/* ========================================
   RESPONSIVE HEADER FOR SMILEBETTER.IN
   Navigation Menu System
   ======================================== */

/* ========================================
   1. BASE HEADER STYLES - ENHANCED
   ======================================== */

.header-section {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fff;
    transition: all 0.3s ease;
}

.header-section.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-area {
    padding: 0;
    transition: all 0.3s ease;
}

.dope-nav-container {
    background: #0077b6;
    position: relative;
}

/* Logo Responsive Sizing */
.nav-brand img {
    max-width: 220px;
    height: auto;
    transition: all 0.3s ease;
}

/* ========================================
   2. NAVIGATION MENU STYLES
   ======================================== */

.dope-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    position: relative;
    background:#0077b6;
}

.dope-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    color:#fff;
}

.dopenav ul {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
    color:#fff;
}

.dopenav ul li {
    position: relative;
}

.dopenav ul li a {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 10px 15px;
    transition: all 0.3s ease;
    display: block;
}

.dopenav ul li a:hover {
    color: #00a8e8;
}

/* Submenu Styles */
.dopenav ul li .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #0077b6;;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 15px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dopenav ul li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dopenav ul li .sub-menu li {
    display: block;
}

.dopenav ul li .sub-menu li a {
    padding: 10px 20px;
    font-size: 15px;
}

/* Menu Button */
.menu-btn {
    background: linear-gradient(135deg, #00a8e8, #0077b6);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,168,232,0.3);
    display: inline-block;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,168,232,0.4);
    color: #fff;
}

/* ========================================
   3. MOBILE MENU TOGGLE BUTTON
   ======================================== */

.dope-navbar-toggler {
    display: none;
    cursor: pointer;
    z-index: 10000;
}

.navbarToggler {
    display: block;
    width: 30px;
    height: 22px;
    position: relative;
}

.navbarToggler span {
    display: block;
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s ease;
}

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

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

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

/* Active State for Hamburger */
.navbarToggler.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

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

.navbarToggler.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ========================================
   4. MOBILE MENU CLOSE BUTTON
   ======================================== */

.dopecloseIcon {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 10001;
}

.cross-wrap {
    width: 30px;
    height: 30px;
    position: relative;
}

.cross-wrap span {
    display: block;
    width: 100%;
    height: 3px;
    background: #333;
    position: absolute;
    top: 50%;
    left: 0;
}

.cross-wrap .top {
    transform: translateY(-50%) rotate(45deg);
}

.cross-wrap .bottom {
    transform: translateY(-50%) rotate(-45deg);
}

/* ========================================
   5. OVERLAY FOR MOBILE MENU
   ======================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   6. RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablets and Below - 991px */
@media (max-width: 991px) {
    
    /* Show Mobile Toggle */
    .dope-navbar-toggler {
        display: block;
    }
    
    /* Logo Adjustment */
    .nav-brand img {
        max-width: 180px;
    }
    
    .dope-navbar {
        padding: 12px 0;
    }
    
    /* Mobile Menu Container */
    .dope-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85%;
        height: 100vh;
        background: #fff;
        color:#000;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        overflow-y: auto;
        transition: right 0.4s ease;
        z-index: 9999;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }
    
    .dope-menu.active {
        right: 0;
    }
    
    /* Show Close Button in Mobile */
    .dopecloseIcon {
        display: block;
    }
    
    /* Navigation Vertical Layout */
    .dopenav {
        width: 100%;
    }
    
    .dopenav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }
    
    .dopenav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .dopenav ul li a {
        padding: 15px 0;
        width: 100%;
        font-size: 16px;
    }
    
    /* Mobile Submenu */
    .dopenav ul li .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        border-radius: 0;
        padding: 0;
        margin-top: 10px;
        margin-bottom: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dopenav ul li.submenu-open .sub-menu {
        max-height: 500px;
    }
    
    .dopenav ul li .sub-menu li {
        border-bottom: none;
    }
    
    .dopenav ul li .sub-menu li a {
        padding: 12px 20px;
        font-size: 15px;
        color: #666;
    }
    
    /* Add Arrow for Submenu Items */
    .dopenav ul li:has(.sub-menu) > a::after {
        content: '\203A';
        position: absolute;
        right: 0;
        font-size: 24px;
        transition: transform 0.3s ease;
    }
    
    .dopenav ul li.submenu-open > a::after {
        transform: rotate(90deg);
    }
    
    /* Menu Button Full Width on Mobile */
    .menu-btn {
        width: 100%;
        text-align: center;
        margin-top: 20px;
        padding: 14px 30px;
    }
}

/* Mobile Devices - 768px */
@media (max-width: 768px) {
    
    .nav-brand img {
        max-width: 160px;
    }
    
    .dope-navbar {
        padding: 10px 0;
    }
    
    .dope-menu {
        width: 300px;
        padding: 70px 25px 25px;
        color:#000;
    }
    
    .dopenav ul li a {
        font-size: 15px;
        padding: 12px 0;
    }
}

/* Small Mobile - 576px */
@media (max-width: 576px) {
    
    .nav-brand img {
        max-width: 140px;
    }
    
    .dope-navbar {
        padding: 8px 0;
         color:#000;
    }
    
    .dope-menu {
        width: 280px;
         color:#000;
    }
    
    .navbarToggler {
        width: 28px;
        height: 20px;
    }
    
    .navbarToggler span {
        height: 2.5px;
    }
}

/* Extra Small Mobile - 400px */
@media (max-width: 400px) {
    
    .nav-brand img {
        max-width: 120px;
    }
    
    .dope-menu {
        width: 260px;
        padding: 60px 20px 20px;
         color:#000;
         
    }
    
    .dopenav ul li a {
        font-size: 14px;
    }
    
    .menu-btn {
        font-size: 14px;
        padding: 12px 25px;
    }
}

/* ========================================
   7. ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus States */
.dopenav ul li a:focus,
.menu-btn:focus,
.dope-navbar-toggler:focus {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 10px;
    background: #00a8e8;
    color: #fff;
    text-decoration: none;
}

.skip-to-content:focus {
    left: 0;
    top: 0;
}

/* ========================================
   8. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration */
.dope-menu,
.dopenav ul li .sub-menu,
.overlay,
.navbarToggler span {
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   9. PRINT STYLES
   ======================================== */

@media print {
    .header-section {
        position: static;
    }
    
    .dope-navbar-toggler,
    .dopecloseIcon,
    .overlay {
        display: none !important;
    }
    
    .dope-menu {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
    }
}

/* ========================================
   10. DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .header-section {
        background: #1a1a1a;
    }
    
    .dope-menu {
        background: #1a1a1a;
    }
    
    .dopenav ul li a {
        color: #f0f0f0;
    }
    
    .navbarToggler span,
    .cross-wrap span {
        background: #f0f0f0;
    }
}
