.contenido-categoria {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ============================================
   CABECERA DE LA CATEGORÍA
   ============================================ */
.categoria-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 3px solid #C8102E;
    position: relative;
}

.categoria-header::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        to right,
        #C8102E 0%,
        #C8102E 33%,
        #E8B200 33%,
        #E8B200 66%,
        #0B6E4F 66%,
        #0B6E4F 100%
    );
}

.categoria-titulo {
    font-family: 'Cambria', Georgia, serif;
    font-size: 48px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.categoria-descripcion {
    font-family: 'Cambria', Georgia, serif;
    font-size: 17px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================
   CONTENEDOR DE LAS CARDS (AQUÍ VA EL GRID)
   ============================================ */
.contenedor-categoria {
    width: 100%;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* ============================================
   CARD DE NOTICIA
   ============================================ */
.card-categoria {
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-categoria:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Imagen con etiqueta */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.card-img-wrapper img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.card-categoria:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-etiqueta {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #C8102E;
    color: white;
    font-family: 'Cambria', Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 3px;
}

/* Cuerpo de la card */
.card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-titulo {
    font-family: 'Cambria', Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.3;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    display: -webkit-box;
    
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-categoria:hover .card-titulo {
    color: #C8102E;
}

.card-sinopsis {
    font-family: 'Cambria', Georgia, serif;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 15px;
    display: -webkit-box;
    
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Meta: fecha + leer más */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #EEE;
    font-family: 'Cambria', Georgia, serif;
    font-size: 13px;
}

.card-fecha {
    color: #888;
}

.card-leer {
    color: #C8102E;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.card-categoria:hover .card-leer {
    transform: translateX(5px);
}

/* ============================================
   PAGINACIÓN
   ============================================ */
.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
    font-family: 'Cambria', Georgia, serif;
}

.pag-btn,
.pag-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    min-width: 42px;
    height: 42px;
    border-radius: 6px;
    text-decoration: none;
    color: #1A1A1A;
    background: #F5F5F5;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.pag-numero:hover,
.pag-btn:hover {
    background: #C8102E;
    color: white;
    transform: translateY(-2px);
}

.pag-numero.activo {
    background: #C8102E;
    color: white;
    pointer-events: none;
}

.pag-puntos {
    padding: 10px;
    color: #888;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================ */
@media (max-width: 1024px) {

    .contenido-categoria {
        padding: 30px 15px 60px;
    }

    .categoria-titulo {
        font-size: 38px;
    }

    .categoria-descripcion {
        font-size: 15px;
    }

    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .card-img-wrapper img {
        height: 180px;
    }

    .card-titulo {
        font-size: 17px;
    }

    .card-sinopsis {
        font-size: 13px;
    }
}

/* ============================================
   RESPONSIVE — MÓVIL (max 768px)
   ============================================ */
@media (max-width: 768px) {

    .contenido-categoria {
        padding: 25px 15px 50px;
    }

    .categoria-header {
        margin-bottom: 35px;
        padding-bottom: 20px;
    }

    .categoria-titulo {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .categoria-descripcion {
        font-size: 14px;
    }

    .grid-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .card-img-wrapper img {
        height: 200px;
    }

    .card-body {
        padding: 15px 18px 18px;
    }

    .card-titulo {
        font-size: 17px;
    }

    .card-sinopsis {
        font-size: 13px;
    }

    .paginacion {
        gap: 5px;
    }

    .pag-btn,
    .pag-numero {
        padding: 8px 12px;
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .pag-numero:nth-of-type(4),
    .pag-numero:nth-of-type(5),
    .pag-puntos {
        display: none;
    }
}

/* ============================================
   RESPONSIVE — MÓVIL PEQUEÑO (max 480px)
   ============================================ */
@media (max-width: 480px) {

    .categoria-titulo {
        font-size: 24px;
    }

    .categoria-descripcion {
        font-size: 13px;
    }

    .card-img-wrapper img {
        height: 180px;
    }

    .card-titulo {
        font-size: 16px;
    }

    .card-sinopsis {
        font-size: 12px;
    }

    .card-fecha {
        font-size: 12px;
    }

    .card-leer {
        font-size: 12px;
    }
}