/* ============================================================
   FORMACIÓN DEPORTIVA MÉRIDA — Main Stylesheet v3.0 (MOBILE FIRST)

   Regla de oro: los estilos base son para MÓVIL. Todo lo demás se
   añade hacia arriba con @media (min-width: …). No hay max-width.

   Breakpoints
     sm  ≥ 640px   móvil grande / tablet vertical pequeña
     md  ≥ 768px   tablet
     lg  ≥ 1024px  portátil / escritorio
     xl  ≥ 1280px  escritorio amplio (diseño original de referencia)
   ============================================================ */


/* ════════════════════════════════════════════════════════════
   1. TOKENS
════════════════════════════════════════════════════════════ */
:root {
  --blue: #C0112B;
  --blue-light: #E01530;
  --pink: #9B2545;
  --pink-light: #C43060;
  --accent-on-dark: #F2577B;  /* rosa del club aclarado: palabras destacadas sobre fotos oscuras */
  --white: #ffffff;
  --gray-50: #F7F7F7;
  --gray-100: #F0F0F0;
  --gray-200: #E2E2E2;
  --gray-300: #D0D0D0;
  --gray-400: #AAAAAA;
  --gray-500: #888888;
  --gray-600: #666666;
  --black: #0E0E0E;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.14);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);

  /* Medidas que cambian con el ancho de pantalla */
  --gutter: 20px;       /* margen lateral de página */
  --nav-h: 56px;        /* alto de la barra de navegación */
}
@media (min-width: 640px)  { :root { --gutter: 32px; } }
@media (min-width: 768px)  { :root { --nav-h: 64px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }
@media (min-width: 1280px) { :root { --gutter: 80px; } }


/* ════════════════════════════════════════════════════════════
   2. BASE
════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: clip;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; object-fit: cover; }   /* todas las fotos con ajuste «cover» (logos: contain, ver .sp-img) */
a { -webkit-tap-highlight-color: rgba(192,17,43,0.12); }
button, input, select, textarea { font: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

#main-content { overflow-x: clip; }


/* ════════════════════════════════════════════════════════════
   3. SISTEMA DE LAYOUT (mobile first)

   Se configura con variables CSS en el atributo style del HTML.
   Los valores escritos son los de ESCRITORIO; en móvil se
   reducen automáticamente.

   SECCIÓN   <section class="sec" style="--py:96px">
             --py  padding vertical de escritorio (def. 100px)
             --pt / --pb  si arriba y abajo son distintos
             Horizontal: siempre var(--gutter). .sec-flush lo quita.

   GRID      <div class="grid" style="--cols-lg:1.5fr 1fr 1fr;--gap:24px">
             --cols     columnas en móvil       (def. 1 columna)
             --cols-sm  ≥640   --cols-md ≥768   --cols-lg ≥1024   --cols-xl ≥1280
             Cada breakpoint hereda del anterior si no se indica.
             --gap  hueco de escritorio (en móvil máx. 20px). Si es de
                    dos valores ("24px 48px") indicar también --gap-m.

   FLEX      <div class="flex to-row-md" style="--gap:16px">
             Columna en móvil; fila desde sm/md/lg con .to-row-*.

   BOTONES   <div class="btns">  apilados a ancho completo en móvil,
             en fila a partir de 480px.

   TIPO      <h2 class="fs" style="--fs:56px">  tamaño de escritorio;
             móvil 64%, tablet 80%. --fs-m para fijar el de móvil.

   ALTURA    <div class="h" style="--h:500px">  escritorio 500px;
             móvil proporcional (clamp 200px–56vw). --h-m para fijarlo.
             .minh con --mh para min-height.

   PADDING   <div class="pad" style="--p:40px">  móvil máx. 24px.
             --p-m para fijarlo en móvil.

   VISIBLE   .lg-only (solo ≥1024)  ·  .md-only (solo ≥768)  ·  .m-only (solo <1024)
             --d:flex/grid para el display que debe recuperar.
════════════════════════════════════════════════════════════ */

/* ── Sección ── */
section, .sec {
  --py: initial; --pt: initial; --pb: initial;
  padding: calc(var(--pt, var(--py, 100px)) * 0.56) var(--gutter) calc(var(--pb, var(--py, 100px)) * 0.56);
}
@media (min-width: 768px) {
  section, .sec { padding: calc(var(--pt, var(--py, 100px)) * 0.72) var(--gutter) calc(var(--pb, var(--py, 100px)) * 0.72); }
}
@media (min-width: 1024px) {
  section, .sec { padding: var(--pt, var(--py, 100px)) var(--gutter) var(--pb, var(--py, 100px)); }
}
.sec-flush { padding-left: 0 !important; padding-right: 0 !important; }
.gutter { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ── Contenedor ── */
.wrap, .container { --max: initial; width: 100%; max-width: var(--max, 1280px); margin-left: auto; margin-right: auto; }

/* ── Grid ── */
.grid {
  --cols: initial; --cols-sm: initial; --cols-md: initial; --cols-lg: initial; --cols-xl: initial;
  --gap: initial; --gap-m: initial;
  display: grid;
  grid-template-columns: var(--cols, minmax(0, 1fr));
  gap: var(--gap-m, min(var(--gap, 20px), 20px));
}
.grid > * { min-width: 0; }
@media (min-width: 640px) {
  .grid { grid-template-columns: var(--cols-sm, var(--cols, minmax(0, 1fr))); }
}
@media (min-width: 768px) {
  .grid {
    grid-template-columns: var(--cols-md, var(--cols-sm, var(--cols, minmax(0, 1fr))));
    gap: var(--gap, 20px);
  }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: var(--cols-lg, var(--cols-md, var(--cols-sm, var(--cols, minmax(0, 1fr))))); }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: var(--cols-xl, var(--cols-lg, var(--cols-md, var(--cols-sm, var(--cols, minmax(0, 1fr)))))); }
}

/* ── Flex que se convierte en fila ── */
.flex {
  --gap: initial; --gap-m: initial;
  display: flex; flex-direction: column;
  gap: var(--gap-m, min(var(--gap, 16px), 16px));
}
.flex > * { min-width: 0; }
@media (min-width: 640px)  { .flex.to-row-sm { flex-direction: row; gap: var(--gap, 16px); } }
@media (min-width: 768px)  { .flex.to-row-md { flex-direction: row; gap: var(--gap, 16px); } }
@media (min-width: 1024px) { .flex.to-row-lg { flex-direction: row; gap: var(--gap, 16px); } }
.flex.wrap-row { flex-direction: row; flex-wrap: wrap; }

/* ── Grupo de botones ── */
.btns { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.btns > a, .btns > button { text-align: center; justify-content: center; }
@media (min-width: 480px) {
  .btns { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--gap, 14px); }
  .btns.center { justify-content: center; }
}

/* ── Scroll horizontal (pestañas, anclas) ── */
.scroll-x {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { flex-shrink: 0; scroll-snap-align: start; }

/* ── Tipografía fluida ── */
.fs { --fs: initial; --fs-m: initial; font-size: var(--fs-m, calc(var(--fs, 32px) * 0.64)); }
@media (min-width: 768px)  { .fs { font-size: calc(var(--fs, 32px) * 0.8); } }
@media (min-width: 1024px) { .fs { font-size: var(--fs, 32px); } }

/* ── Alturas fluidas ── */
.h { --h: initial; --h-m: initial; height: var(--h-m, clamp(200px, 56vw, var(--h, 400px))); }
@media (min-width: 768px)  { .h { height: clamp(240px, 46vw, var(--h, 400px)); } }
@media (min-width: 1024px) { .h { height: var(--h, 400px); } }
.minh { --mh: initial; --mh-m: initial; min-height: var(--mh-m, min(var(--mh, 400px), 100svh)); }
@media (min-width: 1024px) { .minh { min-height: var(--mh, 400px); } }

/* ── Padding interior de tarjetas ── */
.pad { --p: initial; --p-m: initial; padding: var(--p-m, min(var(--p, 32px), 24px)); }
@media (min-width: 768px) { .pad { padding: var(--p, 32px); } }

/* ── Visibilidad ── */
.lg-only, .md-only { --d: initial; display: none !important; }
@media (min-width: 768px)  { .md-only { display: var(--d, block) !important; } }
@media (min-width: 1024px) {
  .lg-only { display: var(--d, block) !important; }
  .m-only  { display: none !important; }
}

/* ── Sticky solo en escritorio ── */
.lg-sticky { position: relative; }
@media (min-width: 1024px) { .lg-sticky { position: sticky; top: var(--sticky-top, 96px); } }

/* ── Utilidades varias ── */
.text-center { text-align: center; }
.text-pink { color: var(--pink); }
.center-x { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ════════════════════════════════════════════════════════════
   4. TÍTULOS DE SECCIÓN
════════════════════════════════════════════════════════════ */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--pink);
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: ''; display: block; width: 24px; height: 2px;
  background: var(--pink); border-radius: 2px;
}

.section-title {
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 800; letter-spacing: -1px;
  color: var(--black); line-height: 1.12;
  margin-bottom: 14px;
  overflow-wrap: break-word;
}
.section-sub {
  font-size: 15px; color: var(--gray-600);
  max-width: 520px; line-height: 1.7;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .section-eyebrow { margin-bottom: 14px; }
  .section-title { letter-spacing: -1.5px; margin-bottom: 16px; }
  .section-sub { font-size: 16px; margin-bottom: 56px; }
}
@media (min-width: 1024px) {
  .section-title { font-size: clamp(28px, 3.5vw, 48px); }
}


/* ════════════════════════════════════════════════════════════
   5. BOTONES
════════════════════════════════════════════════════════════ */
.btn-primary, .btn-secondary, .btn-white, .btn-outline-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  text-decoration: none; cursor: pointer;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--pink); color: white;
  padding: 13px 24px; border-radius: 30px; border: none;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 20px rgba(192,17,43,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(192,17,43,0.5); }
.btn-secondary {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: white; padding: 13px 24px; border-radius: 30px;
  font-size: 15px; font-weight: 600;
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); border-color: white; }
.btn-white {
  background: white; color: var(--black);
  padding: 10px 22px; border-radius: 22px;
  font-size: 14px; font-weight: 700;
}
.btn-white:hover { background: var(--gray-100); }
.btn-outline-white {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: white; padding: 9px 20px;
  border-radius: 22px; font-size: 14px; font-weight: 600;
}
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.1); }
@media (min-width: 768px) {
  .btn-primary, .btn-secondary { padding: 14px 28px; }
  .btn-white, .btn-outline-white { font-size: 13px; }
}


/* ════════════════════════════════════════════════════════════
   6. NAVEGACIÓN (barra superior)
   La barra y el panel móvil se completan en header.php
════════════════════════════════════════════════════════════ */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 16px;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: box-shadow 0.3s;
}
#main-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
@media (min-width: 768px) { #main-nav { padding: 0 24px; } }
@media (min-width: 1280px) { #main-nav { padding: 0 40px; gap: 24px; } }

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; min-width: 0; }
.nav-logo img, .nav-logo .custom-logo { max-height: 36px; width: auto; display: block; }
.nav-logo .custom-logo-link { display: flex; align-items: center; }
@media (min-width: 768px) { .nav-logo img, .nav-logo .custom-logo { max-height: 44px; } }
.nav-logo-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--black), var(--blue));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 900;
}
.nav-logo-text strong {
  display: block; font-size: 14px; font-weight: 800;
  color: var(--black); letter-spacing: -0.3px; line-height: 1.15;
}
@media (min-width: 768px) {
  .nav-logo-icon { width: 40px; height: 40px; font-size: 18px; }
  .nav-logo-text strong { font-size: 15px; }
}


/* ════════════════════════════════════════════════════════════
   7. HERO DE PORTADA
════════════════════════════════════════════════════════════ */
#hero {
  min-height: 88svh;
  position: relative;
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--nav-h) + 32px) 0 48px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-diagonal, .hero-img-overlay { display: none; }
.hero-pink-bar { display: none; }
.hero-content {
  position: relative; z-index: 4;
  padding: 0 var(--gutter);
  max-width: 100%;
  color: white;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(192,17,43,0.18);
  border: 1px solid rgba(192,17,43,0.4);
  color: #e05070;
  padding: 5px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-title {
  /* Mismas medidas que el título de las cabeceras interiores (.ph-title) */
  font-size: clamp(32px, 8.6vw, 46px);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}
.hero-title .accent { color: var(--accent-on-dark); }
/* Misma palabra destacada legible en todas las cabeceras con foto */
.ph-title span, .dp-hero-title span, .fdm-news-h1 span, .page-hero h1 span { color: var(--accent-on-dark) !important; }
.hero-sub {
  font-size: 16px; font-weight: 400;
  color: rgba(255,255,255,0.78);
  margin-bottom: 28px; line-height: 1.7;
  max-width: 500px;
}
@media (min-width: 768px) {
  #hero { min-height: 80vh; align-items: center; padding: var(--nav-h) 0 0; }
  .hero-content { max-width: 620px; }
  .hero-title { letter-spacing: -2px; margin-bottom: 20px; }
  .hero-sub { font-size: 17px; margin-bottom: 36px; }
  .hero-eyebrow { margin-bottom: 24px; }
}
@media (min-width: 1024px) {
  #hero { min-height: 100vh; }
  /* Misma separación que las cabeceras interiores: línea a 76–80px, texto a 160px */
  .hero-content { max-width: 840px; padding: 0 80px 0 160px; }
  .hero-title { font-size: clamp(40px, 5vw, 68px); }
  .hero-pink-bar {
    display: block; position: absolute;
    left: 76px; top: 20%; bottom: 20%;
    width: 4px; background: var(--blue); border-radius: 4px; z-index: 3;
  }
}


/* ════════════════════════════════════════════════════════════
   8. PORTADA — EQUIPOS SÉNIOR
════════════════════════════════════════════════════════════ */
#senior { background: var(--gray-50); }
.senior-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 768px) { .senior-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

.senior-card {
  border-radius: var(--radius-md);
  overflow: hidden; position: relative;
  min-height: 360px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; transition: transform 0.3s;
  box-shadow: var(--shadow-md);
}
.senior-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.5s;
}
.senior-card-fem .senior-card-bg {
  background-image: linear-gradient(to bottom, rgba(155,37,69,0.3) 0%, rgba(0,0,0,0.78) 100%);
  background-color: var(--pink);
}
.senior-card-masc .senior-card-bg {
  background-image: linear-gradient(to bottom, rgba(192,17,43,0.25) 0%, rgba(0,0,0,0.78) 100%);
  background-color: var(--blue);
}
.senior-card-body { position: relative; z-index: 2; padding: 24px; color: white; }
.senior-card-tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 12px;
}
.senior-card-fem .senior-card-tag { background: var(--pink); }
.senior-card-masc .senior-card-tag { background: var(--blue); }
.senior-card-title { font-size: 23px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 20px; line-height: 1.2; }
.senior-card-desc { font-size: 14px; color: rgba(255,255,255,0.8); margin-bottom: 20px; line-height: 1.6; }
@media (hover: hover) {
  .senior-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
  .senior-card:hover .senior-card-bg { transform: scale(1.04); }
}
@media (min-width: 1024px) {
  .senior-card { min-height: 440px; border-radius: var(--radius-lg); }
  .senior-card-body { padding: 32px; }
  .senior-card-title { font-size: 26px; letter-spacing: -0.8px; }
}


/* ════════════════════════════════════════════════════════════
   9. PORTADA — SECCIONES DEPORTIVAS
════════════════════════════════════════════════════════════ */
#secciones { background: white; }
.sections-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sections-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .sections-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .sections-grid > :last-child:nth-child(odd) { grid-column: auto; }
}
@media (min-width: 1024px) { .sections-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.sport-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 20px 14px; text-align: center;
  cursor: pointer; transition: all 0.25s;
  border: 1.5px solid transparent;
  position: relative; overflow: hidden;
  text-decoration: none; color: inherit; display: block;
}
.sport-card img { width: 56px !important; height: 56px !important; }
.sport-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
@media (hover: hover) {
  .sport-card:hover { transform: translateY(-4px); border-color: var(--gray-200); box-shadow: var(--shadow-md); background: white; }
  .sport-card:hover::before { transform: scaleX(1); }
}
.sport-name { font-size: 15px; font-weight: 700; color: var(--black); margin-bottom: 6px; }
.sport-desc { font-size: 13px; color: var(--gray-600); line-height: 1.5; }
@media (min-width: 768px) {
  .sport-card { padding: 32px 24px; }
  .sport-card img { width: 72px !important; height: 72px !important; }
  .sport-desc { font-size: 12px; }
}


/* ════════════════════════════════════════════════════════════
   10. PORTADA — ÁREA SOCIAL
════════════════════════════════════════════════════════════ */
#social {
  background: linear-gradient(135deg, #0E0E0E 0%, #1a0508 100%);
  color: white; position: relative; overflow: hidden;
}
#social::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(192,17,43,0.15);
}
@media (min-width: 768px) { #social::before { width: 350px; height: 350px; } }
#social .section-title { color: white; }
#social .section-sub { color: rgba(255,255,255,0.65); }

.social-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: relative; }
@media (min-width: 768px) { .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1024px) { .social-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.social-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: all 0.25s; cursor: pointer;
  position: relative; overflow: hidden;
}
.social-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--pink); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
@media (hover: hover) {
  .social-card:hover { background: rgba(255,255,255,0.12); transform: translateY(-4px); }
  .social-card:hover::after { transform: scaleX(1); }
}
.social-card-title { font-size: 19px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.social-card-desc { font-size: 14px; color: rgba(255,255,255,0.68); line-height: 1.7; margin-bottom: 20px; }
@media (min-width: 1024px) {
  .social-card { padding: 36px 32px; border-radius: var(--radius-lg); }
  .social-card-title { font-size: 20px; margin-bottom: 12px; }
  .social-card-desc { margin-bottom: 24px; }
}


/* ════════════════════════════════════════════════════════════
   11. NOTICIAS (tarjetas comunes)
════════════════════════════════════════════════════════════ */
#noticias { background: white; }

.noticias-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px)  { .noticias-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1024px) { .noticias-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

.noticia-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
  min-width: 0;
}
@media (hover: hover) { .noticia-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); } }
.noticia-img {
  width: 100%; height: 200px;
  background-size: cover; background-position: center;
  background-color: var(--gray-100);
}
.noticia-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.noticia-cat {
  display: inline-block; align-self: flex-start;
  background: var(--blue); color: white;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 10px;
}
.noticia-title {
  font-size: 16px; font-weight: 700; line-height: 1.4;
  letter-spacing: -0.3px; margin-bottom: 8px; flex: 1;
  overflow-wrap: break-word;
}
.noticia-title a { color: inherit; text-decoration: none; }
.noticia-date { font-size: 12px; color: var(--gray-500); margin-bottom: 12px; }
.noticia-cta {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px;
  color: var(--blue); font-size: 13px; font-weight: 700;
  text-decoration: none; transition: gap 0.2s;
}
.noticia-cta:hover { gap: 10px; }
.noticia-cta::after { content: '→'; }
@media (min-width: 768px) {
  .noticia-img { height: 180px; }
  .noticia-body { padding: 20px; }
  .noticia-title { font-size: 15px; }
  .noticia-date { font-size: 11px; }
  .noticia-cta { font-size: 12px; min-height: 0; }
}

/* Lista de noticias de la portada: destacada + resto */
.home-news { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home-news-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home-news-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.noticia-card.is-row { flex-direction: row; }
.noticia-card.is-row .noticia-img { width: 112px; min-width: 112px; height: auto; }
.noticia-card.is-row .noticia-body { padding: 14px; }
.noticia-card.is-row .noticia-title { font-size: 14px; }
.noticia-card.is-featured .noticia-img { height: 220px; }
.noticia-card.is-featured .noticia-title { font-size: 19px; }
.home-news-row .noticia-img { height: 110px; }
.home-news-row .noticia-body { padding: 14px; }
.home-news-row .noticia-title { font-size: 14px; }
@media (min-width: 768px) {
  .home-news-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
  .home-news-row .noticia-img { height: 140px; }
  .noticia-card.is-row .noticia-img { width: 120px; min-width: 120px; }
}
@media (min-width: 1024px) {
  .home-news { grid-template-columns: 1.5fr 1fr; gap: 24px; }
  .home-news-side { gap: 24px; }
  .noticia-card.is-featured .noticia-img { height: 280px; }
  .noticia-card.is-featured .noticia-title { font-size: 21px; }
}


/* ════════════════════════════════════════════════════════════
   12. PATROCINADORES
════════════════════════════════════════════════════════════ */
/* Fondo = el del pie (var(--black)): la franja se funde con el footer.
   Grupos: principal (logos grandes) · institucional · colaborador. admin/patrocinadores.php */
#sponsors {
  --py: 64px; background: var(--black); color: white;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#sponsors + footer { padding-top: 40px; }
.sponsors-title {
  margin: 0 0 32px; text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.sp-group { max-width: 1100px; margin: 0 auto; }
.sp-group + .sp-group { margin-top: 36px; }
.sp-group-title {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.sp-group-title::before, .sp-group-title::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.12); }
.sp-group--principal .sp-group-title { color: var(--pink); }

.sp-grid {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.sp-grid > li { flex: 0 0 calc(50% - 6px); max-width: 190px; }
.sp-group--principal .sp-grid > li { flex-basis: 100%; max-width: 320px; }

.sp-item {
  display: flex; align-items: center; justify-content: center;
  height: 84px; padding: 16px 20px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
  transition: transform .2s, background .2s, border-color .2s;
}
.sp-group--principal .sp-item { height: 132px; padding: 24px 32px; }
/* Logos en blanco (PNG transparente / SVG). Si llega uno de color, se pasa a blanco. */
.sp-img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  filter: brightness(0) invert(1); opacity: .85; transition: opacity .2s;
}
.sp-name { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 700; text-align: center; line-height: 1.3; }
.sp-group--principal .sp-name { font-size: 17px; }
a.sp-item:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
a.sp-item:hover .sp-img { opacity: 1; }
a.sp-item:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.sp-admin-hint { margin: 28px auto 0; max-width: 640px; text-align: center; font-size: 13px; color: #f5c451; }
.sp-admin-hint a { color: inherit; }

@media (min-width: 640px) {
  .sp-grid { gap: 16px; }
  .sp-grid > li { flex: 0 0 180px; }
  .sp-group--principal .sp-grid > li { flex: 0 0 300px; }
}
@media (min-width: 1024px) {
  .sponsors-title { margin-bottom: 44px; font-size: 13px; }
  .sp-group + .sp-group { margin-top: 44px; }
  .sp-grid { gap: 20px; }
  .sp-grid > li { flex-basis: 190px; }
  .sp-item { height: 96px; }
  .sp-group--principal .sp-grid > li { flex-basis: 320px; }
  .sp-group--principal .sp-item { height: 150px; }
  #sponsors + footer { padding-top: 56px; }
}


/* ════════════════════════════════════════════════════════════
   13. FOOTER
════════════════════════════════════════════════════════════ */
footer {
  background: var(--black); color: white;
  padding: 44px var(--gutter) 28px;
}
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 36px; }
@media (min-width: 640px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  footer { padding: 72px var(--gutter) 32px; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
}

.footer-brand-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--black), var(--blue));
  border-radius: 11px; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px; font-weight: 900;
}
.footer-brand-name { font-size: 15px; font-weight: 800; line-height: 1.1; }
.footer-brand-sub { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 1px; text-transform: uppercase; }
.footer-brand-desc { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.8; margin-bottom: 20px; }

.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: background 0.2s;
  text-decoration: none; color: white;
}
.footer-social:hover { background: var(--pink); }

.footer-col h4 { font-size: 13px; font-weight: 700; color: white; margin-bottom: 12px; letter-spacing: 0.3px; }
.footer-col ul { list-style: none; columns: 2; column-gap: 16px; }
.footer-col li { break-inside: avoid; }
.footer-col a {
  display: inline-block; padding: 6px 0;
  text-decoration: none; font-size: 14px;
  color: rgba(255,255,255,0.6); transition: color 0.2s;
}
.footer-col a:hover { color: white; }
@media (min-width: 640px) { .footer-col ul { columns: 1; } }
@media (min-width: 1024px) {
  .footer-col h4 { margin-bottom: 20px; }
  .footer-col a { font-size: 13px; padding: 0; }
  .footer-col li { margin-bottom: 10px; }
}

.footer-contact-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.footer-contact-icon { font-size: 16px; margin-top: 1px; }
.footer-contact-text { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.5; overflow-wrap: anywhere; }
@media (min-width: 1024px) { .footer-contact-text { font-size: 13px; } }

/* Mapa del pie: el mismo de contacto (fdmerida_contact_map), en versión oscura. */
.fdm-map.footer-map {
  margin-top: 20px; height: 190px; aspect-ratio: auto;
  background: #1c1c1c; border: 1px solid rgba(255,255,255,.08);
}
.footer-map iframe { filter: invert(.92) hue-rotate(180deg) saturate(.6) brightness(.95); }
.footer-map .fdm-map-link {
  left: 10px; bottom: 10px; min-height: 36px; padding: 6px 12px; font-size: 12.5px;
  background: var(--pink); color: white; box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.footer-map .fdm-map-link:hover { background: white; color: var(--black); }
@media (min-width: 1024px) { .fdm-map.footer-map { height: 200px; margin-top: 28px; } }

.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin-bottom: 20px; }
.footer-bottom {
  display: flex; flex-direction: column; gap: 12px; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.45);
}
.footer-bottom > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.footer-bottom a { color: rgba(255,255,255,0.45); text-decoration: none; padding: 6px 0; }
.footer-bottom a:hover { color: white; }
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .footer-bottom > div { gap: 20px; }
}


/* ════════════════════════════════════════════════════════════
   14. CABECERAS DE PÁGINA INTERIOR (hero de subpáginas)
   <section class="page-hero" style="--mh:72vh"> … <div class="page-hero-content">
════════════════════════════════════════════════════════════ */
.page-hero {
  --mh: initial;
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: max(420px, 70svh);
  padding: calc(var(--nav-h) + 32px) 0 40px !important;
  color: white;
}
.page-hero-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.page-hero-bar { display: none; }
.page-hero-content { position: relative; z-index: 2; padding: 0 var(--gutter); width: 100%; max-width: 760px; }
@media (min-width: 768px) {
  .page-hero { align-items: center; min-height: var(--mh, 60vh); padding: var(--nav-h) 0 0 !important; }
}
@media (min-width: 1024px) {
  /* Encuadre del diseño original de escritorio: texto a 160px del borde y 100px de aire inferior */
  .page-hero { padding: var(--nav-h) 80px 100px !important; }
  .page-hero-content { padding: 0 80px; }
  .page-hero-bar {
    display: block; position: absolute; left: 76px; top: 20%; bottom: 20%;
    width: 4px; background: var(--blue); border-radius: 4px; z-index: 1;
  }
}


/* ════════════════════════════════════════════════════════════
   15. NAVEGACIÓN POR ANCLAS (subpáginas)
════════════════════════════════════════════════════════════ */
.anchor-nav {
  position: sticky; top: var(--nav-h); z-index: 50;
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: 0 !important;
}
.anchor-nav-inner { padding: 0 var(--gutter); gap: 4px; }
.anchor-nav a {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0 14px; font-size: 13px; font-weight: 600;
  color: var(--gray-600); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.anchor-nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }


/* ════════════════════════════════════════════════════════════
   16. PESTAÑAS
════════════════════════════════════════════════════════════ */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-btn {
  min-height: 44px; padding: 10px 14px; border-radius: 9px; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--gray-600); transition: all 0.2s;
  flex: 1; white-space: nowrap;
}
.tab-btn.active { background: white; color: var(--black); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
@media (min-width: 640px) { .tab-btn { padding: 10px 24px; flex: none; } }


/* ════════════════════════════════════════════════════════════
   17. ACORDEÓN
════════════════════════════════════════════════════════════ */
.acc-item { border-radius: 14px; overflow: hidden; border: 1.5px solid var(--gray-200); background: white; }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 16px 18px;
  font-size: 15px; font-weight: 700; color: var(--black);
  background: transparent; border: none; cursor: pointer;
  text-align: left; transition: background 0.2s;
}
.acc-btn:hover { background: var(--gray-50); }
.acc-arrow { font-size: 22px; color: var(--gray-400); flex-shrink: 0; transition: transform 0.3s ease; line-height: 1; }
.acc-body {
  max-height: 0; overflow: hidden; padding: 0 18px;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 14px; color: var(--gray-600); line-height: 1.8;
}
.acc-item.open .acc-arrow { transform: rotate(45deg); }
@media (min-width: 768px) {
  .acc-btn { padding: 22px 28px; }
  .acc-body { padding: 0 28px; line-height: 1.9; }
}


/* ════════════════════════════════════════════════════════════
   18. FORMULARIOS
════════════════════════════════════════════════════════════ */
.form-field { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
  display: block; width: 100%;
  background: white; border: 1.5px solid var(--gray-200); border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px; /* 16px evita el zoom automático en iOS */
  color: var(--black); transition: border-color 0.2s;
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--blue); }
.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; font-size: 13px; color: var(--gray-600); line-height: 1.5; }
.form-check input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; accent-color: var(--blue); }
@media (min-width: 768px) { .form-input, .form-select, .form-textarea { font-size: 14px; padding: 13px 16px; } }


/* ════════════════════════════════════════════════════════════
   19. CONTENIDO DE WORDPRESS, MIGAS, PAGINACIÓN
════════════════════════════════════════════════════════════ */
.entry-content { font-size: 16px; line-height: 1.8; overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3 { line-height: 1.25; margin-top: 1.6em; }
.entry-content img, .wp-block-image img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.entry-content iframe, .entry-content video { width: 100%; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft, .alignright { display: block; margin: 0 auto 16px; }
@media (min-width: 640px) {
  .alignleft  { float: left;  margin: 0 24px 16px 0; }
  .alignright { float: right; margin: 0 0 16px 24px; }
}
@media (min-width: 768px) { .entry-content { font-size: 17px; } }
.wp-caption-text { font-size: 13px; color: var(--gray-600); margin-top: 8px; }

.skip-link { position: absolute; top: -100px; left: 0; background: var(--blue); color: white; padding: 8px 16px; z-index: 100000; transition: top 0.2s; }
.skip-link:focus { top: 0; }

.breadcrumb { padding: 12px 0; font-size: 12px; color: var(--gray-500); overflow-wrap: anywhere; }
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }

.pagination, .nav-links.pagination { display: flex; gap: 8px; justify-content: center; padding: 32px 0; flex-wrap: wrap; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--gray-600);
  border: 1.5px solid var(--gray-200); transition: all 0.2s;
}
.pagination .current { background: var(--blue); color: white; border-color: var(--blue); }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }


/* ════════════════════════════════════════════════════════════
   20. ANIMACIÓN DE APARICIÓN
════════════════════════════════════════════════════════════ */
.scroll-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s; }
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}


/* ════════════════════════════════════════════════════════════
   21. SECCIÓN OCULTA (solo la ven quienes pueden editar la página)
════════════════════════════════════════════════════════════ */
.fdm-hidden-section { position: relative; outline: 2px dashed #d97706; outline-offset: -2px; }
.fdm-hidden-section > :not(.fdm-hidden-badge) { opacity: 0.4; filter: grayscale(0.6); }
.fdm-hidden-badge {
  position: sticky; top: var(--nav-h); z-index: 60;
  background: #fef3c7; color: #78350f; border-bottom: 1px solid #fcd34d;
  padding: 10px var(--gutter); font-size: 13px; line-height: 1.45;
}
.fdm-hidden-badge a { color: #78350f; font-weight: 700; }

/* Con la sesión iniciada, la barra de WordPress no debe tapar el menú de la web */
.admin-bar { --wpab: 0px; }
@media (min-width: 601px) { .admin-bar { --wpab: 46px; } }
@media (min-width: 783px) { .admin-bar { --wpab: 32px; } }
.admin-bar #main-nav { top: var(--wpab); }
.admin-bar .fdm-hidden-badge { top: calc(var(--nav-h) + var(--wpab)); }

/* Extracto en tarjetas de noticia (archivo, relacionadas, portada) */
.noticia-exc {
  font-size: 14px; line-height: 1.6; color: var(--gray-600); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Tarjetas de noticia genéricas (archivo, relacionadas): foto 1:1 */
.noticia-img.is-square { height: auto !important; aspect-ratio: 1 / 1; }

/* ════════════════════════════════════════════════════════════
   22. MAPA DE CONTACTO
════════════════════════════════════════════════════════════ */
.fdm-map {
  position: relative; overflow: hidden;
  border-radius: var(--radius-md); background: var(--gray-200);
  aspect-ratio: 4 / 3;
}
.fdm-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fdm-map-link {
  position: absolute; z-index: 1; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  background: white; color: var(--black); border-radius: 22px;
  font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-md);
}
.fdm-map-link:hover { color: var(--blue); }
@media (min-width: 768px) { .fdm-map { aspect-ratio: 16 / 9; } }



/* ════════════════════════════════════════════════════════════
   23. TARJETAS DE NOTICIA v2  (fdmerida_news_card)
   Marco 4:5 · la foto llena el marco (object-fit: cover).
   Móvil: filas compactas.
════════════════════════════════════════════════════════════ */
.nc {
  position: relative; display: flex; flex-direction: row; min-width: 0;
  background: white; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
@media (hover: hover) { .nc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); } }
.nc:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }

.nc-media {
  position: relative; flex: none; width: 108px; aspect-ratio: 4 / 5;
  overflow: hidden; background: var(--gray-100);
}
.nc-media-bg {
  position: absolute; inset: -24px;
  background-size: cover; background-position: center;
  filter: blur(18px) brightness(.8) saturate(1.15);
}
.nc-img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.nc-media-bg { display: none; }   /* ya no hace falta el fondo difuminado */
.nc-media.is-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--pink)); font-size: 30px;
}

.nc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.nc-cat {
  align-self: flex-start; background: var(--blue); color: white;
  padding: 3px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
}
.nc-title {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -.2px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-link { color: inherit; text-decoration: none; }
.nc-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }   /* toda la tarjeta es el enlace */
.nc-link:focus-visible { outline: none; }
@media (hover: hover) { .nc:hover .nc-title { color: var(--blue); } }
.nc-exc {
  margin: 0; font-size: 14px; line-height: 1.55; color: var(--gray-600);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-exc--short { display: none; }
.nc-meta {
  margin-top: auto; padding-top: 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--gray-500);
}
.nc-more { display: none; color: var(--blue); font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* Destacada (móvil): foto arriba a todo el ancho */
.nc--featured { flex-direction: column; }
.nc--featured .nc-media { width: 100%; }
.nc--featured .nc-body { padding: 18px 18px 20px; gap: 10px; }
.nc--featured .nc-title { font-size: 21px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; -webkit-line-clamp: 5; }
.nc--featured .nc-meta { font-size: 13px; }
.nc--featured .nc-more { display: inline; }

@media (min-width: 640px) {
  .nc--card { flex-direction: column; }
  .nc--card .nc-media { width: 100%; }
  .nc-body { padding: 16px 16px 18px; gap: 8px; }
  .nc-exc--short { display: -webkit-box; -webkit-line-clamp: 3; font-size: 13.5px; }
  .nc-more { display: inline; }
}
@media (min-width: 768px) {
  .nc--featured { flex-direction: row; }
  .nc--featured .nc-media { width: 42%; }
  .nc--featured .nc-body { padding: 28px 30px; justify-content: center; gap: 12px; }
  .nc--featured .nc-title { font-size: 25px; }
  .nc--featured .nc-exc { font-size: 15px; -webkit-line-clamp: 5; }
  .nc--featured .nc-meta { margin-top: 6px; }
}

/* ── Portada: destacada 2×2 + tarjetas + enlace que cierra la última fila ── */
.nc-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.nc-all {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 16px 22px; border-radius: var(--radius-md);
  background: var(--black); color: white; text-decoration: none;
  font-size: 15px; font-weight: 800; letter-spacing: -.2px;
  transition: background .2s;
}
.nc-all:hover { background: var(--blue); }
.nc-all-arrow { font-size: 20px; transition: transform .2s; }
.nc-all:hover .nc-all-arrow { transform: translateX(4px); }
@media (min-width: 640px) {
  .nc-home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .nc-home .nc--featured { grid-column: 1 / -1; }
  .nc-all { grid-column: span var(--tile-md, 2); }
}
@media (min-width: 1024px) {
  .nc-home { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .nc-home:not(.is-few) .nc--featured { grid-column: span 2; grid-row: span 2; flex-direction: column; }
  .nc-home:not(.is-few) .nc--featured .nc-media { width: 100%; flex: 1 1 auto; aspect-ratio: auto; min-height: 320px; }  /* llena el alto 2×2 */
  .nc-home:not(.is-few) .nc--featured .nc-body { justify-content: flex-start; padding: 22px 26px 24px; }
  .nc-home .nc--featured .nc-title { font-size: 26px; }
  .nc-home .nc--featured .nc-exc { -webkit-line-clamp: 3; }
  .nc-all { grid-column: span var(--tile-lg, 4); flex-direction: column; font-size: 17px; }
  .nc-all-arrow { font-size: 28px; }
}

/* ── Página Noticias (y filtro): destacada horizontal + rejilla ── */
.nc-list { display: grid; gap: 20px; }
.nc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px)  { .nc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 768px)  { .nc-list .nc--featured .nc-media { width: min(40%, 460px); } }
@media (min-width: 1024px) { .nc-list { gap: 28px; } .nc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1280px) { .nc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Página Noticias: la destacada es un banner oscuro. El fondo de toda la
   tarjeta es la propia foto difuminada; el cartel se ve entero y el texto va en blanco. */
.nc-list .nc--featured { background: #111; color: white; }
.nc-list .nc--featured .nc-media { position: static; background: none; }
.nc-list .nc--featured .nc-media-bg { inset: -60px; filter: blur(40px) brightness(.32) saturate(1.3); }
.nc-list .nc--featured .nc-img { z-index: 1; filter: drop-shadow(0 10px 30px rgba(0,0,0,.45)); }
.nc-list .nc--featured .nc-media.is-empty { position: relative; }
.nc-list .nc--featured .nc-body { position: relative; z-index: 1; }
.nc-list .nc--featured .nc-title { color: white; }
.nc-list .nc--featured .nc-exc { color: rgba(255,255,255,.82); }
.nc-list .nc--featured .nc-meta { color: rgba(255,255,255,.65); }
.nc-list .nc--featured .nc-more { color: white; background: var(--pink); padding: 8px 16px; border-radius: 30px; }
@media (hover: hover) { .nc-list .nc--featured:hover .nc-title { color: white; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; } }
.nc-list .nc--featured .nc-link:focus-visible { outline: none; }
@media (min-width: 768px) {
  .nc-list .nc--featured .nc-media { width: min(34%, 420px); }
  .nc-list .nc--featured .nc-body { padding: 32px 40px; }
}
@media (min-width: 1024px) {
  .nc-list .nc--featured .nc-title { font-size: 32px; }
  .nc-list .nc--featured .nc-exc { font-size: 16px; }
}
.nc-empty { margin: 0; padding: 48px 20px; text-align: center; color: var(--gray-500); font-size: 15px; background: var(--gray-50, #f7f7f7); border-radius: var(--radius-md); }

/* ════════════════════════════════════════════════════════════
   AJUSTE «COVER» PARA TODAS LAS FOTOS DE FONDO
   Red de seguridad: cualquier foto puesta con style="background-image…"
   llena su caja sin deformarse. Las reglas propias de cada bloque mandan.
════════════════════════════════════════════════════════════ */
[style*="background-image"], [style*="background:url"], [style*="background: url"] {
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.entry-content img, .fdm-page-content img { object-fit: cover; }
