/**
 * Módulo: Noticias Principales - Estilos
 * 
 * Estilos específicos del módulo de noticias en portada.
 * 
 * Ubicación: /modulos/portada/noticias-principales/noticias-principales.css
 */

/* ========================================
   CARDS DE NOTICIAS (CLÁSICA)
   ======================================== */

.noticia-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.noticia-imagen {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    position: relative;
    aspect-ratio: 4 / 3;
}

/* Grid de noticias - 3 columnas iguales */
.row-noticias-grid .noticia-card {
    display: block;
    height: 100%;
}

.row-noticias-grid .noticia-imagen {
    aspect-ratio: 4 / 3;
}

.noticia-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1.5rem 1.5rem;
}

.noticia-contenido {
    color: white;
}

.noticia-titulo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.noticia-principal .noticia-titulo {
    font-size: 1.75rem;
}

.noticia-fecha {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ========================================
   3 CARDS GRID (MINIMALISTA)
   ======================================== */

.noticias-minimalista-grid {
    padding: 4rem 0;
    margin-top: 2rem;
    background: #f8f9fa;
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
.noticias-minimal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

.noticias-minimal-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.noticias-minimal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.noticias-minimal-btn:hover {
    background: #125a96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ocultar botón móvil en desktop */
.noticias-minimal-btn-mobile {
    display: none;
}

/* Grid de 4 tarjetas */
.noticias-minimal-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Tarjeta individual */
.noticia-minimal-card {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
    border: 1px solid rgba(2, 6, 23, 0.08);
    transition: all 0.3s ease;
}

.noticia-minimal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.15);
}

.noticia-minimal-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.noticia-minimal-image {
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Tag sobre la imagen */
.noticia-minimal-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(139, 0, 0, 0.9);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}

.noticia-minimal-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

/* Título en azul oscuro */
.noticia-minimal-title-card {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: #003d82;
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.noticia-minimal-card:hover .noticia-minimal-title-card {
    color: var(--color-primary);
}

/* Link "LEER MÁS" en dorado */
.noticia-minimal-read {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-success);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.noticia-minimal-card:hover .noticia-minimal-read {
    gap: 0.5rem;
}

/* Fecha en gris claro */
.noticia-minimal-date {
    font-size: 0.8rem;
    color: #999999;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet grande - 3 columnas */
@media (max-width: 1199px) {
    .noticias-minimal-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Tablet - 2 columnas */
@media (max-width: 991px) {
    .noticias-minimal-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .noticia-minimal-title-card {
        font-size: 1.15rem;
    }

    .noticias-minimal-title {
        font-size: 1.75rem;
    }
}

/* Móvil - 1 columna */
@media (max-width: 767px) {
    .noticias-minimalista-grid {
        padding: 3rem 0;
        margin-top: 1.5rem;
    }

    /* Hacer que el container sea grid para reordenar */
    .noticias-minimalista-grid .container {
        display: grid;
    }

    .noticias-minimal-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        order: 2;
    }

    .noticias-minimal-title {
        font-size: 1.5rem;
    }

    .noticias-minimal-header {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        order: 1;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .noticias-minimal-title {
        order: 1;
        width: 100%;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Ocultar botón del header en móvil */
    .noticias-minimal-header .noticias-minimal-btn {
        display: none !important;
    }
    
    /* Mostrar botón móvil al final */
    .noticias-minimal-btn-mobile {
        display: inline-flex !important;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 2rem;
    }

    .noticia-minimal-title-card {
        font-size: 1.1rem;
    }

    .noticia-minimal-content {
        padding: 1.5rem;
    }
}