/* --- HEADER & NAVIGATION --- */
header {
    display: flex;
    justify-content: space-between; /* Pushes Logo to left, Navbar to right */
    align-items: center;
    padding: 20px 30px; /* Generous breathing room on edges */
    background-color: white;
    border-bottom: 1px solid #ddd;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
}

header .logo {
    margin: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-left: 50px;
}

header .logo img {
    height: 90px;
}

.navbar-desktop {
    margin: 0;
    display: flex;
    align-items: center;
    margin-right: 70px;
}

.navbar-desktop ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    position: relative;
    cursor: pointer;
}

.navbar-desktop ul li {
    margin-left: 100px; /* Reduced from 100px to prevent mid-screen wrapping */
    position: relative;
}

.navbar-desktop ul li a {
    text-decoration: none;
    color: #2e63af;
    font-weight: bold;
    display: block;
    text-align: left;
    padding-bottom: 1px;
    transition: color 0.2s ease;
}

.navbar-desktop ul .active {
    color: #74d0f3;
}

.navbar-desktop ul li a span {
    font-size: 0.85em;
    display: block;
    font-weight: normal;
}

/* Dropdown Content */
.navbar-desktop ul li .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 200px;
    border-radius: 4px;
}

.navbar-desktop ul li .dropdown-content li {
    margin: 0;
}

.navbar-desktop ul li .dropdown-content li a {
    padding: 10px 20px;
    color: #2e63af;
    text-decoration: none;
    display: block;
    font-size: 0.9em;
    font-weight: normal;
}

.navbar-desktop ul li .dropdown-content li a:hover {
    background-color: rgba(116, 208, 243, 0.2);
}

.navbar-desktop ul li:hover:not(.auth-links) > a {
    color: #74d0f3;
}

.navbar-desktop ul li:hover .dropdown-content {
    display: block;
}

/* Auth Links (Login / Register) */
.auth-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.register-link {
    color: #eaa00d !important;
}

.login-link:hover, 
.register-link:hover {
    text-decoration: underline;
}

.login-link:hover {
    color: #74d0f3;
}

/* Mobile Base Elements hidden on desktop */
.burger-menu {
    display: none;
}

.nav-menu-mobile {
    display: none;
}

/* --- FOOTER STRUCTURE --- */
footer {
    background-color: #015397;
    color: #fff;
    padding: 60px 20px 20px 20px;
    font-family: 'Poppins', sans-serif;
}

/* Main Upper Footer Grid */
.footer-nav {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    gap: 80px;
}

.footer-nav > div {
    text-align: left;
    flex: 1;
    max-width: 200px;
}

.footer-nav h3 {
    color: #fff;
    font-size: 1.0em;
    margin-bottom: 15px;
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #74d0f3;
}

/* Horizontal Partition Line */
.horizontal-line {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 30px auto;
    width: 85%;
    max-width: 1200px;
}

/* Lower Footer Info Section */
.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.addresses {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-bottom: 30px;
    width: 100%;
}

.addresses > div {
    text-align: center;
    font-size: 0.9em;
    line-height: 1.6;
}

.addresses h4 {
    font-weight: 550;
    margin: 0 0 8px 0;
    font-size: 1.0em;
}

/* Social Media Channels */
.social-media {
    margin-bottom: 25px;
}

.social-media a {
    cursor: pointer;
    margin: 0 10px;
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.social-media a:hover {
    filter: brightness(1.2);
    transform: translateY(-3px);
}

.social-media img {
    height: 30px;
    width: auto;
}

/* Copyright Info Footer Banner */
.footer-info-copyright {
    font-size: 0.9em;
    margin-top: 10px;
    font-weight: normal;
    align-self: flex-start;
    text-align: center;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1200px) {
    header .logo {
        margin-left: 70px;
    }
    .navbar-desktop ul li {
        margin-left: 25px;
    }
    .footer-nav {
        gap: 40px;
    }
    .addresses {
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .navbar-desktop {
        display: none;
    }
    header {
        padding: 20px; /* Reduced huge desktop spacing down for mobile tracking */
        margin-bottom: 0; /* Removed bottom margin to prevent layout issues with fixed header */
    }
    header .logo {
        margin-left: 20px;
    }
    header .logo img {
        height: 50px; /* Scaled down perfectly to avoid breaking mobile elements */
    }

    .burger-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1100;
        margin-right: 20px; /* Added margin to prevent burger menu from sticking to the edge on mobile */
    }

    .burger-menu span {
        width: 25px;
        height: 3px;
        background-color: #2e63af;
        border-radius: 3px;
        transition: all 0.3s ease; /* Fixed broken layout statement */
    }

    /* Burger Menu Transformations when Open Panels are active */
    .burger-menu.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .burger-menu.open span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

  /* Target Drawer configuration handling visibility toggles */
    .nav-menu-mobile {
        display: block; /* Overrides global hide architecture contextually */
        position: fixed;
        top: 50px; /* FIXED: Explicitly anchors the container right underneath the header line */
        right: 0;
        width: 60%;
        margin-left: auto;
        margin-right: 50px;  
        border-radius: 10px;              
        background-color: #f0f0f1;
        opacity: 0.95;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        max-height: 0; 
        overflow: hidden;
        visibility: hidden; /* Ensures no content peeks out when closed */
        transition: max-height 0.3s ease-in-out;
        z-index: 1050;
    }

    /* Instantly unfolds menu smoothly when open status targets trigger */
    .nav-menu-mobile.open {
        max-height: 500px; 
        visibility: visible; /* Makes the menu content accessible when open */
    }

    .nav-menu-mobile ul {
        list-style: none;
        padding: 0 20px; /* FIXED: Moved top/bottom padding to the individual list items */
        margin: 0;
    }

    .nav-menu-mobile ul li {
        padding: 15px 0; /* Handles interior height spaces beautifully when menu expands */
        border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Softened partition line over red */
    }

    .nav-menu-mobile ul li a {
        text-decoration: none;
        color:  #2e63af; /* Changed color style to pop cleanly against your red test background */
        font-weight: bold;
        display: block;
        font-size: 1em;
    }

    /* Footer Mobile Simplification */
    .footer-nav {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 30px;
        padding: 0 20px;
    }

    .footer-nav > div {
        flex: 1 1 40%;
    }

    .addresses {
        flex-direction: column;
        gap: 30px;
    }
}