:root {
    --green-700: #2f6d2b;
    --green-600: #3f8736;
    --green-500: #61b72c;
    --green-100: #eaf7e3;
    --green-50: #f5fbf1;
    --ink-900: #17211b;
    --ink-700: #3f4c44;
    --ink-500: #6b776f;
    --line: #dfe7e1;
    --surface: #ffffff;
    --background: #f4f7f4;
    --shadow: 0 18px 50px rgba(31, 60, 40, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.municipios-page {
    margin: 0;
    min-width: 280px;
    color: var(--ink-900);
    background: var(--background);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: #fff;
    background: var(--ink-900);
    border-radius: 8px;
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(47, 109, 43, 0.12);
    box-shadow: 0 4px 18px rgba(26, 53, 34, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
    gap: 32px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 8px 0;
}

.brand img {
    display: block;
    width: 205px;
    max-width: 100%;
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.nav-link {
    min-height: 42px;
    padding: 0 15px;
    color: var(--ink-700);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 650;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--green-700);
    background: var(--green-50);
    outline: none;
    transform: translateY(-1px);
}

.nav-link-active {
    color: var(--green-700);
    background: var(--green-100);
}

.nav-link-restricted {
    color: #fff;
    background: var(--green-700);
}

.nav-link-restricted:hover,
.nav-link-restricted:focus-visible {
    color: #fff;
    background: var(--green-600);
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 18%, rgba(157, 230, 93, 0.32), transparent 25%),
        linear-gradient(125deg, #193f27 0%, #2f752e 58%, #63b72f 100%);
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.035), 0 0 0 96px rgba(255, 255, 255, 0.025);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1040px, calc(100% - 40px));
    min-height: 330px;
    margin: 0 auto;
    padding: 66px 0 86px;
    gap: 56px;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow,
.section-kicker {
    display: block;
    margin-bottom: 10px;
    color: #cbf4ac;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    max-width: 680px;
    font-size: clamp(2.35rem, 6vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.hero p {
    max-width: 650px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-mark {
    display: grid;
    flex: 0 0 142px;
    width: 142px;
    height: 142px;
    place-items: center;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 38px;
    box-shadow: 0 18px 40px rgba(12, 42, 22, 0.22);
    transform: rotate(4deg);
}

.hero-mark svg {
    width: 70px;
    fill: #fff;
}

.municipios-section {
    position: relative;
    z-index: 2;
    width: min(1040px, calc(100% - 40px));
    margin: -36px auto 72px;
}

.content-card {
    padding: clamp(24px, 5vw, 48px);
    background: var(--surface);
    border: 1px solid rgba(47, 109, 43, 0.1);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.card-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.section-kicker {
    margin-bottom: 6px;
    color: var(--green-600);
}

.card-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.search-field {
    width: min(100%, 360px);
}

.search-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.search-control {
    position: relative;
}

.search-control svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 20px;
    fill: none;
    stroke: var(--ink-500);
    stroke-linecap: round;
    stroke-width: 2;
    transform: translateY(-50%);
}

.search-control input {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px 10px 46px;
    color: var(--ink-900);
    background: var(--green-50);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-control input:focus {
    background: #fff;
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(97, 183, 44, 0.15);
}

.results-status {
    min-height: 24px;
    margin: 26px 0 10px;
    color: var(--ink-500);
    font-size: 0.9rem;
}

.table-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.municipalities-grid {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.municipalities-grid th {
    padding: 15px 22px;
    color: #fff;
    background: var(--green-700);
    border: 0;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.municipalities-grid td {
    padding: 15px 22px;
    color: var(--ink-700);
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf1ee;
    font-size: 0.98rem;
    font-weight: 550;
}

.municipalities-grid tr:nth-child(even) td {
    background: var(--green-50);
}

.municipalities-grid tr:last-child td {
    border-bottom: 0;
}

.municipalities-grid tbody tr:hover td {
    color: var(--green-700);
    background: var(--green-100);
}

.empty-row td {
    padding: 40px 22px;
    color: var(--ink-500);
    text-align: center;
}

.no-results {
    padding: 48px 20px;
    color: var(--ink-500);
    text-align: center;
}

.no-results span {
    display: block;
    color: var(--green-500);
    font-size: 2.5rem;
    line-height: 1;
}

.no-results strong {
    display: block;
    margin-top: 12px;
    color: var(--ink-900);
    font-size: 1.05rem;
}

.no-results p {
    margin: 5px 0 0;
}

.site-footer {
    padding: 28px 20px;
    color: var(--ink-500);
    background: #e9eeea;
    border-top: 1px solid #dce5de;
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.86rem;
}

@media (max-width: 880px) {
    .header-inner,
    .card-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .header-inner {
        padding: 16px 0;
        gap: 14px;
    }

    .brand {
        justify-content: center;
    }

    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-inner {
        min-height: 300px;
    }

    .hero-mark {
        flex-basis: 112px;
        width: 112px;
        height: 112px;
        border-radius: 30px;
    }

    .hero-mark svg {
        width: 54px;
    }

    .search-field {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .header-inner,
    .hero-inner,
    .municipios-section {
        width: min(100% - 24px, 1040px);
    }

    .brand img {
        width: 176px;
    }

    .main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 0 8px;
    }

    .nav-link-restricted {
        grid-column: 1 / -1;
    }

    .hero-inner {
        min-height: auto;
        padding: 52px 0 76px;
    }

    .hero-mark {
        display: none;
    }

    .municipios-section {
        margin-top: -28px;
        margin-bottom: 40px;
    }

    .content-card {
        border-radius: 18px;
    }

    .municipalities-grid th,
    .municipalities-grid td {
        padding: 13px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
