/* =========================================================================
   Inicio - Camioneros Río Negro
   Hoja exclusiva de index.html. (styles.css sigue en uso por /Noticias.)
   ========================================================================= */

:root {
    /* Marca */
    --green-950: #06231a;
    --green-900: #0a3322;
    --green-800: #004f29;
    --green-700: #006633;
    --green-600: #00843f;
    --green-500: #009a44;
    --green-100: #dcefe3;
    --green-50: #eef6f1;

    /* Neutros */
    --ink: #13221a;
    --ink-2: #33443a;
    --muted: #5e6e65;
    --line: #e1e8e3;
    --surface: #ffffff;
    --surface-2: #f5f8f6;

    /* Tipografía */
    --font-ui: "Roboto", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --font-heading: var(--font-ui);
    --font-display: var(--font-ui);

    /* Medidas */
    --nav-h: 86px;
    --radius-lg: 24px;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(16, 40, 26, 0.05), 0 4px 14px -6px rgba(16, 40, 26, 0.12);
    --shadow-md: 0 1px 2px rgba(16, 40, 26, 0.05), 0 18px 40px -18px rgba(16, 40, 26, 0.28);
    --shadow-lg: 0 30px 70px -30px rgba(6, 35, 26, 0.45);
    --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.is-modal-open {
    overflow: hidden;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

:focus-visible {
    outline: 3px solid rgba(0, 154, 68, 0.45);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.container {
    width: min(1240px, 100% - 2.5rem);
    margin-inline: auto;
}

.footer-anchor {
    scroll-margin-top: calc(var(--nav-h) + 10px);
}

/* ---------- Piezas comunes ---------- */
.section {
    padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.section-head h2 {
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.section-head p {
    margin-top: 0.6rem;
    max-width: 40rem;
    color: var(--muted);
    font-size: 1.02rem;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
    color: var(--green-600);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.eyebrow-live::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1fbf5f;
    box-shadow: 0 0 0 0 rgba(31, 191, 95, 0.55);
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
    70% { box-shadow: 0 0 0 9px rgba(31, 191, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 191, 95, 0); }
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--green-700);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.link-arrow span {
    transition: transform 0.25s var(--ease);
}

.link-arrow:hover span,
a:hover .link-arrow span {
    transform: translateX(4px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 50px;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
}

.btn span {
    transition: transform 0.25s var(--ease);
}

.btn:hover span {
    transform: translateX(4px);
}

.btn-light {
    background: #fff;
    color: var(--green-800);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
}

.btn-light:hover {
    transform: translateY(-2px);
    background: var(--green-50);
}

.round-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s, transform 0.2s;
}

.round-btn svg,
.hero-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.round-btn:hover:not(:disabled) {
    background: var(--green-700);
    border-color: var(--green-700);
    color: #fff;
}

.round-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
    position: relative;
    margin-top: var(--nav-h);
    height: clamp(500px, calc(88vh - var(--nav-h)), 760px);
    background: var(--green-950);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s ease, visibility 0s;
    z-index: 1;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    transition: transform 7s linear;
}

.hero-slide.is-active img {
    transform: scale(1);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 26, 16, 0.86) 0%, rgba(4, 26, 16, 0.55) 38%, rgba(4, 26, 16, 0.05) 75%),
        linear-gradient(0deg, rgba(4, 26, 16, 0.75) 0%, rgba(4, 26, 16, 0) 45%);
}

.hero-copy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 1.1rem;
    padding-bottom: calc(3.25rem + clamp(5.5rem, 10vh, 7rem));
}

.hero-copy > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.7s var(--ease);
}

.hero-slide.is-active .hero-copy > * {
    opacity: 1;
    transform: none;
}

.hero-slide.is-active .hero-copy > :nth-child(2) { transition-delay: 0.12s; }
.hero-slide.is-active .hero-copy > :nth-child(3) { transition-delay: 0.24s; }

.hero-copy h2 {
    max-width: 17ch;
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.035em;
    text-wrap: balance;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}

.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(3.25rem + clamp(1rem, 2.5vh, 1.75rem));
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hero-counter {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.7);
    flex: none;
}

.hero-counter strong {
    color: #fff;
    font-weight: 700;
}

.hero-progress {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 420px;
}

.hero-progress button {
    position: relative;
    flex: 1;
    height: 22px;
    border: 0;
    background: none;
    cursor: pointer;
}

.hero-progress button::before,
.hero-progress button span {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 3px;
}

.hero-progress button::before {
    right: 0;
    background: rgba(255, 255, 255, 0.28);
}

.hero-progress button span {
    width: 0;
    background: #fff;
}

.hero-progress button.is-done span {
    width: 100%;
}

.hero-progress button.is-active span {
    animation: hero-fill var(--hero-duration, 6.5s) linear forwards;
}

.hero:hover .hero-progress button.is-active span,
.hero.is-paused .hero-progress button.is-active span {
    animation-play-state: paused;
}

@keyframes hero-fill {
    from { width: 0; }
    to { width: 100%; }
}

.hero-arrows {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.hero-arrow {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.hero-arrow:hover {
    background: #fff;
    border-color: #fff;
    color: var(--green-800);
}

/* =========================================================================
   TRÁMITES Y SERVICIOS
   ========================================================================= */
.services {
    position: relative;
    z-index: 5;
    margin-top: -3.25rem;
}

.services-panel {
    display: grid;
    grid-template-columns: minmax(200px, 0.32fr) 1fr;
    gap: 2rem;
    padding: clamp(1.4rem, 2.6vw, 2.2rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.services-intro {
    padding: 0.4rem 0.4rem 0;
}

.services-intro h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.services-intro p {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
}

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

.service {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1.05rem 1.05rem 1.15rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.25s, transform 0.25s var(--ease);
}

.service:hover {
    background: var(--green-50);
}

.service-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--green-50);
    color: var(--green-700);
    transition: background 0.25s, color 0.25s, transform 0.35s var(--ease);
}

.service-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service:hover .service-icon {
    background: var(--green-700);
    color: #fff;
    transform: rotate(-6deg) scale(1.04);
}

.service-copy {
    display: grid;
    gap: 0.3rem;
}

.service-copy strong {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.005em;
}

.service-copy span {
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--muted);
}

.service-go {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    color: var(--green-600);
    font-weight: 700;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity 0.25s, transform 0.25s var(--ease);
}

.service:hover .service-go {
    opacity: 1;
    transform: none;
}

/* =========================================================================
   NOVEDADES
   ========================================================================= */
.novedades {
    padding-top: clamp(4rem, 8vw, 6.5rem);
    background:
        radial-gradient(1200px 400px at 85% 0%, rgba(0, 154, 68, 0.07), transparent 70%),
        linear-gradient(180deg, #fff 0%, var(--surface-2) 100%);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* Va siempre en su propio renglón: así no queda un separador suelto al cortar la línea. */
.novedades-updated {
    display: block;
    color: var(--green-700);
    font-weight: 600;
    white-space: nowrap;
}

.novedades-updated:empty {
    display: none;
}

.rail-arrows {
    display: flex;
    gap: 0.5rem;
}

.novedades.nv-no-scroll .rail-arrows {
    display: none;
}

.novedades .nv-rail {
    --nv-rail-pad: max(1.25rem, (100vw - 1240px) / 2);
    grid-auto-columns: minmax(290px, 360px);
}

/* =========================================================================
   NOTICIAS
   ========================================================================= */
.news {
    background: var(--surface-2);
    padding-top: 0;
}

.news .container {
    padding-top: clamp(3rem, 6vw, 4.5rem);
    border-top: 1px solid var(--line);
}

.news-layout {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.news-tag {
    display: inline-block;
    color: var(--green-600);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.news-feature {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--ink);
    transition: box-shadow 0.3s, transform 0.3s var(--ease);
}

.news-feature:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.news-feature-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-feature-media img,
.news-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.news-feature:hover img,
.news-item:hover img {
    transform: scale(1.05);
}

.news-feature-copy {
    display: grid;
    gap: 0.75rem;
    padding: clamp(1.25rem, 2.5vw, 1.9rem);
}

.news-feature-copy h3 {
    font-size: clamp(1.4rem, 2.3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.news-feature-copy p {
    color: var(--muted);
}

.news-list {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.news-item {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 1.1rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    transition: box-shadow 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}

.news-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: transparent;
}

.news-item-media {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.news-item-copy {
    display: grid;
    gap: 0.4rem;
    padding-right: 0.5rem;
}

.news-item-copy h3 {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* =========================================================================
   RADIO Y YOUTUBE
   ========================================================================= */
.media-band {
    position: relative;
    background:
        radial-gradient(900px 500px at 10% 0%, rgba(0, 154, 68, 0.28), transparent 60%),
        radial-gradient(700px 400px at 100% 100%, rgba(0, 102, 51, 0.35), transparent 60%),
        var(--green-950);
    color: #fff;
    overflow: hidden;
    /* Las mueve script.js (setupMediaWave) según el scroll. */
    --wave-depth: 1;
    --wave-shift: 0px;
}

/* Borde superior curvo: una forma del color de Noticias (sección de arriba) tapa
   la parte de arriba de la franja. La curva arranca alta a la izquierda, baja suave
   hasta su punto más hondo (~61% del ancho) y sube apenas sobre la derecha.
   Una sola onda continua (tangentes horizontales en el punto bajo), poco pronunciada. */
.media-band::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: clamp(24px, 3.8vw, 56px);
    background: var(--surface-2);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V24C1300 24 1170 100 880 100C560 100 280 44 0 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V24C1300 24 1170 100 880 100C560 100 280 44 0 0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 1;
    /* Al entrar en pantalla la curva está marcada y se va asentando al bajar. */
    transform-origin: top;
    transform: scaleY(var(--wave-depth));
    will-change: transform;
}

/* Segunda onda, tenue y repetible, que se desliza de costado a otra velocidad
   (da profundidad). Mide el doble de ancho para poder desplazarse sin cortes. */
.media-band::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 200%;
    height: clamp(34px, 5.4vw, 80px);
    background: var(--surface-2);
    opacity: 0.07;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V30C1200 30 1080 100 720 100C360 100 240 30 0 30Z'/%3E%3C/svg%3E") 0 0 / 50% 100% repeat-x;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1440V30C1200 30 1080 100 720 100C360 100 240 30 0 30Z'/%3E%3C/svg%3E") 0 0 / 50% 100% repeat-x;
    pointer-events: none;
    transform: translateX(var(--wave-shift));
    will-change: transform;
}

.media-band > .container {
    position: relative;
    z-index: 2;
}

.section-head-light h2 {
    color: #fff;
}

.section-head-light .eyebrow {
    color: #5fe09a;
}

.media-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 1.5rem;
    align-items: stretch;
}

.radio-card,
.video-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.radio-card {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: clamp(1.4rem, 2.5vw, 2rem);
}

.radio-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.radio-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.radio-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5a4f;
}

.media-card-radio.is-playing .radio-live-dot {
    animation: live-pulse-red 1.6s infinite;
}

@keyframes live-pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 90, 79, 0.6); }
    70% { box-shadow: 0 0 0 9px rgba(255, 90, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 90, 79, 0); }
}

.radio-freq {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.08em;
}

.radio-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.radio-play {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--green-800);
    cursor: pointer;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08), 0 16px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.radio-play:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.1), 0 16px 30px -10px rgba(0, 0, 0, 0.5);
}

.radio-play svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.radio-play .icon-pause,
.media-card-radio.is-playing .radio-play .icon-play {
    display: none;
}

.media-card-radio.is-playing .radio-play .icon-pause {
    display: block;
}

.radio-info h3 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.radio-status {
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.radio-wave {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex: 1;
    min-height: 56px;
    max-height: 150px;
}

.radio-wave span {
    flex: 1;
    height: 18%;
    border-radius: 3px;
    background: linear-gradient(180deg, #5fe09a, rgba(95, 224, 154, 0.35));
    opacity: 0.55;
    transition: height 0.4s ease;
}

.radio-wave span:nth-child(3n) { height: 34%; }
.radio-wave span:nth-child(4n) { height: 26%; }
.radio-wave span:nth-child(5n) { height: 44%; }

.media-card-radio.is-playing .radio-wave span {
    opacity: 1;
    animation: wave 1.1s ease-in-out infinite alternate;
}

.media-card-radio.is-playing .radio-wave span:nth-child(2n) { animation-duration: 0.8s; }
.media-card-radio.is-playing .radio-wave span:nth-child(3n) { animation-duration: 1.4s; }
.media-card-radio.is-playing .radio-wave span:nth-child(5n) { animation-duration: 0.95s; animation-delay: -0.3s; }

@keyframes wave {
    0% { height: 15%; }
    100% { height: 100%; }
}

.media-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    opacity: 0.85;
}

.media-link:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.video-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame iframe,
.video-facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-facade {
    padding: 0;
    cursor: pointer;
    background: #000;
}

.video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.8s var(--ease);
}

.video-facade:hover img {
    opacity: 1;
    transform: scale(1.03);
}

.video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    display: grid;
    place-items: center;
    width: 74px;
    height: 52px;
    border-radius: 16px;
    background: #ff0033;
    color: #fff;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s var(--ease);
}

.video-play svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.video-facade:hover .video-play {
    transform: scale(1.08);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
}

.video-meta h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.video-meta p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.video-meta .media-link {
    margin-top: 0;
    flex: none;
}

/* =========================================================================
   DELEGACIONES
   ========================================================================= */
.delegations {
    background: #fff;
}

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

.delegation {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.3rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s;
    min-width: 0;
}

.delegation:hover {
    border-color: var(--green-100);
    box-shadow: var(--shadow-md);
}

.delegation h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.delegation-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--green-50);
    color: var(--green-700);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delegation-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
    color: var(--ink-2);
    font-size: 0.9rem;
    text-decoration: none;
    min-width: 0;
}

.delegation-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delegation-row svg {
    flex: none;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--green-600);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.delegation-row:hover {
    color: var(--green-700);
}

.delegation-hotline {
    justify-content: center;
    gap: 0.5rem;
    background:
        radial-gradient(260px 160px at 100% 0%, rgba(95, 224, 154, 0.35), transparent 70%),
        linear-gradient(150deg, var(--green-700), var(--green-900));
    border-color: transparent;
    color: #fff;
}

.delegation-kicker {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a6f0c6;
}

.delegation-hotline-number {
    color: #fff;
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-decoration: none;
    line-height: 1.1;
}

.delegation-hotline p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.delegation-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-top: 0.6rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #fff;
    color: var(--green-800);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s var(--ease);
}

.delegation-wa:hover {
    transform: translateY(-2px);
}

.delegation-wa svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* =========================================================================
   MODAL ESCALA SALARIAL
   ========================================================================= */
.document-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(6, 35, 26, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0s linear 0.25s;
}

.document-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s;
}

.document-modal-panel {
    width: min(640px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: clamp(1.4rem, 3vw, 2rem);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: transform 0.35s var(--ease);
}

.document-modal.is-open .document-modal-panel {
    transform: none;
}

.document-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.document-modal-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.document-modal-header p {
    margin-top: 0.4rem;
    color: var(--muted);
}

.document-modal-close {
    flex: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.document-modal-close:hover {
    background: var(--green-50);
}

.document-list {
    display: grid;
    gap: 0.75rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.document-item-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.document-item-title {
    font-weight: 700;
    line-height: 1.3;
}

.document-item-meta {
    color: var(--green-600);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-item-actions {
    display: flex;
    gap: 0.5rem;
    flex: none;
}

.document-action {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.document-action-primary {
    background: var(--green-700);
    color: #fff;
}

.document-action-primary:hover {
    background: var(--green-800);
}

.document-action-secondary {
    background: var(--green-50);
    color: var(--green-700);
}

.document-action-secondary:hover {
    background: var(--green-100);
}

.document-empty {
    color: var(--muted);
}

/* =========================================================================
   Aparición al hacer scroll
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.8s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1100px) {
    .services-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

    .delegation-hotline {
        grid-column: span 3;
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-layout,
    .media-grid {
        grid-template-columns: 1fr;
    }

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

    .delegation-hotline {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-h: 88px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        height: clamp(480px, calc(84svh - var(--nav-h)), 640px);
    }

    .hero-slide::after {
        background:
            linear-gradient(0deg, rgba(4, 26, 16, 0.92) 0%, rgba(4, 26, 16, 0.55) 45%, rgba(4, 26, 16, 0.1) 80%);
    }

    .hero-copy {
        padding-bottom: calc(2.25rem + 4.75rem);
    }

    .hero-controls {
        bottom: calc(2.25rem + 1rem);
    }

    .hero-copy h2 {
        max-width: 22ch;
    }

    .hero-arrows {
        display: none;
    }

    .hero-progress {
        max-width: none;
    }

    .services {
        margin-top: -2.25rem;
    }

    .services-intro p {
        display: none;
    }
}

@media (max-width: 540px) {
    :root {
        --nav-h: 82px;
    }

    .container {
        width: calc(100% - 2rem);
    }

    .hero-copy {
        gap: 0.85rem;
    }

    .hero-copy .btn {
        min-height: 46px;
        padding: 0.7rem 1.2rem;
    }

    .services-panel {
        padding: 1rem 0.6rem 0.6rem;
        border-radius: 20px;
    }

    .services-intro {
        padding: 0.4rem 0.6rem 0;
    }

    .services-grid {
        gap: 0.25rem;
    }

    .service {
        flex-direction: row;
        align-items: center;
        padding: 0.7rem 0.6rem;
        gap: 0.65rem;
    }

    .service-icon {
        flex: none;
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .service-copy strong {
        font-size: 0.9rem;
    }

    .service-copy span {
        display: none;
    }

    .delegation {
        padding: 1.05rem 1.1rem;
        gap: 0.15rem;
    }

    .delegation h3 {
        margin-bottom: 0.3rem;
    }

    .service-go {
        display: none;
    }

    .novedades .nv-rail {
        --nv-rail-pad: 1rem;
    }

    .rail-arrows {
        display: none;
    }

    .news-item {
        grid-template-columns: 108px 1fr;
        gap: 0.85rem;
        padding: 0.6rem;
    }

    .news-item-copy h3 {
        font-size: 0.95rem;
    }

    .radio-play {
        width: 64px;
        height: 64px;
    }

    .video-meta {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .delegation-hotline {
        grid-column: auto;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    :root {
        --nav-h: 78px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
