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

/* MEDIA SEGURA */
img, video {
    width: 100%;
    height: auto;
    display: block;
}

/* IFRAME RESPONSIVO */
iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

/* ========================= */
/* BODY */
/* ========================= */
html, body {
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    max-width: 100vw;
}

/* ========================= */
/* HEADER */
/* ========================= */
header {
    background: url('/images/bandera.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 30px 15px;
    position: relative;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

header h1,
nav {
    position: relative;
    z-index: 1;
}

/* ========================= */
/* MENÚ */
/* ========================= */
.menu-imagenes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.menu-imagenes img {
    width: 120px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: 0.3s;
}

.menu-imagenes img:hover {
    transform: scale(1.1);
}

/* ========================= */
/* MAIN */
/* ========================= */
main {
    margin: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

/* ========================= */
/* PORTADA */
/* ========================= */
.portada {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.principal img {
    max-height: 400px;
    object-fit: cover;
}

.principal h2 {
    font-size: 28px;
    margin-top: 10px;
}

.secundarias {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sec-card {
    cursor: pointer;
}

.sec-card img {
    max-height: 120px;
    object-fit: cover;
}

.sec-card h4 {
    font-size: 14px;
}

/* ========================= */
/* GRID NOTICIAS (PINTEREST) */
/* ========================= */
.news-grid {
    column-count: 3;
    column-gap: 20px;
}

@media (max-width: 1000px) {
    .news-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .news-grid {
        column-count: 1;
    }
}

/* ========================= */
/* CARD */
/* ========================= */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: 0.3s;
    cursor: pointer;

    display: inline-block;   /* 🔥 clave para masonry */
    width: 100%;
    margin-bottom: 20px;     /* espacio entre tarjetas */
}

.news-card:hover {
    transform: translateY(-5px);
}

/* MEDIA */
.news-card img {
    max-height: 220px;
    object-fit: cover;
}

.news-card video {
    max-height: 220px;
}

.news-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* CONTENIDO */
.news-content {
    padding: 15px;
}

.news-date {
    font-size: 12px;
    color: gray;
    margin-bottom: 8px;
}

.news-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 🔥 TEXTO CON SCROLL SOLO SI ES LARGO */
.news-text {
    font-size: 14px;
    line-height: 1.5;

    max-height: 150px;
    overflow-y: auto;

    padding-right: 5px;
}

/* LINKS */
.news-text a {
    color: #0077cc;
    text-decoration: none;
}

.news-text a:hover {
    text-decoration: underline;
}

/* ========================= */
/* CATEGORÍAS */
/* ========================= */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.categoria-box {
    background: black;
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.categoria-box:hover {
    background: gold;
    color: black;
}

/* ========================= */
/* LOGO */
/* ========================= */
.placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.placeholder img {
    width: 100%;
    max-width: 280px;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */
@media (max-width: 768px) {

    main {
        margin: 10px;
    }

    .menu-imagenes img {
        width: 90px;
    }

    .portada {
        grid-template-columns: 1fr;
    }

    .principal img {
        max-height: 250px;
    }

    .news-card img,
    .news-card video {
        max-height: 180px;
    }
}
/* =========================
   SECCIÓN HISPANIDAD (AISLADA)
   ========================= */

.capa-fondo {
    max-width: 900px;
    margin: 60px auto;
    padding: 50px 40px;
    
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.15);

    font-family: 'Playfair Display', serif;
    line-height: 1.8;
    color: #2c2c2c;
}

/* Párrafos */
.capa-fondo p {
    margin-bottom: 22px;
    font-size: 18px;
    text-align: justify;
}

/* Primer párrafo tipo introducción */
.capa-fondo p:first-of-type {
    font-size: 22px;
    font-style: italic;
    text-align: center;
    margin-bottom: 35px;
}

/* Último párrafo (firma) */
.capa-fondo p:last-of-type {
    margin-top: 40px;
    text-align: right;
    font-size: 16px;
    font-style: italic;
    opacity: 0.8;
}

/* Separación visual elegante */
.capa-fondo p + p {
    text-indent: 20px;
}

/* Línea decorativa arriba */
.capa-fondo::before {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: #8b0000;
    margin: 0 auto 30px auto;
}

/* Línea decorativa abajo */
.capa-fondo::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: #8b0000;
    margin: 40px auto 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .capa-fondo {
        padding: 30px 20px;
    }

    .capa-fondo p {
        font-size: 16px;
    }

    .capa-fondo p:first-of-type {
        font-size: 19px;
    }
}