/* =============================================
   DOBLE DISCURSO MX - Multi‑column Newspaper Grid
   Estilos personalizados sobre Bootstrap 5
   ============================================= */

/* ---------- Variables de diseño (acento #fabf0d, fondo claro, texto oscuro) ---------- */
:root {
  --dd-accent: #fabf0d;
  --dd-accent-rgb: 250, 191, 13;
  --dd-dark: #1a1a1a;
  --dd-light-bg: #f8f9fa;
  --dd-white: #ffffff;
  --dd-text: #212529;
  --dd-muted: #6c757d;
  --dd-border-light: #dee2e6;
  --dd-font-serif: 'Newsreader', 'Times New Roman', Georgia, serif;
  --dd-font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Global & tipografía ---------- */
body {
  font-family: var(--dd-font-sans);
  background-color: var(--dd-light-bg);
  color: var(--dd-text);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* Clase de utilidad para la fuente serif (titulares) */
.font-newsreader {
  font-family: var(--dd-font-serif);
  font-weight: 500;
}

/* Acento de color en texto */
.text-accent {
  color: var(--dd-accent) !important;
}

/* Enlaces con transición suave */
a {
  transition: all 0.2s ease-in-out;
}

a:hover {
  opacity: 0.85;
}

/* ---------- Navbar fija ---------- */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.92) !important;
  z-index: 1030;
  font-weight: 500;
}

.navbar-brand img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--dd-accent);
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ---------- Main content spacing ---------- */
.main-content {
  padding-top: 5rem; /* compensa navbar fija */
}

/* ---------- Newspaper Grid: columnas con separación generosa ---------- */
.newspaper-grid .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: var(--dd-white);
  border: none;
}

.newspaper-grid .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

/* Imágenes con estilo moderno: bordes suaves, sombra ligera */
.modern-img {
  border-radius: 1rem 1rem 0 0;
  object-fit: cover;
  width: 100%;
  height: 220px;
  filter: brightness(0.96) contrast(1.02);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.card:hover .modern-img {
  filter: brightness(1.02) contrast(1.05);
}

/* Ajuste para imágenes dentro de cards con estructura row/g-0 */
.card .row.g-0 .modern-img {
  border-radius: 1rem 0 0 1rem;
  height: 100%;
  min-height: 240px;
}

/* Para imágenes en columnas pequeñas (ej. economía) */
.card .modern-img.mt-auto {
  border-radius: 1rem;
  height: auto;
  max-height: 180px;
}

/* ---------- Hero / introducción ---------- */
.newspaper-quote {
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
  border-radius: 1.5rem;
}

/* Borde izquierdo acento en caja de bienvenida */
.border-start.border-warning {
  border-left: 6px solid var(--dd-accent) !important;
}

/* ---------- Tipografía de titulares en cards ---------- */
.card h2, .card .h3, .card .h4, .card .h5 {
  line-height: 1.25;
  color: #111;
}

/* Párrafos con un gris legible */
.text-secondary {
  color: #4a4a4a !important;
}

/* ---------- Botones personalizados ---------- */
.btn-warning {
  background-color: var(--dd-accent) !important;
  border-color: var(--dd-accent) !important;
  color: #000 !important;
  font-weight: 600;
}

.btn-warning:hover {
  background-color: #e5a800 !important;
  border-color: #e5a800 !important;
}

.btn-outline-dark {
  border-color: #333;
  color: #333;
}

.btn-outline-dark:hover {
  background-color: #333;
  color: #fff;
}

.btn-dark {
  background-color: var(--dd-dark);
  border-color: var(--dd-dark);
}

/* ---------- Sección de cierre (reflexión) ---------- */
.border-warning.border-2 {
  border-color: var(--dd-accent) !important;
}

/* ---------- Footer ---------- */
footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--dd-accent) !important;
}

/* ---------- Íconos dentro de botones ---------- */
.bi {
  vertical-align: middle;
}

/* ---------- Adaptaciones responsivas ---------- */
@media (max-width: 768px) {
  .modern-img {
    height: 200px;
  }
  
  .card .row.g-0 .modern-img {
    border-radius: 1rem 1rem 0 0;
    height: 220px;
    min-height: auto;
  }
  
  .newspaper-grid .card {
    margin-bottom: 0;
  }
  
  .navbar-brand span {
    font-size: 1.2rem;
  }
  
  .border-start.border-warning {
    border-left: 4px solid var(--dd-accent) !important;
  }
}

/* Pequeños dispositivos: imágenes más compactas */
@media (max-width: 576px) {
  .modern-img {
    height: 180px;
  }
  
  .card .row.g-0 .modern-img {
    height: 200px;
  }
}

/* Ajuste para sección de seguridad (imagen lateral) en pantallas medianas */
@media (min-width: 768px) and (max-width: 991.98px) {
  .card .row.g-0 .modern-img {
    height: 100%;
    min-height: 260px;
  }
}

/* Suavizado de scroll para anclas */
html {
  scroll-behavior: smooth;
}

/* Espaciado extra para secciones con id */
section[id], div[id] {
  scroll-margin-top: 90px;
}