/* ============================================================
   ENFOQUE DIARIO - HOJA DE ESTILOS PRINCIPAL
   Paleta basada en el logo: coral/salmón + gris azulado
   ============================================================ */

:root {
  /* Colores del logo */
  --coral: #E87A6F;
  --coral-dark: #D5685C;
  --coral-light: #F29389;
  --coral-soft: #FAD7D2;

  --slate: #5C6A7A;
  --slate-dark: #3E4A58;
  --slate-light: #7A8898;

  --gray-bg: #F4F4F4;
  --gray-card: #FFFFFF;
  --gray-border: #E5E5E5;
  --gray-text: #4A4A4A;
  --gray-muted: #8A8A8A;

  --white: #FFFFFF;
  --black: #1A1A1A;

  /* Tipografía */
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Otras variables */
  --container-max: 1200px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
  background: var(--gray-bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--coral);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--coral-dark);
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ============ UTILIDADES ============ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--coral);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: 2px solid var(--coral);
  cursor: pointer;
}

.btn:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--coral);
}

.btn-outline:hover {
  background: var(--coral);
  color: var(--white);
}

/* ============ TOP BAR ============ */
.topbar {
  background: var(--slate-dark);
  color: var(--white);
  padding: 8px 0;
  font-size: 13px;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-date {
  opacity: 0.85;
}

.topbar-social {
  display: flex;
  gap: 12px;
}

.topbar-social a {
  color: var(--white);
  opacity: 0.85;
  font-size: 14px;
}

.topbar-social a:hover {
  opacity: 1;
  color: var(--coral-light);
}

/* ============ HEADER ============ */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--coral);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text .logo-main {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: -0.5px;
}

.logo-text .logo-sub {
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-toggle {
  background: transparent;
  color: var(--slate-dark);
  font-size: 18px;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

.search-toggle:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  font-size: 24px;
  color: var(--slate-dark);
  padding: 8px;
}

/* ============ NAVIGATION ============ */
.main-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
}

.nav-list {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}

.nav-list li a {
  display: block;
  padding: 14px 18px;
  color: var(--slate-dark);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--coral);
  border-bottom-color: var(--coral);
  background: var(--gray-bg);
}

/* ============ SEARCH BAR ============ */
.search-bar {
  background: var(--slate-dark);
  padding: 15px 0;
  display: none;
}

.search-bar.active {
  display: block;
}

.search-form {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
}

.search-input:focus {
  outline: 2px solid var(--coral);
}

.search-submit {
  padding: 10px 22px;
  background: var(--coral);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
}

.search-submit:hover {
  background: var(--coral-dark);
}

/* ============ HERO (HOME) ============ */
.hero {
  background: linear-gradient(135deg, var(--slate-dark) 0%, var(--slate) 100%);
  color: var(--white);
  padding: 40px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 100%;
  background: radial-gradient(circle, var(--coral) 0%, transparent 70%);
  opacity: 0.2;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.9;
  max-width: 700px;
}

.hero-accent {
  color: var(--coral-light);
}

/* ============ MAIN ============ */
main {
  flex: 1;
  padding-bottom: 60px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--slate-dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--coral);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 6px;
  height: 28px;
  background: var(--coral);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--gray-muted);
  font-size: 15px;
  margin-bottom: 24px;
  margin-top: -16px;
}

/* ============ GRID DE NOTICIAS ============ */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Layout destacado para home (primera noticia grande) */
.noticias-grid-featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.noticias-grid-featured .noticia-card.featured {
  grid-row: span 2;
}

.noticias-grid-featured .noticia-card.featured .card-image {
  aspect-ratio: 16/10;
}

.noticias-grid-featured .noticia-card.featured h3 {
  font-size: 26px;
}

/* ============ TARJETA DE NOTICIA ============ */
.noticia-card {
  background: var(--gray-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-border);
  min-width: 0; /* Evita overflow */
}

.noticia-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--slate-light) 0%, var(--slate) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder para imágenes pendientes */
.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.03) 10px,
    rgba(255,255,255,0.03) 20px
  );
}

.card-image-placeholder span {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--coral);
  color: var(--white);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 2px;
  z-index: 2;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.card-meta .meta-dot {
  width: 3px;
  height: 3px;
  background: var(--gray-muted);
  border-radius: 50%;
}

.noticia-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.3;
  color: var(--slate-dark);
  margin-bottom: 12px;
  font-weight: 700;
  /* Truncado seguro */
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.noticia-card h3 a {
  color: inherit;
  text-decoration: none;
}

.noticia-card h3 a:hover {
  color: var(--coral);
}

.card-excerpt {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 16px;
  line-height: 1.55;
  flex: 1;
  overflow-wrap: break-word;
}

.card-link {
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.card-link:hover {
  color: var(--coral-dark);
  gap: 10px;
}

/* ============ PAGINACIÓN / MÁS NOTICIAS ============ */
.cta-more {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  color: var(--slate-dark);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

.pagination .current {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

/* ============ FILTROS DE CATEGORÍA ============ */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  color: var(--slate-dark);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}

/* ============ ARCHIVO POR MES ============ */
.month-section {
  margin-bottom: 40px;
}

.month-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(to right, var(--slate-dark), var(--slate));
  color: var(--white);
  border-radius: var(--radius);
}

.month-header h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
}

.month-count {
  background: var(--coral);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ============ PÁGINA INDIVIDUAL DE NOTICIA ============ */
.article-page {
  background: var(--white);
  padding: 40px 0;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--gray-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--coral);
}

.breadcrumb .sep {
  color: var(--gray-muted);
}

.article-category {
  display: inline-block;
  background: var(--coral);
  color: var(--white);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  color: var(--slate-dark);
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
  overflow-wrap: break-word;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--gray-muted);
}

.article-meta .author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--slate-dark);
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.article-featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-dark) 100%);
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-featured-image .placeholder-label {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 1;
  position: relative;
}

.article-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--gray-text);
}

.article-content p {
  margin-bottom: 20px;
  overflow-wrap: break-word;
}

.article-content p:first-of-type {
  font-size: 19px;
  color: var(--slate-dark);
  font-weight: 500;
  line-height: 1.5;
}

/* ============ NOTICIAS RELACIONADAS ============ */
.related-section {
  background: var(--gray-bg);
  padding: 50px 0;
  margin-top: 50px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
  flex-wrap: wrap;
}

.article-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--slate-dark);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.article-nav a:hover {
  background: var(--coral);
  color: var(--white);
}

/* ============ PÁGINAS ESTÁTICAS (Nosotros, Contacto) ============ */
.page-hero {
  background: linear-gradient(135deg, var(--slate-dark) 0%, var(--slate) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 10px;
  font-weight: 700;
}

.page-hero p {
  font-size: 16px;
  opacity: 0.9;
}

.content-block {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.content-block h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--slate-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--coral);
  font-weight: 700;
}

.content-block h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--coral);
  margin-bottom: 12px;
  margin-top: 20px;
}

.content-block p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.valor-item {
  padding: 20px;
  background: var(--gray-bg);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
}

.valor-item h4 {
  font-family: var(--font-serif);
  color: var(--slate-dark);
  margin-bottom: 8px;
  font-size: 17px;
}

.valor-item p {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--gray-text);
}

/* ============ FORMULARIO DE CONTACTO ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-info {
  background: var(--slate-dark);
  color: var(--white);
  padding: 30px;
  border-radius: var(--radius);
}

.contact-info h3 {
  font-family: var(--font-serif);
  margin-bottom: 20px;
  font-size: 22px;
  color: var(--coral-light);
}

.contact-info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-info-item i {
  color: var(--coral-light);
  width: 20px;
  margin-top: 3px;
  font-size: 16px;
}

.contact-info-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--white);
}

.contact-info-item span,
.contact-info-item a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
}

.contact-form {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--slate-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(232,122,111,0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--coral-dark);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-error.show {
  display: block;
}

.form-success {
  background: #d4edda;
  color: #155724;
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: none;
  border-left: 4px solid #28a745;
}

.form-success.show {
  display: block;
}

/* ============ NO RESULTADOS ============ */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--radius);
  color: var(--gray-muted);
}

.no-results i {
  font-size: 48px;
  color: var(--coral);
  margin-bottom: 16px;
  display: block;
}

.no-results h3 {
  color: var(--slate-dark);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--slate-dark);
  color: var(--white);
  padding: 50px 0 20px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  font-family: var(--font-serif);
  color: var(--coral-light);
  margin-bottom: 16px;
  font-size: 17px;
}

.footer-col p {
  font-size: 14px;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--coral-light);
  padding-left: 6px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo .logo-main {
  color: var(--coral-light);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 15px;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

.footer-bottom a {
  color: var(--coral-light);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 968px) {
  .noticias-grid-featured {
    grid-template-columns: 1fr;
  }

  .noticias-grid-featured .noticia-card.featured {
    grid-row: auto;
  }

  .noticias-grid-featured .noticia-card.featured h3 {
    font-size: 22px;
  }

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

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

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .logo-text .logo-main {
    font-size: 22px;
  }

  .logo-text .logo-sub {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .logo-icon {
    width: 44px;
    height: 44px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
  }

  .main-nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    z-index: 99;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-list li a {
    border-bottom: 1px solid var(--gray-border);
    padding: 14px 20px;
  }

  .hero {
    padding: 30px 0;
  }

  .noticias-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .content-block {
    padding: 24px;
  }

  .article-content {
    font-size: 16px;
  }

  .article-content p:first-of-type {
    font-size: 17px;
  }

  .topbar .container {
    justify-content: center;
  }

  .topbar-date {
    display: none;
  }

  .filter-bar {
    padding: 12px;
  }

  .article-nav {
    flex-direction: column;
  }

  .article-nav a {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 26px;
  }

  .container {
    padding: 0 15px;
  }

  .noticia-card h3 {
    font-size: 17px;
  }

  .card-body {
    padding: 16px;
  }

  .logo-text .logo-sub {
    display: none;
  }
}

/* Imagen principal de articulo: usa la imagen real si existe y cae al placeholder sin romper el layout. */
.article-image {
  margin: 28px 0;
  border-radius: 22px;
  overflow: hidden;
  background: #f3f4f6;
}
.article-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}
.article-image .card-image-placeholder {
  min-height: 320px;
  align-items: center;
  justify-content: center;
}
.article-caption {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: #6b7280;
  background: #fff;
}

.admin-access {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  margin-right: 10px;
}
.admin-access:hover { background: #c40000; color: #fff; }
.month-filter { align-items: center; gap: 10px; flex-wrap: wrap; }
.month-filter input,
.month-filter select { border: 1px solid #ddd; border-radius: 999px; padding: 10px 14px; min-height: 42px; }
.filter-btn.active { background: #111; color: #fff; }

/* ============================================================
   AJUSTE FINAL DE INTERFAZ: evita empalmes de imagenes/tarjetas.
   Mantiene una caja fija por publicación y usa object-fit.
   ============================================================ */
.noticias-grid,
.noticias-grid-featured {
  align-items: stretch;
}
.card-image-link {
  display: block;
  width: 100%;
  flex: 0 0 auto;
}
.noticia-card {
  min-width: 0;
  isolation: isolate;
}
.card-image,
.article-image {
  contain: layout paint;
}
.card-image {
  height: auto;
  min-height: 190px;
  max-height: 360px;
}
.card-image img,
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.card-image video,
.article-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  min-width: 0;
}
.card-meta {
  flex-wrap: wrap;
}
.card-meta span {
  color: var(--gray-muted);
}
.article-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;
}
@media (max-width: 768px) {
  .card-image { min-height: 210px; }
  .article-image { aspect-ratio: 4 / 3; }
}
