/* ==========================================================================
   Círculo de la Amistad de Cabra — hoja de estilos
   Paleta: crema, granate (galerías), oro (logotipo), tinta
   ========================================================================== */

:root {
  --crema: #f6f1e7;
  --papel: #fffdf8;
  --tinta: #2b2320;
  --tinta-suave: #5b504a;
  --granate: #7c2b2e;
  --granate-oscuro: #521c1f;
  --oro: #b3924e;
  --oro-claro: #d9c294;
  --linea: #e4d9c3;
  --sombra: 0 10px 30px rgba(43, 35, 32, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Lato", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--tinta);
  background: var(--crema);
}

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

h1, h2, h3, h4, .serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--tinta);
}

a { color: var(--granate); }

.contenedor { max-width: 1150px; margin: 0 auto; padding: 0 24px; }

/* ---------- etiqueta pequeña sobre títulos ---------- */
.antetitulo {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--oro);
  font-weight: 700;
  margin-bottom: .8rem;
}
.antetitulo::after {
  content: "";
  display: inline-block;
  width: 46px; height: 1px;
  background: var(--oro);
  margin-left: 14px;
  vertical-align: middle;
}

/* ==========================================================================
   Cabecera
   ========================================================================== */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 248, .96);
  backdrop-filter: blur(6px);
  border-top: 4px solid var(--granate);
  border-bottom: 1px solid var(--linea);
}
.cabecera-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marca-mono { height: 52px; width: auto; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.15; }
.marca-texto strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--tinta);
  letter-spacing: .02em;
}
.marca-texto em {
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--oro);
}

.nav ul { list-style: none; display: flex; align-items: center; gap: 6px; }
.nav a {
  display: block;
  padding: 10px 13px;
  text-decoration: none;
  color: var(--tinta);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover, .nav a.activo { color: var(--granate); border-bottom-color: var(--oro); }
.nav .btn-nav {
  background: var(--granate);
  color: #fff;
  border-radius: 3px;
  border-bottom: none;
  padding: 10px 18px;
}
.nav .btn-nav:hover { background: var(--granate-oscuro); color: #fff; }

/* Submenú */
.tiene-sub { position: relative; }
.nav ul.sub {
  position: absolute;
  top: 100%; left: 0;
  min-width: 190px;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-top: 3px solid var(--oro);
  box-shadow: var(--sombra);
  display: none;
  flex-direction: column;
  gap: 0 !important;
  padding: 6px 0;
}
.nav .tiene-sub:hover ul.sub, .nav .tiene-sub.abierto ul.sub { display: flex; }
.sub li { width: 100%; }
.sub a { border-bottom: none; padding: 9px 18px; letter-spacing: .08em; }
.sub a:hover { background: var(--crema); }

.hamburguesa {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 42px; height: 38px;
  flex-direction: column; justify-content: center; gap: 6px;
  align-items: center;
}
.hamburguesa span { display: block; width: 26px; height: 2px; background: var(--tinta); transition: .25s; }
.hamburguesa.abierto span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburguesa.abierto span:nth-child(2) { opacity: 0; }
.hamburguesa.abierto span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   Hero portada
   ========================================================================== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: url("../assets/img/hero-patio.jpg") center 35% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(30, 20, 16, .45), rgba(30, 20, 16, .62));
}
.hero-contenido { position: relative; padding: 90px 24px; max-width: 860px; }
.hero-logo { height: 110px; margin: 0 auto 22px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.hero .antetitulo { color: var(--oro-claro); }
.hero .antetitulo::after { background: var(--oro-claro); }
.hero .antetitulo::before {
  content: "";
  display: inline-block;
  width: 46px; height: 1px;
  background: var(--oro-claro);
  margin-right: 14px;
  vertical-align: middle;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: .5rem;
}
.hero p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: #f0e8d8;
  margin-bottom: 2rem;
}

.botones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 32px;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: .25s;
}
.btn-oro { background: var(--oro); color: #fff; }
.btn-oro:hover { background: #9a7c3e; }
.btn-borde { border: 1px solid rgba(255,255,255,.75); color: #fff; }
.btn-borde:hover { background: rgba(255,255,255,.15); }
.btn-granate { background: var(--granate); color: #fff; }
.btn-granate:hover { background: var(--granate-oscuro); }
.btn-borde-oscuro { border: 1px solid var(--granate); color: var(--granate); }
.btn-borde-oscuro:hover { background: var(--granate); color: #fff; }

/* Cinta de datos bajo el hero */
.cinta {
  background: var(--granate);
  color: #fff;
}
.cinta .contenedor {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px 40px;
  padding: 26px 24px;
  text-align: center;
}
.cinta strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--oro-claro);
  line-height: 1.1;
}
.cinta span { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }

/* ==========================================================================
   Secciones
   ========================================================================== */
.seccion { padding: 90px 0; }
.seccion-clara { background: var(--papel); }
.seccion h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 1.1rem; }
.seccion .intro { max-width: 720px; color: var(--tinta-suave); }
.centrado { text-align: center; }
.centrado .intro { margin: 0 auto; }

/* Dos columnas texto + imagen */
.dos-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.dos-col.invertido .col-texto { order: 2; }
.col-texto p { margin-bottom: 1rem; color: var(--tinta-suave); }
.col-texto p strong { color: var(--tinta); }

.marco { position: relative; }
.marco img { width: 100%; height: 100%; object-fit: cover; box-shadow: var(--sombra); }
.marco::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--oro);
  z-index: -1;
}

/* Collage de dos fotos */
.collage { position: relative; padding-bottom: 70px; padding-right: 40px; }
.collage img:first-child { width: 82%; box-shadow: var(--sombra); }
.collage img:last-child {
  position: absolute;
  right: 0; bottom: 0;
  width: 52%;
  border: 6px solid var(--papel);
  box-shadow: var(--sombra);
}

/* Tarjetas */
.tarjetas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin-top: 3rem;
}
.tarjeta {
  background: var(--papel);
  border: 1px solid var(--linea);
  text-decoration: none;
  color: var(--tinta);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.tarjeta:hover { transform: translateY(-6px); box-shadow: var(--sombra); }
.tarjeta figure { overflow: hidden; height: 220px; }
.tarjeta img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tarjeta:hover img { transform: scale(1.06); }
.tarjeta-cuerpo { padding: 22px 24px 26px; flex: 1; }
.tarjeta h3 { font-size: 1.45rem; margin-bottom: .4rem; }
.tarjeta p { font-size: .95rem; color: var(--tinta-suave); }
.tarjeta .mas {
  display: inline-block;
  margin-top: .9rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--granate);
}

/* Cita destacada */
.cita {
  position: relative;
  background: url("../assets/img/patio-fuente.jpg") center 60% / cover no-repeat fixed;
  color: #fff;
  text-align: center;
  padding: 110px 0;
}
.cita::before { content: ""; position: absolute; inset: 0; background: rgba(46, 26, 22, .72); }
.cita blockquote {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-style: italic;
  line-height: 1.5;
}
.cita cite {
  position: relative;
  display: block;
  margin-top: 1.6rem;
  font-size: .85rem;
  font-style: normal;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oro-claro);
}

/* ==========================================================================
   Banner interior de páginas
   ========================================================================== */
.banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-position: center;
  background-size: cover;
}
.banner::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(30,20,16,.2) 30%, rgba(30,20,16,.75));
}
.banner .contenedor { position: relative; padding-bottom: 44px; width: 100%; }
.banner h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.banner .antetitulo { color: var(--oro-claro); }
.banner .antetitulo::after { background: var(--oro-claro); }

/* Migas */
.migas { font-size: .8rem; letter-spacing: .08em; color: #e8ddc8; margin-bottom: .4rem; }
.migas a { color: #e8ddc8; text-decoration: none; }
.migas a:hover { color: #fff; }

/* ==========================================================================
   Línea de tiempo (historia)
   ========================================================================== */
.tiempo { position: relative; max-width: 760px; margin: 3rem auto 0; }
.tiempo::before {
  content: "";
  position: absolute;
  left: 89px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--oro);
}
.hito { display: flex; gap: 34px; padding: 18px 0; }
.hito .anio {
  flex: 0 0 72px;
  text-align: right;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--granate);
  line-height: 1.2;
}
.hito .punto {
  flex: 0 0 13px;
  height: 13px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--papel);
  border: 3px solid var(--oro);
}
.hito .texto { flex: 1; color: var(--tinta-suave); }
.hito .texto strong { display: block; color: var(--tinta); font-size: 1.05rem; }

/* Equipo directivo */
.equipo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 2.5rem;
}
.persona {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-top: 3px solid var(--oro);
  padding: 22px 24px;
}
.persona strong { display: block; font-size: 1.02rem; }
.persona span {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--granate);
  font-weight: 700;
}

/* ==========================================================================
   Espacios / listas con foto
   ========================================================================== */
.espacio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 44px 0;
  border-bottom: 1px solid var(--linea);
}
.espacio:last-child { border-bottom: none; }
.espacio:nth-child(even) .espacio-texto { order: -1; }
.espacio img { width: 100%; max-height: 420px; object-fit: cover; box-shadow: var(--sombra); }
.espacio h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.espacio p { color: var(--tinta-suave); }

.lista-sencilla { list-style: none; margin-top: 1rem; }
.lista-sencilla li { padding: 8px 0 8px 28px; position: relative; color: var(--tinta-suave); }
.lista-sencilla li::before {
  content: "";
  position: absolute;
  left: 4px; top: 17px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid var(--oro);
}
.lista-sencilla strong { color: var(--tinta); }

/* Cajas de aviso / documentos */
.caja-doc {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-left: 4px solid var(--granate);
  padding: 20px 24px;
  margin-top: 16px;
  text-decoration: none;
  color: var(--tinta);
  transition: box-shadow .25s;
}
.caja-doc:hover { box-shadow: var(--sombra); }
.caja-doc .icono { font-size: 1.8rem; }
.caja-doc strong { display: block; }
.caja-doc small { color: var(--tinta-suave); }

/* Pasos (socios) */
.pasos { counter-reset: paso; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 2.6rem; }
.paso {
  background: var(--papel);
  border: 1px solid var(--linea);
  padding: 30px 26px;
  position: relative;
}
.paso::before {
  counter-increment: paso;
  content: counter(paso);
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--oro);
  line-height: 1;
  margin-bottom: .6rem;
}
.paso h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.paso p { font-size: .95rem; color: var(--tinta-suave); }

/* ==========================================================================
   Galería
   ========================================================================== */
.rejilla-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 2.6rem;
}
.rejilla-galeria a {
  display: block;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
}
.rejilla-galeria img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.rejilla-galeria a:hover img { transform: scale(1.07); }

/* Visor (lightbox) */
.visor {
  position: fixed; inset: 0;
  background: rgba(20, 14, 12, .93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 30px;
}
.visor.abierto { display: flex; }
.visor img { max-width: 92vw; max-height: 86vh; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.visor button {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  padding: 12px 20px;
  opacity: .8;
}
.visor button:hover { opacity: 1; }
.visor .cerrar { top: 12px; right: 16px; }
.visor .ant { left: 8px; top: 50%; transform: translateY(-50%); }
.visor .sig { right: 8px; top: 50%; transform: translateY(-50%); }
.visor figcaption {
  position: absolute;
  bottom: 18px; left: 0; right: 0;
  text-align: center;
  color: #d9cdb5;
  font-size: .9rem;
  letter-spacing: .06em;
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.fichas-contacto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 2.6rem;
}
.ficha {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-top: 3px solid var(--oro);
  padding: 28px;
  text-align: center;
}
.ficha .icono { font-size: 1.9rem; display: block; margin-bottom: .6rem; }
.ficha h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.ficha p, .ficha a { color: var(--tinta-suave); font-size: .98rem; text-decoration: none; }
.ficha a:hover { color: var(--granate); }

.mapa { margin-top: 3rem; box-shadow: var(--sombra); }
.mapa iframe { width: 100%; height: 440px; border: 0; display: block; }

/* ==========================================================================
   Franja llamada a la acción
   ========================================================================== */
.cta {
  background: var(--granate);
  color: #fff;
  text-align: center;
  padding: 80px 24px;
}
.cta h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: .6rem; }
.cta p { color: #ecdfd3; max-width: 640px; margin: 0 auto 1.8rem; }

/* ==========================================================================
   Pie
   ========================================================================== */
.pie { background: #241a17; color: #cbbfae; font-size: .95rem; }
.pie-superior {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 44px;
  padding: 70px 0 50px;
}
.pie h4 {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.pie-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.pie-logo img { height: 54px; }
.pie-logo strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1.2;
}
.pie ul { list-style: none; }
.pie li { padding: 4px 0; }
.pie a { color: #cbbfae; text-decoration: none; transition: color .2s; }
.pie a:hover { color: var(--oro-claro); }
.pie-inferior {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: #96897a;
}
.redes { display: flex; gap: 12px; margin-top: .8rem; }
.redes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  transition: .25s;
}
.redes a:hover { background: var(--oro); border-color: var(--oro); }
.redes svg { width: 18px; height: 18px; fill: #e8ddc8; }

/* ==========================================================================
   Animación de aparición
   ========================================================================== */
.aparece { transition: opacity .7s ease, transform .7s ease; }
.aparece.oculto { opacity: 0; transform: translateY(26px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .pie-superior { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hamburguesa { display: flex; }
  .nav {
    position: fixed;
    top: 77px; right: 0; bottom: 0;
    width: min(320px, 85vw);
    background: var(--papel);
    border-left: 1px solid var(--linea);
    transform: translateX(100%);
    transition: transform .3s;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0,0,0,.12);
  }
  .nav.abierto { transform: none; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 18px; gap: 2px; }
  .nav a { border-bottom: 1px solid var(--linea); padding: 14px 10px; }
  .nav ul.sub { position: static; display: flex; border: none; box-shadow: none; padding-left: 16px; background: transparent; }
  .dos-col, .espacio { grid-template-columns: 1fr; gap: 30px; }
  .dos-col.invertido .col-texto, .espacio:nth-child(even) .espacio-texto { order: 0; }
  .seccion { padding: 60px 0; }
  .cita { background-attachment: scroll; }
  .tiempo::before { left: 71px; }
  .hito { gap: 22px; }
  .hito .anio { flex-basis: 60px; font-size: 1.3rem; }
}

@media (max-width: 560px) {
  .pie-superior { grid-template-columns: 1fr; gap: 30px; }
  .marca-texto strong { font-size: 1.1rem; }
  .hero { min-height: 76vh; }
  .hero-logo { height: 84px; }
}
