/* =========================================
   1. VARIABLES & CONFIGURACIÓN BASE
   ========================================= */
:root {
  --m-scale: 1rem;
  --font-s: 0.7rem;
  --font-m: 0.9rem;
  --font-l: calc(1rem * var(--m-scale));
  --font-xl: calc(1rem * var(--m-scale) * var(--m-scale));
  --font-xxl: calc(1rem * var(--m-scale) * var(--m-scale) * var(--m-scale));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  font-family: Montserrat, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #2b2626; /* Se unificó el background repetido */
}

a {
  text-decoration: none;
  color: #444;
}

/* =========================================
   2. TIPOGRAFÍA
   ========================================= */
h1 {
  font-size: var(--font-xxl);
  margin-bottom: .5em;
  position: relative;
}

h1:after {
  content: "";
  position: absolute;
  left: .6rem;
  bottom: -.2em;
  height: .14em;
  width: 9rem;
  background: #444;
}

h2 {
  font-size: var(--font-xl);
  margin-bottom: .5em;
  margin-top: calc(var(--m-scale) * 1em);
}

p {
  font-size: var(--font-m);
  margin: 0 0 1em;
}

.fecha {
  font-size: calc(.6rem * var(--m-scale));
  margin-bottom: 0;
}

.separador-titulo {
  display: flex;
  text-transform: uppercase;
  font-size: 1rem;
  align-items: center;
  color: #fff;
  text-align: center;
  margin: .25rem 0;
}

.separador-titulo::before,
.separador-titulo::after {
  content: '';
  flex: 1;
  border-top: 2px solid #818182;
}

.separador-titulo::before { margin-right: 1rem; }
.separador-titulo::after { margin-left: 1rem; }
.separador-titulo span { white-space: nowrap; }

/* =========================================
   3. LAYOUT & CONTENEDORES
   ========================================= */
.container {
  width: 100%;
  max-width: 1440px;
  margin: .5rem auto;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
}

header, footer {
  background: #240505 !important;
  box-shadow: 0 0 3px -1px #fff;
}

main {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

footer, header, main {
  grid-column-start: span 1;
}

/* Header Specifics */
header .box { text-align: center; }

/* Footer Specifics */
footer { padding: 1rem 0 .5rem 0; }
footer .box {
  text-align: center;
  border-radius: 0;
  padding: 0;
  background: 0 0;
}
footer .box p {
  font-size: calc(var(--font-s) - .18rem);
  color: #efefef;
  margin: 0;
}
.logo-pie {
  max-width: 100%;
  height: auto;
  margin: 0 auto .5rem auto;
  display: block !important;
}

/* =========================================
   4. NAVEGACIÓN (NAVBAR)
   ========================================= */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  min-width: 360px;
}

.navbar-links { height: 100%; }
.navbar-links ul { display: flex; padding: 0; margin: 0; }
.navbar-links li {
  font-family: Righteous, cursive;
  font-size: .75rem;
  list-style: none;
}
.navbar-links a {
  text-decoration: none;
  color: #fff;
  padding: 1rem .5rem;
  display: block;
}
.navbar-links li:hover { background-color: #555; }
.brand-title { margin: .5rem; }

/* Botón Hamburguesa */
.toggle-button {
  position: absolute;
  top: 1.75rem;
  right: 1rem;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}
.toggle-button .bar {
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 10px;
  transition: all .5s ease-in;
}

/* =========================================
   5. COMPONENTES: CAJAS Y TARJETAS
   ========================================= */
.box {
  background-color: #444;
  color: #fff;
  border-radius: 0;
  padding: 20px;
}
.box a p { text-decoration: none; color: #fff; }
.box p, main .box h1 { padding: .5rem; }

main .box {
  background-color: #ccc;
  color: #000;
  padding: 0 0 .5rem 0;
}
main .box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
main .box h1 { line-height: 1.2; }
main#destacado > .box a p { text-decoration: none; color: #444; }

/* =========================================
   6. COMPONENTES: NOTICIAS (GRID SYSTEM)
   ========================================= */
.contenedor-noticia {
  width: 100%;
  margin: auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.contenedor-noticia .ribbon {
  position: absolute;
  top: 0;
  left: 0;
  color: #fff;
  background-color: #000;
  padding: .1rem;
  margin: 0;
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 1;
}
.banner-publicidad{margin:.5rem auto;text-align:center;max-width:100%;margin-top:auto;padding:0 .25rem}.banner-publicidad img{max-width:293px;width:100%;height:auto;display:inline-block}

.columna-izquierda { display: grid; grid-template-columns: 1fr; }
.columna-derecha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 100%; }

/* Noticia Destacada */
.noticia-destacada { position: relative; height: 100%; }
.imagen_noticia-destacada {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  aspect-ratio: 16 / 9;
}
.contenido_noticia-destacada {
  background: rgba(0, 0, 0, .2);
  background-color: #ccc;
  color: #000;
  padding: .1rem .25rem;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}
.contenido_noticia-destacada h2 { margin: 0; }

/* Noticia Secundaria */
.noticia-secundaria {
  display: grid;
  grid-template-columns: 1fr;
  background: #fff;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
  transition: box-shadow 0.3s ease;
}
.noticia-secundaria_imagen { position: relative; }
.noticia-secundaria_imagen img {
  width: 100%;
  height: auto;
  aspect-ratio: 5/3;
  object-fit: cover;
  object-position: top;
}
.contenido_noticia-secundaria { padding: 0 .25rem .15rem; }
.contenido_noticia-secundaria h3 {
  font-size: .75rem;
  line-height: normal;
  color: #333;
}

/* Overlays & Ribbons */
.text-overlay {
  background-color: #444;
  color: #fff;
  padding: .25rem;
  text-align: left;
  position: relative;
}
.text-overlay h2 { font-size: 24px; margin: 0; }
.text-overlay p { font-size: 18px; margin: 5px 0 0; }

.ribbon {
  position: absolute;
  background-color: #000;
  padding: .1rem;
  margin: .07rem 0 0 .05rem;
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
}
.ribbon-blue { background: #0056b3; }

/* =========================================
   7. GALERÍAS
   ========================================= */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20%, 1fr));
  gap: 10px;
  padding: 0;
  margin: .25rem 0;
}
.galeria .box {
  padding: 0;
  box-shadow: 0 3px 0 0 #555;
  display: flex;
  flex-direction: column;
}
.galeria .box p {
  padding: 3px;
  font-size: calc(var(--m-scale) * .6em);
}
.galeria .box img {
  object-fit: cover;
  width: 100%;
  height: auto;
  border: 1px solid #efefef;
}

/* Estilos específicos dentro de .galerias */
.galerias main {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: .1em;
  box-shadow: 0 0 3px -1px #fff;
}
.galerias .galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(5% + 6rem), 1fr));
  gap: .15em;
  padding: 0;
}
.galerias .galeria .box {
  background-color: #444;
  color: #fff;
  border-radius: 5px;
  padding: 0;
  box-shadow: 0 0 0 0 #555;
  height: 100%;
}
.galerias .galeria .box img {
  object-fit: cover;
  max-width: 100%;
  height: auto;
  opacity: .75;
  transition: all ease-in-out .3s;
  object-position: top;
}
.galerias .galeria .box img:hover { opacity: 1; }
.galerias .galeria .box p {
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0;
  padding: .1em .2em .45em .2em;
  font-size: calc(var(--m-scale) * .45em);
}
.galerias .galeria .box .cardimg { height: 143px; }

/* =========================================
   8. COMPONENTES UI (BOTONES, MODALES, ETC)
   ========================================= */
/* Botones */
.button {
  background-color: #555;
  border: none;
  color: #fff;
  padding: 12px 25px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin-bottom: .5rem;
  cursor: pointer;
  border-radius: 6px;
  margin-left: 10px;
}
.button:hover { background-color: #3f3e3e; }

.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: .25rem;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn-modal {
  font-weight: bold;
  background: #240505;
  border-radius: 5px;
  border: none;
  color: white;
  padding: 12px 22px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  transition: background 0.3s ease;
  box-shadow: 0px 2px 5px #852617;
}
.btn-modal:hover { background: #852617; cursor: pointer; }

/* Modales */
.modal {
  display: none;
  position: fixed;
  bottom: .5rem;
  right: .5rem;
  z-index: 1000;
}
.modal.fade-out { animation: fadeOut 0.3s ease-in-out; }
.modal-dialog { max-width: 640px; }
.modal-content {
  width: 300px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #240505;
  color: #fff;
  border-bottom: 1px solid #ccc;
  border-radius: 10px 10px 0 0;
}
.modal-header h5 { font-size: .7rem; }
.modal-body {
  border-top-left-radius: 0.3rem;
  border-top-right-radius: 0.3rem;
  padding: .5rem;
  background: linear-gradient(to bottom, rgb(230, 227, 227) 0%, rgba(236, 221, 221, 0.16) 100%);
  font-size: 1.1rem;
}
.modal-body p { font-size: .75rem; margin-bottom: auto; }
.modal-footer {
  padding: 10px;
  background: #f8f9fa;
  border-top: 1px solid #ccc;
  border-radius: 0 0 10px 10px;
  text-align: right;
  justify-content: center;
}
.btn-close {
  color: #fff;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

/* Paginación */
.pagination, .paging-nav { text-align: center; }
.pagination > li { display: inline; }
.pagination > li > a, .pagination > li > span, .paging-nav a {
  margin: auto .2rem;
  margin-bottom: 1rem;
  text-decoration: none;
  display: inline-block;
  padding: .25rem .8rem;
  color: #5b6167;
  background-color: #fff;
  border-radius: 3px;
  font-size: 1.3rem;
  border: 1px solid #ddd;
}
.pagination > .active > a, .pagination > .active > span, .paging-nav .selected-page {
  color: #fff;
  background: 0 0;
  font-weight: 700;
}
.pagination a:hover, .paging-nav a:hover {
  color: #fff;
  background-color: #5b6167;
}

/* =========================================
   9. OTROS ESTILOS Y UTILIDADES
   ========================================= */
.acercade main {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: .1em;
  box-shadow: 0 0 3px -1px #fff;
}
.acercade main .text {
  column-count: 2;
  column-span: all;
  column-gap: 30px;
  text-align: justify;
}
.acercade main .box img { box-shadow: 0 20px 15px -20px #111; }

.pub-superior {
  margin: .5rem auto;
  padding: 1rem;
  text-align: center;
  background: 0 0;
  width: 100%;
  max-width: 1440px;
}
.pub-inferior {
  display: grid;
  grid-template-columns: repeat(4, auto);
  grid-auto-flow: row;
  justify-items: center;
  justify-content: center;
  grid-gap: 1rem;
  background-color: #444;
  margin: auto;
  padding: .5rem 0;
  width: 100%;
}

.sharethis a { color: #ada8a8; margin: .1rem; }
.sharethis-inline-share-buttons { padding: 0 0 .5rem .5rem; }

.cardimg { cursor: pointer; aspect-ratio: 16 / 9; }
.video-container { display: flex; justify-content: center; align-items: center; height: auto; }
video { max-width: 100%; height: auto; }

/* Utilidades de Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.float-right { float: right !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mb-2, .my-2 { margin-bottom: .5rem !important; }
.img-fluid { max-width: 100%; height: auto !important; }
.border { border: 1px solid #dee2e6 !important; }
.rounded { border-radius: .25rem !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Animaciones */
@keyframes navLinkFade {
  from { opacity: 0; transform: translate(50px); }
  to { opacity: 1; transform: translate(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* =========================================
   10. MEDIA QUERIES (Consolidadas)
   ========================================= */

/* Desktop First / Large Screens */
@media screen and (min-width: 1412px) {
  .galerias .galeria {
    grid-template-columns: repeat(auto-fill, minmax(calc(6% + 6.25rem), 1fr));
  }
}

@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
}

@media (min-width: 1024px) {
  .columna-izquierda { display: grid; grid-template-columns: 1fr; }
}

@media screen and (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
}

/* Tablet Landscape / Medium Desktop */
@media only screen and (min-width: 812px) and (max-width: 1080px) {
  .galerias .galeria {
    grid-template-columns: repeat(auto-fill, minmax(calc(8% + 6rem), 1fr));
  }
}

@media screen and (max-width: 992px) {
  .toggle-button { display: flex; }
  .navbar-links {
    display: none;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 150ms, visibility 150ms;
  }
  nav { flex-direction: column; align-items: flex-start; }
  nav .navbar-links ul { flex-direction: column; margin-right: 0; width: 100%; }
  .navbar-links ul li {
    text-align: center;
    opacity: 0;
    border-bottom: #555 1px solid;
  }
  .navbar-links ul li:first-child { border-top: #555 1px solid; }
  .navbar-links ul li:last-child { border-bottom: none; }
  .navbar-links a { padding: 1.2rem 1rem; }
  .active { display: flex; opacity: 1; visibility: visible; }
  main .box { font-size: 1.2rem; }
  .acercade main .box { max-height: 100%; }
  .acercade main .text {
    column-count: 1;
    column-span: all;
    column-gap: 30px;
    text-align: left;
    font-size: 1.22rem;
    line-height: 1.18;
  }
  main .box img {
    object-fit: cover;
    object-position: top;
    width: 100%;
    height: 100%;
  }
  .contacto-redes { font-size: .8em; }
}

@media only screen and (min-width: 769px) and (max-width: 912px) {
  main .box h1 { line-height: 1; font-size: 1.3em; }
  main .box p { line-height: 1.1; padding-top: .2em; }
}

@media (min-width: 768px) {
  .contenedor-noticia { grid-template-columns: 1fr 1fr; }
  .columna-derecha {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 100%;
  }
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
}

/* Tablet Portrait / Mobile */
@media screen and (max-width: 768px), (max-width: 767px) {
  /* Layout General */
  main { grid-template-columns: 1fr; gap: 0; }
  
  /* Galerias */
  .galeria { grid-template-columns: repeat(auto-fill, minmax(40%, 1fr)); }
  
  /* Contacto */
  .icon-contacto { grid-template-columns: 1fr !important; }
  .foto-contacto { margin: 0; padding-left: 2rem; }
  .foto-contacto img {
    border-radius: 0;
    width: 300px !important;
    height: 320px !important;
    max-width: 360px;
    box-shadow: 0 20px 15px -20px #111;
    border: 1px solid #efefef;
  }
  .foto-contacto img::before {
    content: "";
    position: absolute;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, .6);
  }
  .contacto-redes > div { padding-left: 1.5rem; }

  /* Noticias */
  .contenido_noticia-destacada {
    background-color: #fff;
    position: relative;
    border-radius: 0;
  }
  .contenido_noticia-destacada h2 { color: #333; }
  .noticia-destacada { height: auto; }
  .text-overlay { position: relative; }
  .text-overlay_copete { display: none; }
  .columna-derecha { grid-template-columns: 1fr 1fr; }
  .noticia-secundaria { grid-template-columns: 1fr; border-radius: 0; }
  .noticia-secundaria_imagen img { aspect-ratio: 5/3; }
  .contenido_noticia-secundaria h3 {
    font-size: .85rem;
    line-height: normal;
    color: #333;
  }
}

@media screen and (max-width: 698px) {
  .pub-inferior { grid-gap: 0.25rem; }
}

@media screen and (max-width: 654px) {
  .pub-inferior { grid-template-columns: repeat(2, auto); grid-gap: 1rem; }
}

/* Small Screens / Phones */
@media screen and (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
}

@media screen and (max-width: 576px) {
  :root { --m-scale: 1.2; }
  
  main .box p { font-size: .82em; }
  
  .galeria {
    padding: 0 .25rem;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }
  .galeria .box { border-radius: 0; }
  .galeria .box p {
    font-size: calc(var(--m-scale) * .9em);
    font-weight: 700;
  }
  .galerias .galeria .box .cardimg { height: 115px !important; }
  
  h4.nombre-entrevista {
    text-align: center;
    font-size: calc(var(--m-scale) * .42em);
  }
  p.fecha-entrevista { font-size: calc(var(--m-scale) * .38em); }
  
  /* Noticias Ajuste */
  .columna-derecha { grid-template-columns: 1fr 1fr; }
  .noticia-secundaria { grid-template-columns: 1fr; border-radius: 0; }
  .noticia-secundaria_imagen img { aspect-ratio: 5/3; }
}

@media (max-width: 500px) {
  .columna-derecha { grid-template-columns: 1fr; row-gap: 10px; }
  .noticia-secundaria { grid-template-columns: 1fr; border-radius: 0; }
  .noticia-secundaria_imagen img { aspect-ratio: 16 / 9; }
  .contenido_noticia-secundaria h3 {
    font-size: calc(var(--m-scale) * .9em);
  }
}

@media screen and (max-width: 480px) {
  .galerias .galeria .box .cardimg { height: 100px !important; }
  .modal-content { width: 250px; }
}

@media screen and (max-width: 380px) {
  .galerias .galeria .box .cardimg { height: 84px !important; }
}

/* Responsive Scaling Bases */
@media screen and (min-width: 36em) {
  :root { --m-scale: 1.2; }
  html { font-size: calc(100% + .25vw + .25vh); }
}