/* =============================================================================
   MODERN MOBILE NAVIGATION SYSTEM
   ============================================================================= */

/* Modern Mobile Navigation Bottom Bar */
.modern-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-logo {
    height: 40px;
    width: auto;
    max-width: calc(100vw - 120px);
    object-fit: contain;
}

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.nav-toggle:hover {
    transform: scale(1.1);
}

/* Hamburger SVG Icon */
.hamburger-icon {
    width: 24px;
    height: 24px;
}

.hamburger-icon rect {
    fill: #333;
    transition: all 0.3s ease;
}

/* Cross SVG Icon */
.close-icon {
    width: 24px;
    height: 24px;
}

.close-icon line {
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: square;
    transition: all 0.3s ease;
}

/* Modern Full Screen Overlay */
.mobile-overlay.modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

.mobile-overlay.modern.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Overlay Header */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.overlay-logo {
    height: 40px;
    width: auto;
}

.overlay-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.overlay-close:hover {
    transform: scale(1.1);
}

/* Overlay Menu */
.overlay-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    max-width: 100%;
    overflow-y: auto;
}

/* Menu Categories - Hidden by default */
.menu-category {
    margin-bottom: 8px;
    width: 100%;
    max-width: 400px;
}

.menu-category-title {
    display: none; /* Hide category titles for cleaner look */
}

.menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

/* Main Menu Links */
.menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 20px;
    transition: all 0.3s ease;
    font-family: 'Nunito Sans', sans-serif;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease forwards;
    position: relative;
    margin-bottom: 5px;
}

.menu-link:hover {
    color: #910000;
    text-decoration: none;
    transform: scale(1.05);
}

/* Menu items with submenu */
.menu-item {
    position: relative;
    margin-bottom: 5px;
}

.menu-item.has-submenu .menu-link:after {
    content: '▼';
    font-size: 16px;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: #910000;
}

.menu-item.has-submenu.open .menu-link:after {
    transform: rotate(180deg);
}

/* Submenu Container */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(145, 0, 0, 0.05);
    border-radius: 8px;
    margin-top: 5px;
}

.submenu.open {
    max-height: 500px;
}

/* Submenu Links */
.submenu-link {
    display: block;
    font-size: 20px;
    font-weight: 500;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.submenu-link:hover {
    color: #910000;
    background: rgba(145, 0, 0, 0.1);
    border-left-color: #910000;
    text-decoration: none;
    padding-left: 25px;
}

/* Animation delays for staggered effect */
.menu-item:nth-child(1) .menu-link {
    animation-delay: 0.1s;
}

.menu-item:nth-child(2) .menu-link {
    animation-delay: 0.2s;
}

.menu-item:nth-child(3) .menu-link {
    animation-delay: 0.3s;
}

.menu-item:nth-child(4) .menu-link {
    animation-delay: 0.4s;
}

.menu-item:nth-child(5) .menu-link {
    animation-delay: 0.5s;
}

.menu-item:nth-child(6) .menu-link {
    animation-delay: 0.6s;
}

.menu-item:nth-child(7) .menu-link {
    animation-delay: 0.7s;
}

.menu-item:nth-child(8) .menu-link {
    animation-delay: 0.8s;
}

/* Keyframes */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overlay Footer */
.overlay-footer {
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.cta-button {
    display: inline-block;
    background: #910000;
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #910000;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease 0.6s forwards;
}

.cta-button:hover {
    background: transparent;
    color: #910000;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(145, 0, 0, 0.3);
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   MOBILE NAVIGATION RESPONSIVE RULES
   ============================================================================= */

/* Show modern mobile nav on tablet and mobile */
@media (max-width: 991px) {
    .modern-mobile-nav {
        display: flex;
    }
    
    /* Add bottom padding for fixed navbar */
    body {
        padding-bottom: 70px !important;
        overflow-x: hidden !important; /* Prevent horizontal overflow */
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Prevent any container overflow */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Hide desktop navigation */
    .main-nav {
        display: none !important;
    }
    
    /* Header adjustments */
    .header-bottom,
    .header-divider {
        display: none;
    }
}

/* Additional mobile-specific fixes */
@media (max-width: 768px) {
    .modern-mobile-nav {
        padding: 0 15px; /* Reduce padding on small screens */
    }
    
    .nav-logo {
        height: 35px; /* Smaller logo on mobile */
    }
    
    .overlay-logo {
        height: 35px; /* Smaller overlay logo */
    }
    
    .overlay-menu {
        padding: 15px;
    }

    .menu-category {
        margin-bottom: 6px;
        max-width: 350px;
    }

    .menu-link {
        font-size: 28px;
        padding: 15px;
    }

    .submenu-link {
        font-size: 18px;
        padding: 10px 18px;
    }
}

@media (max-width: 576px) {
    .modern-mobile-nav {
        padding: 0 5px; /* Minimal padding */
        height: 60px; /* Shorter nav bar */
        width: 100vw;
        max-width: 100vw;
    }
    
    .nav-content {
        padding: 0 5px;
        gap: 10px;
    }
    
    .nav-logo {
        height: 30px;
        max-width: calc(100vw - 80px); /* Leave space for button */
    }
    
    .nav-toggle {
        padding: 5px;
        min-width: 40px;
        justify-content: center;
    }
    
    .hamburger-icon, .close-icon {
        width: 20px;
        height: 20px;
    }
    
    .overlay-logo {
        height: 30px;
        max-width: calc(100vw - 80px);
    }
    
    .overlay-menu {
        padding: 10px;
    }

    .menu-category {
        margin-bottom: 4px;
        max-width: 300px;
    }

    .menu-link {
        font-size: 24px;
        padding: 12px;
    }

    .submenu-link {
        font-size: 16px;
        padding: 8px 15px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    /* Update body padding for shorter nav */
    body {
        padding-bottom: 60px !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
} 