:root {
    color-scheme: light only;
    --primary: #01337b;
    --primary-hover: #0863b8;
    --secondary: #02aaf1;
    --success: #79cc01;
    --info: #add400;
    --text: #000;
    --background: #fff;
    --card-bg: #fff;
    --border-radius: 12px;
    --font-family: 'Inter', Arial, sans-serif;
    --nav-bg: #fff;
}

[data-theme="dark"] {
    color-scheme: light only;
}

/* Force light theme on elements that might inherit dark theme */
body, main, article, form {
    color-scheme: light only;
}

/* ====== Base & Layout ====== */
body {
    font-family: var(--font-family);
    background: var(--background);
    color: var(--text);
}
.container {
    width: 100%; /* Make container adapt to screen width */
    max-width: 1020px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem; /* Add breathing room on the left */
    padding-right: 1.5rem; /* Add breathing room on the right */
}

/* Remove default Pico header/footer lines */
header, nav, main {
    background: var(--nav-bg) !important;
    border-top: none !important;
    box-shadow: none !important;
}
footer {
    border-top: none !important;
    box-shadow: none !important;
    padding: 1.5rem 0 0.75rem 0;
    font-size: 0.95rem;
    color: #555;
    background: var(--nav-bg);
}

/* ====== Typography ====== */
body, .hero-lead, p, li, input, textarea, select,
nav, footer, .button, button, .btn {
    font-size: 1rem !important;
}
.hero-title, h1, .display-1 {
    color: var(--primary);
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5em;
    line-height: 1.22;
}
h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.45em;
    line-height: 1.22;
}
.hero-lead {
    color: #222;
    font-size: 1rem;
    margin: 0 auto 1.6rem auto;
    text-align: justify !important;
}

footer p {
    font-size: 0.7rem !important;
    color: #555 !important;
}

/* ====== Card Styles ====== */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 16px rgba(1,51,123,0.03);
    border: 1px solid #e5e9f2;
    padding: 2rem;
}
.card .button,
.card button,
.card .btn {
    display: inline-block;
    padding: 0.45em 1.1em;
    font-size: 0.96rem;
    font-weight: 500;
    margin-top: 1em;
    border-radius: 1.3em;
    box-shadow: 0 2px 10px 0 #01337b18;
    letter-spacing: 0.01em;
}
.card .button:active {
    transform: translateY(1px) scale(0.98);
}
.card p {
    font-size: 0.9rem !important;
}

/* ====== Main/Section Spacing ====== */
main.container {
    margin-top: 0.8rem !important;
    margin-bottom: 0.8rem !important;
}
main.container section:last-child {
    margin-bottom: 0.8rem !important;
}

/* ====== Buttons & Links ====== */
.button,
button,
.btn,
.btn-primary {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: var(--border-radius);
    border: none;
    transition: background 0.2s;
    font-weight: 500;
}
.button:hover,
button:hover,
.btn:hover,
.btn-primary:hover {
    background: var(--primary-hover) !important;
}
a {
    color: var(--secondary);
    text-decoration: underline;
    transition: color 0.2s;
}
a:hover {
    color: var(--primary);
}

h1, h2, h3, .about-lead, section {
    text-align: left;
}

.team-row {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* or center if you want vertical alignment */
    gap: 2.2rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    width: 100%;
}

.team-member {
    min-width: 170px;
    max-width: 190px;
    text-align: left;
    font-size: 0.8rem !important;
}
.team-member img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}
.team-member .role {
    font-size: 0.8rem !important;
    color: #666;
    margin-bottom: 0.3rem;
}
.team-member a {
    font-size: 0.8rem !important;
}
@media (max-width: 900px) {
    .team-row { flex-direction: column; gap: 1.2rem; }
    .team-member { text-align: left; }
}

/* Form customization */
form {
    margin: 0 auto;
    max-width: 800px;
}

form .grid {
    display: grid;
    gap: 0.7rem;
}

#subscribe .grid {
    grid-template-columns: 1fr 1fr auto;
}

form:not(#subscribe) .grid {
    grid-template-columns: 1fr auto;
}

input {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem;
}

button {
    font-size: 0.9rem !important;
    background: var(--primary);
    border: none;
}

button:hover {
    background: var(--primary-hover);
}

/* Mobile adjustments */
@media (max-width: 700px) {
    #subscribe .grid,
    form:not(#subscribe) .grid {
        grid-template-columns: 1fr;
    }
    input {
        font-size: 0.9rem !important;
        padding: 0.45rem 1rem;
    }
}

/* ====== Responsive ====== */
@media (max-width: 700px) {
    #subscribe .grid,
    form:not(#subscribe) .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .hero-title, h1, .display-1 { font-size: 1.35rem; }
    h2 { font-size: 1.1rem; }
    h3 { font-size: 1rem; }
    .hero-lead { font-size: 1.08rem; }
    .container { padding: 1rem; }
}
@media (min-width: 1200px) {
    .container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}
/*
================================================================
==                  HEADER, LOGO & NAVIGATION                 ==
================================================================
*/

/* --- Main Header & Nav Structure --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
}

/* --- Logo Sizing --- */
.logo {
    max-height: 50px;
    width: auto;
    display: block;
}

.company-name {
    transition: opacity 0.3s ease;
}

/* --- Desktop Navigation Links --- */
.main-nav .nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item.active {
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

/* --- Hamburger Icon (Hidden on Desktop) --- */
#nav-toggle {
    display: none; /* Hidden by default */
    background: transparent !important;
    border: 2px solid #cccccc;
    border-radius: 5px;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 26px;
    z-index: 1001;
    box-sizing: content-box;
}

.icon-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #888888;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon-bar + .icon-bar {
    margin-top: 4px;
}

/*
================================================================
==              RESPONSIVE NAVIGATION (MOBILE)                ==
================================================================
*/
/* This media query applies ONLY to screens 768px wide or smaller */
@media (max-width: 768px) {

    /* Hide company name text, leaving just the logo */
    .company-name {
        display: none;
    }

    /* Show the hamburger button */
    #nav-toggle {
        display: block;
    }

    /* Hide the original desktop navigation links */
    .main-nav .nav-links {
        display: none;
    }

    /* Styles for the dropdown menu container WHEN IT IS OPEN */
    .main-nav .nav-links.is-open {
        display: flex; /* This makes it visible */
        flex-direction: column;
        position: absolute;
        top: 85px; /* Position below the header */
        left: 0;
        right: 0;
        background-color: white;
        width: 100%;
        padding: 1rem 0 0.5rem; /* Space at top/bottom of the dropdown */
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
        gap: 0; /* Reset gap for the new button styling */
    }

    /* --- Mobile Menu Buttons Styling --- */
    .nav-links.is-open a {
        display: block;
        /* The width and margin have been moved to the LI above */
        padding: 0.75rem 1rem;
        border: 1px solid #cccccc;
        border-radius: 8px;
        text-align: center;
        text-decoration: none;
        font-weight: 500;
        color: #333;
        transition: background-color 0.2s, color 0.2s;
    }

    .nav-links.is-open a:hover {
        background-color: #f5f5f5;
        color: var(--primary);
    }

    /* Style for the active page link in the mobile menu */
    .nav-links.is-open .nav-item.active a {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    /* This targets the list item that contains the link */
    .nav-links.is-open li {
        width: 80%;
        margin: 0 auto 0.25rem; /* Centers the item and adds space below */
        list-style-type: none;  /* Ensures no bullet points appear */
    }

}

/* Form customization */
form .grid {
    gap: 0.7rem;
    max-width: 800px; /* Prevent excessive stretching on wide screens */
}

/* Desktop-specific grid adjustments */
@media (min-width: 701px) {
    form .grid {
        grid-template-columns: 2fr 1fr; /* Make input field take more space than button */
    }

    form input {
        min-width: 300px; /* Ensure input doesn't get too narrow */
    }

    form button {
        min-width: 120px; /* Ensure button maintains reasonable width */
    }
}