:root {
    --brand-navy: #143f74;
    --brand-navy-deep: #0f2e56;
    --brand-blue: #2d73b9;
    --brand-sky: #eaf3fb;
    --brand-line: #d7e3f0;
    --brand-ink: #173047;
    --brand-muted: #5c7187;
    --brand-white: #ffffff;
    --brand-shadow: 0 20px 50px rgba(17, 48, 86, 0.08);
    --brand-radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
    color: var(--brand-ink);
    background:
        radial-gradient(circle at top right, rgba(45, 115, 185, 0.08), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    min-height: 100vh;
}

.site-header {
    background:
        linear-gradient(135deg, rgba(20, 63, 116, 0.96), rgba(15, 46, 86, 0.92)),
        var(--brand-navy);
    color: var(--brand-white);
    padding: 24px clamp(18px, 4vw, 42px) 40px;
}

.topbar,
.site-main {
    width: min(1160px, 100%);
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    filter: brightness(0) invert(1);
    opacity: 0.96;
}

.brand-copy strong {
    display: block;
    max-width: 560px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
    line-height: 1.25;
}

.brand-overline,
.hero-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    opacity: 0.82;
}

.header-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    margin: 0 20px;
}

.header-menu a {
    padding: 9px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.92rem;
    font-weight: 700;
    transition: background 0.16s ease, color 0.16s ease;
}

.header-menu a:hover,
.header-menu a.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.lang-switch a {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.78);
}

.lang-switch a.active {
    background: var(--brand-white);
    color: var(--brand-navy);
}

.hero {
    width: min(1160px, 100%);
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 360px);
    gap: 36px;
    align-items: center;
}

.hero h1 {
    margin: 10px 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.15rem, 4vw, 3.6rem);
    line-height: 1.05;
}

.hero p {
    margin: 0;
    max-width: 700px;
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
}

.hero-art {
    width: 100%;
    max-width: 380px;
    justify-self: end;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.18));
}

.site-main {
    padding: 30px clamp(18px, 4vw, 42px) 48px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--brand-muted);
    font-size: 0.92rem;
}

.breadcrumbs a:hover {
    color: var(--brand-navy);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.listing-section + .listing-section {
    margin-top: 34px;
}

.section-head {
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--brand-navy-deep);
    font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.section-head p {
    margin: 0;
    color: var(--brand-muted);
    line-height: 1.7;
}

.offer-card,
.detail-card,
.apply-card,
.empty-state,
.alert {
    background: var(--brand-white);
    border: 1px solid var(--brand-line);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
}

.offer-card {
    padding: 26px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.offer-id {
    margin: 0 0 8px;
    color: var(--brand-blue);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.offer-card h2,
.detail-head h2,
.apply-card h3,
.content-block h3,
.attachment-list h4 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--brand-navy-deep);
}

.offer-card h2 {
    font-size: 1.45rem;
    line-height: 1.2;
}

.offer-group {
    margin: 8px 0 16px;
    color: var(--brand-muted);
    font-size: 0.96rem;
}

.offer-summary {
    margin: 0 0 18px;
    line-height: 1.7;
    color: #42586f;
    flex: 1 1 auto;
}

.offer-meta {
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
}

.offer-meta div {
    padding-top: 10px;
    border-top: 1px solid var(--brand-line);
}

.offer-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--brand-muted);
    margin-bottom: 4px;
}

.offer-meta dd {
    margin: 0;
    line-height: 1.5;
}

.card-actions,
.detail-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.archive-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #eef2f7;
    color: #58708a;
    font-weight: 800;
}

.archived-card {
    opacity: 0.96;
}

.apply-button,
.secondary-link,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.apply-button,
.primary-link {
    background: linear-gradient(135deg, #2d73b9, #1f5a96);
    color: var(--brand-white);
    box-shadow: 0 10px 24px rgba(31, 90, 150, 0.25);
}

.secondary-link {
    background: #eef5fb;
    color: var(--brand-navy-deep);
}

.apply-button:hover,
.primary-link:hover,
.secondary-link:hover {
    transform: translateY(-1px);
}

.apply-button.is-disabled,
.apply-button:disabled {
    opacity: 0.72;
    cursor: wait;
    box-shadow: none;
    transform: none;
}

.detail-card,
.apply-card,
.empty-state {
    padding: 28px;
}

.page-card h2 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--brand-navy-deep);
}

.detail-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.detail-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.14;
}

.offer-meta-line {
    margin: 8px 0 0;
    color: var(--brand-muted);
    font-size: 1rem;
}

.deadline-box {
    min-width: 220px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #edf5fd, #e4eef8);
}

.deadline-box span {
    display: block;
    color: var(--brand-muted);
    margin-bottom: 6px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.deadline-box strong {
    font-size: 1.1rem;
    color: var(--brand-navy-deep);
}

.detail-lead,
.muted {
    color: #4d667d;
    line-height: 1.7;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.meta-grid div {
    border: 1px solid var(--brand-line);
    background: #fbfdff;
    border-radius: 18px;
    padding: 16px 18px;
}

.meta-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--brand-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-grid strong {
    line-height: 1.5;
}

.content-block {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--brand-line);
}

.content-block h3,
.attachment-list h4 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.contact-card {
    padding: 18px;
    border: 1px solid var(--brand-line);
    border-radius: 18px;
    background: #fbfdff;
}

.contact-card h3 {
    margin: 0 0 10px;
    color: var(--brand-navy-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.contact-card p {
    margin: 0;
    line-height: 1.7;
    color: #4d667d;
}

.contact-card a {
    color: var(--brand-blue);
}

.results-table-wrap {
    margin-top: 24px;
    overflow-x: auto;
    border: 1px solid var(--brand-line);
    border-radius: 22px;
    background: #fbfdff;
}

.results-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.results-table thead th {
    padding: 18px 20px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-muted);
    background: #eef5fb;
    border-bottom: 1px solid var(--brand-line);
}

.results-table tbody td {
    padding: 18px 20px;
    border-top: 1px solid var(--brand-line);
    color: #3f556a;
    line-height: 1.6;
    vertical-align: top;
}

.results-table tbody tr:first-child td {
    border-top: 0;
}

.results-table tbody tr:nth-child(even) td {
    background: rgba(238, 245, 251, 0.45);
}

.results-empty {
    margin-top: 24px;
}

.wysiwyg-copy,
.pill-copy,
.simple-list,
.criteria-table {
    line-height: 1.72;
}
.wysiwyg-copy a {font-weight:bold}

.simple-list {
    margin: 0;
    padding-left: 20px;
}

.simple-list li + li {
    margin-top: 6px;
}

.criteria-table-wrap {
    overflow-x: auto;
}

.criteria-table {
    width: 100%;
    border-collapse: collapse;
}

.criteria-table th,
.criteria-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--brand-line);
    text-align: left;
}

.criteria-table th {
    color: var(--brand-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.alert {
    padding: 18px 22px;
    margin-bottom: 20px;
}

.alert.success {
    border-color: #bfe1c9;
    background: #effaf2;
    color: #245537;
}

.alert.error {
    border-color: #f0c3c3;
    background: #fff5f5;
    color: #8d1f1f;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.apply-card h3 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.apply-form {
    margin-top: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid label,
.attachment-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
    color: var(--brand-navy-deep);
}

.form-grid label.full {
    grid-column: 1 / -1;
}

.form-grid input,
.attachment-item input {
    width: 100%;
    border: 1px solid #cdd9e7;
    border-radius: 14px;
    padding: 14px 15px;
    font: inherit;
    background: #fbfdff;
}

.attachment-list {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--brand-line);
}

.attachment-list h4 {
    margin-bottom: 14px;
}

.attachment-item {
    padding: 16px 18px;
    border: 1px dashed #bfd0e3;
    border-radius: 18px;
    background: #f8fbff;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.attachment-item input[type="file"] {
    cursor: pointer;
}

.attachment-title {
    display: block;
}

.attachment-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.attachment-controls input[type="file"] {
    flex: 1 1 240px;
}

.attachment-remove {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: #f0d8d8;
    color: #7d2020;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.attachment-remove:disabled {
    opacity: 0.6;
    cursor: wait;
}

.attachment-remove.is-hidden {
    display: none;
}

.attachment-status {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--brand-muted);
}

.attachment-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dce9f5;
    overflow: hidden;
}

.attachment-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #2d73b9, #7fb4e8);
    transition: width 0.18s ease;
}

.attachment-item.is-selected {
    border-color: #4b8aca;
    background: #edf6ff;
    box-shadow: 0 12px 28px rgba(45, 115, 185, 0.12);
}

.attachment-item.is-selected .attachment-status {
    color: #1f5a96;
    font-weight: 700;
}

.attachment-item.is-uploading {
    border-color: #7fb4e8;
    background: #f3f9ff;
}

.attachment-item.is-uploading .attachment-status {
    color: #1f5a96;
}

.attachment-item.is-invalid,
.form-grid label.is-invalid input {
    border-color: #d26d6d;
    background: #fff6f6;
}

.attachment-item.is-invalid {
    box-shadow: 0 10px 24px rgba(210, 109, 109, 0.12);
}

.attachment-item + .attachment-item {
    margin-top: 16px;
}

.consent-list {
    margin-top: 24px;
    display: grid;
    gap: 14px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid #d6e2ef;
    border-radius: 18px;
    background: #fbfdff;
    color: var(--brand-ink);
    line-height: 1.6;
}

.consent-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex: 0 0 18px;
}

.consent-item.is-checked {
    border-color: #8cb0d3;
    background: #f4f9ff;
}

.consent-item.is-invalid {
    border-color: #d26d6d;
    background: #fff6f6;
}

.inline-link-button {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-blue);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 32, 55, 0.6);
    z-index: 1200;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-dialog {
    width: min(860px, 100%);
    max-height: min(86vh, 920px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(13, 38, 69, 0.24);
    overflow: hidden;
}

.modal-head,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
}

.modal-head {
    border-bottom: 1px solid var(--brand-line);
}

.modal-head h3 {
    margin: 0;
    color: var(--brand-navy-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.modal-close {
    border: 0;
    background: transparent;
    color: var(--brand-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    padding: 22px;
    overflow: auto;
    color: var(--brand-ink);
    line-height: 1.7;
}

.modal-body p:first-child,
.modal-body h1:first-child,
.modal-body h2:first-child,
.modal-body h3:first-child {
    margin-top: 0;
}

.modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--brand-line);
    background: #f8fbff;
}

.small {
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 44px 28px;
}

.empty-state h2 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--brand-navy-deep);
}

.empty-state p {
    margin: 0 auto 18px;
    max-width: 620px;
    line-height: 1.7;
    color: var(--brand-muted);
}

.site-footer {
    margin-top: 32px;
    background:
        linear-gradient(180deg, rgba(76, 102, 151, 0.98), rgba(58, 82, 129, 0.98)),
        #3A5281;
    color: rgba(255, 255, 255, 0.92);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 110px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 80%);
    opacity: 0.22;
    pointer-events: none;
}

.site-footer-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 38px 0 28px;
    position: relative;
    z-index: 1;
}

.footer-brand-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 680px;
}

.footer-brand-mark {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    filter: brightness(0) invert(1);
    opacity: 0.98;
}

.footer-brand-copy h3 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    line-height: 1.2;
    color: #ffffff;
}

.footer-brand-copy p,
.footer-column p,
.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.7;
}

.footer-socials {
    min-width: 250px;
}

.footer-heading,
.footer-column h4 {
    margin: 0 0 12px;
    display: block;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    background: #FFF;
    color: #ffffff;
    font-weight: 700;
}
.footer-social-links a img {width:50px;}
.footer-social-links a:hover,
.footer-links a:hover,
.footer-column p a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    padding: 28px 0 24px;
}

.footer-column {
    min-width: 0;
}

.footer-column p + p {
    margin-top: 10px;
}

.footer-column p a,
.footer-links a {
    color: rgba(255, 255, 255, 0.78);
}

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

.footer-links li + li {
    margin-top: 10px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-art {
        justify-self: start;
        max-width: 260px;
    }

    .detail-head {
        flex-direction: column;
    }

    .deadline-box {
        min-width: 0;
        width: 100%;
    }

    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-menu {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin: 4px 0 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        padding-bottom: 30px;
    }

    .consent-item {
        padding: 14px 15px;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal-dialog {
        max-height: 90vh;
    }

    .site-footer::before {
        height: 72px;
    }

    .site-footer-inner {
        width: calc(100% - 28px);
    }

    .footer-brand {
        flex-direction: column;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
