/* ===== Base compartida (reset, tipografía, componentes) ===== */
:root {
  --verde: #536b53;
  --verde-oscuro: #3f553f;
  --gris-fondo: #e8e8e8;
  --gris-texto: #6b6565;
  --texto: #2b2b2b;
  --ancho: 1200px;
  --radio: 16px;
  --fuente: "DM Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
button, input, select, textarea { font-family: inherit; }
body { margin: 0; font-family: var(--fuente); color: var(--texto); background: #fff; line-height: 1.4; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
/* Dificultar la descarga/arrastre de imágenes (no impide herramientas de desarrollo) */
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; pointer-events: none; -webkit-touch-callout: none; }
a img, button img, .lt__foto img { pointer-events: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.contenedor { width: min(100% - 2rem, var(--ancho)); margin-inline: auto; }

/* ----- Cabecera institucional ----- */
.cabecera { text-align: center; padding: clamp(28px, 5vw, 55px) 1rem 0; }
.cabecera__logo { width: clamp(220px, 30vw, 340px); margin: 0 auto; }
.cabecera__nombre { margin: 0; font-weight: 500; font-size: clamp(.85rem, 1.6vw, 1.1rem); }

/* ----- Hero con logo 200 años ----- */
.hero { text-align: center; padding: clamp(40px, 8vw, 100px) 1rem clamp(60px, 9vw, 130px); }
.hero__logo { width: min(100%, 580px); margin: 0 auto; }

/* ----- Sección principal (menú + tarjetas) ----- */
.principal { position: relative; overflow: hidden; background: #f0f0f0 url("../img/fondo-gris.png") center / cover no-repeat; padding: 30px 1rem clamp(30px, 5vw, 55px); }
.principal__marca { position: absolute; pointer-events: none; user-select: none; opacity: .55; z-index: 0; }
.principal > *:not(.principal__marca) { position: relative; z-index: 1; }

/* ----- Menú (configurable desde config.js) ----- */
.menu { width: fit-content; max-width: 100%; margin: 0 auto clamp(20px, 3vw, 28px); position: relative; }
.menu__lista { display: flex; align-items: stretch; border-radius: 999px; overflow: hidden; }
.menu__item { flex: 1 1 auto; display: flex; position: relative; }
.menu__item + .menu__item::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: currentColor; opacity: .7; }
.menu__link { flex: 1; padding: 10px clamp(12px, 1.6vw, 22px); text-align: center; text-decoration: none; font-size: .92rem; white-space: nowrap; transition: background .2s, color .2s; }
.menu__link:hover, .menu__link[aria-current="page"] { background: rgba(83,107,83,.14); color: var(--verde-oscuro); }
.menu__toggle { display: none; background: none; border: 0; padding: 12px 14px; cursor: pointer; }
.menu__toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }
.menu.is-open .menu__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu.is-open .menu__toggle span:nth-child(2) { opacity: 0; }
.menu.is-open .menu__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Tarjetas ----- */
.tarjetas { display: grid; gap: 20px; }
.tarjeta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 250px; border-radius: var(--radio); text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.4)); box-shadow: 0 10px 30px rgba(0,0,0,.08);
  transition: transform .2s, box-shadow .2s; padding: 1.5rem 1.4rem; scroll-margin-top: 20px; }
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.14); }
.tarjeta__titulo { margin: 0; font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--tarjeta-titulo, var(--verde)); }
.tarjeta__desc { margin: 0; font-size: .95rem; color: #555; max-width: 30ch; }
.tarjeta__btn { margin-top: auto; display: inline-block; padding: 10px 22px; border-radius: 999px; font-size: .9rem; font-weight: 500; text-decoration: none;
  background: var(--btn-bg, var(--verde)); color: var(--btn-color, #fff); transition: background .2s; }
.tarjeta__btn:hover, .tarjeta__btn:focus-visible { background: var(--btn-hover, var(--verde-oscuro)); }

/* ----- Video ----- */
.video { padding: clamp(24px, 4vw, 30px) 1rem; }
.video__caja { position: relative; width: min(100%, 930px); margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: #000; }
.video__caja img, .video__caja iframe, .video__caja video { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video__play { position: absolute; top: 50%; left: 50%; width: clamp(48px, 7vw, 66px); transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; }
.video__play circle { fill: #fff; }
.video__play path { fill: #222; }
.video__play:hover { transform: translate(-50%, -50%) scale(1.08); }

/* ----- Pie de página ----- */
.footer { font-size: .85rem; }
.footer__rejilla { display: grid; gap: 28px 40px; }
.footer__titulo { margin: 0 0 12px; font-size: .85rem; font-weight: 600; }
.footer p { margin: 0; }
.footer__links li a { text-decoration: underline; }
.footer__col--redes .footer__links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.footer__col--redes .footer__links a { text-decoration: none; }
.footer__col--redes .footer__links a:not(.footer__icono):hover { text-decoration: underline; }
.footer__icono { display: inline-flex; width: 34px; height: 34px; }
.footer__icono img { width: 100%; height: 100%; object-fit: contain; transition: opacity .2s, transform .2s; }
.footer__icono:hover img, .footer__icono:focus-visible img { opacity: .65; transform: translateY(-2px); }
.footer__admin { width: 200px; height: 100px; overflow: hidden; margin: 40px auto 0; }
.footer__admin img { width: 200px; max-width: none; }

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

/* ----- Responsivo ----- */
@media (max-width: 1080px) {
  .menu { width: 100%; }
  .menu__toggle { display: block; margin-left: auto; }
  .menu__lista { display: none; flex-direction: column; border-radius: 20px; margin-top: 6px; background: rgba(255,255,255,.9); }
  .menu.is-open .menu__lista { display: flex; }
  .menu__item + .menu__item::before { left: 12%; right: 12%; top: 0; bottom: auto; width: auto; height: 1px; }
  .menu__link { padding: 14px; }
}
@media (max-width: 760px) {
  .tarjeta { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
