:root {
    /* Color system */
    --primary-green: #0d7e4f;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --text-dark: #222222;
    --text-deep: #0a0d12;
    --muted: #666666;
    --muted-variant: #535862;
    --border-light: #e9eaeb;
    --border-muted: #e0e0e0;

    /* Brand colors */
    --brand-facebook: #3b5998;
    --brand-twitter: #1da1f2;
    --brand-youtube: #ff0000;

    /* Shadows */
    --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.12);
    --shadow-accent: 0 6px 18px rgba(10, 136, 90, 0.18);
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
}

/* Navbar Styling: make the inner container a rounded pill with shadow */
.navbar {
    background: transparent; /* keep page background visible around the pill */
    padding: 1.25rem 0;
    margin: 0 1em;
    z-index: 1050 !important;
}

.navbar > .container {
    background-color: var(--white);
    border-radius: 999px; /* pill */
    /* responsive horizontal padding: stays compact on small screens, wider on desktop */
    padding: 0.5rem clamp(0.8rem, 2.5vw, 1rem);
    box-shadow: var(--shadow-sm);
    align-items: center;
    display: flex;
    border: 2px solid var(--border-light);
    position: relative; /* needed so collapse overlay can position itself */
}

.navbar-brand img {
    /* responsive logo: min 160px, grows with viewport, max 250px */
    width: clamp(160px, 12.5vw, 250px);
    height: auto;
    display: block;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Allow the collapse area to expand so the nav can be centered between logo and button */
.navbar-collapse {
    flex: 1 1 auto;
}

.navbar-collapse .navbar-nav {
    justify-content: center;
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    padding: 0.5rem 0.6rem;
    transition: color 0.18s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-green);
}

.navbar-toggler {
    border: none !important;
}

.btn-register {
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: none;
    display: inline-flex;
    align-items: center;
}

.btn-register .iconsax,
.btn-register i {
    /* icon spacing inside button */
    margin-right: 0.5rem;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* Small screens: make the pill full-width and remove large radius; adjust button sizes */
@media (max-width: 576px) {
    .navbar > .container {
        max-width: 100%;
    }

    .btn-register {
        font-size: 13px;
        padding: 0.35rem 0.8rem;
    }

    /* ensure collapse area stacks below brand on very small screens */
    .navbar-collapse {
        order: 3;
        width: 100%;
    }

    .navbar-collapse .navbar-nav {
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }

    .social-icons a {
        width: 32px;
        height: 32px;
    }
}

/* Collapsed overlay styling: make the open mobile menu look like the pill in the screenshot
   (combined rules for <= 991.98px) */
@media (max-width: 991.98px) {
    .navbar > .container .navbar-collapse.show {
        position: absolute;
        left: 50%;
        top: 60px;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        padding: 1rem;
        border-radius: 14px;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        z-index: 1050;
        display: flex;
    }

    /* Remove animation to avoid even a tiny flicker when opening the overlay.
     Use an immediate show/hide based on the .show class so the menu appears instantly. */
    .navbar > .container .navbar-collapse {
        transition: none !important;
    }

    .navbar > .container .navbar-collapse:not(.show) {
        opacity: 0 !important;
        visibility: hidden !important;
        height: auto !important; /* keep layout stable */
        display: none !important; /* ensure positioned overlay stays in DOM for absolute positioning */
    }

    .navbar > .container .navbar-collapse.show {
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
    }

    /* Ensure Bootstrap's collapsing state doesn't apply its height animation */
    .navbar > .container .navbar-collapse.collapsing {
        transition: none !important;
        height: auto !important;
    }

    .navbar > .container .navbar-collapse.show .navbar-nav {
        flex-direction: column;
        gap: 0;
        align-items: start;
        width: 100%;
    }

    /* style the in-menu register button to match screenshot: centered and pill-like */
    .navbar > .container .navbar-collapse.show .btn-register.w-100 {
        display: inline-flex;
        padding: 0.6rem 1.05rem;
        border-radius: 50px;
        font-weight: 600;
    }

    /* keep the rest of the container visible as pill behind the overlay */
    .navbar > .container::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 999px;
        pointer-events: none;
    }

    .navbar > .container .navbar-collapse.show .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar
        > .container
        .navbar-collapse.show
        .navbar-nav:has(.nav-item:nth-child(2))
        .nav-button {
        width: 100%;
        padding: 0.25em 0;
        padding-top: 1em;
        border-top: 1px solid var(--border-light);
    }

    .navbar
        > .container
        .navbar-collapse.show
        .navbar-nav
        .nav-button
        .btn-register {
        justify-content: center;
    }

    /* Make collapsed register button full-width and visually distinct */
    .navbar-nav .btn-register {
        width: 100%;
        padding: 0.6rem 0.75rem;
        font-size: 14px;
    }

    .navbar-nav .btn-register .iconsax {
        margin-right: 0.5rem;
    }
}

/* Iconsax usage: style the webfont icons per documentation */
.iconsax {
    font-size: 18px;
    vertical-align: middle;
    display: inline-block;
    color: currentColor; /* inherit text color unless overridden */
}

/* Main Section */
.main {
    flex: 1;
    padding-top: 100px;
    margin: 0 1em;
}

.main > .content-section {
    padding: 1em 0;
}

/* Footer Section */
footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 60px 0 20px;
    font-weight: 400;
    margin: 0 1em;
}

footer > .container {
    max-width: 1150px;
}

footer > .container .row {
    padding-top: 1em;
    padding-bottom: 3.5em;
}

.footer-logo {
    max-width: 325px;
}

.footer-desc {
    color: var(--muted-variant);
    margin-bottom: 20px;
    font-size: 13px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    color: white;
    text-decoration: none;
    transition: transform 0.18s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
}

.social-icons a i {
    font-size: 14px;
}

.social-icons .facebook {
    background-color: var(--brand-facebook);
}

.social-icons .twitter {
    background-color: var(--brand-twitter);
}

.social-icons .youtube {
    background-color: var(--brand-youtube);
}

.footer-heading {
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--text-deep);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: var(--text-deep);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-deep);
}

.footer-bottom {
    padding-bottom: 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-weight: 500;
    font-size: 14px;
}

.labmu-logo {
    max-width: 100px;
}
