/*
    CIS 376 - 01 ; Dr. Cumbie
    Jasmine Morgan
    1/29/2026 - 3/9/2026
    Description: Stylesheet for Barbering and Beauty by Kayla Latrell homepage.
*/

/* import fonts */
.alan-sans {
  font-family: "Alan Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.carattere-regular {
  font-family: "Carattere", cursive;
  font-weight: 400;
  font-style: normal;
}


/* GLOBAL STYLES */
body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden;        /* prevent horizontal scroll */
}

/* NAV BAR */ 
#navbar {
    position: fixed;
    top: 0;
    width: 100%;

    background: #8b3ca1; 

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px;
    transition: padding 0.3s ease;
    z-index: 1000;
    box-sizing: border-box;
}

/* making the nav bar more centered */ 
.nav-inner {
    display: flex;
    justify-content: center;   /* centers all children */
    align-items: center;
    gap: 40px;                 /* space between logo and links */
}

/* logo and site name */
.nav-logo {
    font-family: "Alan Sans", system-ui;
    font-size: 28px;
    color: white;

    flex-wrap: wrap;
    justify-content: flex-end;
}

/* nav links list */ 
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

/* individual nav links */
.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 18px;
}

/* cta button */
.nav-links a.cta {
    background-color: white;
    color: black;
    font-weight: bold;

    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #ddd;

    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* cta hover effect */
.nav-links a.cta:hover {
    background-color: #f3f3f3;
    transform: translateY(-1px);
}

/* hover effect for nav links */
.nav-links a:hover {
    text-decoration: underline;
}

/* shrunken nav bar */
#navbar.shrink {
    padding: 8px 40px;
}

/* HEADER */
#welcome-header {
    background: linear-gradient(
        135deg,
        #cc71d7 0%,
        #b565d9 50%,
        #9d4edd 100%
    );

    color: white;
    text-align: center;
    font-family: "Alan Sans", system-ui, sans-serif;
    text-shadow:
        2px 2px 3px #624267,
        -2px 2px 3px #624267,
        2px -2px 3px #624267,
        -2px -2px 3px #624267;

    font-size: 30px;
    padding: 15px 10px;
    margin-top: 80px;
}

/* text below welcome message */
#slogan {
    font-family: "Carattere", system-ui, sans-serif;
    font-size: 40px;
    text-align: center;
    color: #ffffff;
}

/* content sections */
.content-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.content-section img {
    width: 100%;
    border-radius: 8px;
    margin-top: 15px;
}

/* search bar styles */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    margin-right: 15px;
}

#site-search {
    border: none;
    background: transparent;
    color: white;
    outline: none;
    padding: 5px;
}

#site-search::placeholder {
    color: #eee;
}

.search-container button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

/* background overlay */
.modal {
    display: none; /* hidden */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

/* white box */
.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

#login-form input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* make sure login/signup look the same */
#signup-form input, #login-form input {
    width: 90%;
    padding: 10px;
    margin: 8px 0; 
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

#signup-section h2, #login-section h2 {
    margin-top: 0;
    color: #8b3ca1; 
}

/* toggle link style */
.modal-content p a {
    color: #8b3ca1;
    font-weight: bold;
    text-decoration: none;
}

.modal-content p a:hover {
    text-decoration: underline;
}

/* service card grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.service-card {
    background: #fdfdfd;
    border-left: 5px solid #8b3ca1;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.service-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}

.service-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* group container */
.services-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category-group h3 {
    border-bottom: 2px solid #8b3ca1;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #8b3ca1;
}

.service-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-card[open] {
    border-color: #8b3ca1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* service card header */
.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding: 5px;
}

/* dropdown details */
.service-details {
    padding: 15px;
    border-top: 1px solid #eee;
    margin-top: 10px;
    color: #555;
}

/* iamge debug fix */
.service-details img {
    width: 100%;
    max-width: 300px; 
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
    display: block; 
}

/* remove default arrow */
summary::-webkit-details-marker {
    display: none;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    #navbar {
        padding: 10px 20px;
    }

    .search-container {
        margin-right: 0;
        flex-grow: 1; /* search takes up middle space on mobile */
        max-width: 150px;
    }

    /* hide the links by default on mobile */
    .nav-links {
        position: absolute;
        top: 100%; /* sits right below the nav */
        left: 0;
        width: 100%;
        background: #8b3ca1;
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0; /* hidden */
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    /* show links when 'active' class is added via JS */
    .nav-links.active {
        max-height: 300px; 
        padding-bottom: 20px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    /* hamburger style :> */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        order: 3; /* puts it at the very right */
    }

    .bar {
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 3px 0;
        transition: 0.4s;
    }
}

/* toggle is hidden on desktop */
@media (min-min-width: 769px) {
    .menu-toggle { display: none; }
}

#no-results h3 {
    color: #8b3ca1;
    font-family: "Alan Sans", sans-serif;
}