:root {
    --font-body: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-heading: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
    --color-bg: #f3f5f7;
    --color-surface: #ffffff;
    --color-surface-2: #f8fafc;
    --color-text: #1f2b3a;
    --color-muted: #5f6f82;
    --color-border: #d9e1e8;
    --color-primary: #1f4a6e;
    --color-primary-strong: #173852;
    --color-primary-soft: #e7eef4;
    --color-danger: #b3202f;
    --color-success: #1f7a4f;
    --shadow-sm: 0 6px 18px rgba(16, 35, 54, 0.06);
    --shadow-md: 0 14px 35px rgba(16, 35, 54, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--color-text);
    background: radial-gradient(circle at top right, #ffffff 0%, var(--color-bg) 45%, #edf1f5 100%);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-strong);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: #152436;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.container {
    width: min(1160px, calc(100% - 3rem));
    margin: 0 auto;
}

.main-content {
    min-height: calc(100vh - 220px);
}

.alert {
    width: min(1160px, calc(100% - 3rem));
    margin: 1rem auto 0;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.alert-success {
    background: #edf8f2;
    border-color: #c6e9d4;
    color: var(--color-success);
}

.alert-error {
    background: #fff1f2;
    border-color: #f3c8cd;
    color: var(--color-danger);
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
}

.header-content {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    min-width: 210px;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.logo a {
    color: #142233;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    color: #425468;
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-link:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
}

.nav-link.active {
    background: #dbe7f0;
    color: var(--color-primary-strong);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.locale-switcher {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    padding: 0.2rem;
    gap: 0.1rem;
}

.locale-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.45rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #506073;
}

.locale-option:hover {
    background: #eef3f7;
}

.locale-option.active {
    background: #dce7ef;
    color: #12283c;
}

.mini-flag {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.flag-es {
    background: linear-gradient(to bottom, #c61f32 0 24%, #f2c23d 24% 76%, #c61f32 76% 100%);
}

.flag-ca {
    background: repeating-linear-gradient(
        to bottom,
        #f5cf4a 0 14%,
        #c52637 14% 28%
    );
}

.flag-va {
    background:
        linear-gradient(to right, #1d4f8a 0 18%, transparent 18% 100%),
        repeating-linear-gradient(to bottom, #f5cf4a 0 14%, #c52637 14% 28%);
}

.locale-code {
    line-height: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 1.3rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-strong);
    border-color: var(--color-primary-strong);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: #f1f6fc;
    border-color: rgba(241, 246, 252, 0.5);
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-outline {
    border-color: var(--color-primary);
    background: transparent;
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-lg {
    padding: 0.78rem 1.55rem;
    font-size: 0.96rem;
}

.hero {
    padding: 5.4rem 0 4.8rem;
    background:
        linear-gradient(125deg, rgba(20, 40, 59, 0.96), rgba(22, 62, 89, 0.92)),
        linear-gradient(180deg, #102536 0%, #17354d 100%);
    color: #f5f9fc;
}

.hero-content {
    width: min(1000px, calc(100% - 3rem));
    margin: 0 auto;
}

.eyebrow,
.section-kicker {
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    color: #98adbf;
    margin-bottom: 0.7rem;
    font-weight: 700;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
    color: #fff;
    max-width: 900px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #d5e2ee;
    max-width: 880px;
    margin-bottom: 0.85rem;
}

.hero-description {
    max-width: 760px;
    color: #b8c8d7;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.section-light {
    padding: 4.5rem 0;
    background: transparent;
}

.section-content {
    padding: 3.2rem 0;
}

.section-subtitle {
    max-width: 780px;
    color: var(--color-muted);
    margin-bottom: 1.6rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.8rem;
}

.service-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.service-card h3 {
    font-size: 1.12rem;
    margin: 0;
}

.service-card p {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.link-arrow {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.88rem;
}

.link-arrow::after {
    content: "\2192";
    margin-left: 0.35rem;
}

.section-cta {
    margin-top: 2rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--color-border);
    text-align: left;
}

.section-cta p {
    margin-bottom: 0.9rem;
    color: var(--color-muted);
}

.cta-section {
    width: min(1160px, calc(100% - 3rem));
    margin: 2.8rem auto 0;
    border-radius: var(--radius-lg);
    border: 1px solid #244766;
    background:
        linear-gradient(115deg, #12314b 0%, #184364 50%, #1a4f74 100%);
    color: #e7f2fc;
    padding: 2.6rem;
    text-align: left;
    box-shadow: var(--shadow-md);
}

.cta-section h2 {
    color: #fff;
    margin-bottom: 0.6rem;
}

.cta-section p {
    color: #c5d8ea;
    max-width: 760px;
    margin-bottom: 1.4rem;
}

.institutional-section {
    width: min(1160px, calc(100% - 3rem));
    margin: 2.2rem auto 0;
}

.institutional-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 252, 0.98) 100%);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

.institutional-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
    gap: 1.4rem;
    align-items: start;
}

.institutional-copy {
    padding-right: 1rem;
}

.institutional-copy h2 {
    margin-bottom: 0.95rem;
}

.institutional-lead {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--color-primary-strong);
    margin-bottom: 0.45rem;
}

.institutional-description {
    color: var(--color-muted);
    max-width: 70ch;
    font-size: 0.96rem;
}

.institutional-panel {
    padding: 1.25rem 1.35rem;
    background: linear-gradient(180deg, #f9fbfd 0%, #f2f6f9 100%);
    border: 1px solid rgba(31, 74, 110, 0.1);
    border-radius: 14px;
}

.institutional-panel-title {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5b6f83;
    margin-bottom: 0.75rem;
}

.institutional-motto {
    font-size: 0.84rem;
    color: #5a7186;
}

.institutional-logos-block {
    margin-top: 1.6rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(31, 74, 110, 0.1);
}

.institutional-logos-caption {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #698196;
    margin-bottom: 0.9rem;
}

.institutional-logos {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.institutional-logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    margin: 0;
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid rgba(31, 74, 110, 0.1);
    border-radius: 10px;
    flex: 1 1 220px;
}

.institutional-logo-card img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 54px;
    object-fit: contain;
    object-position: center;
}

.institutional-logo-card-eu img {
    max-height: 48px;
}

.institutional-logos-home .institutional-logo-card {
    min-height: 90px;
    background: #fff;
}

.institutional-logos-home .institutional-logo-card img {
    max-height: 58px;
}

.page-header {
    margin-top: 0;
    background: linear-gradient(140deg, #0f293d 0%, #1f4a6e 100%);
    color: #f2f7fc;
    padding: 3.5rem 0 3rem;
}

.page-header h1 {
    color: #fff;
    margin-bottom: 0.6rem;
    font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}

.page-header p {
    color: #d2e2ef;
    max-width: 760px;
}

.services-full {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.service-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.7rem;
    box-shadow: var(--shadow-sm);
}

.service-item h2 {
    font-size: 1.4rem;
    margin-bottom: 0.65rem;
}

.service-item p {
    color: var(--color-muted);
}

.service-item ul {
    list-style: none;
    margin-top: 1rem;
}

.service-item li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.45rem;
    color: #475a6f;
    font-size: 0.94rem;
}

.service-item li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.68rem;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: #65829f;
}

.service-note {
    margin-top: 1.2rem;
}

.form-standard {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
}

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

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #304457;
    font-size: 0.9rem;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #cfd8e1;
    border-radius: var(--radius-sm);
    padding: 0.72rem;
    font-size: 0.96rem;
    font-family: inherit;
    color: #23364a;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6e8ca8;
    box-shadow: 0 0 0 3px rgba(99, 131, 160, 0.18);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.form-checkbox input {
    width: auto;
    margin-top: 0.25rem;
}

.form-checkbox label {
    margin-bottom: 0;
    font-weight: 600;
    color: #415367;
}

.form-actions {
    margin-top: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-info {
    color: #6a7d90;
    font-size: 0.84rem;
}

.input-error {
    border-color: #cf3f4d !important;
    background: #fff4f5;
}

.error-text {
    margin-top: 0.3rem;
    display: block;
    color: var(--color-danger);
    font-size: 0.84rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem;
}

.contact-details {
    display: grid;
    gap: 0.8rem;
}

.contact-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.contact-item strong {
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5d7388;
    display: block;
    margin-bottom: 0.2rem;
}

.contact-item a {
    font-weight: 700;
}

.about-content {
    max-width: 860px;
}

.about-content p {
    color: var(--color-muted);
    margin-bottom: 1.1rem;
}

.about-callout {
    margin-top: 1.2rem;
}

.about-final-cta {
    margin-top: 2.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #20384f;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 1.6rem;
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
}

.legal-content p,
.legal-content li {
    color: #40556a;
}

.legal-content ul {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

.legal-updated-note {
    margin-top: 1.8rem;
    font-style: italic;
    color: #607487;
}

.not-found-content {
    text-align: center;
    padding: 3.8rem 0;
}

.not-found-action {
    margin-top: 1.3rem;
}

.footer {
    margin-top: 3.6rem;
    background: #102334;
    color: #d0dbe6;
    padding: 2.6rem 0 1.1rem;
}

.footer-content {
    width: min(1160px, calc(100% - 3rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.8fr));
    gap: 1.25rem;
    align-items: start;
}

.footer-brand-block {
    padding-right: 1rem;
}

.footer-kicker,
.footer-institutional-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8fa9be;
    margin-bottom: 0.55rem;
}

.footer-brand-block h3 {
    color: #f1f6fb;
    font-size: 1.2rem;
    margin-bottom: 0.65rem;
}

.footer-brand-copy {
    color: #c8d7e4;
    max-width: 28ch;
    font-size: 0.92rem;
}

.footer-column h3,
.footer-column h4 {
    color: #f1f6fb;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.footer-column p,
.footer-column li,
.footer-column a {
    color: #b8c8d7;
    font-size: 0.84rem;
    line-height: 1.55;
}

.footer-column strong {
    color: #f1f6fb;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.35rem;
}

.footer-contact-column {
    display: grid;
    gap: 0.65rem;
}

.footer-contact-column p {
    margin: 0;
}

.footer-column a:hover {
    color: #fff;
}

.footer-institutional {
    width: min(1160px, calc(100% - 3rem));
    margin: 1.4rem auto 0;
    padding: 0.9rem 0 0;
    border-top: 1px solid rgba(184, 200, 215, 0.22);
    display: flex;
    gap: 1.1rem;
    align-items: center;
}

.footer-institutional-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 0 1 430px;
}

.footer-institutional-summary {
    color: #e1e9f0;
    font-size: 0.82rem;
    font-weight: 600;
}

.footer-institutional-motto {
    color: #9fb3c5;
    font-size: 0.76rem;
}

.footer-institutional-logos-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.institutional-logos-footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
}

.institutional-logos-footer .institutional-logo-card {
    min-height: 62px;
    padding: 0.45rem 0.7rem;
    background: rgba(255, 255, 255, 0.98);
    flex: 0 1 170px;
}

.institutional-logos-footer .institutional-logo-card img {
    max-height: 36px;
}

.institutional-logos-footer .institutional-logo-card-eu img {
    max-height: 32px;
}

.footer-bottom {
    width: min(1160px, calc(100% - 3rem));
    margin: 0.9rem auto 0;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(184, 200, 215, 0.28);
    color: #9fb3c5;
    text-align: center;
}

.footer-license {
    margin-top: 0;
    padding-top: 0;
    font-size: 0.8rem;
    line-height: 1.35;
}

.cc-license-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: inherit;
    text-decoration: none;
    flex-wrap: nowrap;
    max-width: 100%;
}

.cc-license-link:hover {
    text-decoration: underline;
}

.cc-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
}

.cc-icons img {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.9;
}

.cc-license-text {
    display: inline-block;
    font-size: 0.8rem;
    color: #adc0d1;
}

.cc-license-text strong {
    color: #dbe7f1;
}

.cc-attribution {
    margin-top: 0.32rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem 0.85rem;
    opacity: 0.8;
    font-size: 0.72rem;
    line-height: 1.3;
}

.cc-attribution span {
    display: inline-block;
}

.cc-attribution strong {
    color: #c3d3e1;
    font-weight: 600;
}

.cc-attribution a {
    color: inherit;
    text-decoration: none;
}

.cc-attribution a:hover {
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6a7d90;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

@media (max-width: 1080px) {
    .header-content {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.9rem 0;
    }

    .logo {
        min-width: 0;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding-bottom: 0.3rem;
    }

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

    .institutional-section-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-brand-block {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .footer-institutional {
        align-items: flex-start;
        flex-direction: column;
    }

    .institutional-logos-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

}

@media (max-width: 820px) {
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .header-actions .btn {
        flex: 1;
    }

    .locale-switcher {
        flex: 1;
        justify-content: space-between;
    }

    .locale-option {
        justify-content: center;
        flex: 1;
    }

    .hero {
        padding: 4.4rem 0 4rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-section {
        padding: 2rem 1.2rem;
    }

    .institutional-section {
        width: min(1160px, calc(100% - 1.5rem));
    }

    .institutional-shell,
    .institutional-panel,
    .footer-institutional {
        padding: 1.4rem;
    }

    .institutional-copy {
        padding-right: 0;
    }

    .services-full,
    .contact-content,
    .form-row {
        grid-template-columns: 1fr;
    }

    .btn,
    .btn-lg {
        width: 100%;
    }

    .cc-license-link {
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .cc-icons img {
        width: 16px;
        height: 16px;
    }

    .cc-attribution {
        display: block;
        text-align: left;
    }

    .cc-attribution span {
        display: block;
        margin-bottom: 0.18rem;
    }
}

@media (max-width: 560px) {
    .container,
    .hero-content,
    .alert,
    .cta-section,
    .footer-content,
    .footer-institutional,
    .footer-bottom {
        width: calc(100% - 1.5rem);
    }

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

    .institutional-logos-footer {
        gap: 0.55rem;
    }

    .institutional-logo-card {
        flex-basis: 100%;
        min-height: 82px;
    }

    .footer-institutional {
        padding: 0.9rem 0 0;
    }
}
