/* ============================================
   MORFILANDIA - DISEÑO MODERNO V1
   CELULARES + PC
   NO MODIFICA PHP, IA NI PUBLICIDAD
============================================ */

:root {
    --mf-bg: #080c12;
    --mf-panel: #111923;
    --mf-panel2: #151f2b;
    --mf-blue: #38bdf8;
    --mf-orange: #ff7900;
    --mf-text: #f4f7fb;
    --mf-muted: #9eafbf;
    --mf-border: rgba(125,165,205,.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mf-bg) !important;
    color: var(--mf-text);
    font-family: "Segoe UI", Arial, sans-serif !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* CABECERA */

.header {
    background: #090d13;
    border-bottom: 1px solid var(--mf-border);
    padding: 18px 15px !important;
    text-align: center;
}

.logo {
    color: var(--mf-blue) !important;
    font-size: clamp(25px, 4vw, 34px) !important;
    font-weight: 850 !important;
    letter-spacing: -.8px;
}

/* NAVEGACIÓN */

.nav {
    position: sticky !important;
    top: 0;
    z-index: 999;
    display: block !important;
    padding: 0 !important;
    background: rgba(12,17,24,.97) !important;
    border-bottom: 1px solid var(--mf-border) !important;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 9px !important;
    max-width: 1280px;
    margin: auto;
    padding: 12px 16px !important;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-wrap::-webkit-scrollbar {
    display: none;
}

.nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 10px 15px !important;
    border-radius: 11px !important;
    color: #d4e0eb !important;
    font-size: 13px !important;
    font-weight: 600;
    white-space: nowrap;
}

.nav a:hover,
.nav a.active {
    background: #17364a !important;
    color: #fff !important;
}

.nav a.hot {
    background: linear-gradient(120deg,#ff422e,#ff8700) !important;
    color: #fff !important;
    box-shadow: 0 3px 16px rgba(255,103,0,.25);
}

.nav a.home {
    background: #1b2734 !important;
}

/* CONTENEDOR GENERAL */

.container {
    width: 100%;
    max-width: 1280px !important;
    margin: 0 auto;
    padding: 25px 20px !important;
}

/* ============================================
   PORTADA - NOTICIA DESTACADA
============================================ */

.hero {
    position: relative;
    min-height: 410px;
    margin-bottom: 28px !important;
    overflow: hidden;
    border-radius: 20px !important;
    background: var(--mf-panel);
    border: 1px solid var(--mf-border);
    box-shadow: 0 12px 35px rgba(0,0,0,.25);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.96) 0%,
        rgba(0,0,0,.62) 32%,
        rgba(0,0,0,.08) 75%
    );
}

.hero img {
    display: block;
    width: 100%;
    height: 410px !important;
    object-fit: cover;
    transition: transform .35s ease;
}

.hero:hover img {
    transform: scale(1.025);
}

.hero h1 {
    position: absolute;
    z-index: 2;
    bottom: 28px !important;
    left: 30px !important;
    right: 30px;
    width: auto;
    max-width: 900px;
    margin: 0;
    font-size: clamp(25px,3.5vw,43px) !important;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -.8px;
    color: #fff;
    text-shadow: 0 3px 12px rgba(0,0,0,.6);
    overflow-wrap: anywhere;
}

/* ============================================
   TARJETAS DE NOTICIAS
============================================ */

.grid {
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 19px !important;
    align-items: stretch;
}

.grid > a {
    display: block;
    min-width: 0;
    height: 100%;
}

.card {
    height: 100%;
    overflow: hidden;
    background: var(--mf-panel) !important;
    border: 1px solid var(--mf-border);
    border-radius: 15px !important;
    transition: transform .2s, border-color .2s;
}

.card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(56,189,248,.45);
}

.card img {
    display: block;
    width: 100%;
    height: 185px !important;
    object-fit: cover;
}

.card h3 {
    margin: 0 !important;
    padding: 15px !important;
    color: #f1f5f9 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* ============================================
   ARTÍCULOS
============================================ */

.container > h1 {
    max-width: 1050px;
    margin: 8px 0 16px !important;
    color: #fff;
    font-size: clamp(30px,4vw,47px) !important;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -.9px;
    overflow-wrap: anywhere;
}

.meta {
    margin-bottom: 24px !important;
    color: var(--mf-muted) !important;
    font-size: 13px !important;
}

/* Imagen y publicidad existentes */

.noticia-flex {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px !important;
    margin: 22px 0 28px;
    max-width: 100%;
}

.img-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.img-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 16px !important;
    margin: 0 !important;
}

/* Texto de las noticias */

.mf-article-content {
    max-width: 850px;
    margin: 30px auto;
}

.mf-article-content p {
    color: #e0e8f1;
    font-size: 19px;
    line-height: 1.85;
    margin: 0 0 29px;
    overflow-wrap: break-word;
}

.mf-article-content p:first-of-type::first-letter {
    float: left;
    color: var(--mf-orange);
    font-size: 4.3em;
    font-weight: 850;
    line-height: .83;
    padding: 7px 10px 0 0;
}

.mf-article-content h2 {
    margin: 35px 0 18px;
    padding-left: 13px;
    border-left: 4px solid var(--mf-orange);
    color: #fff !important;
    font-size: 25px;
    line-height: 1.3;
}

.mf-article-content a {
    color: var(--mf-blue);
}

/* Imágenes intercaladas */

.mf-article-image {
    display: block;
    width: 100%;
    max-width: 850px;
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
    background: var(--mf-panel);
}

.mf-article-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 470px;
    object-fit: cover;
}

/* Cajas y relacionadas */

.box {
    max-width: 100%;
    margin: 30px 0 !important;
    padding: 22px !important;
    background: var(--mf-panel) !important;
    border: 1px solid var(--mf-border);
    border-radius: 15px !important;
}

.box h3 {
    margin-top: 0;
    font-size: 21px;
}

.rel-grid {
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px !important;
}

.rel-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    background: var(--mf-panel2) !important;
    border-radius: 12px !important;
}

.rel-card img {
    display: block;
    width: 100%;
    height: 140px !important;
    object-fit: cover;
}

.rel-card div {
    padding: 12px !important;
    font-size: 14px !important;
    line-height: 1.4;
}

/* ============================================
   TABLETS
============================================ */

@media (max-width: 1000px) {

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

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

@media (max-width: 750px) {

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

    .noticia-flex {
        flex-wrap: wrap;
    }

    .img-wrap {
        flex: 1 1 100%;
    }
}

/* ============================================
   CELULARES - ESTILO PORTAL DE NOTICIAS
============================================ */

@media (max-width: 600px) {

    .header {
        padding: 17px 10px !important;
    }

    .logo {
        font-size: 27px !important;
    }

    .nav-wrap {
        gap: 8px !important;
        padding: 10px 12px !important;
    }

    .nav a {
        font-size: 12px !important;
        padding: 9px 12px !important;
    }

    .container {
        padding: 16px 13px !important;
    }

    /* DESTACADA */

    .hero {
        min-height: 330px;
        margin-bottom: 19px !important;
        border-radius: 15px !important;
    }

    .hero img {
        height: 330px !important;
    }

    .hero h1 {
        bottom: 20px !important;
        left: 17px !important;
        right: 17px !important;
        font-size: 25px !important;
        line-height: 1.2;
        letter-spacing: -.4px;
    }

    /* NOTICIAS HORIZONTALES COMO PORTAL */

    .grid {
        display: flex !important;
        flex-direction: column;
        gap: 12px !important;
    }

    .grid > a {
        width: 100%;
        height: auto;
    }

    .card {
        display: grid;
        grid-template-columns: 38% minmax(0,1fr);
        min-height: 120px;
        border-radius: 13px !important;
    }

    .card img {
        width: 100%;
        height: 100% !important;
        min-height: 120px;
        max-height: 165px;
        object-fit: cover;
    }

    .card h3 {
        align-self: center;
        padding: 12px !important;
        font-size: 15px !important;
        line-height: 1.35;
        font-weight: 750 !important;
    }

    /* ARTÍCULOS */

    .container > h1 {
        font-size: 30px !important;
        line-height: 1.2;
        margin: 8px 0 16px !important;
    }

    .meta {
        font-size: 12px !important;
        margin-bottom: 22px !important;
    }

    .noticia-flex {
        display: flex !important;
        flex-direction: column;
        gap: 18px !important;
        margin: 22px 0 28px;
    }

    .img-wrap {
        width: 100% !important;
    }

    .img-wrap img {
        max-height: 290px;
        border-radius: 12px !important;
    }

    .mf-article-content {
        margin: 25px 0;
    }

    .mf-article-content p {
        font-size: 17px;
        line-height: 1.8;
        margin-bottom: 25px;
    }

    .mf-article-content p:first-of-type::first-letter {
        font-size: 3.8em;
        padding-right: 8px;
    }

    .mf-article-content h2 {
        font-size: 22px;
    }

    .mf-article-image {
        margin: 25px 0;
        border-radius: 12px;
    }

    .box {
        padding: 17px !important;
        margin: 23px 0 !important;
    }

    .rel-grid {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
        gap: 10px !important;
    }

    .rel-card img {
        height: 105px !important;
    }

    .rel-card div {
        padding: 9px !important;
        font-size: 12px !important;
    }

    /* Los anuncios existentes conservan sus scripts.
       Este estilo no modifica su configuración. */
}

@media (max-width: 360px) {

    .hero h1 {
        font-size: 22px !important;
    }

    .card {
        grid-template-columns: 35% minmax(0,1fr);
    }

    .card h3 {
        font-size: 13px !important;
    }
}
.mf-article-content > p:nth-of-type(-n+3)::first-letter {
    float: left !important;
    font-size: 4.8em !important;
    line-height: 0.8 !important;
    font-weight: 800 !important;
    color: #ff9933 !important;
    margin: 8px 12px 0 0 !important;
    padding: 0 !important;
}
/* =========================================
   MORFILANDIA - TIPOGRAFÍA PERIODÍSTICA
   ========================================= */

.mf-article-content {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 19px !important;
    line-height: 1.85 !important;
    letter-spacing: 0.1px;
    color: #e5e5e5 !important;
    font-weight: 400;
}

/* PÁRRAFOS */
.mf-article-content p {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 0 25px !important;
    color: #e5e5e5 !important;
}

/* SUBTÍTULOS */
.mf-article-content h2,
.mf-article-content h3 {
    font-family: Arial, sans-serif !important;
    font-weight: 700;
    color: #f0f0f0;
    line-height: 1.35;
    margin: 35px 0 18px;
}

/* LETRAS CAPITALES NARANJA */
.mf-article-content > p:nth-of-type(-n+3)::first-letter {
    float: left !important;
    font-size: 4.5em !important;
    line-height: 0.8 !important;
    font-weight: 700 !important;
    color: #ff9933 !important;
    margin: 8px 12px 0 0 !important;
}

/* AJUSTES PARA CELULARES */
@media (max-width: 600px) {
    .mf-article-content {
        font-size: 18px !important;
        line-height: 1.8 !important;
        letter-spacing: 0;
    }

    .mf-article-content p {
        margin-bottom: 24px !important;
    }
}
/* TÍTULO PRINCIPAL DE LAS NOTICIAS */

.container > h1 {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 34px !important;
    font-weight: 700 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.5px !important;
    color: #f5f1eb !important;
    margin: 12px 0 18px !important;
    text-wrap: balance;
}

/* TÍTULO EN CELULARES */

@media (max-width: 600px) {
    .container > h1 {
        font-size: 29px !important;
        line-height: 1.28 !important;
        letter-spacing: -0.3px !important;
        margin-bottom: 16px !important;
    }
}
/* ============================================
   MORFILANDIA - HOME ESTILO EDITORIAL
   ============================================ */

/* NOTICIA PRINCIPAL */
.hero {
    border: 1px solid rgba(255, 153, 51, .18) !important;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .35) !important;
}

.hero::after {
    background: linear-gradient(
        to top,
        rgba(5, 8, 13, .98) 0%,
        rgba(5, 8, 13, .78) 30%,
        rgba(5, 8, 13, .12) 80%
    ) !important;
}

.hero h1 {
    font-family: Georgia, "Times New Roman", serif !important;
    font-weight: 700 !important;
    font-size: clamp(27px, 3.5vw, 43px) !important;
    line-height: 1.22 !important;
    letter-spacing: -.5px !important;
    color: #fff7ed !important;
    text-shadow: 0 3px 14px rgba(0, 0, 0, .8) !important;
    text-wrap: balance;
}

/* TARJETAS SECUNDARIAS */
.grid .card {
    background: #111923 !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .16);
    transition: transform .25s ease,
                border-color .25s ease,
                box-shadow .25s ease !important;
}

.grid .card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(255, 153, 51, .45) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .3);
}

.grid .card h3 {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.48 !important;
    letter-spacing: -.15px;
    color: #f3eee8 !important;
    text-wrap: pretty;
}

/* DETALLE NARANJA AL PASAR EL CURSOR */
.grid > a:hover .card h3 {
    color: #ffb366 !important;
}

/* CELULARES */
@media (max-width: 600px) {

    .hero h1 {
        font-size: 27px !important;
        line-height: 1.24 !important;
        letter-spacing: -.35px !important;
    }

    .grid .card h3 {
        font-size: 16px !important;
        line-height: 1.42 !important;
        font-weight: 700 !important;
        padding: 12px 14px !important;
    }

    .grid .card {
        border-radius: 14px !important;
    }
}

/* CELULARES PEQUEÑOS */
@media (max-width: 360px) {

    .hero h1 {
        font-size: 24px !important;
    }

    .grid .card h3 {
        font-size: 14px !important;
    }
}
/* ============================================
   MORFILANDIA - CATEGORÍAS V2
   TARJETAS MODERNAS PC + CELULAR
   ============================================ */

/* TARJETAS */
body:has(.card-body) .grid .card {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    height: 100% !important;
    min-height: 0 !important;
    background: #131c27 !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 5px 20px rgba(0,0,0,.22);
    transition: transform .25s ease,
                box-shadow .25s ease,
                border-color .25s ease !important;
}

/* IMAGEN COMPLETA */
body:has(.card-body) .grid .card img {
    display: block !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    flex: none !important;
}

/* CONTENEDOR DEL TEXTO */
body:has(.card-body) .grid .card-body {
    position: relative !important;
    inset: auto !important;
    bottom: auto !important;
    width: 100% !important;
    padding: 17px !important;
    background: #131c27 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* TITULARES */
body:has(.card-body) .grid .card h3 {
    position: static !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
    letter-spacing: -.2px !important;
    color: #f0f4f8 !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    text-shadow: none !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    text-wrap: pretty;
}

/* INVITACIÓN A LEER */
body:has(.card-body) .grid .card-body::after {
    content: "Leer noticia  →";
    display: block;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    color: #ff9933;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
}

/* EFECTO PC */
@media (hover: hover) {

    body:has(.card-body) .grid .card:hover {
        transform: translateY(-5px) !important;
        border-color: rgba(255,153,51,.5) !important;
        box-shadow: 0 14px 32px rgba(0,0,0,.38) !important;
    }

    body:has(.card-body) .grid .card:hover img {
        filter: brightness(1.08);
    }

    body:has(.card-body) .grid .card:hover h3 {
        color: #ffb366 !important;
    }
}

/* ============================================
   CELULARES
   ============================================ */

@media (max-width: 600px) {

    /* UNA NOTICIA DEBAJO DE OTRA */
    body:has(.card-body) .grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    body:has(.card-body) .grid > a {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }

    /* TARJETA HORIZONTAL */
    body:has(.card-body) .grid .card {
        display: grid !important;
        grid-template-columns: 35% minmax(0, 1fr) !important;
        min-height: 135px !important;
        height: auto !important;
        border-radius: 14px !important;
    }

    /* IMAGEN A LA IZQUIERDA */
    body:has(.card-body) .grid .card img {
        width: 100% !important;
        height: 100% !important;
        min-height: 135px !important;
        max-height: none !important;
        object-fit: cover !important;
        grid-column: 1 !important;
    }

    /* TEXTO SOLO A LA DERECHA */
    body:has(.card-body) .grid .card-body {
        position: relative !important;
        grid-column: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 12px !important;
        background: #131c27 !important;
        justify-content: space-between !important;
    }

    /* TITULAR LEGIBLE */
    body:has(.card-body) .grid .card h3 {
        font-size: 14px !important;
        font-weight: 650 !important;
        line-height: 1.38 !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
        color: #f3f5f8 !important;
    }

    /* LEER NOTICIA */
    body:has(.card-body) .grid .card-body::after {
        content: "Leer noticia →";
        font-size: 12px !important;
        padding-top: 9px !important;
        margin-top: auto !important;
    }
}

/* CELULARES MUY PEQUEÑOS */
@media (max-width: 360px) {

    body:has(.card-body) .grid .card {
        grid-template-columns: 32% minmax(0,1fr) !important;
    }

    body:has(.card-body) .grid .card h3 {
        font-size: 13px !important;
    }

    body:has(.card-body) .grid .card-body {
        padding: 10px !important;
    }
}
/* CORRECCION: imagen principal de portada */
.mf-feature-main .hero {
    height: 410px !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.mf-feature-main .hero img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 410px !important;
    object-fit: cover !important;
}

@media (max-width: 850px) {
    .mf-feature-main .hero {
        height: 330px !important;
    }

    .mf-feature-main .hero img {
        max-height: 330px !important;
    }
}
