/* ══════════════════════════════════════════════════════════
    noticias.css — Página Noticias
    Ana Lamb Multiservicios LLC
    Depende de las variables CSS definidas en style.css global
    (--navy, --rose, --teal, --gold, --cream, --white, --text,
    --font-display, --font-body)
══════════════════════════════════════════════════════════ */

/* ── Utilidades compartidas de sección ─────────────────── */
.nt-section__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════════════════════════
    HERO
══════════════════════════════════════════════════════════ */
.nt-hero {
    background: linear-gradient(110deg, #f5eee6 0%, #fdf8f3 55%, #e8f4f2 100%);
    padding: 70px 24px 60px;
    text-align: center;
}

.nt-hero__inner {
    max-width: 700px;
    margin: 0 auto;
}

.nt-hero__pretitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
}

.nt-hero__pretitle::before,
.nt-hero__pretitle::after {
    content: '';
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--teal);
    border-radius: 2px;
}

.nt-hero__title {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 16px;
}

.nt-hero__title em {
    font-style: italic;
    color: var(--rose);
}

.nt-hero__desc {
    font-size: 15.5px;
    line-height: 1.7;
    color: #5a5a5a;
}

/* ══════════════════════════════════════════════════════════
    TABS / FILTROS
══════════════════════════════════════════════════════════ */
.nt-tabs-section {
    background: var(--white);
    border-bottom: 1px solid rgba(212, 169, 64, 0.18);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nt-section__inner:has(.nt-tabs) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.nt-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nt-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy);
    background: var(--cream);
    border: 1.5px solid transparent;
    border-radius: 24px;
    padding: 9px 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.nt-tab:hover {
    border-color: rgba(212, 169, 64, 0.4);
    transform: translateY(-1px);
}

.nt-tab--active,
    .nt-tab--active:hover {
    background: var(--rose);
    color: var(--white);
    border-color: var(--rose);
    }

    .nt-tab__icon {
    font-size: 13px;
    }

    .nt-actualizado {
    font-size: 12px;
    color: #999;
    font-style: italic;
    }

    /* ══════════════════════════════════════════════════════════
    SECCIÓN NOTICIAS / GRID
    ══════════════════════════════════════════════════════════ */
    .nt-noticias {
    padding: 56px 0 90px;
    background: var(--cream);
    min-height: 400px;
    }

    /* ── Estado: cargando ── */
    .nt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 80px 24px;
    color: #888;
    font-size: 14px;
    }

    .nt-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(200, 56, 90, 0.15);
    border-top-color: var(--rose);
    border-radius: 50%;
    animation: nt-spin 0.9s linear infinite;
    }

    @keyframes nt-spin {
    to { transform: rotate(360deg); }
}

/* ── Estado: error ── */
.nt-error {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 60px 24px;
text-align: center;
background: #fff8e7;
border: 1.5px solid rgba(212, 169, 64, 0.3);
border-radius: 16px;
max-width: 480px;
margin: 0 auto;
}

.nt-error__icon {
font-size: 32px;
}

.nt-error p {
font-size: 14px;
color: #6b5a2a;
line-height: 1.6;
}

/* ── Grid de tarjetas ── */
.nt-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 28px;
}

/* ── Tarjeta de noticia ── */
.nt-card {
background: var(--white);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 4px 20px rgba(27, 44, 78, 0.08);
border: 1px solid rgba(212, 169, 64, 0.12);
display: flex;
flex-direction: column;
text-decoration: none;
color: inherit;
transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.nt-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 32px rgba(27, 44, 78, 0.14);
border-color: rgba(212, 169, 64, 0.35);
}

/* Imagen */
.nt-card__img-wrap {
width: 100%;
height: 180px;
overflow: hidden;
position: relative;
background: linear-gradient(135deg, #dde8f5 0%, #c8dcea 100%);
}

.nt-card__img-wrap img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.4s ease;
}

.nt-card:hover .nt-card__img-wrap img {
transform: scale(1.06);
}

/* Placeholder cuando la noticia no trae imagen */
.nt-card__img-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: var(--navy);
opacity: 0.4;
}

.nt-card__img-placeholder svg {
width: 40px;
height: 40px;
}

/* Badge de categoría sobre la imagen */
.nt-card__badge {
position: absolute;
top: 12px;
left: 12px;
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
padding: 5px 12px;
border-radius: 20px;
color: var(--white);
backdrop-filter: blur(4px);
}

.nt-card__badge--florida {
background: rgba(42, 157, 143, 0.92);
}

.nt-card__badge--mundo {
background: rgba(200, 56, 90, 0.92);
}

/* Cuerpo de la tarjeta */
.nt-card__body {
padding: 20px 22px 24px;
display: flex;
flex-direction: column;
flex: 1;
}

.nt-card__fecha {
font-size: 11.5px;
font-weight: 600;
color: var(--gold);
letter-spacing: 0.03em;
margin-bottom: 8px;
}

.nt-card__titulo {
font-family: var(--font-display);
font-size: 17px;
font-weight: 700;
color: var(--navy);
line-height: 1.32;
margin-bottom: 10px;
/* Limita a 3 líneas */
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.nt-card__desc {
font-size: 13.5px;
line-height: 1.6;
color: #666;
flex: 1;
/* Limita a 3 líneas */
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
margin-bottom: 16px;
}

.nt-card__leer {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12.5px;
font-weight: 700;
color: var(--rose);
letter-spacing: 0.02em;
margin-top: auto;
}

.nt-card__leer svg {
    width: 13px;
    height: 13px;
    transition: transform 0.2s;
}

.nt-card:hover .nt-card__leer svg {
    transform: translateX(3px);
}

/* ── Estado vacío (sin resultados en un filtro) ── */
.nt-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: #999;
font-size: 14px;
}

/* ══════════════════════════════════════════════════════════
ANIMACIÓN DE ENTRADA
═══════════════════════════════════════════════════════===═ */
.nt-card {
    animation: nt-fade-in 0.4s ease both;
}

@keyframes nt-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
    RESPONSIVE
══════════════════════════════════════════════════════════ */

/* Tablet ≤ 900px */
@media (max-width: 900px) {
    .nt-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }

    .nt-section__inner:has(.nt-tabs) {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile ≤ 640px */
@media (max-width: 640px) {
    .nt-hero { padding: 52px 20px 44px; }
    .nt-noticias { padding: 40px 0 64px; }

    .nt-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nt-tabs-section { padding: 18px 0; }

    .nt-tab {
        font-size: 12.5px;
        padding: 8px 16px;
    }

    .nt-card__img-wrap { height: 160px; }
    .nt-card__body { padding: 18px 18px 20px; }
}

/* Small mobile ≤ 400px */
@media (max-width: 400px) {
    .nt-tabs { gap: 6px; }
    .nt-tab { padding: 7px 13px; font-size: 12px; }
}


/* ══════════════════════════════════════════════════════════
    RECURSOS DE LA COMUNIDAD
══════════════════════════════════════════════════════════ */
.nt-recursos {
    background: var(--white);
    padding: 80px 0 90px;
    border-top: 3px solid rgba(212, 169, 64, 0.18);
}
 
.nt-recursos__header {
    text-align: center;
    margin-bottom: 48px;
}
 
.nt-recursos__title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 12px;
}
 
.nt-recursos__title em {
    font-style: italic;
    color: var(--rose);
}
 
.nt-recursos__desc {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}
 
/* Grid de tarjetas de recursos */
.nt-recursos__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
 
/* Tarjeta de recurso */
.nt-recurso-card {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    background: var(--cream);
    border: 1.5px solid rgba(212, 169, 64, 0.18);
    border-radius: 18px;
    padding: 32px 28px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
 
.nt-recurso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(27, 44, 78, 0.12);
    border-color: rgba(212, 169, 64, 0.45);
}
 
/* Ícono */
.nt-recurso-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
 
.nt-recurso-card__icon svg {
    width: 26px;
    height: 26px;
}
 
.nt-recurso-card__icon--green {
    background: rgba(76, 175, 80, 0.12);
    color: #388e3c;
}
 
.nt-recurso-card__icon--navy {
    background: rgba(27, 44, 78, 0.10);
    color: var(--navy);
}
 
/* Cuerpo */
.nt-recurso-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
 
.nt-recurso-card__title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
}
 
.nt-recurso-card__desc {
    font-size: 14px;
    line-height: 1.65;
    color: #5a5a5a;
}
 
.nt-recurso-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rose);
    margin-top: 4px;
}
 
.nt-recurso-card__link svg {
    width: 13px;
    height: 13px;
    transition: transform 0.2s;
}
 
.nt-recurso-card:hover .nt-recurso-card__link svg {
    transform: translateX(4px);
}
 
/* Responsive recursos */
@media (max-width: 700px) {
    .nt-recursos__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nt-recurso-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px 22px;
    }
}
