﻿/* ---------- Reset & basics ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

/* ---------- Top Bar ---------- */
.top-bar {
    width: 100%;
    background: linear-gradient(90deg, #065f46 0%, #b45309 100%);
    color: #fff;
    text-align: center;
    padding: 12px 16px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    line-height: 1;
}

/* ---------- Header (fixed) ---------- */
.main-header {
    position: fixed; /* fixed to the viewport */
    left: 0;
    right: 0;
    top: 0;
    z-index: 1100;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    will-change: transform, height;
}

/* placeholder element (keeps layout flow) */
#header-placeholder {
    width: 100%;
    height: 0; /* JS will set this equal to header height */
}

/* ---------- Navbar container ---------- */
.navbar .container {
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    gap: 16px;
}

/* ---------- Logo ---------- */
.logo-header {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 120px; /* moderate default */
    width: auto;
    transition: transform .25s ease, height .25s ease;
}

    /* smaller logo on hover (subtle) */
    .logo-img:hover {
        transform: scale(1.03);
    }

/* ---------- Navigation menu (desktop) ---------- */
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: #065f46;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    transition: color .2s ease;
}

    .nav-link::after {
        content: "";
        position: absolute;
        width: 0;
        height: 3px;
        bottom: -7px;
        left: 0;
        background: linear-gradient(90deg, #10b981, #b45309);
        transition: width .25s ease;
        border-radius: 3px;
    }

    .nav-link:hover::after, .nav-link.active::after {
        width: 100%;
    }

    .nav-link:hover {
        color: #b45309;
    }

/* ---------- Mobile toggle button ---------- */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

    .menu-toggle:focus {
        outline: 2px solid rgba(6,95,70,.2);
        outline-offset: 2px;
    }

.bar {
    width: 28px;
    height: 3px;
    background-color: #065f46;
    border-radius: 3px;
    display: block;
    margin: 4px 0;
    transition: transform .25s ease, opacity .25s ease;
}

/* ---------- Mobile menu panel ---------- */
@media (max-width: 992px) {

    /* Hide desktop menu, show toggle */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        padding: 120px 20px 40px; /* space for header content overlapping */
        background: linear-gradient(180deg, #065f46, #b45309);
        transform: translateX(100%); /* off-canvas to right */
        transition: transform .35s cubic-bezier(.2,.9,.2,1);
        z-index: 1099;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

        .nav-menu.open {
            transform: translateX(0);
        }

    .nav-link {
        color: #fff;
        font-size: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .navbar .container {
        padding: 10px 20px;
    }

    .logo-img {
        height: 64px;
    }

    .top-bar {
        font-size: 18px;
        padding: 10px 12px;
    }

    /* style menu toggle animation (toggle -> X) */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(.1);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* ---------- Shrink effect ---------- */
.main-header.shrink {
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
}

    .main-header.shrink .navbar .container {
        padding: 10px 30px;
    }

    .main-header.shrink .logo-img {
        height: 72px;
    }

/* ---------- Prevent horizontal overflow ---------- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
