/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #222120;
    margin: 0;
    padding: 0;
    background: #F6F5EF;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-weight: 700;
}

.mx-auto {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Form Styles */
.careers-browse {
    width: 100%;
}

/* Search Input */
#search-keyword {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-keyword:focus {
    outline: none;
    border-color: #1596D1;
    box-shadow: 0 0 0 3px rgba(21, 150, 209, 0.1);
}

/* Filter Section */
#search-filters {
    display: flex;
    gap: 16px;
}

#search-filters h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#search-filters h3:first-child {
    margin-top: 0;
}

.filter {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter li {
    margin-bottom: 0.5rem;
}

.filter input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.filter label {
    cursor: pointer;
    font-size: 0.95rem;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter label:hover {
    color: #1e293b;
}

.filter label .count {
    color: #64748b;
    font-size: 0.875rem;
}

/* Buttons */
.button,
#filter-results-submit,
#job-mail-subscribe-button {
    background: #1596D1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.button:hover,
#filter-results-submit:hover,
#job-mail-subscribe-button:hover {
    background: #1375AA;
}

.button:active,
#filter-results-submit:active,
#job-mail-subscribe-button:active {
    transform: translateY(1px);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

#search-keyword {
    width: 543px !important;
    max-width: 100% !important;
}

thead {
    background: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
}

th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

tbody tr:not(.summary) {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

tbody tr:not(.summary):hover {
    background: #f8fafc;
}

td {
    padding: 1rem;
}

tr.summary td {
    padding: 0.5rem 1rem 1rem 1rem;
    color: #64748b;
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Job Links */
.job-link {
    color: #1596D1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.job-link:hover {
    color: #1375AA;
    text-decoration: underline;
}

/* Location */
.location {
    color: #64748b;
    font-size: 0.9rem;
}

/* Headings */
h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Job Mail Section */
#job-mail {
    background: #EAF7FD;
    border: 1px solid #C1E7F9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

#job-mail-trigger {
    color: #1596D1;
    text-decoration: none;
    font-weight: 500;
}

#job-mail-trigger:hover {
    text-decoration: underline;
}

#job-mail-content {
    margin-top: 1rem;
}

#job-mail-subscribe-email {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Messages */
.success {
    color: #16a34a;
    background: #f0fdf4;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #16a34a;
}

.error {
    color: #dc2626;
    background: #fef2f2;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #dc2626;
}

/* PageUp Link */
#PageUpPeopleLink {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

#PageUpPeopleLink a {
    color: #64748b;
    font-size: 0.875rem;
    text-decoration: none;
}

#PageUpPeopleLink a:hover {
    color: #1596D1;
}

/* Recaptcha */
.g-recaptcha {
    margin: 1rem 0;
}

/* Waiting/Loading */
.waiting {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

/* Main Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
}

/* Header Container */
.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Section - Logo and CTA Buttons */
.header-top {
    background: #F6F5EF;
    padding: 1rem 0;
}

.header-top .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    position: relative;
    z-index: 1003;
}

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

.header-cta-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cta-button {
    background: #D2CDB7;
    color: #222120;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cta-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.cta-button:hover {
    background: #DFDBCC;
}

.cta-button.donate-btn {
    background: #F0B336;
}

.cta-button.donate-btn:hover {
    background: #F3C774;
}

/* Mobile Hamburger */
.mobile-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1003;
}

.mobile-hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #222120;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.mobile-hamburger span:nth-child(1) {
    top: 10px;
}

.mobile-hamburger span:nth-child(2) {
    top: 18px;
}

.mobile-hamburger span:nth-child(3) {
    top: 26px;
}

.mobile-hamburger span.active:nth-child(1) {
    top: 18px;
    transform: translateX(-50%) rotate(45deg);
}

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

.mobile-hamburger span.active:nth-child(3) {
    top: 18px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Navigation Section */
.header-nav {
    background: white;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #222120;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: #1596D1;
}

.nav-link .arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s;
}

.nav-link .arrow svg {
    width: 12px;
    height: 12px;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-content {
    padding: 1.5rem 0;
}

.submenu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #C1E7F9;
    color: #0A2635;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    min-height: 40px;
}

.submenu-item:hover {
    background: #1596D1;
    color: white;
}

.submenu-item .arrow-right {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.submenu-item .arrow-right svg {
    width: 16px;
    height: 16px;
}

/* Hide mobile submenu on desktop */
.mobile-submenu {
    display: none;
}

/* Footer Styles */
footer {
    background: #0B2E46;
    color: white;
    padding: 80px 0;
    margin-top: 3rem;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
}

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

footer .acknowledgment {
    margin-bottom: 1rem;
    color: #F1F9FE;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

footer .legal-info {
    margin-bottom: 1rem;
    color: #F1F9FE;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

footer .copyright {
    border-top: 1px solid #F1F9FE;
    padding-top: 1rem;
    text-align: center;
    color: #F1F9FE;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

footer .copyright a {
    color: #F1F9FE;
    text-decoration: none;
    transition: opacity 0.2s;
}

footer .copyright a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    /* Keep header fixed on mobile */
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background: white;
    }

    /* Header top section stays visible on mobile */
    .header-top {
        background: #F6F5EF;
        position: relative;
        z-index: 1002;
    }

    /* Hide CTA buttons on tablet/mobile */
    .header-cta-buttons {
        display: none;
    }

    /* Show hamburger */
    .mobile-hamburger {
        display: flex;
    }

    /* Mobile menu overlay */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .header-nav.mobile-open {
        opacity: 1;
        pointer-events: all;
    }

    /* Navigation panel */
    .header-nav .header-container {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        padding: 0;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .header-nav.mobile-open .header-container {
        transform: translateY(0);
    }

    /* Stack navigation vertically */
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0rem 0;
        background: white;
        min-height: min-content;
    }

    .nav-item {
        border-bottom: 1px solid #E2E8F0;
        background: white;
    }

    .nav-item:first-child {
        border-top: 1px solid #E2E8F0;
    }

    .nav-item:last-child {
        border-bottom: 1px solid #E2E8F0;
    }

    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        background: white;
        text-align: left;
    }

    .nav-link:hover {
        background: #F6F5EF;
    }

    .nav-link .arrow {
        margin-left: auto;
    }

    /* Hide desktop mega menu on mobile */
    .mega-menu {
        display: none !important;
    }

    /* Show mobile submenu on mobile only */
    .mobile-submenu {
        display: block;
        background: #F6F5EF;
        border-top: 1px solid #E2E8F0;
        animation: slideDownMobile 0.3s ease;
    }

    @keyframes slideDownMobile {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 2000px;
        }
    }

    .mobile-submenu-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1.5rem;
        padding-left: 2.5rem;
        background: #F6F5EF;
        color: #222120;
        text-decoration: none;
        border-bottom: 1px solid #E2E8F0;
        font-weight: 600;
        font-size: 14px;
        text-align: left;
        transition: background 0.2s;
    }

    .mobile-submenu-item:last-child {
        border-bottom: none;
    }

    .mobile-submenu-item:hover {
        background: #DFDBCC;
    }

    .mobile-submenu-item .arrow-right {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
    }

    .mobile-submenu-item .arrow-right svg {
        width: 14px;
        height: 14px;
    }

    /* Hide desktop mega menu on mobile */
    @media (max-width: 1024px) {
        .mega-menu {
            display: none !important;
        }
    }

    .header-logo img {
        height: 40px;
    }
}

@media (max-width: 768px) {
    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    footer {
        padding: 40px 0;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .mx-auto {
        padding: 0 20px;
    }

    .header-top {
        padding: 0.75rem 0;
    }

    .header-logo img {
        height: 40px;
    }

    .header-nav .header-container {
        top: 70px;
    }

    main {
        padding-top: 70px !important;
    }

    /* Make search filters vertical on mobile */
    #search-filters {
        flex-direction: column !important;
    }
}

@media (max-width: 1024px) {
    #search-filters {
        flex-direction: column !important;
    }
}

/* Add spacing for fixed header */
main {
    padding-top: 140px; /* Account for two-row header */
    background: #F6F5EF;
}

@media (max-width: 1024px) {
    main {
        padding-top: 70px; /* Smaller header on mobile */
    }
}

