/* Responsive layout overrides */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --navy: #27458B;
    --blue: #27458B;
    --red: #59A946;
    --ink: #4D4A4A;
    --paper: #F7F8F5;
    --white: #FFFFFF;
    --line: #D8DDD5;
    --shadow: 0 24px 70px rgba(39, 69, 139, .14);
}

.campaign-message {
    text-align: justify;
    font-weight: 700;
    white-space: pre-line;
}

.campaign-highlight {
    display: inline;
    background: var(--red);
    color: #fff;
    padding: 3px 7px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.language-button {
    border: 1px solid var(--line);
    background: transparent;
    color: #496078;
    padding: 7px 9px;
    font: 700 11px/1 'DM Sans', sans-serif;
    cursor: pointer;
}

.language-button.is-active,
.language-button:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.eyebrow > span[data-i18n] {
    display: inline;
    width: auto;
    height: auto;
    background: none;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font: 700 24px/1 'Space Grotesk', sans-serif;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
    box-shadow: 0 8px 22px rgba(16, 44, 86, .2);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .section-shell,
    .site-header {
        width: calc(100% - 40px);
    }

    .hero {
        grid-template-columns: 1fr 0.9fr;
        gap: 30px;
    }

    .hero h1 {
        font-size: clamp(42px, 6vw, 62px);
    }

    .main-nav {
        gap: 15px;
    }

    .language-switcher {
        margin-right: 0;
    }

    .main-nav a {
        font-size: 12px;
    }

    .form-section {
        gap: 40px;
    }

    .engagement {
        gap: 40px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 760px) {
    .section-shell,
    .site-header {
        width: calc(100% - 38px);
    }

    .site-header {
        height: 78px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        z-index: 10;
        top: 84px;
        left: 19px;
        right: 19px;
        background: #fff;
        box-shadow: var(--shadow);
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 17px;
    }

    .language-switcher {
        justify-content: flex-end;
    }

    .main-nav.is-open {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 45px;
        padding: 55px 0 75px;
        min-height: 0;
    }

    .hero-visual {
        justify-self: center;
        width: calc(100% - 20px);
    }

    .vision-grid,
    .form-section {
        grid-template-columns: 1fr;
    }

    .vision-card {
        min-height: 220px;
    }

    .engagement {
        grid-template-columns: 1fr;
        gap: 45px;
        padding-left: 19px;
        padding-right: 19px;
    }

    .form-section {
        gap: 48px;
        padding: 90px 0;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 18px;
    }

    .site-footer {
        padding: 30px 19px;
        display: grid;
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .section-shell,
    .site-header {
        width: calc(100% - 32px);
    }

    .site-header {
        height: 72px;
    }

    .brand {
        font-size: 12px;
    }

    .brand-logo {
        width: 72px;
        height: 44px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .main-nav {
        top: 76px;
        left: 16px;
        right: 16px;
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 38px;
        padding: 42px 0 65px;
    }

    .hero h1 {
        font-size: clamp(40px, 12vw, 54px);
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .hero-actions .button {
        width: 100%;
    }

    .text-link {
        text-align: center;
    }

    .hero-visual {
        width: 100%;
        padding: 0 8px;
    }

    .portrait-frame {
        height: 360px;
    }

    .stamp {
        right: -4px;
        top: 24px;
        width: 90px;
        height: 90px;
    }

    .vision {
        padding: 78px 0 70px;
    }

    .section-heading h2 {
        font-size: 36px;
    }

    .engagement {
        padding: 58px 16px;
        display: flex;
        flex-direction: column;
        gap: 34px;
    }

    .engagement-photo {
        width: 100%;
        height: 230px;
    }

    .engagement-copy h2 {
        font-size: 34px;
    }

    .form-section {
        display: flex;
        flex-direction: column;
        padding: 75px 0;
        gap: 38px;
    }

    .form-intro h2 {
        font-size: 40px;
    }

    .contact-form {
        padding: 22px 16px;
    }

    .contact-form input,
    .contact-form select {
        min-height: 46px;
    }

    .site-footer {
        padding: 28px 16px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

.print-header {
    display: none;
}

.print-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.admin-stats {
    grid-template-columns: repeat(3, 1fr);
}

.admin-overview {
    margin-bottom: 38px;
    padding: 25px 30px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(16, 44, 86, .04);
}

.overview-heading,
.table-heading,
.table-footer,
.table-actions,
.admin-filters,
.commune-bar div {
    display: flex;
    align-items: center;
}

.overview-heading,
.table-heading,
.table-footer {
    justify-content: space-between;
}

.overview-heading h2 {
    margin: 7px 0 0;
    color: var(--navy);
    font: 600 24px 'Space Grotesk', sans-serif;
}

.overview-heading > span,
.commune-bar strong,
.table-footer,
.filter-search,
.admin-filters label {
    color: #6d7e90;
    font-size: 12px;
}

.commune-bars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 35px;
    margin-top: 22px;
}

.commune-bar {
    display: grid;
    gap: 7px;
}

.commune-bar div {
    justify-content: space-between;
    gap: 15px;
}

.bar-track {
    display: block;
    height: 7px;
    overflow: hidden;
    background: #e7ebef;
}

.bar-track span {
    display: block;
    height: 100%;
    background: var(--red);
}

.table-heading > div:first-child {
    display: grid;
    gap: 5px;
}

.table-heading span {
    color: #788899;
    font-size: 12px;
}

.table-actions {
    gap: 10px;
}

.table-actions .button {
    padding: 9px 12px;
}

.admin-filters {
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0 18px;
    padding: 15px;
    background: #eef1f3;
}

.admin-filters label {
    display: grid;
    gap: 5px;
    min-width: 170px;
    font-weight: 700;
}

.admin-filters .filter-search {
    flex: 1 1 260px;
}

.admin-filters input,
.admin-filters select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    padding: 8px 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.sort-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.table-footer {
    gap: 15px;
    margin-top: 15px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

.pagination-controls button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

tr[hidden] {
    display: none;
}

@media (max-width: 760px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-overview {
        padding: 20px;
    }

    .commune-bars {
        grid-template-columns: 1fr;
    }

    .table-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .table-actions {
        flex-wrap: wrap;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 14mm;
    }

    body,
    .admin-dashboard {
        min-height: 0;
        background: #fff;
    }

    .admin-dashboard {
        padding: 0;
    }

    .admin-dashboard-header,
    .admin-heading,
    .admin-stats,
    .admin-overview,
    .admin-filters,
    .table-footer,
    .form-alert,
    .table-actions,
    .table-heading span,
    .admin-actions {
        display: none !important;
    }

    .print-header {
        display: block;
        border-bottom: 2px solid #27458B;
        padding-bottom: 12px;
        margin-bottom: 18px;
        color: #102c56;
    }

    .print-header div {
        display: flex;
        align-items: center;
        gap: 10px;
        font: 700 18px 'Space Grotesk', sans-serif;
    }

    .print-header .brand-mark {
        display: grid;
        width: 36px;
        height: 36px;
        color: #fff;
        background: #59A946;
        place-items: center;
        font-size: 12px;
    }

    .print-header p {
        margin: 10px 0 3px;
        font-size: 13px;
    }

    .print-header small {
        color: #63758a;
        font-size: 10px;
    }

    .admin-table-section {
        box-shadow: none;
    }

    .table-wrap {
        overflow: visible;
        box-shadow: none;
    }

    table {
        min-width: 0;
        font-size: 10px;
    }

    th,
    td {
        padding: 8px 6px;
        border-bottom: 1px solid #d9dfe5;
    }

    thead {
        display: table-header-group;
    }

    tr {
        break-inside: avoid;
    }
}
