/* Tierra Viva A.G. — hoja de estilos principal
   Paleta heredada del sitio original (verde #006600 / crema #FFFFCC), modernizada. */

:root {
  --verde-900: #1b3a10;
  --verde-800: #24501a;
  --verde-700: #2f6b23;
  --verde-600: #3d8a2c;
  --verde-100: #e4efdb;
  --crema:     #fbf7e8;
  --arena:     #f2ead3;
  --tinta:     #1d2418;
  --gris:      #5b6353;
  --borde:     #ddd6bd;
  --tierra:    #8a5a2b;
  --max:       68rem;
  --radio:     4px;
  --sombra:    0 1px 3px rgba(27, 58, 16, .12), 0 8px 24px -12px rgba(27, 58, 16, .25);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ---------- Tipografía ---------- */

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--verde-900);
  line-height: 1.22;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.85rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.9rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); margin-top: 1.8em; }
h2 + h3 { margin-top: 1.2em; }

p, ul, ol, dl, table { margin: 0 0 1.2em; }
li { margin-bottom: .45em; }
li > ul, li > ol { margin-top: .45em; }

a { color: var(--verde-700); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { color: var(--verde-900); background: var(--verde-100); }

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

strong { color: var(--verde-900); }
abbr[title] { cursor: help; text-decoration-style: dotted; }

.lead {
  font-size: 1.15em;
  color: var(--gris);
  max-width: 46ch;
}

/* ---------- Estructura ---------- */

.contenedor { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1.25rem; }

.saltar {
  position: absolute; left: -9999px;
  background: var(--verde-900); color: #fff;
  padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 var(--radio) 0;
}
.saltar:focus { left: 0; top: 0; }

/* ---------- Cabecera ---------- */

.cabecera {
  background: var(--verde-900);
  border-bottom: 4px solid var(--verde-600);
}
.cabecera__barra {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem;
}
.marca { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.marca:hover, .marca:focus-visible { background: none; }
.marca img { width: 48px; height: auto; border-radius: var(--radio); background: var(--crema); padding: 2px; }
.marca__texto { display: flex; flex-direction: column; line-height: 1.15; }
.marca__nombre { font-family: Georgia, serif; font-size: 1.3rem; font-weight: 700; color: #fff; }
.marca__lema { font-size: .78rem; color: var(--verde-100); letter-spacing: .02em; }

.menu-boton {
  display: none;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.45); border-radius: var(--radio);
  padding: .5rem .8rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.menu-boton:hover { background: rgba(255,255,255,.12); }

.nav ul {
  display: flex; flex-wrap: wrap; gap: .1rem;
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  display: block; padding: .55rem .8rem;
  color: var(--verde-100); text-decoration: none;
  font-size: .93rem; border-radius: var(--radio);
}
.nav a:hover, .nav a:focus-visible { background: var(--verde-700); color: #fff; }
.nav a[aria-current="page"] { background: var(--verde-600); color: #fff; font-weight: 600; }
.nav { padding-bottom: .6rem; }

/* ---------- Migas ---------- */

.migas { background: var(--arena); border-bottom: 1px solid var(--borde); font-size: .87rem; }
.migas ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding-block: .6rem; }
.migas li::after { content: "\203A"; margin-left: .4rem; color: var(--gris); }
.migas li:last-child::after { content: ""; }
.migas [aria-current="page"] { color: var(--gris); }

/* ---------- Contenido ---------- */

main { padding-block: 2.5rem 3.5rem; }
main > .contenedor > :first-child { margin-top: 0; }

.portada {
  background: linear-gradient(160deg, var(--verde-800), var(--verde-900) 70%);
  color: var(--verde-100);
  padding-block: 3.2rem 3rem;
}
.portada h1 { color: #fff; max-width: 20ch; }
.portada p { max-width: 52ch; font-size: 1.1rem; }
.portada .lead { color: var(--verde-100); max-width: 52ch; }
.portada a { color: #fff; }

.boton {
  display: inline-block;
  background: var(--verde-600); color: #fff !important;
  padding: .7rem 1.35rem; border-radius: var(--radio);
  text-decoration: none; font-weight: 600; font-size: .97rem;
  border: 1px solid var(--verde-600);
}
.boton:hover, .boton:focus-visible { background: var(--verde-700); border-color: var(--verde-700); }
.boton--claro { background: transparent; border-color: rgba(255,255,255,.5); }
.boton--claro:hover { background: rgba(255,255,255,.14); }
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* ---------- Rejillas y tarjetas ---------- */

.rejilla { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.tarjeta {
  background: #fff; border: 1px solid var(--borde);
  border-radius: var(--radio); padding: 1.35rem 1.4rem;
  box-shadow: var(--sombra);
}
.tarjeta h3 { margin-top: 0; }
.tarjeta > :last-child { margin-bottom: 0; }

.nota {
  background: var(--verde-100); border-left: 4px solid var(--verde-600);
  padding: 1rem 1.2rem; border-radius: 0 var(--radio) var(--radio) 0;
}
.nota > :last-child { margin-bottom: 0; }
.nota--aviso { background: #fdf3dc; border-left-color: var(--tierra); }

/* ---------- Listas de socios ---------- */

.socios {
  columns: 3 14rem; column-gap: 2rem;
  list-style: none; margin: 0 0 1.5rem; padding: 0;
}
.socios li {
  break-inside: avoid;
  padding: .4rem 0 .4rem .3rem;
  border-bottom: 1px solid var(--borde);
}

/* ---------- Figuras ---------- */

figure { margin: 0 0 1.5rem; }
figure img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radio); border: 1px solid var(--borde);
  background: #fff;
}
figcaption { font-size: .89rem; color: var(--gris); padding-top: .55rem; }

.galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }

/* ---------- Tablas ---------- */

.tabla-envoltura { overflow-x: auto; margin-bottom: 1.5rem; }

table {
  width: 100%; border-collapse: collapse;
  background: #fff; font-size: .96rem;
  border: 1px solid var(--borde); border-radius: var(--radio);
}
caption { text-align: left; color: var(--gris); font-size: .95rem; }
th, td { padding: .7rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--borde); }
thead th { background: var(--verde-100); color: var(--verde-900); font-family: Georgia, serif; }
tbody th[scope="row"] { background: var(--arena); color: var(--verde-900); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td small { color: var(--gris); font-weight: 400; }

/* ---------- Citas ---------- */

blockquote { margin: 0 0 1.5rem; }
blockquote p { font-family: Georgia, serif; font-size: 1.1rem; font-style: italic; }

/* ---------- Datos de contacto ---------- */

.datos { display: grid; gap: .1rem; margin: 0 0 1.5rem; }
.datos div { display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.datos dt { min-width: 8rem; font-weight: 600; color: var(--verde-900); margin: 0; }
.datos dd { margin: 0; }

/* ---------- Pie ---------- */

.pie {
  background: var(--verde-900); color: var(--verde-100);
  padding-block: 2.5rem 1.5rem; margin-top: 3rem;
  font-size: .93rem;
}
.pie h2 { color: #fff; font-size: 1.05rem; margin: 0 0 .7rem; }
.pie a { color: #fff; }
.pie a:hover, .pie a:focus-visible { background: var(--verde-700); }
.pie ul { list-style: none; padding: 0; }
.pie li { margin-bottom: .35em; }
.pie__legal {
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: 1.5rem; padding-top: 1.1rem;
  font-size: .85rem; color: var(--verde-100);
}

/* ---------- Responsivo ---------- */

@media (max-width: 48rem) {
  .menu-boton { display: block; }
  .nav { display: none; padding-bottom: 1rem; }
  .nav.abierto { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: .7rem .8rem; border-bottom: 1px solid rgba(255,255,255,.12); border-radius: 0; }
  .socios { columns: 2 10rem; column-gap: 1.25rem; }
  main { padding-block: 2rem 2.5rem; }
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .socios { columns: 1; }
  .marca img { width: 40px; }
  .marca__nombre { font-size: 1.1rem; }
  .acciones .boton { width: 100%; text-align: center; }
}

@media print {
  .cabecera, .pie, .migas, .acciones { display: none; }
  body { background: #fff; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}
