/* --- ROOT VARIABLES --- */
:root {
    --accent-color: #00cce2;
    --dark-text: #111;
    --light-text: #555;
    --text-color: #333;
    --bg-light: #f5f7fa;
    --heading-font: 'Oswald', sans-serif;
    --body-font: 'Roboto', sans-serif;
}

/* --- GLOBAL RESET --- */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    height: 100%;
    font-family: var(--body-font);
    color: var(--text-color);
    background-color: #ffffff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

html {
    overflow-y: scroll;
}

body::before {
    animation: waveDrift 60s linear infinite;
}

/* --- PAGE STRUCTURE --- */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: url('/images/wave-multi.svg') no-repeat center bottom;
    background-size: cover;
    flex: 1;
}

main {
    flex: 1 0 auto;
}

.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: url('/images/converted_wave.svg') no-repeat center top;
    background-size: cover;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.page-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- ANIMATIONS --- */
@keyframes waveDrift {
    0% {
        background-position: center top;
    }

    100% {
        background-position: 200px top;
    }
}

@keyframes driftWaves {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 200px 0;
    }
}



/* --- HEADER --- */
header {
    background-color: var(--accent-color);
    padding: 0;
    text-align: center;
}

    header img {
        height: 100px;
        width: auto;
    }

/* --- TOP BAR --- */
.top-bar {
    background: #ffffff url('/images/converted_wave.svg') no-repeat center;
    background-size: cover;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    animation: driftWaves 60s linear infinite;
}

.top-bar-inner {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- LOGO --- */
.navbar-brand img {
    height: 140px;
    max-height: 10vh;
    padding-top: 5px;
    padding-bottom: 5px;
}

/* --- CTA BUTTON --- */
.cta-button {
    font-size: 18px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--dark-text);
    background-color: var(--accent-color);
    color: var(--dark-text);
    font-family: var(--heading-font);
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .cta-button i {
        margin-right: 8px;
        min-width: 20px;
    }

    .cta-button:hover,
    .cta-button:focus {
        background-color: var(--dark-text);
        color: var(--accent-color);
        transform: translateY(-2px);
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }

/* --- NAVIGATION --- */
.nav-strip {
    display: flex;
    justify-content: center;
    background-color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

/* Navigation links */
.main-links {
    display: flex;
    align-items: center;
    height: 100%;
}

    .main-links .nav-link {
        font-family: var(--heading-font);
        font-weight: 500;
        font-size: 16px;
        color: var(--dark-text);
        padding: 0 24px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-left: 1px solid var(--dark-text);
        text-decoration: none;
        position: relative;
        transition: color 0.3s ease, background-color 0.3s ease;
        background-color: transparent; /* Explicitly set */
    }

        .main-links .nav-link:first-child {
            border-left: none;
        }

        .main-links .nav-link i {
            margin-right: 8px;
            font-size: 15px;
        }

        /* Underline effect (invisible by default) */
        .main-links .nav-link::after {
            content: "";
            position: absolute;
            left: 20%;
            bottom: 0;
            width: 60%;
            height: 2px;
            background-color: transparent; /* default blank */
            opacity: 0;
            transform: scaleX(0);
            transform-origin: center;
            transition: all 0.3s ease;
        }

        /* Hover on normal links: show underline */
        .main-links .nav-link:hover::after {
            opacity: 1;
            background-color: var(--dark-text);
            transform: scaleX(1);
        }

        /* Active link styling */
        .main-links .nav-link.active {
            background: linear-gradient(to bottom, var(--dark-text), #222);
            color: var(--accent-color);
        }

            /* Hover on active link: underline with accent color */
            .main-links .nav-link.active:hover::after {
                opacity: 1;
                background-color: var(--accent-color);
                transform: scaleX(1);
            }


/* --- HAMBURGER MENU --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 10px;
}

    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: #111;
        display: block;
    }

/* --- HERO --- */
.hero {
    text-align: center;
    padding: 0 20px;
    margin: 40px auto 60px;
    min-height: 110px;
}

    .hero h1 {
        font-family: var(--heading-font);
        font-size: 38px;
        font-weight: 600;
        color: var(--dark-text);
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 18px;
        color: var(--light-text);
        max-width: 700px;
        margin: 0 auto;
    }

/* --- GRID LAYOUT --- */
/* Base grid */
.grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Optional flexible class, can still be used */
.grid, .grid-flexible {
    display: grid;
    gap: 20px;
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

    /* Column utilities */

    .grid.col-1,
    .grid-flexible.col-1 {
        grid-template-columns: 1fr !important;
    }

    .grid.col-2,
    .grid-flexible.col-2 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    }

    .grid.col-3,
    .grid-flexible.col-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .grid.col-4,
    .grid-flexible.col-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    }


/* Responsive fallback */


.card {
    background: var(--bg-light);
    border-radius: 6px;
    padding: 0 0 28px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

    .card:hover {
        transform: translateY(-3px);
        background-color: #e8fafd;
        box-shadow: 0 6px 12px rgba(0, 204, 226, 0.15);
    }

    .card h2 {
        font-family: var(--heading-font);
        font-weight: 600;
        font-size: 20px;
        background-color: var(--accent-color);
        color: var(--dark-text);
        padding: 12px 16px;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        border-radius: 6px 6px 0 0;
    }

    .card p,
    .card ul {
        font-size: 15px;
        color: var(--light-text);
        line-height: 1.6;
        padding: 13px 26px;
        margin: 0;
    }

    .card ul {
        list-style-type: disc;
        padding-left: 46px; /* ensures bullets are indented slightly inside padding */
        padding-top: 0;
    }

    .card li {
        margin-bottom: 10px;
    }


/* --- CONTACT FORM --- */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    align-items: stretch;
}

.contact-form,
.contact-info-card {
    border-radius: 6px;
    padding: 20px;
    background: var(--bg-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    height: 100%;
}

    .contact-form legend,
    .contact-info-card h2 {
        font-family: var(--heading-font);
        font-size: 20px;
        font-weight: 600;
        background: var(--accent-color);
        color: var(--dark-text);
        padding: 14px 20px;
        border-radius: 6px 6px 0 0;
        margin: -20px -20px 20px -20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 15px;
        font-family: var(--body-font);
        box-sizing: border-box;
    }

        .contact-form input:focus,
        .contact-form textarea:focus {
            border-color: var(--accent-color);
            outline: none;
            box-shadow: 0 0 0 2px rgba(0, 204, 226, 0.2);
        }

/* --- FOOTER --- */
footer {
    background-color: var(--accent-color);
    padding: 30px 20px;
    color: var(--dark-text);
    font-family: var(--heading-font);
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Grid layout for 3-column footer sections */
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 20px;
    text-align: center;
}

.footer-section {
    flex: 1 1 220px;
    max-width: 300px;
}

    .footer-section h4 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 12px;
        text-transform: uppercase;
    }

    .footer-section ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .footer-section ul li {
            margin-bottom: 10px;
        }

    .footer-section a {
        color: #111;
        font-weight: 500;
        text-decoration: none;
        transition: transform 0.2s ease, font-weight 0.2s ease;
    }

        .footer-section a:hover {
            font-weight: 600;
            transform: scale(1.03);
        }



    .footer-section p {
        font-size: 14px;
        line-height: 1.6;
        margin: 0;
    }

/* Copyright */
.footer-copy {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    margin-top: 10px;
    text-align: center;
}

/* --- Responsive layout --- */




/* --- RESPONSIVE ADJUSTMENTS --- */




/* Push right-aligned items like login/logout */
.nav-spacer {
    flex-grow: 1;
}

/* Style for the username display */
.nav-link.user-name {
    font-weight: 600;
    padding-right: 12px;
    color: var(--dark-text);
}

/* Logout button appearance to match links */
.nav-link form {
    margin: 0;
}

.nav-link .btn-link {
    background: none;
    border: none;
    color: var(--dark-text);
    font-family: var(--heading-font);
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    height: 50px;
}

    .nav-link .btn-link i {
        margin-right: 8px;
        font-size: 15px;
    }

    .nav-link .btn-link:hover {
        background: linear-gradient(to bottom, var(--dark-text), #222);
        color: var(--accent-color);
    }


.contact-section {
    display: flex;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 0 20px;
    align-items: stretch;
}

/* --- Both cards --- */
.contact-form-card,
.contact-side-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: var(--bg-light);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
    overflow: hidden;
}

    /* --- Card Header --- */
    .contact-form-card h2,
    .contact-side-info h2 {
        font-family: var(--heading-font);
        font-weight: 600;
        font-size: 20px;
        background-color: var(--accent-color);
        color: var(--dark-text);
        padding: 12px 16px;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        border-radius: 6px 6px 0 0;
    }

/* --- Inner Content for both --- */
.contact-form-wrapper,
.contact-side-info-content {
    padding: 0px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- Side panel fixed width --- */
.contact-side-info {
    flex: 0 0 340px;
}


/* --- Form card flexible --- */
.contact-form-card {
    flex: 1 1 auto;
}

/* --- Contact form itself --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

    .contact-form .form-group {
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }

    .contact-form label {
        margin-bottom: 6px;
        font-weight: 600;
        color: var(--text-color);
    }

    .contact-form input,
    .contact-form textarea {
        padding: 10px 12px;
        font-size: 15px;
        border-radius: 4px;
        border: 1px solid #ccc;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .contact-form input:focus,
        .contact-form textarea:focus {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(0, 204, 226, 0.15);
            outline: none;
        }

    /* --- Button --- */
    .contact-form .cta-button {
        margin-top: auto;
        align-self: flex-start;
        padding: 12px 24px;
        font-size: 16px;
        font-family: var(--heading-font);
        font-weight: 600;
    }

/* --- Hover behavior --- */
.contact-form-card:hover,
.contact-side-info:hover {
    background-color: #e8fafd;
    box-shadow: 0 6px 12px rgba(0, 204, 226, 0.15);
}

/* --- Mobile Stack --- */


/* Match inputs and select size */
.input-lg {
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
    border-radius: 6px;
}

.form-row-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    width: 100%;
    gap: 1rem;
    flex-wrap: wrap; /* Mobile support */
}

.form-checkbox {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    gap: 0.5rem;
}

.checkbox-lg {
    transform: scale(1.2);
    margin: 0;
}

.checkbox-label {
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

.form-submit {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    min-width: 200px;
}

.cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* Softer red border + subtle background */
input.input-lg.input-validation-error,
select.input-lg.input-validation-error,
textarea.input-lg.input-validation-error {
    border: 2px solid #f5a7a7;
    background-color: #fff8f8;
}

    /* Softer focus shadow */
    input.input-lg.input-validation-error:focus,
    select.input-lg.input-validation-error:focus,
    textarea.input-lg.input-validation-error:focus {
        box-shadow: 0 0 0 3px rgba(245, 167, 167, 0.4);
    }


/* Visually hidden validation messages for accessibility */
span.field-validation-error {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}


.field-validation-error {
    color: #dc3545;
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

.card {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

    .card:hover {
        transform: translateY(-4px);
    }

    .card h2 {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.35em 0.75em;
    border-radius: 999px;
    /*    margin-bottom: 1rem;
*/
}

    .status-badge.in-progress {
        background-color: #00bcd4;
        color: #fff;
    }

    .status-badge.planned {
        background-color: #6c757d;
        color: #fff;
    }

.link {
    color: #00bcd4;
    font-weight: bold;
    text-decoration: none;
}

    .link:hover {
        text-decoration: underline;
    }

.card {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

    .card:hover {
        transform: translateY(-4px);
    }

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

    .card-heading h2 {
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0;
    }

.status-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25em 0.65em;
    border-radius: 999px;
    white-space: nowrap;
    margin-left: 1rem;
}

    .status-badge.in-progress {
        background-color: #00bcd4;
        color: white;
    }

    .status-badge.planned {
        background-color: #6c757d;
        color: white;
    }

.link {
    color: #00bcd4;
    font-weight: bold;
    text-decoration: none;
}

    .link:hover {
        text-decoration: underline;
    }

.content p,
/*.content ul {
    margin-bottom: 1.5rem;
}

.content ul {
    padding-left: 1.5rem;
}*/
/* Sections (Services, Labs, Privacy, etc.) */
.section-wrapper {
    padding: 0 20px;
    margin: 0 auto 60px;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Each section block */
.section-item {
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Section title */
.section-header {
    background-color: var(--accent-color);
    color: var(--dark-text);
    font-family: var(--heading-font);
    font-size: 1.25rem;
    font-weight: 700;
    padding: 12px 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px 12px 0 0;
}

/* Section text */
.section-text {
    margin: 0;
    padding: 1.5rem 2rem;
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.6;
}

    /* Link style inside section text */
    .section-text a.link {
        display: inline-block;
        margin-top: 0.75rem;
        font-weight: 600;
        color: var(--accent-color);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .section-text a.link:hover {
            text-decoration: underline;
            color: var(--dark-text);
        }

    /* Bullet list inside section text */
    .section-text ul {
        margin: 0.75rem 0 1rem;
        padding-left: 1.25rem;
        list-style-type: disc;
    }

    .section-text li {
        margin-bottom: 0.4rem;
    }

/* Tighten section padding and hero spacing on small screens */


/* Improve layout stacking on narrow phones */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .contact-section {
        flex-direction: column;
    }

    .contact-form-card,
    .contact-side-info {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .grid.col-2,
    .grid.col-3,
    .grid.col-4,
    .grid-flexible.col-2,
    .grid-flexible.col-3,
    .grid-flexible.col-4 {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .footer-section {
        max-width: 100%;
    }

        .footer-section ul,
        .footer-section p {
            text-align: center;
        }
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 90px;
    }

    .nav-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
    }

    .nav-inner {
        flex-direction: column;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem; /* Brings hamburger in on the right */
    }

    .hamburger {
        display: flex;
        margin-left: auto;
        padding: 10px 0;
    }

    .main-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }

        .main-links.show {
            display: flex;
        }

        .main-links .nav-link {
            border-left: none;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            padding: 12px 16px;
            justify-content: flex-start;
        }

    .cta-button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .card h2 {
        text-align: center;
        justify-content: center;
    }

    footer nav.footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .main-links .nav-link {
        display: block;
        width: 100%;
        padding: 12px 16px;
        text-align: left;
    }

        .main-links .nav-link.active {
            background-color: var(--dark-color); /* or whatever dark theme you're using */
            color: var(--accent-color);
            border-radius: 0;
        }
}

@media (max-width: 768px) {
    .section-text {
        padding: 1.25rem 1.25rem;
    }

    .section-header {
        font-size: 1.1rem;
        padding: 10px 14px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
        padding: 0 10px;
    }

    .grid, .section-wrapper {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .navbar-brand img {
        height: 70px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }

    .cta-button {
        font-size: 13px;
        padding: 8px 12px;
    }

    .section-text ul {
        padding-left: 1rem;
    }

    .main-links .nav-link {
        font-size: 15px;
        padding: 10px 12px;
    }
}
