/* ============================================================
   Familia Galilea — estilo carmelitano
   Marrones del hábito, crema del manto, tipografía serif.
   Verdes oliva institucionales como segundo color: acentos,
   botones, la franja de la cita y la sección Formación.
   ============================================================ */

:root {
  --marron-900: #2b1a10;   /* casi negro, fondos profundos */
  --marron-800: #3d2616;   /* hábito oscuro */
  --marron-700: #563622;   /* hábito */
  --marron-500: #8a6142;   /* madera */
  --marron-300: #c4a27f;   /* arena */
  --marron-200: #dcc6a8;   /* lino */
  --oliva-900: #262d19;    /* oliva profundo */
  --oliva-800: #343d22;    /* oliva oscuro, fondos */
  --oliva-700: #4b5730;    /* oliva institucional */
  --oliva-500: #6f7c3f;    /* oliva */
  --oliva-300: #aab47c;    /* oliva claro */
  --oliva-200: #cdd3a8;    /* salvia */
  /* Paleta del logo de Casa Sagrada Familia (zócalo) */
  --paleta-1: #2b2d3a;
  --paleta-2: #32404b;
  --paleta-3: #385156;
  --paleta-4: #4b7166;
  --paleta-5: #79a489;
  --crema-100: #f4ece0;    /* manto */
  --crema-50:  #faf6ef;    /* papel */
  --texto: #3a2a1f;
  --texto-suave: #6b5645;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;

  --radio: 10px;
  --sombra: 0 6px 24px rgba(43, 26, 16, 0.08);
}

/* RESET Y BASE */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--texto);
  background: var(--crema-50);
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--marron-800);
  line-height: 1.2;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.2rem;
}

h3 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p + p {
  margin-top: 1rem;
}

a {
  color: var(--oliva-700);
}

/* NAVEGACIÓN */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(43, 26, 16, 0.96);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Zócalo con la paleta del logo en el borde inferior de la barra fija */
.topbar::after {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(to right,
    var(--paleta-1) 0 20%,
    var(--paleta-2) 20% 40%,
    var(--paleta-3) 40% 60%,
    var(--paleta-4) 60% 80%,
    var(--paleta-5) 80% 100%);
}

.nav {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--crema-100);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

/* Mismo medallón que la portada, en chico */
.logo-medallon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--crema-50);
  border: 2px solid var(--marron-300);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-medallon img {
  width: 64%;
  height: auto;
  transform: translate(3%, -2%);
}

/* LOGOS */
/* ZÓCALO: la franja de cinco colores del logo de Casa Sagrada Familia, tal cual */
.zocalo {
  height: 14px;
  background: linear-gradient(to right,
    var(--paleta-1) 0 20%,
    var(--paleta-2) 20% 40%,
    var(--paleta-3) 40% 60%,
    var(--paleta-4) 60% 80%,
    var(--paleta-5) 80% 100%);
}

/* Medallón crema: el logo va oscuro sobre claro, como fue diseñado */
.hero-logo {
  width: clamp(150px, 24vw, 200px);
  aspect-ratio: 1;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  background: var(--crema-50);
  border: 3px solid var(--marron-300);
  box-shadow: 0 0 0 6px rgba(244, 236, 224, 0.12), 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo img {
  width: 64%;
  height: auto;
  transform: translate(3%, -2%);
}

.house-logo {
  display: block;
  width: 130px;
  height: auto;
  margin: 0 auto 1.2rem;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-menu a {
  color: var(--marron-200);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--crema-50);
}

.nav-menu a.nav-cta {
  background: var(--oliva-300);
  color: var(--oliva-900);
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  font-weight: 600;
}

.nav-menu a.nav-cta:hover {
  background: var(--crema-100);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--crema-100);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* PORTADA */
/* Una pantalla menos el zócalo, para que el zócalo se vea al abrir la página.
   svh = alto de pantalla sin la barra del navegador del celular. */
.hero {
  min-height: calc(100vh - 14px);
  min-height: calc(100svh - 14px);
  padding: 7rem 1.5rem 3rem;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(196, 162, 127, 0.18), transparent 60%),
    radial-gradient(ellipse at 50% 110%, rgba(111, 124, 63, 0.35), transparent 55%),
    linear-gradient(170deg, var(--marron-900) 0%, var(--marron-800) 55%, var(--marron-700) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--crema-100);
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  color: var(--crema-50);
  margin-bottom: 0.4rem;
}

.hero-lema {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--marron-200);
}

/* Ornamento: una pequeña cruz entre líneas */
.hero-lema::after {
  content: "✝";
  display: block;
  font-style: normal;
  font-size: 1rem;
  color: var(--marron-300);
  margin: 1.4rem auto;
  width: 180px;
  background: linear-gradient(var(--oliva-500), var(--oliva-500)) left center / 70px 1px no-repeat,
              linear-gradient(var(--oliva-500), var(--oliva-500)) right center / 70px 1px no-repeat;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--marron-200);
  max-width: 560px;
  margin: 0 auto;
}

/* BOTONES */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-light {
  background: var(--crema-100);
  color: var(--marron-800);
}

.btn-light:hover {
  background: var(--crema-50);
}

.btn-dark {
  background: var(--oliva-700);
  color: var(--crema-50);
}

.btn-dark:hover {
  background: var(--oliva-800);
}

/* SECCIONES */
.section {
  padding: 5.5rem 1.5rem;
}

.section-tight {
  padding: 4rem 1.5rem;
}

.section-cream {
  background: var(--crema-100);
}

.section-dark {
  background: var(--marron-800);
  color: var(--marron-200);
}

.section-dark h2,
.section-dark h3 {
  color: var(--crema-50);
}

.container {
  max-width: 1050px;
  margin: 0 auto;
}

.eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--oliva-700);
  margin-bottom: 0.6rem;
}

.eyebrow-light {
  color: var(--oliva-300);
}

.section-dark .two-col .eyebrow,
.section-dark .two-col h2 {
  text-align: left;
}

.lead {
  text-align: center;
  font-size: 1.15rem;
  color: var(--texto-suave);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.lead-light {
  color: var(--marron-200);
}

.center {
  text-align: center;
}

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* VIDEO */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(43, 26, 16, 0.25);
  border: 6px solid var(--marron-800);
  background: var(--marron-900);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* HISTORIA */
.timeline {
  background: var(--crema-100);
  border-left: 3px solid var(--marron-500);
  border-radius: 0 var(--radio) var(--radio) 0;
  padding: 1.8rem;
}

.timeline ol {
  list-style: none;
}

.timeline li {
  font-size: 0.97rem;
  color: var(--texto-suave);
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--marron-200);
}

.timeline li:last-child {
  border-bottom: none;
}

.timeline span {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--marron-700);
}

/* CITA */
.quote-band {
  background: var(--oliva-700);
  padding: 4rem 1.5rem;
}

.quote-band blockquote {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.45;
  color: var(--crema-100);
}

/* TARJETAS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Cuatro tarjetas: de a dos, para que no quede una sola abajo */
.cards-2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.cta-row {
  margin-top: 2.5rem;
}

.card {
  background: var(--crema-50);
  border: 1px solid var(--marron-200);
  border-top: 4px solid var(--oliva-500);
  border-radius: var(--radio);
  padding: 1.8rem;
  box-shadow: var(--sombra);
}

.section:not(.section-cream) .card {
  background: #fff;
}

.card p {
  font-size: 0.98rem;
  color: var(--texto-suave);
}

.card-highlight {
  border-top-color: var(--marron-800);
  background: var(--crema-100) !important;
}

.placeholder {
  font-style: italic;
  border-left: 3px solid var(--marron-300);
  padding-left: 0.9rem;
}

/* CASAS */
.houses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 760px) {
  .houses,
  .dreams {
    grid-template-columns: repeat(2, 1fr);
  }
}

.house {
  background: linear-gradient(180deg, var(--crema-100), var(--crema-50));
  border: 1px solid var(--marron-200);
  border-radius: var(--radio);
  padding: 2.2rem;
  text-align: center;
}

.house-place {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--oliva-700);
  margin-bottom: 1rem;
}

.house p:last-child {
  color: var(--texto-suave);
}

/* PROYECTOS */
.dreams {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

/* El Anuncio: tarjeta destacada a todo el ancho, afiche + texto */
.dream.dream-anuncio {
  grid-column: 1 / -1;
  margin-top: 2rem;
  display: grid;
  gap: 1.8rem;
  align-items: center;
  text-align: left;
  border-style: solid;
  border-color: var(--oliva-500);
}

.dream-anuncio img {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

.dream-anuncio .btn {
  margin-top: 1rem;
}

.anuncio-contacto {
  margin-top: 1.2rem;
  color: var(--marron-800);
}

@media (min-width: 760px) {
  .dream-anuncio {
    grid-template-columns: 300px 1fr;
  }
}

.dreams-cta {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--texto-suave);
}

.dream {
  padding: 2rem 2.2rem;
  border: 2px dashed var(--marron-300);
  border-radius: var(--radio);
  text-align: center;
  background: var(--crema-50);
}

.dream-tag {
  display: inline-block;
  background: var(--oliva-700);
  color: var(--crema-50);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.25rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 0.8rem;
}

.dream p:last-child {
  max-width: 640px;
  margin: 0 auto;
  color: var(--texto-suave);
}

/* PAN VIVO */
.pan-card {
  background: var(--marron-700);
  border: 1px solid var(--marron-500);
  border-radius: var(--radio);
  padding: 2.2rem;
  text-align: center;
  align-self: center;
}

/* Logo de Pan Vivo: trazo marrón sobre medallón crema, como el de la portada */
.pan-logo {
  width: 190px;
  aspect-ratio: 1;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  background: var(--crema-50);
  border: 3px solid var(--marron-300);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pan-logo img {
  width: 74%;
  height: auto;
  transform: translate(2%, 1%);
}

/* Caja para escribir el mensaje de pedido de ayuda (se envía por WhatsApp) */
.mensaje-ayuda {
  margin-top: 1rem;
}

.mensaje-ayuda summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  background: var(--oliva-700);
  color: var(--crema-50);
  padding: 0.6rem 1.3rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
}

.mensaje-ayuda summary::-webkit-details-marker {
  display: none;
}

.mensaje-ayuda[open] summary {
  background: var(--oliva-800);
}

.mensaje-ayuda form {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
  text-align: left;
}

.mensaje-ayuda label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--marron-800);
}

.mensaje-ayuda textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--marron-300);
  border-radius: var(--radio);
  font: inherit;
  font-size: 0.95rem;
  color: var(--texto);
  background: #fff;
  resize: vertical;
}

.mensaje-ayuda textarea:focus {
  outline: 2px solid var(--oliva-500);
  outline-offset: 1px;
}

.mensaje-ayuda .btn {
  justify-self: start;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.mensaje-ayuda-nota {
  font-size: 0.85rem;
  color: var(--texto-suave);
}

.pan-direccion {
  margin-top: 1.2rem;
  color: var(--marron-200);
  line-height: 1.6;
}

.pan-direccion strong {
  color: var(--crema-50);
}

.pan-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--crema-50);
}

.pan-card .btn {
  margin-top: 1.4rem;
}

/* PEDIR AYUDA */
.steps {
  list-style: none;
  counter-reset: paso;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.steps li {
  counter-increment: paso;
  background: var(--crema-50);
  border-radius: var(--radio);
  padding: 1.8rem 1.6rem;
  border: 1px solid var(--marron-200);
}

.steps li::before {
  content: counter(paso);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--oliva-700);
  color: var(--crema-50);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.steps p {
  font-size: 0.98rem;
  color: var(--texto-suave);
}

.note {
  max-width: 760px;
  margin: 0 auto 2rem;
  padding: 1.2rem 1.5rem;
  background: var(--crema-50);
  border-left: 4px solid var(--oliva-500);
  border-radius: 0 var(--radio) var(--radio) 0;
  font-size: 0.98rem;
}

/* FORMACIÓN: fondo oliva, tarjetas claras */
.section-olive {
  background: var(--oliva-800);
  color: var(--oliva-200);
}

.section-olive h2 {
  color: var(--crema-50);
}

.section-olive .lead-light {
  color: var(--oliva-200);
}

.section-olive .card h3,
.section-dark .card h3 {
  color: var(--marron-800);
}

.section-olive .card {
  border-top-color: var(--marron-500);
}

.formacion-note {
  margin-top: 2.5rem;
  color: var(--texto);
}

/* Texto solo para lectores de pantalla (no se ve) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* CUSTODIA Y ORACIÓN DE LA SERENIDAD */
.serenidad-band {
  background: var(--marron-800);
  padding: 3.5rem 1.5rem;
}

.serenidad-band figure {
  max-width: 420px;
  margin: 0 auto;
}

.serenidad-band img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radio);
  border: 3px solid var(--marron-300);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.serenidad-band figcaption {
  margin-top: 1.2rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  color: var(--marron-200);
}

/* Misión, debajo del título de Quiénes somos */
.lead-mision {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  color: var(--oliva-700);
}

/* RED */
.network {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.network li {
  background: var(--crema-50);
  border: 1px solid var(--marron-300);
  color: var(--marron-800);
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

/* Logos de la red */
.logos {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
}

.logos li {
  background: #fff;
  border: 2px solid var(--oliva-500);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logos img {
  display: block;
  width: 100%;
  height: auto;
}

.logos-convenio {
  grid-template-columns: 1fr 2fr;
  max-width: 480px;
  align-items: center;
}

.logos-convenio .logo-ancho img {
  padding: 0.6rem;
}

.logos-sub {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--oliva-700);
  margin: 2rem 0 1rem;
}

@media (max-width: 600px) {
  .logos { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .logos-convenio { grid-template-columns: 1fr 2fr; }
}

/* CONTACTO */
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-link {
  display: block;
  background: var(--marron-700);
  border: 1px solid var(--marron-500);
  border-radius: var(--radio);
  padding: 1.3rem 1rem;
  color: var(--crema-100);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 0.2s;
}

.contact-link:hover {
  background: var(--marron-500);
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--marron-300);
  margin-bottom: 0.3rem;
}

/* PIE */
.footer {
  background: var(--marron-900);
  color: var(--marron-300);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.88rem;
}

.footer p + p {
  margin-top: 0.3rem;
}

.footer-lema {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--marron-200);
  margin-bottom: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--marron-900);
    padding: 0.5rem 1.5rem 1.2rem;
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(196, 162, 127, 0.15);
  }

  .nav-menu a.nav-cta {
    margin-top: 0.8rem;
    text-align: center;
    border-bottom: none;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 1rem;
  }

  /* Portada más compacta en el celular: entra entera con el zócalo */
  .hero {
    padding: 5.8rem 1rem 1.5rem;
  }

  .hero-logo {
    width: 124px;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .hero-lema {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  .hero-lema::after {
    margin: 0.9rem auto;
  }

  .hero-text {
    font-size: 1rem;
  }

  .logo {
    font-size: 1.35rem;
  }

  .cards,
  .houses,
  .steps {
    grid-template-columns: 1fr;
  }
}
