/* ==========================================
   HOME (solo index.php)
   Se carga después de styles.css y ninguna otra página lo usa.
   Dirección: editorial cívica del Litoral. Verde municipal + dorado, sin azules.
   Títulos en Fraunces (serif con carácter, eco de la arquitectura colonial),
   texto en Archivo. El arco de la foto repite el del Museo de San Roque.
   Supera las 800 líneas a propósito: es la hoja de una sola página y así
   se descarga en una única petición. Las secciones están separadas abajo.
   ========================================== */

:root {
    --home-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --home-ink: #0d3822;
    --home-cream: #fbf7ea;
    --home-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
:where(a, button):focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 3px;
}

.home-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
}

.home-eyebrow::before {
    content: '';
    width: 1.5rem;
    height: 2px;
    background: var(--secondary);
}

.home-title,
.main .section-title,
.main .contact-title,
.portal-card-title {
    font-family: var(--home-serif);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-wrap: balance;
}

.home-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--text-primary);
}

.section-subtitle,
.portal-card-text,
.bento-head-text,
.ejes-head-text {
    text-wrap: pretty;
}

[data-theme="dark"] .home-eyebrow {
    color: #7fd1a5;
}

/* ---------- Header: una sola línea ---------- */
.desktop-nav .nav-link {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
}

.desktop-nav .nav-link .external-hint {
    font-size: 0.875rem;
    margin-left: 0.2rem;
    vertical-align: -0.15em;
}

/* Entre 1024 y 1279 px los enlaces no entran: se usa el menú lateral. */
@media (min-width: 1024px) and (max-width: 1279px) {
    .desktop-nav {
        display: none;
    }

    .menu-btn {
        display: flex;
    }
}

/* Modo oscuro: el verde institucional sobre el header oscuro daba 2:1 */
[data-theme="dark"] .header-logo-title {
    color: #7fd1a5;
}

/* ==========================================
   HERO
   ========================================== */
.hero-civic {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: var(--white);
    padding: 3rem 0 7.5rem;
    background:
        radial-gradient(ellipse at 80% 15%, rgba(212, 175, 55, 0.2) 0%, transparent 45%),
        radial-gradient(ellipse at 0% 100%, rgba(26, 107, 67, 0.7) 0%, transparent 55%),
        var(--home-ink);
}

/* Grano sutil para que el verde no se vea plano */
.hero-civic::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.09;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Líneas de río (eco del puente del escudo) */
.hero-civic::before {
    content: '';
    position: absolute;
    inset: auto -10% -30% 30%;
    height: 70%;
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
    background: repeating-radial-gradient(ellipse at 30% 100%, transparent 0 22px, rgba(212, 175, 55, 0.9) 22px 23px);
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%);
    mask-image: linear-gradient(to top, #000 10%, transparent 80%);
}

.hero-civic-text {
    min-width: 0;
}

.hero-civic-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-civic-inner {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
        gap: 2.5rem;
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-civic {
        padding: 4.5rem 0 9rem;
    }

    .hero-civic-inner {
        gap: 4rem;
    }
}

/* Entrada escalonada */
.hero-civic-text > *,
.hero-civic-media {
    animation: homeRise 0.9s var(--home-ease) backwards;
}

.hero-civic-text > :nth-child(2) { animation-delay: 0.08s; }
.hero-civic-text > :nth-child(3) { animation-delay: 0.16s; }
.hero-civic-text > :nth-child(4) { animation-delay: 0.24s; }
.hero-civic-text > :nth-child(5) { animation-delay: 0.32s; }
.hero-civic-media { animation-delay: 0.2s; }

@keyframes homeRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    padding: 0.4rem 0.9rem 0.4rem 0.6rem;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.hero-eyebrow .material-icons-round {
    font-size: 1.125rem;
    color: var(--secondary);
}

.hero-civic-title {
    margin: 0 0 1.25rem;
    font-family: var(--home-serif);
    font-weight: 600;
    font-size: clamp(3.25rem, 9vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: -0.035em;
    color: var(--home-cream);
}

.hero-civic-kicker {
    display: block;
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
    font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--secondary-light);
}

.hero-civic-lead {
    max-width: 32rem;
    margin: 0 0 2rem;
    font-size: clamp(1rem, 1.6vw, 1.1875rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    text-wrap: pretty;
}

.hero-civic-slogan {
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}

/* Tareas frecuentes */
.hero-tasks-label {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.hero-tasks-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-task {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.1rem 0.5rem 0.9rem;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s var(--home-ease), transform 0.25s var(--home-ease), border-color 0.25s;
}

.hero-task .material-icons-round {
    font-size: 1.125rem;
    color: var(--secondary);
}

.hero-task:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-task:active {
    transform: translateY(0) scale(0.98);
}

.hero-task--primary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--home-ink);
}

.hero-task--primary .material-icons-round {
    color: var(--home-ink);
}

.hero-task--primary:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
}

.hero-task .hero-task-ext {
    font-size: 0.9375rem;
    opacity: 0.7;
}

/* Celular: tareas en 2 columnas para que entren sin scroll largo */
@media (max-width: 639px) {
    .hero-tasks-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-task {
        width: 100%;
        height: 100%;
        justify-content: flex-start;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        line-height: 1.25;
    }

    .hero-task .hero-task-ext {
        display: none;
    }
}

/* Datos */
.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2.5rem;
    margin: 2.5rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-fact dt {
    margin: 0 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.hero-fact dd {
    margin: 0;
    font-family: var(--home-serif);
    font-size: 1.625rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: var(--home-cream);
}

.hero-fact:last-child dd {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
}

/* Foto en arco */
.hero-civic-media {
    position: relative;
    width: min(100%, 15rem);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-civic-media {
        width: min(100%, 20rem);
        margin: 0 0 0 auto;
    }
}

@media (min-width: 1024px) {
    .hero-civic-media {
        width: min(100%, 26rem);
        margin: 0 0 0 auto;
    }
}

.hero-arch {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 1.75rem;
    outline: 1px solid rgba(212, 175, 55, 0.55);
    outline-offset: 10px;
    box-shadow: 0 50px 80px -40px rgba(0, 0, 0, 0.7);
    background: var(--primary);
}

.hero-arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: homeSettle 1.6s var(--home-ease) both;
}

@keyframes homeSettle {
    from {
        transform: scale(1.08);
    }
}

.hero-arch-caption {
    position: absolute;
    left: 50%;
    bottom: -1.1rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    background: var(--home-cream);
    color: var(--home-ink);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
}

.hero-arch-caption .material-icons-round {
    font-size: 1rem;
    color: var(--secondary-dark);
}

/* Sello giratorio */
.hero-seal {
    position: absolute;
    top: 12%;
    left: -2.25rem;
    width: 6rem;
    height: 6rem;
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.35));
}

@media (min-width: 1024px) {
    .hero-seal {
        left: -3.5rem;
        width: 8rem;
        height: 8rem;
    }
}

.hero-seal-bg {
    fill: var(--secondary);
}

.hero-seal-ring {
    font-family: var(--font-sans);
    font-size: 9.6px;
    font-weight: 700;
    letter-spacing: 1.9px;
    fill: var(--home-ink);
    transform-box: view-box;
    transform-origin: 50% 50%;
    animation: homeSpin 32s linear infinite;
}

.hero-seal-num {
    font-family: var(--home-serif);
    font-size: 30px;
    font-weight: 600;
    fill: var(--home-ink);
}

.hero-seal-label {
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    fill: var(--home-ink);
}

@keyframes homeSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   ACCESOS RÁPIDOS (bento sobre el hero)
   ========================================== */
.bento-section {
    position: relative;
    z-index: 2;
    margin-top: -5rem;
    padding-bottom: 4rem;
}

.bento {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 2rem;
    background: var(--surface);
    box-shadow: 0 40px 70px -40px rgba(13, 56, 34, 0.45), 0 0 0 1px var(--border-color);
}

.bento-head {
    grid-column: 1 / -1;
    padding: 0.75rem 0.5rem 1rem;
}

.bento-head-text {
    margin: 0.75rem 0 0;
    max-width: 22rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.bento-feature {
    grid-column: 1 / -1;
}

@media (max-width: 639px) {
    .bento {
        padding: 0.875rem;
        border-radius: 1.5rem;
    }

    .bento-tile {
        padding: 0.875rem;
    }
}

@media (min-width: 640px) {
    .bento {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 1rem;
        padding: 1.5rem;
    }

    .bento-head {
        grid-column: span 6;
    }

    .bento-feature {
        grid-column: span 3;
    }

    .bento-tile {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .bento-head,
    .bento-feature {
        grid-column: span 2;
    }

    .bento-head {
        align-self: center;
        padding: 0.5rem 1rem 0.5rem 0.5rem;
    }

    .bento-tile {
        grid-column: span 1;
    }
}

.bento-icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    transition: background 0.25s, color 0.25s, transform 0.35s var(--home-ease);
}

.bento-icon .material-icons-round {
    font-size: 1.375rem;
}

/* Destacados */
.bento-feature {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 0.5rem;
    min-height: 13.5rem;
    padding: 1.5rem;
    border-radius: 1.5rem;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.35s var(--home-ease), box-shadow 0.35s var(--home-ease);
}

.bento-feature::after {
    content: '';
    position: absolute;
    right: -3rem;
    bottom: -3rem;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    border: 1.5rem solid currentColor;
    opacity: 0.07;
    transition: transform 0.6s var(--home-ease);
}

.bento-feature--gold {
    background: linear-gradient(145deg, #ecce62 0%, #c9a227 100%);
    color: #14301f;
}

.bento-feature--gold .bento-icon {
    background: #14301f;
    color: var(--secondary-light);
}

.bento-feature--green {
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--home-ink) 100%);
    color: var(--white);
}

.bento-feature--green .bento-icon {
    background: var(--secondary);
    color: var(--home-ink);
}

.bento-feature .bento-icon {
    margin-bottom: 0.75rem;
}

.bento-feature-title {
    font-family: var(--home-serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.bento-feature-desc {
    font-size: 0.9375rem;
    line-height: 1.5;
    opacity: 0.85;
}

.bento-feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
}

.bento-feature-cta .material-icons-round {
    font-size: 1.125rem;
    transition: transform 0.3s var(--home-ease);
}

.bento-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 40px -24px rgba(13, 56, 34, 0.6);
}

.bento-feature:hover::after {
    transform: scale(1.15);
}

.bento-feature:hover .bento-feature-cta .material-icons-round {
    transform: translate(3px, -3px);
}

.bento-feature:active {
    transform: translateY(-1px) scale(0.99);
}

/* Mosaico */
.bento-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1.125rem;
    border-radius: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid transparent;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, transform 0.35s var(--home-ease);
}

.bento-tile .bento-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.625rem;
    background: rgba(20, 82, 51, 0.1);
    color: var(--primary);
}

.bento-tile-title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
}

.bento-tile-desc {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.bento-ext {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1rem;
    color: var(--text-tertiary);
}

.bento-tile:hover {
    background: var(--surface);
    border-color: rgba(20, 82, 51, 0.25);
    transform: translateY(-3px);
}

.bento-tile:hover .bento-icon {
    background: var(--primary);
    color: var(--white);
    transform: rotate(-6deg);
}

.bento-tile:active {
    transform: translateY(0) scale(0.98);
}

[data-theme="dark"] .bento-tile {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .bento-tile .bento-icon {
    background: rgba(127, 209, 165, 0.12);
    color: #7fd1a5;
}

[data-theme="dark"] .bento-tile:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(127, 209, 165, 0.3);
}

/* ==========================================
   EJES DE GESTIÓN (lista editorial)
   ========================================== */
.ejes-section {
    padding: 4.5rem 0 5rem;
    background: var(--bg-primary);
}

.ejes-layout {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .ejes-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
        gap: 4rem;
        align-items: start;
    }
}

.ejes-head-text {
    margin: 0.75rem 0 0;
    max-width: 20rem;
    color: var(--text-secondary);
}

.ejes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .ejes-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.eje {
    padding-top: 1.25rem;
    border-top: 2px solid var(--primary);
}

.eje-num {
    display: block;
    margin-bottom: 1rem;
    font-family: var(--home-serif);
    font-style: italic;
    font-size: 2.75rem;
    font-weight: 500;
    line-height: 1;
    color: var(--secondary-dark);
}

.eje-title {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.eje-text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

[data-theme="dark"] .eje {
    border-top-color: #7fd1a5;
}

[data-theme="dark"] .eje-num {
    color: var(--secondary);
}

@media (prefers-reduced-motion: reduce) {
    .hero-civic-text > *,
    .hero-civic-media,
    .hero-arch img,
    .hero-seal-ring {
        animation: none;
    }

    .hero-task,
    .bento-feature,
    .bento-tile,
    .bento-icon {
        transition: none;
    }
}

/* El iframe del mapa se pasaba 1px del ancho en tablet */
.contact-section {
    overflow-x: clip;
}

/* ---------- Plataformas: tarjeta + captura real del sitio ---------- */
.portales-destacados-section {
    padding: 4.5rem 0 5rem;
    background: var(--bg-secondary);
}

.portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem;
    }
}

.portal-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2rem 1.75rem 0;
    border-radius: 2rem;
    text-decoration: none;
    box-shadow: 0 24px 48px -28px rgba(13, 56, 34, 0.55);
    transition: transform 0.45s var(--home-ease), box-shadow 0.45s var(--home-ease);
}

@media (min-width: 640px) {
    .portal-card {
        padding: 2.5rem 2.5rem 0;
    }
}

.portal-card--turismo {
    background:
        radial-gradient(circle at 90% 0%, rgba(212, 175, 55, 0.28) 0%, transparent 45%),
        linear-gradient(150deg, var(--primary-light) 0%, var(--home-ink) 100%);
    color: var(--white);
}

/* Dorado con texto verde oscuro: 7.4:1 de contraste (blanco daba 2.1:1). */
.portal-card--hcd {
    background:
        radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
        linear-gradient(150deg, #ecce62 0%, #c9a227 100%);
    color: #14301f;
}

.portal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 40px 60px -30px rgba(13, 56, 34, 0.6);
}

.portal-card:active {
    transform: translateY(-2px) scale(0.995);
}

.portal-card-body {
    position: relative;
    z-index: 1;
}

.portal-card-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-card--turismo .portal-card-tag {
    background: rgba(255, 255, 255, 0.16);
}

.portal-card--hcd .portal-card-tag {
    background: #14301f;
    color: var(--white);
}

.portal-card-title {
    margin: 1rem 0 0.5rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: inherit;
}

.portal-card-text {
    max-width: 28rem;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    opacity: 0.9;
}

.portal-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 0.875rem;
}

.portal-card-btn .material-icons-round {
    font-size: 1.1rem;
    transition: transform 0.3s var(--home-ease);
}

.portal-card:hover .portal-card-btn .material-icons-round {
    transform: translate(3px, -3px);
}

.portal-card--turismo .portal-card-btn {
    background: var(--white);
    color: var(--home-ink);
}

.portal-card--hcd .portal-card-btn {
    background: #14301f;
    color: var(--white);
}

/* Captura dentro de un marco de navegador: asoma inclinada y se endereza al pasar el mouse */
.portal-shot {
    margin-top: 2rem;
    border-radius: 0.875rem 0.875rem 0 0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 -12px 40px -12px rgba(0, 0, 0, 0.4);
    transform: perspective(1400px) rotateX(9deg) translateY(1.25rem);
    transform-origin: 50% 100%;
    transition: transform 0.6s var(--home-ease);
}

.portal-card:hover .portal-shot,
.portal-card:focus-visible .portal-shot {
    transform: perspective(1400px) rotateX(0deg) translateY(0);
}

.portal-shot-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    background: #f1efe9;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-shot-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #e0605a;
}

.portal-shot-dot:nth-child(2) { background: #e7b84a; }
.portal-shot-dot:nth-child(3) { background: #5fbf6a; }

.portal-shot-url {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    margin-left: 0.5rem;
    padding: 0.2rem 0.75rem;
    border-radius: var(--border-radius-full);
    background: #fff;
    color: #57534e;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-shot-url .material-icons-round {
    font-size: 0.75rem;
    color: #15803d;
}

.portal-shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
}

@media (prefers-reduced-motion: reduce) {
    .portal-card,
    .portal-shot,
    .portal-card-btn .material-icons-round {
        transition: none;
    }

    .portal-shot {
        transform: none;
    }
}

/* ==========================================
   AVISO "ÚLTIMA NOVEDAD" EN EL HERO
   Lo muestra js/main.js solo si hay algo de las últimas 3 semanas.
   ========================================== */
.hero-latest {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    margin: 0 0 1.5rem;
    padding: 0.45rem 0.9rem 0.45rem 0.75rem;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: var(--white);
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s;
}

.hero-latest[hidden] {
    display: none;
}

/* Si hay novedad, reemplaza al rótulo de portal oficial */
.hero-latest:not([hidden]) + .hero-eyebrow {
    display: none;
}

.hero-latest:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--secondary);
}

.hero-latest-dot {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: homePulse 2s infinite;
}

@keyframes homePulse {
    70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-latest-when {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--secondary-light);
}

.hero-latest-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.88);
}

.hero-latest .material-icons-round {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--secondary);
}

/* ==========================================
   NOVEDADES: una destacada + lista
   ========================================== */
.home-news {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 1024px) {
    .home-news {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 1.75rem;
        align-items: start;
    }
}

.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.news-source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--border-radius-full);
    background: rgba(225, 48, 108, 0.1);
    color: #b0306f;
}

.news-source .material-icons-round {
    font-size: 0.875rem;
}

.news-feature-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border-radius: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: inherit;
    text-decoration: none;
    transition: transform 0.35s var(--home-ease), box-shadow 0.35s var(--home-ease);
}

.news-feature-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 50px -30px rgba(13, 56, 34, 0.45);
}

.news-feature-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-primary);
}

.news-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.8s var(--home-ease);
}

.news-feature-link:hover .news-feature-media img {
    transform: scale(1.04);
}

.news-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--border-radius-full);
    background: rgba(13, 56, 34, 0.88);
    backdrop-filter: blur(4px);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
}

.news-feature-body {
    padding: 1.5rem 1.5rem 1.75rem;
}

.news-feature-title {
    margin: 0 0 0.625rem;
    font-family: var(--home-serif);
    font-size: clamp(1.375rem, 2.4vw, 1.75rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-wrap: balance;
}

.news-feature-text {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.news-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--primary);
}

.news-more .material-icons-round {
    font-size: 1.1rem;
    transition: transform 0.3s var(--home-ease);
}

.news-feature-link:hover .news-more .material-icons-round {
    transform: translateX(4px);
}

.news-list {
    display: grid;
    gap: 0.75rem;
}

.news-item-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.25s, transform 0.35s var(--home-ease);
}

.news-item-link:hover {
    border-color: rgba(20, 82, 51, 0.35);
    transform: translateX(4px);
}

.news-item-thumb {
    flex-shrink: 0;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 0.875rem;
    object-fit: cover;
    background: var(--bg-primary);
}

.news-item-body {
    min-width: 0;
}

.news-item-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-empty {
    grid-column: 1 / -1;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.home-news-empty .material-icons-round {
    font-size: 2.5rem;
    opacity: 0.5;
}

.home-news-empty a {
    font-weight: 700;
    color: var(--primary);
}

[data-theme="dark"] .news-more,
[data-theme="dark"] .home-news-empty a {
    color: #7fd1a5;
}

[data-theme="dark"] .news-source {
    background: rgba(225, 48, 108, 0.18);
    color: #f58fbf;
}

/* ==========================================
   FRANJA DE INSTAGRAM
   ========================================== */
.ig-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1.5rem;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(120deg, #833ab4, #fd1d1d 55%, #fcb045) border-box;
    border: 1.5px solid transparent;
}

.ig-strip-id {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.ig-strip-avatar {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    padding: 2px;
    background: linear-gradient(120deg, #833ab4, #fd1d1d 55%, #fcb045);
}

.ig-strip-handle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--text-primary);
}

.ig-strip-badge {
    padding: 0.15rem 0.55rem;
    border-radius: var(--border-radius-full);
    background: rgba(20, 82, 51, 0.1);
    color: var(--primary);
    font-size: 0.6875rem;
    font-weight: 700;
}

.ig-strip-text {
    margin: 0.2rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.ig-strip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--border-radius-full);
    background: linear-gradient(120deg, #833ab4, #fd1d1d 55%, #fcb045);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s var(--home-ease), box-shadow 0.25s;
}

.ig-strip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(193, 53, 132, 0.6);
}

[data-theme="dark"] .ig-strip-badge {
    background: rgba(127, 209, 165, 0.12);
    color: #7fd1a5;
}

@media (prefers-reduced-motion: reduce) {
    .hero-latest-dot {
        animation: none;
    }

    .news-feature-link,
    .news-feature-media img,
    .news-item-link,
    .ig-strip-btn {
        transition: none;
    }
}

/* ==========================================
   ESTADO DEL RÍO SANTA LUCÍA (includes/partials/alerta-rio.php)
   Verde: normal · Ámbar: atención (≥ 2,50 m) · Rojo: alerta (≥ 3,00 m)
   ========================================== */
.rio-bar {
    --rio-bg: #eef7f1;
    --rio-borde: #d3eadb;
    --rio-texto: var(--home-ink);
    --rio-suave: #3f6b52;
    --rio-acento: #15803d;
    --rio-pill-bg: #d6efe0;
    --rio-pill-tx: #14532d;
    background: var(--rio-bg);
    border-bottom: 1px solid var(--rio-borde);
    color: var(--rio-texto);
}

.rio-bar--atencion {
    --rio-bg: #fff7e0;
    --rio-borde: #f2dd9b;
    --rio-suave: #7a5c12;
    --rio-acento: #b7791f;
    --rio-pill-bg: #f8e3a3;
    --rio-pill-tx: #5c4100;
}

.rio-bar--alerta {
    --rio-bg: #fdecec;
    --rio-borde: #f5c2c2;
    --rio-suave: #8a2a2a;
    --rio-acento: #b91c1c;
    --rio-pill-bg: #b91c1c;
    --rio-pill-tx: #fff;
}

[data-theme="dark"] .rio-bar {
    --rio-bg: #12231a;
    --rio-borde: #1f3a2a;
    --rio-texto: #e7f3ec;
    --rio-suave: #9cc7ae;
    --rio-acento: #7fd1a5;
    --rio-pill-bg: rgba(127, 209, 165, 0.15);
    --rio-pill-tx: #7fd1a5;
}

[data-theme="dark"] .rio-bar--atencion {
    --rio-bg: #2a2310;
    --rio-borde: #4a3c12;
    --rio-suave: #e3c77a;
    --rio-acento: #f2c14e;
    --rio-pill-bg: rgba(242, 193, 78, 0.18);
    --rio-pill-tx: #f2c14e;
}

[data-theme="dark"] .rio-bar--alerta {
    --rio-bg: #2d1414;
    --rio-borde: #5a2222;
    --rio-suave: #f0a8a8;
    --rio-acento: #f87171;
    --rio-pill-bg: #b91c1c;
    --rio-pill-tx: #fff;
}

.rio-bar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.875rem 1.25rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1rem;
}

.rio-bar-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.875rem;
    background: var(--rio-acento);
    color: #fff;
}

[data-theme="dark"] .rio-bar-icon {
    color: #0d1f16;
}

.rio-bar-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rio-suave);
}

.rio-bar-time {
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.rio-bar-time--viejo::after {
    content: ' · dato desactualizado';
    color: var(--rio-acento);
}

.rio-bar-level {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    margin: 0.1rem 0 0;
}

.rio-bar-level strong {
    font-family: var(--home-serif);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.rio-bar-trend {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rio-suave);
}

.rio-bar-chart {
    display: none;
    width: 7.5rem;
    height: 2.25rem;
    overflow: visible;
}

.rio-bar-chart-line {
    fill: none;
    stroke: var(--rio-acento);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.rio-bar-chart-alerta,
.rio-bar-chart-atencion {
    stroke-width: 1;
    stroke-dasharray: 3 3;
    vector-effect: non-scaling-stroke;
}

.rio-bar-chart-alerta {
    stroke: #dc2626;
    opacity: 0.7;
}

.rio-bar-chart-atencion {
    stroke: #d97706;
    opacity: 0.6;
}

.rio-bar-chart-dot {
    fill: var(--rio-acento);
}

.rio-bar-status {
    grid-column: 1 / -1;
    min-width: 0;
}

.rio-bar-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-full);
    background: var(--rio-pill-bg);
    color: var(--rio-pill-tx);
    font-size: 0.8125rem;
    font-weight: 700;
}

.rio-bar--alerta .rio-bar-pill::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #fff;
    animation: homePulse 1.6s infinite;
}

.rio-bar-detail {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--rio-suave);
}

.rio-bar-evac {
    font-weight: 700;
    color: var(--rio-acento);
}

.rio-bar-link {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius-full);
    background: var(--rio-texto);
    color: var(--rio-bg);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.25s var(--home-ease), opacity 0.25s;
}

.rio-bar-link .material-icons-round {
    font-size: 1rem;
}

.rio-bar-link:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* Celular: el botón queda solo con la flecha para no apretar el número */
@media (max-width: 479px) {
    .rio-bar-link {
        padding: 0.6rem;
        font-size: 0;
        gap: 0;
    }

    .rio-bar-link .material-icons-round {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .rio-bar-inner {
        grid-template-columns: auto auto auto minmax(0, 1fr) auto;
        gap: 1.5rem;
        padding: 0.875rem 1.5rem;
    }

    .rio-bar-chart {
        display: block;
    }

    .rio-bar-status {
        grid-column: auto;
        padding-left: 1.5rem;
        border-left: 1px solid var(--rio-borde);
    }

    .rio-bar-link {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rio-bar--alerta .rio-bar-pill::before {
        animation: none;
    }

    .rio-bar-link {
        transition: none;
    }
}

/* ==========================================
   FRANJA "SEGUINOS EN REDES" (includes/partials/redes-compacto.php)
   El detalle completo de cuentas está en redes.php.
   ========================================== */
.redes-strip {
    padding: 3.5rem 0;
    background: var(--bg-secondary);
}

.redes-strip-inner {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .redes-strip-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 1.5rem 3rem;
    }

    .redes-strip-more {
        grid-column: 2;
        justify-self: end;
    }
}

.redes-strip-lead {
    margin: 0.75rem 0 0;
    max-width: 30rem;
    color: var(--text-secondary);
}

.redes-strip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.redes-strip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.25rem;
    border-radius: var(--border-radius-full);
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: transform 0.25s var(--home-ease), box-shadow 0.25s;
}

/* Tonos oscurecidos: con texto blanco cumplen contraste AA */
.redes-strip-btn--instagram { background: linear-gradient(120deg, #6a2c9c, #b4246f 55%, #c84a1c); }
.redes-strip-btn--facebook  { background: #1565d8; }
.redes-strip-btn--whatsapp  { background: #128c4a; }

.redes-strip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px -12px rgba(0, 0, 0, 0.45);
}

.redes-strip-btn:active {
    transform: translateY(0) scale(0.98);
}

.redes-strip-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.redes-strip-more .material-icons-round {
    font-size: 1.1rem;
    transition: transform 0.3s var(--home-ease);
}

.redes-strip-more:hover .material-icons-round {
    transform: translateX(4px);
}

[data-theme="dark"] .redes-strip-more {
    color: #7fd1a5;
}

@media (prefers-reduced-motion: reduce) {
    .redes-strip-btn,
    .redes-strip-more .material-icons-round {
        transition: none;
    }
}
