/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Header Container ===== */
header {
    background: linear-gradient(90deg, #7096D180, #D0E3FF80);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.container {    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 50px;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap; /* Keep logo text in one line */
    margin-right: auto; /* Push navigation items to the right */
    flex-wrap: nowrap; /* prevent wrapping of logo and text */
}

.logo {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 0 10px #7096D180);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.big-shoulders {
    font-family: "Big Shoulders", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
  }

/* Logo text styling using Big Shoulders font */
.logo-text {
    font-family: "Big Shoulders", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.5px;
    font-size: 2rem;
    line-height: 1;
    white-space: nowrap;
    display: inline-block;
    color: #081f5C;
}

@media (min-width: 768px) {
    .logo-text {
        font-size: 2.4rem; /* increased tablet size */
        font-family: fantasy;
    }
}

@media (min-width: 1200px) {
    .logo-text {
        font-size: 2.4rem; /* increased desktop size */
    }
}
/* Navigation Menu */
.topnav {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(8, 31, 92, 0.1);
    padding: 10px 25px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px #7096D140;
}

/* Desktop Navigation Styles */
.topnav a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: #081f5C;
    background: linear-gradient(135deg, #D0E3FF, #E7F1FF);
    transition: all 0.3s ease;
    border: 1px solid #7096D130;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.topnav a:hover,
.topnav a.active {
    background: linear-gradient(135deg, #334EAC, #7096D1);
    color: #F9FCFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px #7096D160;
}

/* Menu Icon Styling */
.menu-icon {
    display: none;
    background: transparent;
    color: #F9FCFF;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(112,150,209,0.4);
    transition: all 0.3s ease;
}

.menu-icon .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #081f5C;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
}

/* Active (X) state */
.menu-icon.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-icon.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-icon.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.menu-icon:hover {
    background: rgba(112,150,209,0.12);
    box-shadow: 0 4px 12px rgba(112,150,209,0.25);
}

/* Large Desktop styles */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
        padding: 0 30px;
    }

    .logo {
        height: 45px;
    }

    .logo-text {
        font-size: 2.2rem;
        font-family: fantasy;
    }

    .topnav a {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Desktop styles */
@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
        padding: 0 25px;
    }
}

/* Small Desktop styles */
@media (max-width: 1200px) {
    .container {
        max-width: 1100px;
        padding: 0 20px;
        gap: 30px;
    }

    .topnav {
        gap: 10px;
    }

    .topnav a {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* Tablet styles */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
        gap: 20px;
    }

    .logo {
        height: 35px;
    }

    .logo-text {
        font-size: 1.5rem;
        font-family: fantasy;
    }

    .topnav {
        padding: 8px 15px;
        gap: 8px;
        background: rgba(8, 31, 92, 0.08);
    }

    .topnav a {
        padding: 8px 12px;
        font-size: 0.8rem;
        letter-spacing: 0.3px;
    }

    /* Ensure logo container doesn't shrink too much */
    .logo-container {
        flex-shrink: 0;
        min-width: 180px;
    }

    /* Adjust hover effects for better touch interaction */
    .topnav a:hover,
    .topnav a.active {
        transform: translateY(-1px);
        box-shadow: 0 2px 10px #7096D140;
    }
}

/* Mobile styles */
@media (max-width: 992px) {
    .container {
        gap: 15px;
        justify-content: space-between;
    }

    .logo-container {
        white-space: nowrap; /* keep in one line on mobile too */
        flex-shrink: 0;
        flex-wrap: nowrap;
    }
    
    .topnav {
        display: none;
        position: fixed; /* Change to fixed */
        top: 70px; /* Adjusted to match actual header height */
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.95);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        border-radius: 0 0 15px 15px;
        z-index: 1000; /* Add z-index */
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    }

    .topnav.active {
        display: flex;
        animation: slideDown 0.3s ease; /* Add animation */
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .menu-icon {
        display: block;
        margin-left: 10px;
        position: relative;
        z-index: 1001;
    }

    .topnav a {
        width: 100%;
        text-align: center;
        background: linear-gradient(135deg, #334EAC30, #7096D130);
        color: #F9FCFF;
        border: 1px solid rgba(255,255,255,0.1);
        margin: 2px 0;
        padding: 12px;
        transition: all 0.3s ease;
    }

    .topnav a:hover,
    .topnav a.active {
        background: linear-gradient(135deg, #334EAC, #7096D1);
        border-color: transparent;
        transform: translateX(5px);
    }

    .logo {
        height: 35px;
    }

    .logo-text {
        font-size: 1.5rem;
        font-family: fantasy;
    }
}

/* Small screens */
@media (max-width: 576px) {
    header {
        padding: 12px 0;
    }
    
    .container {
        padding: 0 12px;
        gap: 12px;
    }

    .logo {
        height: 30px;
    }

    .logo-text {
        font-size: 1.5rem;
        font-family: fantasy;
    }

    .topnav {
        top: 60px;
    }

    .topnav a {
        font-size: 0.9rem;
        padding: 10px;
    }

    .menu-icon {
        padding: 8px 12px;
    }
}

/* Extra Small Mobile styles */
@media (max-width: 320px) {
    header {
        padding: 8px 0;
    }

    .container {
        padding: 0 10px;
        gap: 8px;
    }

    .logo-container {
        gap: 5px;
        min-width: auto;
    }

    .logo {
        height: 25px;
    }

    .logo-text {
        font-size: 1.5rem;
        font-family: fantasy;
        font-weight: lighter;
    }

    .menu-icon {
        padding: 6px 10px;
        font-size: 1rem;
    }

    .topnav {
        top: 55px;
        padding: 12px;
        gap: 6px;
    }

    .topnav a {
        font-size: 0.8rem;
        padding: 8px;
        margin: 1px 0;
    }
}
