/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    margin-top: 80px;
}

/* ── Heading weights ──────────────────────────── */
h1 {
    font-weight: 300;
    letter-spacing: -.02em;
    line-height: 1.1;
}
h2 {
    font-weight: 300;
    letter-spacing: -.015em;
    line-height: 1.15;
}
h3 {
    font-weight: 400;
    letter-spacing: -.01em;
    line-height: 1.2;
}
h4, h5, h6 {
    font-weight: 500;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #007cba;
}

.nav-menu a.active {
    color: #007cba;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007cba;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* ── Nav Dropdown ─────────────────────────────────── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-arrow {
    font-size: 0.6em;
    vertical-align: middle;
    margin-left: 2px;
}

.nav-user-icon {
    font-style: normal;
    font-size: 0.6em;
    vertical-align: middle;
    color: #007cba;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 170px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 18px;
    font-size: 0.9em;
    white-space: nowrap;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:hover {
    background: #f5f5f5;
}

/* ── Nav CTA Button ───────────────────────────────── */
.nav-cta {
    margin-left: 8px;
}

.nav-cta-btn {
    background: #007cba;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.nav-cta-btn:hover {
    background: #005f8a;
    color: #fff !important;
    transform: translateY(-1px);
}

.nav-cta-btn::after {
    display: none !important;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    border-bottom: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #007cba;
}

.footer-cta {
    background: #007cba;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.footer-cta h3 {
    margin-bottom: 10px;
}

.footer-cta p {
    margin-bottom: 20px;
}

.footer-cta a {
    background: white;
    color: #007cba;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-cta a:hover {
    background: #f0f0f0;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #007cba;
}

/* Common Utility Classes */
.divider {
    width: 100px;
    height: 3px;
    background: white;
    margin: 0 auto;
}

/* Nav backdrop (mobile) */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 998;
    cursor: pointer;
}

.nav-backdrop.active {
    display: block;
}

/* Base Responsive Design */
@media (max-width: 768px) {
    /* ── Main nav panel ── */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        /* hidden state */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity 0.22s ease, visibility 0.22s, transform 0.22s ease;
        z-index: 999;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* ── Top-level items ── */
    .nav-menu > li {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a,
    .nav-menu > li .nav-dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        font-size: 1rem;
    }

    /* suppress underline animation on mobile */
    .nav-menu > li > a::after,
    .nav-menu > li .nav-dropdown-toggle::after {
        display: none;
    }

    /* ── Arrow rotation ── */
    .nav-arrow {
        transition: transform 0.22s ease;
        font-size: 0.8em;
    }

    .nav-dropdown.open > .nav-dropdown-toggle .nav-arrow {
        transform: rotate(180deg);
    }

    /* Hide user-icon dot on mobile so it doesn't break flex alignment */
    .nav-user-icon {
        display: none;
    }

    /* ── Sub-menu accordion ── */
    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        min-width: 0;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
        background: #f7f8fa;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 300px;
    }

    .nav-dropdown-menu a {
        padding: 13px 20px 13px 36px;
        border-bottom: 1px solid #ebebeb;
    }

    .nav-dropdown-menu li:last-child a {
        border-bottom: none;
    }

    /* ── Nav CTA on mobile ── */
    .nav-cta {
        margin-left: 0;
        padding: 12px 20px;
        background: #f0f8ff;
    }

    .nav-cta-btn {
        display: block;
        text-align: center;
        padding: 12px 20px;
        border-radius: 8px;
        font-size: 1rem;
    }

    /* ── Hamburger ── */
    .mobile-menu-toggle {
        display: flex;
        background: none;
        border: none;
        padding: 10px;
        margin: -10px;
        cursor: pointer;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    body {
        margin-top: 70px;
    }

    .header-container {
        padding: 0 15px;
    }
}
