/* ===== UNIFIED FANCY NAVIGATION - MOBILE FIRST ===== */

/* Reset for navigation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent ALL overflow */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
}

/* ===== MOBILE FIRST BASE STYLES ===== */

.fancy-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    box-shadow: 0 4px 20px rgba(0, 37, 131, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fancy-nav.scrolled {
    box-shadow: 0 8px 30px rgba(0, 37, 131, 0.12);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.fancy-nav.hidden {
    transform: translateY(-100%);
}

/* Announcement Bar - Mobile */
.fancy-announcement {
    background: linear-gradient(90deg, #FFF8E7 0%, #FFE5B4 100%);
    color: #333333;
    padding: 8px 16px;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 193, 7, 0.2);
}

/* Nav Container - Mobile */
.fancy-nav-container {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    height: 56px; /* Fixed height mobile */
}

/* Logo - Mobile */
.fancy-logo {
    font-size: 20px;
    font-weight: 800;
    color: #002583;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: transform 0.3s ease;
}

.fancy-logo:hover {
    transform: scale(1.05);
}

.fancy-logo-accent {
    color: #10b14b;
    font-weight: 900;
}

/* Desktop Menu - Hidden on Mobile */
.fancy-desktop-menu {
    display: none;
}

/* CTA Button - Hidden on Mobile */
.fancy-cta-desktop {
    display: none;
}

/* Mobile Menu Button */
.fancy-mobile-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b14b 0%, #0e9940 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(16, 177, 75, 0.3);
    transition: all 0.3s ease;
}

.fancy-mobile-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(16, 177, 75, 0.3);
}

.fancy-burger {
    width: 22px;
    height: 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.fancy-burger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fancy-burger span:nth-child(1) {
    top: 0;
}

.fancy-burger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.fancy-burger span:nth-child(3) {
    bottom: 0;
}

/* Active state burger animation */
.fancy-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.fancy-burger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

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

/* Mobile Menu Overlay */
.fancy-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 37, 131, 0.4);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.fancy-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Panel */
.fancy-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(90%, 380px);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    box-shadow: -10px 0 40px rgba(0, 37, 131, 0.2);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    overflow-y: auto;
    overflow-x: hidden;
}

.fancy-mobile-menu.active {
    right: 0;
}

.fancy-mobile-menu-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #002583 0%, #001a5c 100%);
}

.fancy-mobile-menu-title {
    color: white;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.fancy-mobile-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fancy-mobile-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}

.fancy-mobile-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 3;
}

.fancy-mobile-nav {
    padding: 20px;
}

.fancy-mobile-link {
    display: block;
    padding: 16px 20px;
    margin: 8px 0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fancy-mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #10b14b 0%, #0e9940 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.fancy-mobile-link:active {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(16, 177, 75, 0.2);
}

.fancy-mobile-link:active::before {
    transform: scaleY(1);
}

.fancy-mobile-services {
    margin: 16px 0;
}

.fancy-mobile-services-title {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 8px 20px;
}

.fancy-mobile-sublink {
    display: block;
    padding: 12px 20px 12px 40px;
    margin: 4px 0;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.fancy-mobile-sublink::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.fancy-mobile-sublink.whitening::before {
    background: #A0DFFF;
}

.fancy-mobile-sublink.aligners::before {
    background: #C8FF83;
}

.fancy-mobile-sublink.veneers::before {
    background: #E88DFF;
}

.fancy-mobile-sublink.skin::before {
    background: #FFA57F;
}

.fancy-mobile-sublink:active {
    transform: translateX(4px);
}

.fancy-mobile-sublink.whitening:active {
    background: rgba(160, 223, 255, 0.2);
    color: #002583;
}

.fancy-mobile-sublink.aligners:active {
    background: rgba(200, 255, 131, 0.2);
    color: #166E00;
}

.fancy-mobile-sublink.veneers:active {
    background: rgba(232, 141, 255, 0.2);
    color: #6E0055;
}

.fancy-mobile-sublink.skin:active {
    background: rgba(255, 165, 127, 0.2);
    color: #6E1B00;
}

.fancy-mobile-cta {
    display: block;
    margin: 24px 0;
    padding: 16px;
    background: linear-gradient(135deg, #10b14b 0%, #0e9940 100%);
    color: white;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(16, 177, 75, 0.3);
    transition: all 0.3s ease;
}

.fancy-mobile-cta:active {
    transform: scale(0.98);
    box-shadow: 0 2px 15px rgba(16, 177, 75, 0.3);
}

/* ===== TABLET STYLES (768px+) ===== */
@media (min-width: 768px) {
    .fancy-announcement {
        font-size: 12px;
        padding: 10px 20px;
    }

    .fancy-nav-container {
        padding: 14px 24px;
        height: 60px; /* Fixed height tablet */
    }

    .fancy-logo {
        font-size: 22px;
    }
}

/* ===== DESKTOP STYLES (1024px+) ===== */
@media (min-width: 1024px) {
    .fancy-nav-container {
        max-width: 1280px;
        margin: 0 auto;
        padding: 16px 32px;
        height: 64px; /* Fixed height desktop */
    }

    .fancy-logo {
        font-size: 24px;
    }

    /* Show desktop menu */
    .fancy-desktop-menu {
        display: flex;
        align-items: center;
        gap: 32px;
        flex-grow: 1;
        justify-content: center;
    }

    .fancy-nav-link {
        color: #555;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        position: relative;
        transition: color 0.3s ease;
        padding: 8px 0;
    }

    .fancy-nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #10b14b 0%, #0e9940 100%);
        transition: width 0.3s ease;
    }

    .fancy-nav-link:hover {
        color: #002583;
    }

    .fancy-nav-link:hover::after {
        width: 100%;
    }

    /* Services dropdown */
    .fancy-dropdown {
        position: relative;
    }

    .fancy-dropdown-trigger {
        display: flex;
        align-items: center;
        gap: 4px;
        color: #555;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        padding: 8px 0;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .fancy-dropdown-trigger:hover {
        color: #002583;
    }

    .fancy-dropdown-trigger svg {
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease;
    }

    .fancy-dropdown:hover .fancy-dropdown-trigger svg {
        transform: rotate(180deg);
    }

    .fancy-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        margin-top: 8px;
        min-width: 280px;
        background: white;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 37, 131, 0.15);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .fancy-dropdown:hover .fancy-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .fancy-dropdown-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        color: #555;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        transition: all 0.3s ease;
        position: relative;
    }

    .fancy-dropdown-link::before {
        content: '';
        width: 10px;
        height: 10px;
        border-radius: 50%;
        transition: transform 0.3s ease;
    }

    .fancy-dropdown-link.whitening::before {
        background: #A0DFFF;
    }

    .fancy-dropdown-link.aligners::before {
        background: #C8FF83;
    }

    .fancy-dropdown-link.veneers::before {
        background: #E88DFF;
    }

    .fancy-dropdown-link.skin::before {
        background: #FFA57F;
    }

    .fancy-dropdown-link:hover {
        padding-left: 28px;
    }

    .fancy-dropdown-link:hover::before {
        transform: scale(1.3);
    }

    .fancy-dropdown-link.whitening:hover {
        background: linear-gradient(90deg, rgba(160, 223, 255, 0.2) 0%, transparent 100%);
        color: #002583;
    }

    .fancy-dropdown-link.aligners:hover {
        background: linear-gradient(90deg, rgba(200, 255, 131, 0.2) 0%, transparent 100%);
        color: #166E00;
    }

    .fancy-dropdown-link.veneers:hover {
        background: linear-gradient(90deg, rgba(232, 141, 255, 0.2) 0%, transparent 100%);
        color: #6E0055;
    }

    .fancy-dropdown-link.skin:hover {
        background: linear-gradient(90deg, rgba(255, 165, 127, 0.2) 0%, transparent 100%);
        color: #6E1B00;
    }

    /* Show CTA button */
    .fancy-cta-desktop {
        display: block;
        padding: 12px 28px;
        background: linear-gradient(135deg, #10b14b 0%, #0e9940 100%);
        color: white;
        font-weight: 700;
        font-size: 14px;
        text-decoration: none;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(16, 177, 75, 0.3);
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .fancy-cta-desktop:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(16, 177, 75, 0.4);
    }

    /* Hide mobile button on desktop */
    .fancy-mobile-btn {
        display: none;
    }
}

/* Page content spacing */
.page-content {
    padding-top: 88px; /* Mobile: announcement (28px) + nav (60px) */
}

@media (min-width: 768px) {
    .page-content {
        padding-top: 92px; /* Tablet: announcement (32px) + nav (60px) */
    }
}

@media (min-width: 1024px) {
    .page-content {
        padding-top: 96px; /* Desktop: announcement (32px) + nav (64px) */
    }
}