/* Patricia Wong, MD. FAAD- Integrative Dermatology */
/* Centralized Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --lavender: #9d8fb7;
    --soft-lilac: #e6dce8;
    --plum: #6b4c6e;
    --deep-aubergine: #4a2c54;
    --champagne: #f8f6f3;
    --soft-gold: #b8a398;
    --charcoal: #2c3e50;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--charcoal);
    line-height: 1.6;
    background-color: white;
}

/* ==================== HEADER & NAVIGATION ==================== */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 20px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--deep-aubergine);
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-bar {
    position: relative;
    flex-shrink: 0;
}

.search-bar input {
    padding: 8px 35px 8px 15px;
    border: 1px solid var(--soft-lilac);
    border-radius: 20px;
    font-size: 0.85rem;
    width: 180px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--lavender);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lavender);
    font-size: 0.9rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--deep-aubergine);
    transition: all 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
    flex: 1;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 10px 16px;
    color: var(--deep-aubergine);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu > li > a:hover {
    color: var(--plum);
    background: var(--soft-lilac);
    border-radius: 5px;
}

/* Hide mobile search on desktop */
.nav-menu > li.mobile-search {
    display: none;
}

/* Mega Menu */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 800px;
    padding: 30px;
    border-top: 3px solid var(--lavender);
    z-index: 999;
}

.mega-menu-title {
    font-family: 'Playfair Display', serif;
    color: var(--plum);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--lavender);
}

.nav-menu > li:hover .mega-menu {
    display: block;
}

.mega-columns {
    display: grid;
    gap: 30px;
}

.mega-columns.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mega-columns.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mega-columns.services-cols {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mega-column h3 {
    font-family: 'Playfair Display', serif;
    color: var(--deep-aubergine);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--lavender);
}

.mega-column ul {
    list-style: none;
}

.mega-column li {
    margin-bottom: 8px;
}

.mega-column a {
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: block;
    padding: 5px 0;
}

.mega-column a:hover {
    color: var(--plum);
    padding-left: 5px;
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--charcoal);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-family: 'Playfair Display', serif;
    color: var(--lavender);
    margin-bottom: 15px;
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--lavender);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ==================== PAGE HEADER (Internal Pages) ==================== */
.page-header {
    background: var(--soft-lilac);
    padding: 30px 20px;
    text-align: center;
}

.page-header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 500;
    margin: 0;
    color: var(--plum);
}

.page-header-divider {
    color: var(--lavender);
    font-size: 1.2rem;
}

/* ==================== SERVICE/CONDITION PAGE HERO ==================== */
.service-hero {
    background: linear-gradient(135deg, var(--soft-lilac) 0%, var(--champagne) 100%);
    padding: 40px 20px;
    text-align: center;
}

.service-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--deep-aubergine);
    margin: 0;
    font-weight: 500;
}

/* ==================== CONTENT SECTIONS ==================== */
.service-content {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.service-section {
    margin-bottom: 50px;
}

/* ==================== DROP CAP (First Paragraph) ==================== */
.service-content > .service-section:first-child > p:first-of-type::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 0.85;
    float: left;
    margin: 8px 12px 0 0;
    color: var(--plum);
}

/* ==================== HEADER ORNAMENTS ==================== */

/* Services Pages - Medical Caduceus ⚕ */
.service-section h2.service-header::before,
.service-section h2.service-header::after {
    content: "⚕";
    color: var(--lavender);
    margin: 0 15px;
    font-size: 1.2rem;
}

.service-section h2.service-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--plum);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--lavender);
    text-align: center;
    position: relative;
}

/* Add elegant center ornament to border */
.service-section h2.service-header::after {
    content: "⚕";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 15px;
    color: var(--lavender);
    font-size: 1.2rem;
    margin: 0;
}

/* Conditions Pages - Sparkle ✧ */
.service-section h2.condition-header::before,
.service-section h2.condition-header::after {
    content: "✧";
    color: var(--lavender);
    margin: 0 15px;
    font-size: 1.2rem;
}

.service-section h2.condition-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--plum);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--lavender);
    text-align: center;
    position: relative;
}

.service-section h2.condition-header::after {
    content: "✧";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 15px;
    color: var(--lavender);
    font-size: 1.2rem;
    margin: 0;
}

/* Top-Level Pages - Fleur-de-lis ⚜ */
.service-section h2.page-header-section::before,
.service-section h2.page-header-section::after {
    content: "⚜";
    color: var(--lavender);
    margin: 0 15px;
    font-size: 1.2rem;
}

.service-section h2.page-header-section {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--plum);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--lavender);
    text-align: center;
    position: relative;
}

.service-section h2.page-header-section::after {
    content: "⚜";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 15px;
    color: var(--lavender);
    font-size: 1.2rem;
    margin: 0;
}

/* ==================== SERVICE PAGE CONTENT STYLING ==================== */
.service-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.service-section ul {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.service-section ul li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--charcoal);
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
}

.service-section ul li:before {
    content: "•";
    color: var(--lavender);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 5px;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: var(--deep-aubergine);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-top: 60px;
}

.cta-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--lavender);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.cta-button:hover {
    background: var(--plum);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 1200px) {
    .mega-menu {
        min-width: 600px;
    }
}

@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .header-content {
        position: relative;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        gap: 0;
        max-height: 75vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        display: flex;
    }

    /* Show mobile search bar */
    .nav-menu > li.mobile-search {
        display: block !important;
        border-bottom: none;
    }

    .nav-menu > li.mobile-search .search-bar {
        padding: 15px 20px;
        background: #f8f8f8;
    }

    .nav-menu > li.mobile-search .search-bar input {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
    }

    /* Top level menu items (Home, About, etc) */
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #e5e5e5;
    }

    .nav-menu > li > a {
        padding: 18px 20px;
        display: block;
        background: white;
        font-weight: 600;
        font-size: 1.05rem;
        color: var(--charcoal);
    }

    /* Mega menus - hidden by default on mobile, expand on click */
    .mega-menu {
        display: none;
        position: relative;
        left: 0;
        transform: none;
        min-width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        background: #f8f8f8;
        max-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Show mega menu when parent li has active class */
    .nav-menu > li.expanded .mega-menu {
        display: block !important;
    }

    /* Style the parent item when expanded */
    .nav-menu > li.expanded > a {
        background: white !important;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Add arrow indicator for expandable items */
    .nav-menu > li > a[href="#services"]::after,
    .nav-menu > li > a[href="#conditions"]::after {
        content: "▾";
        float: right;
        font-size: 1.2rem;
        transition: transform 0.3s;
    }

    .nav-menu > li.expanded > a[href="#services"]::after,
    .nav-menu > li.expanded > a[href="#conditions"]::after {
        transform: rotate(180deg);
    }

    /* Force single column layout */
    .mega-columns {
        display: block !important;
        grid-template-columns: none !important;
        padding: 0;
        gap: 0;
    }

    /* Section headers within mega menu - HIDE THEM */
    .mega-column {
        margin: 0;
        padding: 0;
    }

    .mega-column h3 {
        display: none;
    }

    .mega-column ul {
        padding: 0;
        margin: 0;
    }

    .mega-column ul li {
        margin: 0;
        border-bottom: 1px solid #e5e5e5;
    }

    .mega-column ul li:last-child {
        border-bottom: none;
    }

    .mega-column ul li a {
        font-size: 0.95rem;
        padding: 14px 20px 14px 30px;
        display: block;
        color: #666;
        background: #f8f8f8;
    }

    .mega-column ul li a:hover {
        background: #e8e8e8;
        color: var(--charcoal);
    }

    .logo {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        flex-direction: column;
    }

    .mega-menu {
        position: static;
        transform: none;
        min-width: 100%;
    }

    .mega-columns {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .page-header-divider {
        font-size: 1rem;
        margin: 0 10px;
    }

    .service-hero h1 {
        font-size: 1.8rem;
    }

    .service-section h2.service-header,
    .service-section h2.condition-header,
    .service-section h2.page-header-section {
        font-size: 1.5rem;
    }

    .service-content > .service-section:first-child > p:first-of-type::first-letter {
        font-size: 3rem;
        margin: 5px 10px 0 0;
    }
}
