/* ==========================================================================
   Asociación Ornitológica Ciudad de Cártama — styles.css
   Paleta derivada del logo (amarillo canario + verde) con contraste AA.
   ========================================================================== */

:root {
  /* Color */
  --verde-bosque: #14532b;   /* fondos oscuros y texto de marca */
  --verde-hoja:   #1e7a3d;   /* acentos, enlaces */
  --verde-suave:  #e7f2e9;   /* fondos de apoyo */
  --amarillo:     #f7c948;   /* acento cálido — siempre con texto oscuro */
  --amarillo-luz: #fdf3d7;
  --crema:        #fdfcf7;   /* fondo base */
  --tinta:        #1b2a20;   /* texto principal */
  --tinta-suave:  #4c5d52;
  --blanco:       #ffffff;

  /* Tipo */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Albert Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Ritmo */
  --radio: 14px;
  --sombra: 0 10px 30px rgba(20, 83, 43, .12);
  --ancho: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; color: var(--verde-bosque); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

a { color: var(--verde-hoja); }
a:hover { color: var(--verde-bosque); }

.container { max-width: var(--ancho); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.mt { margin-top: 1.25rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--verde-bosque); color: #fff; padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   Firma visual: la “anilla de criador” como etiqueta de sección
   -------------------------------------------------------------------------- */
.anilla-tag {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--verde-hoja); margin: 0 0 .75rem;
}
.anilla {
  width: 16px; height: 16px; border-radius: 50%;
  border: 4px solid var(--amarillo);
  background: transparent; flex: none;
  box-shadow: inset 0 0 0 2px var(--verde-bosque);
}
.anilla-tag-invert { color: var(--amarillo); }
.anilla-tag-invert .anilla { box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 252, 247, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(20, 83, 43, .12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 92px; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--verde-bosque); }
.brand img { border-radius: 50%; width: 72px; height: 72px; }
@media (max-width: 480px) { .brand img { width: 58px; height: 58px; } }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-family: var(--f-display); font-size: 1.02rem; }
.brand-name span:last-child { font-size: .8rem; color: var(--tinta-suave); letter-spacing: .04em; }

.nav-list { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--tinta); }
.nav-list a:hover { color: var(--verde-hoja); }
.nav-cta {
  background: var(--amarillo); color: var(--verde-bosque) !important;
  padding: .5rem 1rem; border-radius: 999px;
  box-shadow: 0 2px 0 rgba(20,83,43,.25);
}
.nav-cta:hover { background: #f0bd2e; }

.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 10px;
    background: var(--verde-bosque); border: 0; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; width: 22px; height: 2.5px;
    background: var(--amarillo); border-radius: 2px; position: relative;
    transition: transform .25s ease;
  }
  .nav-toggle-bar::before { position: absolute; top: -7px; }
  .nav-toggle-bar::after  { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(90deg); top: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { opacity: 0; }

  .nav-list {
    position: absolute; top: 92px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--crema); border-bottom: 1px solid rgba(20,83,43,.15);
    display: none; padding: .5rem 0 1rem;
  }
  .nav-list.is-open { display: flex; }
  .nav-list li { text-align: center; }
  .nav-list a { display: block; padding: .8rem 1rem; }
  .nav-cta { margin: .5rem auto 0; display: inline-block; }
}

/* --------------------------------------------------------------------------
   Sección 1 · Evento
   -------------------------------------------------------------------------- */
.section-evento {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--amarillo-luz), transparent 60%),
    var(--crema);
}
.evento-grid {
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
}
@media (max-width: 900px) { .evento-grid { grid-template-columns: 1fr; } }

.evento-cartel { margin: 0; }
.cartel-btn {
  position: relative; display: block; width: 100%;
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
}
.cartel-btn img { transition: transform .35s ease; }
.cartel-btn:hover img { transform: scale(1.025); }
.cartel-zoom {
  position: absolute; bottom: .75rem; right: .75rem;
  background: rgba(20,83,43,.85); color: #fff;
  font-size: .8rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px;
}
.evento-cartel figcaption { font-size: .85rem; color: var(--tinta-suave); margin-top: .6rem; text-align: center; }

.evento-fecha { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1.1rem; }
.fecha-destacada {
  display: inline-block;
  background: var(--amarillo); color: var(--verde-bosque);
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  padding: .35rem .9rem; border-radius: 8px;
  box-shadow: 0 3px 0 rgba(20,83,43,.25);
}
.fecha-nota { font-weight: 600; color: var(--verde-hoja); }

.evento-intro { max-width: 58ch; }

.jueces { margin-top: 1.75rem; background: var(--blanco); border: 1px solid rgba(20,83,43,.12); border-radius: var(--radio); padding: 1.25rem 1.4rem; }
.jueces h2 { font-size: 1.3rem; margin-bottom: .9rem; }
.jueces-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; }
@media (max-width: 640px) { .jueces-grid { grid-template-columns: 1fr; } }
.jueces-col h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--verde-hoja); }
.jueces-col ul { list-style: none; margin: 0; padding: 0; }
.jueces-col li {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .42rem 0; border-bottom: 1px dashed rgba(20,83,43,.15); font-size: .96rem;
}
.jueces-col li:last-child { border-bottom: 0; }

.badge {
  flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .18rem .55rem; border-radius: 999px;
  background: var(--verde-suave); color: var(--verde-bosque);
}
.badge-omj { background: var(--verde-bosque); color: var(--amarillo); }
.badge-pend { background: var(--amarillo-luz); color: #8a6d1a; }

.evento-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Botones */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: .75rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--verde-bosque); color: var(--amarillo); }
.btn-primary:hover { background: #0e3f20; color: var(--amarillo); }
.btn-ghost { border-color: var(--verde-bosque); color: var(--verde-bosque); }
.btn-ghost:hover { background: var(--verde-suave); }
.btn-ghost-light { border-color: var(--amarillo); color: var(--amarillo); }
.btn-ghost-light:hover { background: rgba(247, 201, 72, .15); color: var(--amarillo); }
.btn-mini { background: var(--amarillo); color: var(--verde-bosque); padding: .4rem .9rem; font-size: .85rem; }

/* --------------------------------------------------------------------------
   Sección 2 · Quiénes somos
   -------------------------------------------------------------------------- */
.section-somos { background: var(--blanco); border-top: 1px solid rgba(20,83,43,.08); }
.somos-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (max-width: 900px) { .somos-grid { grid-template-columns: 1fr; } }
.somos-texto p { max-width: 62ch; }

.link-estatutos {
  background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--verde-hoja);
  text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
.link-estatutos:hover { color: var(--verde-bosque); }

.junta {
  background: var(--verde-suave); border-radius: var(--radio);
  padding: 1.4rem 1.5rem; border: 1px solid rgba(20,83,43,.12);
}
.junta-lista { list-style: none; margin: 0; padding: 0; }
.junta-cargo { padding: .6rem 0; border-bottom: 1px solid rgba(20,83,43,.14); }
.junta-cargo:last-child { border-bottom: 0; }
.junta-cargo .cargo {
  display: block; font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--verde-hoja);
}
.junta-cargo .nombre { font-weight: 600; }
.junta-vocales ul { list-style: none; margin: .4rem 0 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.junta-vocales li { font-size: .92rem; padding: .15rem 0; break-inside: avoid; }
@media (max-width: 480px) { .junta-vocales ul { columns: 1; } }

/* --------------------------------------------------------------------------
   Sección 3 · Hazte socio
   -------------------------------------------------------------------------- */
.section-socio { background: var(--verde-bosque); color: #f2f7f3; }
.section-socio h2 { color: var(--blanco); }

.socio-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: start; margin-top: 1rem;
}
@media (max-width: 800px) { .socio-grid { grid-template-columns: 1fr; } }

.cuota-callout {
  background: var(--amarillo); color: var(--verde-bosque);
  border-radius: var(--radio); padding: 1.6rem 1.5rem; text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  /* Ocupa toda la altura de la columna de beneficios para alinear ambas cajas */
  align-self: stretch; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 800px) { .cuota-callout { height: auto; } }
.cuota-precio { font-family: var(--f-display); font-size: 3.4rem; font-weight: 700; line-height: 1; display: block; }
.cuota-detalle { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.cuota-callout p { margin: .8rem 0 0; font-weight: 600; font-size: .95rem; }

.beneficios { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.beneficios li {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: .8rem 1.1rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem;
}
.beneficios strong { color: var(--amarillo); font-size: 1.05rem; }
.beneficios span { color: rgba(242, 247, 243, .78); font-size: .95rem; }

.socio-contacto { margin-top: 2.25rem; }
.socio-contacto > p { font-weight: 600; }
.contacto-botones { display: flex; flex-wrap: wrap; gap: .75rem; }
.section-socio .btn-primary { background: var(--amarillo); color: var(--verde-bosque); }
.section-socio .btn-primary:hover { background: #f0bd2e; }

/* --------------------------------------------------------------------------
   Sección 4 · Galería
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: .5rem; margin: .5rem 0 1.5rem; }
.tab {
  border: 2px solid var(--verde-bosque); background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--verde-bosque);
  padding: .5rem 1.3rem; border-radius: 999px;
}
.tab.is-active { background: var(--verde-bosque); color: var(--amarillo); }

.tab-panel[hidden] { display: none; }

.galeria-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem;
}
@media (max-width: 800px) { .galeria-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .galeria-grid { grid-template-columns: 1fr; } }

.galeria-item {
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radio); overflow: hidden; position: relative;
  aspect-ratio: 4 / 3;
}
.galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.galeria-item::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radio);
  border: 0 solid var(--amarillo); transition: border-width .18s ease;
  pointer-events: none;
}
.galeria-item:hover img { transform: scale(1.05); }
.galeria-item:hover::after { border-width: 4px; }

.videos-vacio {
  text-align: center; padding: 3rem 1rem;
  background: var(--verde-suave); border-radius: var(--radio);
  border: 1px dashed rgba(20,83,43,.3);
}
.videos-icono { font-size: 2.2rem; display: block; margin-bottom: .5rem; }
.videos-nota { color: var(--tinta-suave); font-size: .95rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: #0e2b18; color: rgba(255,255,255,.85); padding: 2.5rem 0 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand img { border-radius: 50%; }
.site-footer a { color: var(--amarillo); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.footer-registro { font-size: .82rem; color: rgba(255,255,255,.55); }
.footer-copy { text-align: center; font-size: .82rem; color: rgba(255,255,255,.45); margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Modal de estatutos
   -------------------------------------------------------------------------- */
.modal[hidden], .lightbox[hidden] { display: none; }
.modal, .lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
}
.modal-fondo { position: absolute; inset: 0; background: rgba(14, 43, 24, .8); }

.modal-caja {
  position: relative; background: var(--blanco); border-radius: var(--radio);
  width: min(920px, 94vw); height: min(88vh, 1000px);
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,.4);
}
.modal-cabecera {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.1rem; background: var(--verde-bosque);
}
.modal-cabecera h3 { color: var(--blanco); margin: 0; font-size: 1.05rem; }
.modal-acciones { display: flex; align-items: center; gap: .6rem; }
.modal-cerrar {
  background: none; border: 2px solid var(--amarillo); color: var(--amarillo);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; font-weight: 700;
}
.modal-cerrar:hover { background: rgba(247,201,72,.15); }
#estatutos-iframe { flex: 1; width: 100%; border: 0; background: #444; }

/* --------------------------------------------------------------------------
   Lightbox de imágenes
   -------------------------------------------------------------------------- */
.lightbox-figura {
  position: relative; margin: 0; max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.lightbox-figura img {
  max-width: 92vw; max-height: 80vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 25px 60px rgba(0,0,0,.5);
}
.lightbox-figura figcaption { color: rgba(255,255,255,.9); font-size: .95rem; text-align: center; }

.lightbox-cerrar {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--amarillo); color: var(--verde-bosque);
  border: 0; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.15rem; font-weight: 700; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.14); color: #fff; border: 0;
  width: 52px; height: 52px; border-radius: 50%;
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-nav[disabled] { display: none; }

@media (max-width: 600px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.5rem; }
}

/* Grid de vídeos de la galería */
.videos-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem;
}
@media (max-width: 900px) { .videos-grid { grid-template-columns: 1fr; } }
.videos-grid video {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0e2b18;
  border-radius: var(--radio); box-shadow: var(--sombra);
}
