:root {
    --blue: #075da8;
    --navy: #102f50;
    --teal: #0caea8;
    --pale: #edf9fa;
    --line: #d5e2e9;
    --muted: #5b7188;
    --bg: #f7fbfc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--navy);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Encabezado */

.site-header {
    height: 78px;
    padding: 0 clamp(24px, 5vw, 76px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 5;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    height: 52px;
    object-fit: contain;
}

.main-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 700;
}

.main-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Presentación */

.hero {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid #e2edf1;
}

.topography {
    position: absolute;
    inset: 0;
    opacity: 0.7;
    background-image:
        radial-gradient(circle at 14% 30%,
            transparent 0 88px,
            rgba(28, 170, 195, 0.08) 89px 90px,
            transparent 91px 118px,
            rgba(28, 170, 195, 0.06) 119px 120px,
            transparent 121px),
        radial-gradient(circle at 88% 32%,
            transparent 0 115px,
            rgba(28, 170, 195, 0.08) 116px 117px,
            transparent 118px 147px,
            rgba(28, 170, 195, 0.06) 148px 149px,
            transparent 150px),
        linear-gradient(rgba(7, 93, 168, 0.025) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(7, 93, 168, 0.025) 1px,
            transparent 1px);

    background-size:
        auto,
        auto,
        28px 28px,
        28px 28px;
}

.hero-inner {
    position: relative;
    max-width: 920px;
    margin: auto;
    padding: 68px 24px 40px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(42px, 5.4vw, 70px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.subtitle {
    max-width: 720px;
    margin: 20px auto 30px;
    color: #496782;
    font-size: 19px;
    line-height: 1.6;
}

/* Buscador */

.search-wrap {
    max-width: 720px;
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    background: #fff;
    border: 1px solid #b9cddd;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(14, 61, 94, 0.06);
}

.search-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(7, 93, 168, 0.12);
}

.search-icon {
    color: #53728f;
    font-size: 35px;
    line-height: 1;
    transform: rotate(-20deg);
}

.search-wrap input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--navy);
    font-size: 18px;
}

.search-wrap input::placeholder {
    color: #8093a5;
}

/* Filtros */

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.filters button {
    min-width: 128px;
    padding: 11px 19px;
    color: var(--blue);
    font-weight: 700;
    border: 1px solid #74a8ce;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.filters button:hover {
    border-color: var(--blue);
    background: #f2f8fc;
}

.filters button.active {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 5px 13px rgba(7, 93, 168, 0.2);
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(12, 174, 168, 0.4);
    outline-offset: 3px;
}

/* Directorio */

.directory {
    max-width: 1240px;
    margin: auto;
    padding: 34px 24px 64px;
}

.results-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 17px;
    color: var(--muted);
    font-size: 14px;
}

.results-heading p {
    margin: 0;
    color: #35536d;
    font-weight: 700;
}

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

/* Tarjetas sin icono */

.station-card {
    min-height: 210px;
    position: relative;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(19, 65, 95, 0.035);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.station-card:hover {
    transform: translateY(-3px);
    border-color: #83b9d4;
    box-shadow: 0 13px 30px rgba(19, 65, 95, 0.09);
}

.station-copy {
    min-width: 0;
    padding-bottom: 56px;
}

.region-tag {
    display: inline-block;
    margin-bottom: 7px;
    color: #16827f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.station-copy h2 {
    margin: 0 0 8px;
    color: #0c294b;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.station-copy p {
    margin: 0 0 11px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.location {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #44657f;
    font-size: 13px;
    line-height: 1.4;
}

.location span {
    flex-shrink: 0;
    color: var(--blue);
    font-weight: 800;
}

.station-link {
    position: absolute;
    right: 26px;
    bottom: 22px;
    padding: 10px 15px;
    color: var(--blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid var(--blue);
    border-radius: 8px;
    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.station-link:hover {
    color: #fff;
    background: var(--blue);
}

/* Sin resultados */

.empty-state {
    padding: 70px 24px;
    text-align: center;
    border: 1px dashed #adc4d2;
    border-radius: 14px;
    background: #fff;
}

.empty-state[hidden],
.station-grid[hidden] {
    display: none;
}

.empty-state>span {
    color: #8aa7b9;
    font-size: 42px;
}

.empty-state h2 {
    margin: 8px 0;
}

.empty-state p {
    margin: 0 0 20px;
    color: var(--muted);
}

.empty-state button {
    padding: 10px 18px;
    color: #fff;
    font-weight: 700;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    cursor: pointer;
}

/* Pie de página */

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 25px clamp(24px, 5vw, 76px);
    color: #667d8f;
    font-size: 13px;
    border-top: 1px solid var(--line);
    background: #fff;
}

footer p {
    margin: 0;
}

/* Tabletas */

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

    .main-link {
        font-size: 14px;
    }
}

/* Teléfonos */

@media (max-width: 590px) {
    .site-header {
        height: 68px;
        padding: 0 18px;
    }

    .brand-logo {
        height: 43px;
    }

    .main-link {
        font-size: 0;
    }

    .main-link span {
        font-size: 23px;
    }

    .hero-inner {
        padding: 50px 18px 30px;
    }

    h1 {
        font-size: clamp(38px, 11vw, 48px);
    }

    .subtitle {
        font-size: 16px;
    }

    .search-wrap {
        height: 57px;
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .filters button {
        min-width: 0;
    }

    .directory {
        padding: 26px 16px 48px;
    }

    .results-heading span {
        display: none;
    }

    .station-card {
        min-height: 235px;
        padding: 20px;
    }

    .station-copy {
        padding-bottom: 62px;
    }

    .station-copy h2 {
        font-size: 25px;
    }

    .station-link {
        right: 20px;
        bottom: 20px;
    }

    footer {
        flex-direction: column;
        padding: 22px 18px;
    }
}

/* Accesibilidad */

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