/* CSS Reset - Remove default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global styles */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
    overflow-x: hidden; /* prevent horizontal scroll */
    width: 100%;
}

/* Container for proper spacing */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main content spacing to account for fixed header */
main, section:first-of-type:not(.page-hero) {
    padding-top: 80px; /* Adjust based on your header height */
}

/* Don't add extra padding to page-hero sections as they have their own padding */

/* Global Header Styles */
header {
    background: #fff;
    box-shadow: 0 15px 40px -20px rgba(40, 44, 63, .15);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 998;
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 8%;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    min-height: 70px;
}

nav .logo {
    display: flex;
    align-items: center;
    z-index: 999;
    flex: 0 0 auto; /* Don't grow or shrink */
    max-width: 200px; /* Prevent logo from taking too much space */
    height: 100%;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

nav .logo a {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none;
}

nav .logo img {
    height: 55px !important;
    width: auto;
    transition: none;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

nav .logo img:hover,
nav .logo img:focus,
nav .logo img:active {
    transform: none !important;
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure logo images are never rounded */
.logo img,
.mobile-logo,
nav .logo img,
.mobile-menu-header img {
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Force logo container to have no styling at all times */
nav .logo,
nav .logo *,
nav .logo a,
nav .logo a *,
nav .logo img {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Override any focus, hover, active states */
nav .logo:focus,
nav .logo:hover,
nav .logo:active,
nav .logo a:focus,
nav .logo a:hover,
nav .logo a:active,
nav .logo img:focus,
nav .logo img:hover,
nav .logo img:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Desktop Navigation - Default visible */
.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex: 1; /* Take up remaining space */
    margin: 0;
    height: 100%;
}

.desktop-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.desktop-nav a:hover {
    color: #FFCE19;
}

.desktop-nav a i {
    font-size: 1.1rem;
}

/* Mobile Menu Elements - Default hidden */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 999;
    transition: all 0.3s ease;
    flex: 0 0 auto; /* Don't grow or shrink */
    margin-left: auto; /* Push to the right */
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
    position: relative;
}

/* Hide hamburger when menu is open */
.mobile-menu-toggle.active {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}

.mobile-menu-overlay.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    z-index: 1500;
}

.mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 80px;
    z-index: 2050;
}

.mobile-logo {
    height: 50px;
    width: auto;
    max-width: 80%;
    object-fit: contain;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    margin-right: 40px; /* Make space for the close button */
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 2100; /* Ensure it's above other elements */
}

.mobile-menu-close:hover {
    color: #FFCE19;
    background-color: rgba(0, 0, 0, 0.05);
}

.mobile-nav-links {
    padding: 1.5rem 0;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-links a i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.mobile-nav-links a:hover {
    background-color: #f8f9fa;
    color: #FFCE19;
    padding-left: 2.5rem;
}

.mobile-nav-links a i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Header CSS Reset - Prevent conflicts */
header *, header *::before, header *::after {
    box-sizing: border-box;
}

header .desktop-nav,
header .mobile-menu-toggle,
header .mobile-menu,
header .mobile-menu-overlay {
    transition: all 0.3s ease;
}

/* Prevent logo styling changes when mobile menu is active */
body .mobile-menu.active ~ header nav .logo,
body .mobile-menu.active ~ header nav .logo a,
body .mobile-menu.active ~ header nav .logo img,
body .mobile-menu.overlay.active ~ header nav .logo,
body .mobile-menu.overlay.active ~ header nav .logo a,
body .mobile-menu.overlay.active ~ header nav .logo img,
.mobile-menu.active ~ nav .logo,
.mobile-menu.active ~ nav .logo a,
.mobile-menu.active ~ nav .logo img,
.mobile-menu-overlay.active ~ nav .logo,
.mobile-menu-overlay.active ~ nav .logo a,
.mobile-menu-overlay.active ~ nav .logo img {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Force header to be solid white when mobile menu is active */
body.mobile-menu-open header,
body.mobile-menu-open header nav,
body.mobile-menu-open nav {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}

/* Ensure mobile menu toggle button area is also white when menu is open */
body.mobile-menu-open .mobile-menu-toggle {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Force white background on the entire header container when mobile menu is open */
body.mobile-menu-open header::before,
body.mobile-menu-open header::after {
    display: none !important;
}

body.mobile-menu-open header {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}

/* Additional specificity to ensure header nav area is white */
body.mobile-menu-open nav,
body.mobile-menu-open header nav {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Additional override for when mobile menu toggle is active */
.mobile-menu-toggle.active ~ .mobile-menu-overlay ~ nav .logo,
.mobile-menu-toggle.active ~ .mobile-menu-overlay ~ nav .logo a,
.mobile-menu-toggle.active ~ .mobile-menu-overlay ~ nav .logo img {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Ensure header has white background when mobile menu is active */
.mobile-menu.active ~ header,
.mobile-menu-overlay.active ~ header,
body:has(.mobile-menu.active) header {
    background: #fff !important;
    background-color: #fff !important;
}

/* Ensure nav also has white background when mobile menu is active */
.mobile-menu.active ~ header nav,
.mobile-menu-overlay.active ~ header nav,
body:has(.mobile-menu.active) header nav {
    background: #fff !important;
    background-color: #fff !important;
}

/* Make sure logo area specifically has white background */
.mobile-menu.active ~ header .logo,
.mobile-menu-overlay.active ~ header .logo,
body:has(.mobile-menu.active) header .logo,
.mobile-menu.active ~ header .logo-wrapper,
.mobile-menu-overlay.active ~ header .logo-wrapper,
body:has(.mobile-menu.active) header .logo-wrapper {
    background: #fff !important;
    background-color: #fff !important;
}

/* Proper z-index stacking for mobile menu overlay */
.mobile-menu-overlay.active {
    z-index: 1500;
}

body:has(.mobile-menu.active) header,
.mobile-menu.active ~ header {
    z-index: 997;
}

body:has(.mobile-menu-overlay.active) header,
.mobile-menu-overlay.active ~ header {
    z-index: 997;
}

/* Ensure all mobile menu components have higher z-index when active */
.mobile-menu.active {
    z-index: 2000;
}

.mobile-menu.active .mobile-menu-header {
    z-index: 2050;
}

/* Override the header and logo z-index when mobile menu is active */
@media screen and (max-width: 768px) {
    .mobile-menu-overlay.active ~ header .logo,
    body:has(.mobile-menu-overlay.active) header .logo {
        z-index: 997;
    }
}

/* Force correct display states */
@media screen and (max-width: 768px) {
    /* Ensure mobile layout structure */
    nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Logo positioned left */
    nav .logo {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        order: 1 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    nav .logo img {
        display: block !important;
        height: 50px !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        object-fit: contain !important;
        border-radius: 0 !important;
        border: none !important;
        outline: none !important;
    }
    
    /* Desktop nav hidden */
    header .desktop-nav {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        order: 2 !important;
    }
    
    /* Hamburger positioned right */
    header .mobile-menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        order: 3 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 0.5rem !important;
        height: auto !important;
        background: none !important;
        border: none !important;
    }
}

/* Additional mobile alignment fixes */
@media screen and (max-width: 768px) {
    /* Ensure both elements are on same line */
    header {
        min-height: 70px !important;
    }
    
    nav {
        min-height: 60px !important;
        line-height: 1 !important;
    }
    
    nav .logo,
    .mobile-menu-toggle {
        align-self: center !important;
        flex-shrink: 0 !important;
    }
    
    /* Make sure hamburger lines are centered */
    .mobile-menu-toggle {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hamburger-line {
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        margin: 2px 0 !important;
    }
}

@media screen and (min-width: 769px) {
    header .mobile-menu-toggle,
    header .mobile-menu,
    header .mobile-menu-overlay {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    header .desktop-nav {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* ==============================================
   RESPONSIVE HEADER MEDIA QUERIES
   ============================================== */

/* Mobile styles: Hide desktop nav, show mobile elements */
@media screen and (max-width: 768px) {
    /* Ensure proper mobile layout */
    nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        height: auto !important;
        min-height: 60px !important;
        padding: 0.7rem 5% !important;
    }
    
    /* Logo on the left */
    nav .logo {
        display: flex !important;
        align-items: center !important;
        order: 1 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        height: 100% !important;
    }
    
    /* Hide desktop navigation */
    .desktop-nav {
        display: none !important;
        order: 2;
    }
    
    /* Hamburger menu on the right */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 3 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        padding: 0.5rem !important;
        height: 100% !important;
    }
    
    /* Enable mobile menu elements */
    .mobile-menu-overlay {
        display: block !important;
    }
    
    .mobile-menu {
        display: block !important;
    }
    
    /* Smaller logo on mobile */
    nav .logo img {
        height: 50px !important;
        vertical-align: middle !important;
    }
    
    /* Adjust main content padding */
    main, section:first-of-type:not(.page-hero) {
        padding-top: 80px;
    }
}

/* Smaller mobile devices */
@media screen and (max-width: 576px) {
    nav {
        padding: 0.7rem 3%;
    }
    
    nav .logo img {
        height: 45px;
    }
    
    .mobile-menu {
        width: 280px;
        right: -280px;
    }
    
    .mobile-nav-links a {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .mobile-nav-links a:hover {
        padding-left: 1.7rem;
    }
}

/* Very small devices */
@media screen and (max-width: 480px) {
    nav {
        padding: 0.7rem 2%;
    }
    
    nav .logo img {
        height: 40px;
    }
    
    .mobile-menu {
        width: 260px;
        right: -260px;
    }
    
    .hamburger-line {
        width: 22px;
        height: 2px;
    }
}

/* Desktop styles: Show desktop nav, hide mobile elements */
@media screen and (min-width: 769px) {
    /* Ensure desktop navigation is visible */
    .desktop-nav {
        display: flex !important;
    }
    
    /* Hide all mobile elements */
    .mobile-menu-toggle,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Enhanced Footer Styles */
footer {
    background: #333333;
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-column h3 {
    color: #FFCA16;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

/* Simple footer navigation */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-nav a:active {
    color: #FFCA16;
}

/* Mobile styles */
@media (max-width: 768px) {
    .footer-nav a {
        padding: 12px 15px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .footer-nav a:hover,
    .footer-nav a:active {
        background: rgba(255, 255, 255, 0.2);
        color: #FFCA16;
    }
}

/* Social links */
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
}

.footer-social a:hover {
    background: #FFCA16;
    color: #333;
}

/* Contact info */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 0;
}

.footer-contact-item i {
    color: #FFCA16;
}

/* Mobile styles for contact info */
@media (max-width: 768px) {
    .footer-contact-item {
        padding: 12px 15px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }

    .footer-contact-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* Super simple footer styles */
/* Mobile-first approach for footer links */
.footer-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin: 0 auto;
}

.footer-link {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    margin: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(255, 202, 22, 0.3);
}

.footer-link:active,
.footer-link:focus {
    background: rgba(255, 202, 22, 0.2);
    outline: none;
}

/* Desktop styles */
@media (min-width: 769px) {
    .footer-link {
        min-height: unset;
        padding: 8px 0;
        justify-content: flex-start;
        background: none;
        border-radius: 0;
        transition: color 0.3s ease;
    }

    .footer-link:hover {
        background: none;
        color: #FFCA16;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .footer-column {
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .footer-links {
        padding: 10px 0;
    }
}

/* Override any interference with footer links */
footer {
    position: relative;
    z-index: 1;
}

.footer-links a,
.footer-link {
    position: relative;
    z-index: 2;
    cursor: pointer !important;
    pointer-events: auto !important;
}

@media screen and (max-width: 768px) {
    /* Ensure hamburger is hidden when menu is open */
    .mobile-menu-toggle.active {
        display: none !important;
    }
}

/* Ensure mobile logo has transparent background */
.mobile-menu-header img,
.mobile-menu-header .mobile-logo {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    opacity: 1 !important;
}

.mobile-menu-header {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}

/* Override any other styles that might affect the mobile logo */
.mobile-menu .mobile-menu-header img,
.mobile-menu .mobile-logo {
    background-color: transparent !important;
    background: transparent !important;
}

/* Specifically target the logo image to prevent yellow background */
img.mobile-logo {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Fix for mobile menu logo yellow background */
.mobile-menu-header img[src*="grubzo"] {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-background: none !important;
    -webkit-background-color: transparent !important;
    display: inline-block !important;
}

/* Ensure no background appears in any image in the mobile header */
.mobile-menu-header * {
    background: transparent !important;
}

/* Ensure white background for header but transparent for the logo */
.mobile-menu-header {
    background-color: #ffffff !important;
}

/* Override any potential conflicts from other CSS rules */
img.mobile-logo[src*="grubzo"] {
    background-color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-background: none !important;
    -webkit-background-color: transparent !important;
}
