/* ─── IMPORTING FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Crimson+Pro:ital,wght@0,300;0,400;1,300;1,600&display=swap');

@font-face {
  font-family: 'ArtegraSansBlack';
  src: url('../tipografia/black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}

html { scroll-behavior: smooth; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* =========================================
   HERO HEADER NOTICIAS
   ========================================= */
.header-noticias {
  position: relative;
  width: 100%;
  min-height: 45vh;
  background: url('../recursos/noticias.webp') center 50% / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.header-noticias .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 53, 61, 0.7) 0%, rgba(13, 13, 13, 0.8) 100%);
  z-index: 1;
}

.header-noticias-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 1.5rem;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.header-noticias-content.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.header-noticias-content h1 {
  font-family: 'ArtegraSansBlack', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 10vw, 70px);
  letter-spacing: 0.09em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  letter-spacing: 0.05em;
  font-family: 'Crimson Pro', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: #f7c50f;
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb .current {
  color: #f7c50f;
  font-weight: bold;
}

.hero-divider {
  width: 80px;
  height: 3px;
  background: #f7c50f;
  margin: 0 auto;
}


/* =========================================
   SECCIÓN NOTICIAS
   ========================================= */

.seccion-noticias {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Georgia', serif;
}

/* --- Encabezado --- */
.noticias-header {
    text-align: center;
    margin-bottom: 56px;
}

.noticias-label {
    display: inline-block;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #ae9a19;
    margin-bottom: 14px;
    padding: 6px 16px;
    border: 1px solid #ae9a19;
    border-radius: 2px;
}

.noticias-titulo {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #012026;
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.noticias-titulo em {
    font-style: italic;
    color: #e1c11c;
}

.noticias-subtitulo {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Controles de Filtro (Opcional visual) --- */
.noticias-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #ccc;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: #012026;
    color: white;
    border-color: #012026;
}

/* --- Grid de cards --- */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- Card --- */
.noticia-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
}

.noticia-card.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.noticia-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.noticia-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- Imagen de card --- */
.noticia-imagen {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.noticia-imagen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20,20,40,0.6) 0%, transparent 60%);
    transition: opacity 0.3s;
}

.noticia-card:hover .noticia-imagen::after {
    opacity: 0.85;
}

.noticia-categoria {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    background: #e1c11c;
    color: #fff;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Cuerpo de card --- */
.noticia-body {
    padding: 25px 20px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: white;
}

.noticia-fecha {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: block;
    display: flex;
    align-items: center;
    gap: 6px;
}

.noticia-titulo-card {
    font-size: 1.15rem;
    font-weight: 700;
    color: #012026;
    line-height: 1.4;
    margin: 0 0 12px;
    transition: color 0.3s;
}

.noticia-card:hover .noticia-titulo-card {
    color: #e1c11c;
}

.noticia-desc {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 auto;
    padding-bottom: 20px;
}

.noticia-leer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #012026;
    border-top: 1px solid #eaeaea;
    padding-top: 15px;
    transition: gap 0.3s, color 0.3s;
}

.noticia-card:hover .noticia-leer {
    gap: 12px;
    color: #e1c11c;
}

.noticia-card:hover .noticia-leer svg {
    stroke: #e1c11c;
}


/* =========================================
   PAGINACIÓN
   ========================================= */
.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #012026;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Trebuchet MS', sans-serif;
    font-weight: bold;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #e1c11c;
    color: white;
    border-color: #e1c11c;
}

.page-link.active {
    background: #012026;
    color: white;
    border-color: #012026;
}

.page-link.next-prev {
    width: auto;
    padding: 0 15px;
}

/* =========================================
   MODAL / POPUP
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 32, 38, 0.85); /* teal oscuro con opacidad */
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: color 0.3s;
}

.modal-close:hover {
    color: #f7c50f;
}

.modal-header {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
}

.modal-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(1, 32, 38, 0.9) 0%, transparent 100%);
}

.modal-header-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: white;
}

.modal-header-text h2 {
    font-family: 'ArtegraSansBlack', sans-serif;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.modal-header-text .modal-fecha {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 0.85rem;
    color: #e1c11c;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-body {
    padding: 30px;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 15px;
    margin-left: 25px;
}

.modal-body li {
    margin-bottom: 5px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    
    .header-noticias {
        height: 40vh;
    }
    
    .seccion-noticias {
        padding: 40px 15px;
    }
}

/* =========================================
   MODAL CAROUSEL
   ========================================= */
.modal-carousel-container {
    margin-top: 25px;
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    padding: 15px;
}

.modal-carousel-title {
    font-family: 'ArtegraSansBlack', sans-serif;
    font-size: 0.9rem;
    color: #012026;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-carousel-title::before {
    content: '';
    width: 20px;
    height: 2px;
    background: #e1c11c;
    display: block;
}

.modal-carousel-view {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #eee;
}

.modal-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-carousel-img {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    background: #012026;
}

.modal-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.3s ease;
    color: #012026;
}

.modal-carousel-btn:hover {
    background: #e1c11c;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-carousel-btn svg {
    width: 20px;
    height: 20px;
}

.modal-carousel-btn.prev { left: 15px; }
.modal-carousel-btn.next { right: 15px; }

.modal-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.modal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.modal-dot.active {
    background: #e1c11c;
    border-color: #fff;
    box-shadow: 0 0 0 1px #e1c11c;
    transform: scale(1.2);
}

@media (max-width: 700px) {
    .modal-carousel-view {
        height: 280px;
    }
    .modal-carousel-container {
        padding: 10px;
    }
    .modal-carousel-btn {
        width: 36px;
        height: 36px;
    }
}
