/* ============================================================
   RANCOTV
   STYLE.CSS
   Diseño principal del sitio
   ============================================================ */


/* ============================================================
   1. VARIABLES
   ============================================================ */

:root {

    --ranco-blue: #0757b8;
    --ranco-blue-dark: #061a35;
    --ranco-blue-deep: #041326;
    --ranco-blue-light: #1475df;

    --ranco-red: #d90000;
    --ranco-red-dark: #a90000;
    --ranco-red-light: #ef1717;

    --white: #ffffff;
    --black: #000000;

    --background: #f3f5f8;
    --background-light: #f8fafc;

    --text: #17202a;
    --text-dark: #0d1722;
    --text-light: #66717d;
    --text-muted: #8a949e;

    --border: #e1e6eb;

    --shadow-small:
        0 3px 12px rgba(5, 23, 43, 0.07);

    --shadow:
        0 8px 28px rgba(5, 23, 43, 0.09);

    --shadow-hover:
        0 14px 35px rgba(5, 23, 43, 0.14);

    --radius: 10px;
    --radius-small: 6px;

    --container-width: 1180px;

}


/* ============================================================
   2. RESET
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--background);

    color: var(--text);

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
}


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


a {
    color: inherit;
    text-decoration: none;
}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    cursor: pointer;
}


ul {
    list-style: none;
}


/* ============================================================
   3. CONTENEDOR GENERAL
   ============================================================ */

.container {

    width: calc(100% - 40px);

    max-width: var(--container-width);

    margin-left: auto;
    margin-right: auto;

}


/* ============================================================
   4. HEADER
   ============================================================ */

.site-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    background:
        linear-gradient(
            110deg,
            var(--ranco-blue-deep) 0%,
            var(--ranco-blue-dark) 55%,
            #08264b 100%
        );

    border-bottom:
        3px solid var(--ranco-red);

    box-shadow:
        0 3px 18px rgba(0, 0, 0, 0.18);

}


/* Línea superior de identidad */

.site-header::before {

    content: "";

    display: block;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--ranco-blue),
            #ffffff 50%,
            var(--ranco-red)
        );

}


/* ============================================================
   5. HEADER CONTENEDOR
   ============================================================ */

.header-container {

    min-height: 84px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 35px;

}


/* ============================================================
   6. LOGO
   ============================================================ */

.logo-link {

    display: flex;

    align-items: center;

    flex-shrink: 0;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;

}


.logo-link:hover {

    opacity: 0.94;

    transform: scale(1.01);

}


.logo {

    width: 200px;

    height: auto;

    object-fit: contain;

}


/* ============================================================
   7. MENÚ PRINCIPAL
   ============================================================ */

.main-menu {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 5px;

}


.main-menu a {

    position: relative;

    display: flex;

    align-items: center;

    min-height: 44px;

    padding: 0 18px;

    border-radius: var(--radius-small);

    color: rgba(255, 255, 255, 0.94);

    font-size: 15px;

    font-weight: 700;

    letter-spacing: 0.1px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;

}


.main-menu a:hover {

    background:
        rgba(255, 255, 255, 0.10);

    color: var(--white);

}


/* ============================================================
   8. BOTÓN EN VIVO
   ============================================================ */

.main-menu .live-menu-item {
    color: #ffffff;
    font-weight: 800;
    background: #d90000;
    border-radius: 6px;
    padding: 10px 16px;
    animation: liveButtonBlink 1.2s infinite;
}

@keyframes liveButtonBlink {
    0%, 45%, 100% {
        background-color: #d90000;
        box-shadow: 0 0 0 rgba(217, 0, 0, 0);
    }

    50%, 75% {
        background-color: transparent;
        box-shadow: 0 0 0 rgba(217, 0, 0, 0);
    }
}


/* ============================================================
   9. MENÚ HAMBURGUESA
   ============================================================ */

.menu-toggle {

    display: none;

    width: 46px;

    height: 46px;

    padding: 0;

    border: 0;

    border-radius: 7px;

    background:
        rgba(255, 255, 255, 0.08);

    position: relative;

}


.menu-toggle span {

    position: absolute;

    left: 10px;

    width: 26px;

    height: 3px;

    border-radius: 3px;

    background: var(--white);

    transition:
        top 0.25s ease,
        transform 0.25s ease,
        opacity 0.2s ease;

}


.menu-toggle span:nth-child(1) {
    top: 13px;
}


.menu-toggle span:nth-child(2) {
    top: 21px;
}


.menu-toggle span:nth-child(3) {
    top: 29px;
}


/* Estado abierto */

.menu-toggle.active span:nth-child(1) {

    top: 21px;

    transform: rotate(45deg);

}


.menu-toggle.active span:nth-child(2) {

    opacity: 0;

}


.menu-toggle.active span:nth-child(3) {

    top: 21px;

    transform: rotate(-45deg);

}


/* ============================================================
   BANNER PUBLICITARIO
============================================================ */

.advertising-section {
    padding: 15px 0;
    background: #ffffff;
}

.advertising-banner {
    position: relative;

    width: 100%;
    max-width: 650px;

    margin: 0 auto;

    overflow: hidden;

    border-radius: 7px;

    background: #e9edf2;
}

.advertising-banner a {
    display: block;
    width: 100%;
}

.advertising-image {
    display: block;

    width: 100%;
    height: auto;
}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 680px) {

    .advertising-section {
        padding: 10px 0;
    }

    .advertising-banner {
        width: 100%;
        max-width: 100%;
        border-radius: 5px;
    }

    .advertising-image {
        width: 100%;
        height: auto;
    }

}


/* ============================================================
   11. SECCIONES
   ============================================================ */

.live-section,
.weather-section,
.news-section {

    width: 100%;

}


.live-section {

    padding:
        32px 0 22px;

}


.weather-section {

    padding:
        20px 0 30px;

}


.news-section {

    padding:
        28px 0;

}


.news-featured {

    padding-top:
        32px;

}


.news-information {

    padding-bottom:
        50px;

}


/* ============================================================
   12. TÍTULOS DE SECCIÓN
   ============================================================ */

.section-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;

}


.section-heading h1,
.section-heading h2 {

    color:
        var(--text-dark);

    font-weight:
        800;

    line-height:
        1.15;

}


.section-heading h1 {

    font-size:
        27px;

}


.section-heading h2 {

    font-size:
        25px;

}


.section-heading p {

    margin-top:
        4px;

    color:
        var(--text-light);

    font-size:
        13px;

}


/* ============================================================
   13. INDICADOR EN VIVO
   ============================================================ */

.live-heading {

    justify-content:
        flex-start;

    margin-bottom:
        17px;

}


.live-indicator {

    position:
        relative;

    flex-shrink:
        0;

    width:
        13px;

    height:
        13px;

    border-radius:
        50%;

    background:
        var(--ranco-red);

    box-shadow:
        0 0 0 5px rgba(217, 0, 0, 0.10);

}


.live-indicator::after {

    content:
        "";

    position:
        absolute;

    inset:
        -5px;

    border:
        1px solid rgba(217, 0, 0, 0.35);

    border-radius:
        50%;

    animation:
        livePulse 1.8s infinite;

}


@keyframes livePulse {

    0% {

        transform:
            scale(0.9);

        opacity:
            1;

    }

    70% {

        transform:
            scale(1.25);

        opacity:
            0;

    }

    100% {

        transform:
            scale(1.25);

        opacity:
            0;

    }

}


/* ============================================================
   14. REPRODUCTOR
   ============================================================ */

/*
   IMPORTANTE:

   NO se estiliza el iframe ni el contenido interno
   del reproductor CWS.

   Solamente se trabaja con el contenedor exterior.
*/

.player-wrapper {

    width: 100%;

    overflow: hidden;

    border-radius:
        var(--radius);

    background:
        #000000;

    box-shadow:
        var(--shadow);

}


/*
   NO agregar aquí reglas para iframe,
   video, controles, botones, etc.

   El embed CWS conservará su reproductor nativo.
*/


/* ============================================================
   15. CLIMA
   ============================================================ */

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

.weather-card {
    position: relative;
    overflow: hidden;
    min-height: 165px;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
}

/* Fotografía de fondo */
.weather-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--weather-background);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    background-blend-mode: normal;
    opacity: 0.80;
    pointer-events: none;
    transition: opacity 0.3s ease, background-image 0.4s ease;
}

/* Barra lateral */
.weather-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    z-index: 2;
    background: var(--ranco-blue);
}

.weather-card.weather-ranco::before {
    background: var(--ranco-red);
}

/* Contenido por encima de la fotografía */
.weather-card > * {
    position: relative;
    z-index: 3;
}

/* Fondos según condición meteorológica */
.weather-card.weather-despejado {
    --weather-background: url("/assets/img/sol.png");
}

.weather-card.weather-mayormente-despejado {
    --weather-background: url("/assets/img/mayormente-despejado.png");
}

.weather-card.weather-nublado {
    --weather-background: url("/assets/img/parcial.png");
}

.weather-card.weather-niebla {
    --weather-background: url("/assets/img/niebla.png");
}

.weather-card.weather-llovizna {
    --weather-background: url("/assets/img/llovizna.png");
}

.weather-card.weather-lluvia {
    --weather-background: url("/assets/img/lluvia.png");
}

.weather-card.weather-nieve {
    --weather-background: url("/assets/img/nieve.png");
}

.weather-card.weather-tormenta {
    --weather-background: url("/assets/img/tormenta.png");
}

.weather-card.weather-variable {
    --weather-background: url("/assets/img/clima-nublado.jpg");
}

/* Fotografía especial de lluvia para Lago Ranco */
.weather-card.weather-ranco.weather-lluvia {
    --weather-background: url("/assets/img/clima-lluvia-ranco.jpg");
}

/* Encabezado */
.weather-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.weather-label {
    display: block;
    margin-bottom: 4px;
    color: var(--ranco-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.weather-card.weather-ranco .weather-label {
    color: var(--ranco-red);
}

.weather-card h2 {
    color: var(--text-dark);
    font-size: 20px;
    line-height: 1.2;
}

.weather-location {
    margin-top: 7px;
    color: var(--text-light);
    font-size: 13px;
}

/* Estructura generada por script.js */
.weather-main {
    min-height: 65px;
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.weather-main .weather-icon {
    flex-shrink: 0;
    margin-right: 14px;
    font-size: 42px;
    line-height: 1;
}

.weather-main .weather-temperature {
    color: var(--text-dark);
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
}

.weather-description {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 13px;
}

.weather-wind {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
}

.weather-loading {
    color: var(--text-muted);
    font-size: 13px;
}

.weather-error {
    color: var(--ranco-red-dark);
    font-size: 13px;
}

/* ============================================================
   FIN CLIMA
   ============================================================ */

/* ============================================================
   16. ETIQUETAS DE SECCIÓN DE NOTICIAS
   ============================================================ */

.section-label {

    display:
        block;

    margin-bottom:
        5px;

    color:
        var(--ranco-red);

    font-size:
        10px;

    font-weight:
        800;

    letter-spacing:
        1.5px;

}


.news-section .section-heading h2 {

    position:
        relative;

    padding-left:
        13px;

}


.news-section .section-heading h2::before {

    content:
        "";

    position:
        absolute;

    left:
        0;

    top:
        2px;

    bottom:
        2px;

    width:
        4px;

    border-radius:
        3px;

    background:
        var(--ranco-blue);

}


/* ============================================================
   17. GRILLA DE NOTICIAS
   ============================================================ */

.news-grid {

    display:
        grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap:
        20px;

}


/* ============================================================
   18. TARJETA DE NOTICIA
   ============================================================ */

.news-card {

    min-width:
        0;

    overflow:
        hidden;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    background:
        var(--white);

    box-shadow:
        var(--shadow-small);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

}


.news-card:hover {

    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow-hover);

}


/* ============================================================
   19. IMAGEN DE NOTICIA
   ============================================================ */

.news-image-link {

    display:
        block;

}


.news-image {

    position:
        relative;

    width:
        100%;

    aspect-ratio:
        16 / 9;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

    background:
        linear-gradient(
            135deg,
            #dce2e8,
            #edf0f3
        );

    color:
        #7c858e;

    font-size:
        12px;

}


.news-image img {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    transition:
        transform 0.4s ease;

}


.news-card:hover .news-image img {

    transform:
        scale(1.04);

}


/* ============================================================
   20. CONTENIDO DE NOTICIA
   ============================================================ */

.news-content {

    padding:
        17px 18px 18px;

}


.news-category {

    display:
        inline-flex;

    align-items:
        center;

    min-height:
        22px;

    padding:
        0 8px;

    border-radius:
        4px;

    background:
        var(--ranco-blue);

    color:
        var(--white);

    font-size:
        9px;

    font-weight:
        800;

    letter-spacing:
        0.7px;

    text-transform:
        uppercase;

}


.news-card h3 {

    margin-top:
        10px;

    color:
        var(--text-dark);

    font-size:
        18px;

    font-weight:
        800;

    line-height:
        1.28;

}


.news-card p {

    margin-top:
        8px;

    color:
        var(--text-light);

    font-size:
        13px;

    line-height:
        1.55;

}


.news-date {

    display:
        block;

    margin-top:
        12px;

    color:
        var(--text-muted);

    font-size:
        11px;

}


/* ============================================================
   21. FOOTER
   ============================================================ */

.site-footer {

    background:
        linear-gradient(
            135deg,
            var(--ranco-blue-deep),
            var(--ranco-blue-dark)
        );

    color:
        var(--white);

    border-top:
        4px solid var(--ranco-red);

}


/* ============================================================
   22. CONTENIDO FOOTER
   ============================================================ */

.footer-container {

    padding:
        42px 0;

    display:
        grid;

    grid-template-columns:
        1.5fr 1fr 1fr;

    gap:
        50px;

}


.footer-column {

    min-width:
        0;

}


.footer-brand p {

    max-width:
        370px;

    margin-top:
        14px;

    color:
        rgba(255, 255, 255, 0.67);

    font-size:
        13px;

    line-height:
        1.7;

}


/* ============================================================
   23. LOGO FOOTER
   ============================================================ */

.footer-logo-link {

    display:
        inline-flex;

}


.footer-logo {

    width:
        175px;

    height:
        auto;

}


/* ============================================================
   24. TÍTULOS FOOTER
   ============================================================ */

.footer-column h3 {

    position:
        relative;

    margin-bottom:
        17px;

    padding-bottom:
        9px;

    color:
        var(--white);

    font-size:
        15px;

    font-weight:
        800;

}


.footer-column h3::after {

    content:
        "";

    position:
        absolute;

    left:
        0;

    bottom:
        0;

    width:
        32px;

    height:
        2px;

    background:
        var(--ranco-red);

}


/* ============================================================
   25. MENÚ FOOTER
   ============================================================ */

.footer-menu {

    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;

}


.footer-menu a {

    color:
        rgba(255, 255, 255, 0.68);

    font-size:
        13px;

    transition:
        color 0.2s ease,
        padding-left 0.2s ease;

}


.footer-menu a:hover {

    color:
        var(--white);

    padding-left:
        4px;

}


/* ============================================================
   26. CONTACTO FOOTER
   ============================================================ */

.footer-contact {

    display:
        flex;

    flex-direction:
        column;

    gap:
        11px;

}


.footer-contact a {

    color:
        rgba(255, 255, 255, 0.68);

    font-size:
        13px;

    transition:
        color 0.2s ease;

}


.footer-contact a:hover {

    color:
        var(--white);

}


/* ============================================================
   27. COPYRIGHT
   ============================================================ */

.footer-bottom {

    border-top:
        1px solid rgba(255, 255, 255, 0.09);

}


.footer-bottom .container {

    min-height:
        54px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

}


.footer-bottom p {

    color:
        rgba(255, 255, 255, 0.42);

    font-size:
        11px;

    text-align:
        center;

}


/* ============================================================
   28. TABLET
   ============================================================ */

@media (max-width: 900px) {


    .container {

        width:
            calc(100% - 32px);

    }


    .logo {

        width:
            170px;

    }


    .main-menu a {

        padding:
            0 13px;

    }


    .news-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .footer-container {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:
            35px;

    }


    .footer-brand {

        grid-column:
            1 / -1;

    }

}


/* ============================================================
   29. MÓVIL
   ============================================================ */

@media (max-width: 680px) {


    .container {

        width:
            calc(100% - 22px);

    }


    /* HEADER */

    .site-header::before {

        height:
            2px;

    }


    .header-container {

        min-height:
            68px;

    }


    .logo {

        width:
            145px;

    }


    .menu-toggle {

        display:
            block;

    }


    /* MENÚ MÓVIL */

    .main-menu {

        position:
            absolute;

        top:
            70px;

        left:
            0;

        width:
            100%;

        padding:
            8px 11px 13px;

        display:
            none;

        flex-direction:
            column;

        align-items:
            stretch;

        gap:
            4px;

        background:
            var(--ranco-blue-deep);

        border-top:
            1px solid rgba(255, 255, 255, 0.08);

        box-shadow:
            0 12px 25px rgba(0, 0, 0, 0.18);

    }


    .main-menu.open,
    .main-menu.menu-open {

        display:
            flex;

    }


    .main-menu a {

        width:
            100%;

        min-height:
            45px;

        padding:
            0 14px;

        justify-content:
            flex-start;

    }


    .main-menu .live-menu-item {

        justify-content:
            flex-start;

    }


    /* PUBLICIDAD */

    .advertising-section {

        padding:
            12px 0;

    }


    .advertising-banner {

        min-height:
            85px;

        border-radius:
            7px;

    }


    /* EN VIVO */

    .live-section {

        padding:
            25px 0 18px;

    }


    .section-heading h1 {

        font-size:
            22px;

    }


    .section-heading h2 {

        font-size:
            21px;

    }


    /* ========================================================
       IMPORTANTE:
       NO se toca el contenido del reproductor CWS.
       ======================================================== */

    .player-wrapper {

        border-radius:
            7px;

    }


    /* CLIMA */

    .weather-section {

        padding:
            18px 0 22px;

    }


    .weather-grid {

        grid-template-columns:
            1fr;

        gap:
            13px;

    }


    .weather-card {

        min-height:
            150px;

        padding:
            19px;

    }


    /* NOTICIAS */

    .news-section {

        padding:
            22px 0;

    }


    .news-grid {

        grid-template-columns:
            1fr;

        gap:
            15px;

    }


    .news-content {

        padding:
            15px;

    }


    .news-card h3 {

        font-size:
            17px;

    }


    /* FOOTER */

    .footer-container {

        padding:
            35px 0;

        grid-template-columns:
            1fr;

        gap:
            27px;

    }


    .footer-brand {

        grid-column:
            auto;

    }


    .footer-logo {

        width:
            155px;

    }


}


/* ============================================================
   30. MÓVILES PEQUEÑOS
   ============================================================ */

@media (max-width: 400px) {


    .container {

        width:
            calc(100% - 18px);

    }


    .logo {

        width:
            132px;

    }


    .menu-toggle {

        width:
            43px;

        height:
            43px;

    }


    .weather-card {

        padding:
            17px;

    }


    .weather-data .temperature {

        font-size:
            28px;

    }


    .news-card h3 {

        font-size:
            16px;

    }

}


/* ============================================================
   31. ACCESIBILIDAD
   ============================================================ */

a:focus-visible,
button:focus-visible {

    outline:
        3px solid rgba(20, 117, 223, 0.45);

    outline-offset:
        3px;

}


/* ============================================================
   32. REDUCCIÓN DE MOVIMIENTO
   ============================================================ */

@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;

    }

}

.weather-details {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

/* ============================================================
   ENLACE DE TARJETA DE NOTICIA
============================================================ */

.news-card-link {

    display: block;

    color: inherit;

    text-decoration: none;

}


.news-card-link .news-content {

    display: block;

}


.news-card-link:hover {

    color: inherit;

}


.news-card-link:focus-visible {

    outline:
        3px solid rgba(7, 87, 184, 0.35);

    outline-offset:
        -3px;

}

/* ============================================================
   RANCOTV - COMPATIBILIDAD CON index.php / script.js ACTUALES
   Mantiene el diseño original y adapta únicamente las clases
   dinámicas utilizadas por la versión PHP.
   ============================================================ */

/* El JS actual utiliza menu-open */
@media (max-width: 680px) {
    .main-menu.menu-open {
        display: flex;
    }
}

/* El banner debe conservar el tamaño profesional del diseño */
.advertising-banner {
    width: 100%;
    max-width: 650px;
}

.advertising-banner a {
    width: 100%;
}

.advertising-image {
    width: 100%;
    height: auto;
}

/* El JS actual genera estas clases para las tarjetas */
.news-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #dce2e8, #edf0f3);
    color: #7c858e;
    font-size: 12px;
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-image {
    transform: scale(1.04);
}

.news-card-content {
    display: block;
    padding: 17px 18px 18px;
}

.news-card-date {
    display: block;
    margin-top: 0;
    color: var(--text-muted);
    font-size: 11px;
}

.news-card-title {
    margin-top: 10px;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.28;
}

.news-card-summary {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.55;
}

.news-card-read {
    display: inline-block;
    margin-top: 12px;
    color: var(--ranco-blue);
    font-size: 12px;
    font-weight: 800;
}

.news-card-link:hover .news-card-read {
    color: var(--ranco-red);
}

.news-card-no-image {
    min-height: 0;
}

.news-card-no-image span {
    color: var(--ranco-blue);
    font-size: 16px;
    font-weight: 800;
}

.news-loading,
.news-empty,
.news-error {
    grid-column: 1 / -1;
    padding: 30px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
}

.news-error {
    color: var(--ranco-red-dark);
}

/* Estructura de clima que genera script.js */
.weather-content {
    min-height: 65px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-main {
    min-height: 65px;
    display: flex;
    align-items: center;
}

.weather-content .weather-icon {
    margin-right: 14px;
    font-size: 42px;
    line-height: 1;
}

.weather-content .weather-temperature {
    color: var(--text-dark);
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
}

.weather-content .weather-description {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 13px;
}

.weather-content .weather-wind {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
}

/* En móvil, conservar las proporciones del diseño original */
@media (max-width: 680px) {
    .weather-content .weather-temperature {
        font-size: 28px;
    }

    .news-card-content {
        padding: 15px;
    }

    .news-card-title {
        font-size: 17px;
    }
}

/* Contacto utilizado por index.php actual */
/* =========================================================
   FORMULARIO DE CONTACTO
   ========================================================= */

.contact-box {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 30px;
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-sizing: border-box;
}

.contact-intro {
    margin: 0 0 24px;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.contact-form {
    width: 100%;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    margin-bottom: 7px;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input {
    height: 46px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--ranco-blue);
    box-shadow: 0 0 0 3px rgba(7, 87, 184, 0.10);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.contact-form-footer {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 5px;
}

.contact-submit {
    border: 0;
    border-radius: var(--radius-small);
    padding: 12px 24px;
    background: var(--ranco-blue);
    color: var(--white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-submit:hover {
    background: var(--ranco-blue-light);
    transform: translateY(-1px);
}

.contact-submit:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.contact-status {
    font-size: 14px;
    font-weight: 600;
}

.contact-status.success {
    color: #16803c;
}

.contact-status.error {
    color: var(--ranco-red);
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 680px) {

    .contact-box {
        padding: 22px 18px;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-submit {
        width: 100%;
    }

    .contact-status {
        text-align: center;
    }
}

/* Página individual de noticia */
.article-section {
    width: 100%;
    padding: 32px 0 50px;
}

.article-container {
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 0 auto;
}

.article-loading,
.article-error {
    padding: 40px 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
    text-align: center;
}

.article-loading {
    color: var(--text-muted);
    font-size: 14px;
}

.article-error h1 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 25px;
}

.article-error p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.article-content {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.article-category {
    margin: 25px 30px 10px;
    color: var(--ranco-red);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.article-title {
    padding: 0 30px;
    color: var(--text-dark);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.18;
}

.article-date {
    padding: 10px 30px 0;
    color: var(--text-muted);
    font-size: 11px;
}

.article-image-container {
    margin-top: 22px;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
}

.article-summary {
    margin: 24px 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
}

.article-body {
    padding: 24px 30px 30px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.article-footer {
    padding: 0 30px 30px;
}

.article-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 6px;
    background: var(--ranco-blue);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.article-back-button:hover {
    background: var(--ranco-blue-light);
}

@media (max-width: 680px) {
    .advertising-banner {
        width: 100%;
        max-width: 100%;
    }

    .contact-section {
        padding: 25px 0 35px;
    }

    .article-section {
        padding: 22px 0 35px;
    }

    .article-container {
        width: calc(100% - 22px);
    }

    .article-category {
        margin: 20px 18px 9px;
    }

    .article-title {
        padding: 0 18px;
        font-size: 25px;
    }

    .article-date {
        padding: 9px 18px 0;
    }

    .article-summary {
        margin: 20px 18px 0;
        font-size: 15px;
    }

    .article-body {
        padding: 20px 18px 24px;
        font-size: 15px;
    }

    .article-footer {
        padding: 0 18px 22px;
    }
}


/* ============================================================
   RANCOTV - AJUSTES FINALES
   ============================================================ */

/* Menú móvil */
@media (max-width: 680px) {
    .main-menu.menu-open {
        display: flex;
    }
}

/* Publicidad */
.advertising-banner {
    width: 100%;
    max-width: 650px;
}

.advertising-banner a {
    display: block;
    width: 100%;
}

.advertising-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Clima responsive */
@media (max-width: 680px) {
    .weather-card {
        min-height: 150px;
        padding: 19px;
    }

    .weather-main .weather-temperature {
        font-size: 28px;
    }

    .weather-main .weather-icon {
        font-size: 38px;
    }
}

@media (max-width: 400px) {
    .weather-card {
        padding: 17px;
    }

    .weather-main .weather-temperature {
        font-size: 28px;
    }

    .weather-main .weather-icon {
        font-size: 36px;
    }
}

/* ============================================================
   CLIMA RANCOTV - DISEÑO SOBRE FOTOGRAFÍA
   ============================================================ */

.weather-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    min-height: 300px;

    color: #ffffff;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.25);

    box-shadow:
        0 8px 28px rgba(5,23,43,.14);

    background-size: cover;
    background-position: center;
}

/* ------------------------------------------------------------
   IMAGEN DE FONDO
   ------------------------------------------------------------ */

.weather-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background-image:
        linear-gradient(
            90deg,
            rgba(3,12,22,.82) 0%,
            rgba(3,12,22,.65) 28%,
            rgba(3,12,22,.28) 52%,
            rgba(3,12,22,.05) 78%,
            rgba(3,12,22,0) 100%
        ),
        var(--weather-background);

    background-size: cover;
    background-position: center;

    opacity: 1;
}

/* ------------------------------------------------------------
   BARRA LATERAL
   ------------------------------------------------------------ */

.weather-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;

    width: 6px;

    z-index: 5;

    background: var(--ranco-blue);

    border-radius: 10px 0 0 10px;
}

.weather-card.weather-ranco::before {
    background: var(--ranco-red);
}

/* ------------------------------------------------------------
   CONTENIDO
   ------------------------------------------------------------ */

.weather-card > * {
    position: relative;
    z-index: 2;
}

.weather-content {
    position: relative;
    z-index: 3;

    min-height: 300px;

    padding: 22px 26px 20px;
}

/* ------------------------------------------------------------
   ETIQUETA SUPERIOR
   ------------------------------------------------------------ */

.weather-label {
    display: inline-flex;
    align-items: center;

    padding: 6px 11px;

    border-radius: 6px;

    background: rgba(255,255,255,.96);

    color: var(--ranco-blue);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: .6px;

    text-transform: uppercase;

    box-shadow:
        0 3px 10px rgba(0,0,0,.12);
}

.weather-card.weather-ranco .weather-label {
    color: var(--ranco-red);
}

/* ------------------------------------------------------------
   TÍTULO
   ------------------------------------------------------------ */

.weather-card h2 {
    display: inline-block;

    margin: 8px 0 4px;

    padding: 0;

    color: #ffffff;

    font-size: 28px;
    line-height: 1.1;

    font-weight: 800;

    text-shadow:
        0 2px 5px rgba(0,0,0,.55);
}

/* ------------------------------------------------------------
   UBICACIÓN / REGIÓN
   ------------------------------------------------------------ */

.weather-location {
    display: inline-block;

    margin-left: 7px;
    padding: 5px 9px;

    border-radius: 5px;

    background: rgba(255,255,255,.88);

    color: #17202a;

    font-size: 13px;
    font-weight: 500;

    vertical-align: middle;

    box-shadow:
        0 2px 8px rgba(0,0,0,.12);
}

/* ------------------------------------------------------------
   DESCRIPCIÓN DE UBICACIÓN
   ------------------------------------------------------------ */

.weather-card .weather-intro,
.weather-card .weather-message {
    max-width: 520px;

    margin: 0 0 12px;

    color: rgba(255,255,255,.94);

    font-size: 14px;
    line-height: 1.4;

    text-shadow:
        0 1px 4px rgba(0,0,0,.65);
}

/* ------------------------------------------------------------
   ZONA PRINCIPAL DEL CLIMA
   ------------------------------------------------------------ */

.weather-main {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-top: 12px;
}

/* ------------------------------------------------------------
   ICONO
   ------------------------------------------------------------ */

.weather-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    min-width: 64px;
    height: 64px;

    font-size: 50px;

    filter:
        drop-shadow(0 3px 4px rgba(0,0,0,.55));
}

/* ------------------------------------------------------------
   TEMPERATURA
   ------------------------------------------------------------ */

.weather-main .weather-temperature,
.weather-temperature {
    display: inline-block;

    margin: 0;
    padding: 3px 10px;

    color: #ffffff;

    font-size: 44px;
    line-height: 1;

    font-weight: 800;

    letter-spacing: -1px;

    text-shadow:
        0 3px 7px rgba(0,0,0,.75);
}

/* ------------------------------------------------------------
   DESCRIPCIÓN DEL CLIMA
   ------------------------------------------------------------ */

.weather-description {
    margin-top: 3px;

    color: #ffffff;

    font-size: 17px;
    font-weight: 600;

    text-shadow:
        0 2px 5px rgba(0,0,0,.7);
}

/* ------------------------------------------------------------
   DATOS: VIENTO / HUMEDAD
   ------------------------------------------------------------ */

.weather-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 18px;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 155px;

    padding: 9px 13px;

    border-radius: 8px;

    background: rgba(8,18,28,.58);

    border: 1px solid rgba(255,255,255,.12);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    box-shadow:
        0 4px 12px rgba(0,0,0,.18);
}

.weather-detail-icon {
    font-size: 24px;

    line-height: 1;

    filter:
        drop-shadow(0 2px 3px rgba(0,0,0,.5));
}

.weather-detail-label {
    display: block;

    color: rgba(255,255,255,.78);

    font-size: 12px;
    line-height: 1.1;
}

.weather-detail-value {
    display: block;

    margin-top: 2px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;
}

/* ------------------------------------------------------------
   VIENTO - COMPATIBILIDAD CON EL HTML ACTUAL
   ------------------------------------------------------------ */

.weather-wind {
    display: inline-block;

    margin-top: 8px;
    padding: 5px 9px;

    border-radius: 5px;

    background: rgba(8,18,28,.65);

    color: #ffffff;

    font-size: 12px;
    font-weight: 500;

    border: 1px solid rgba(255,255,255,.12);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ------------------------------------------------------------
   HUMEDAD
   ------------------------------------------------------------ */

.weather-humidity {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 5px;

    background: rgba(8,18,28,.65);

    color: #ffffff;

    font-size: 12px;
    font-weight: 500;

    border: 1px solid rgba(255,255,255,.12);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ------------------------------------------------------------
   ESTADO DE CARGA
   ------------------------------------------------------------ */

.weather-loading {
    color: #ffffff;

    text-shadow:
        0 2px 5px rgba(0,0,0,.7);
}

/* ------------------------------------------------------------
   MENSAJE DE GEOLOCALIZACIÓN
   ------------------------------------------------------------ */

.weather-card .weather-permission,
.weather-card .weather-error {
    display: inline-block;

    margin-top: 5px;

    padding: 6px 9px;

    border-radius: 5px;

    background: rgba(255,255,255,.90);

    color: #17202a;

    font-size: 12px;

    box-shadow:
        0 2px 8px rgba(0,0,0,.12);
}

/* ------------------------------------------------------------
   TARJETA RANCO
   ------------------------------------------------------------ */

.weather-card.weather-ranco h2 {
    text-shadow:
        0 2px 6px rgba(0,0,0,.65);
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 768px) {

    .weather-content {
        min-height: 290px;

        padding: 18px 20px 18px;
    }

    .weather-card h2 {
        font-size: 24px;
    }

    .weather-main .weather-temperature,
    .weather-temperature {
        font-size: 38px;
    }

    .weather-icon {
        width: 55px;
        min-width: 55px;
        height: 55px;

        font-size: 42px;
    }

    .weather-detail {
        min-width: 140px;
    }
}

@media (max-width: 480px) {

    .weather-content {
        padding: 16px 17px;
    }

    .weather-card {
        min-height: 280px;
    }

    .weather-content {
        min-height: 280px;
    }

    .weather-card h2 {
        display: block;

        margin-top: 8px;

        font-size: 22px;
    }

    .weather-location {
        margin-left: 0;
        margin-top: 4px;
    }

    .weather-main {
        gap: 10px;
    }

    .weather-main .weather-temperature,
    .weather-temperature {
        font-size: 34px;
    }

    .weather-icon {
        width: 50px;
        min-width: 50px;

        font-size: 38px;
    }

    .weather-details {
        gap: 7px;
        margin-top: 14px;
    }

    .weather-detail {
        min-width: 0;
        flex: 1;

        padding: 8px 9px;
    }
}



/* ============================================================
   BANNER FIESTAS PATRIAS BAJO EL HEADER
   ============================================================ */

.patrias-banner-image {
    display: block;
    width: 100%;
    max-width: 1180px;
    height: auto;
    margin: 0 auto;
    mix-blend-mode: multiply;
}

