/* ==========================================================
   TEMPLO ESPIRITUAL DE LA QUIMBANDA — Hoja de estilos
   Diseño oscuro, místico y respetuoso. Mobile-first.
   ========================================================== */

/* ---------- 1. Variables de diseño ---------- */
:root {
  --bg-main: #0a0a0a;        /* Fondo principal */
  --bg-alt: #0f0f0f;         /* Fondo alterno de secciones */
  --bg-card: #1a1a1a;        /* Fondo de tarjetas */
  --crimson: #8b0000;        /* Rojo carmesí oscuro */
  --crimson-hover: #a80f0f;  /* Rojo al pasar el cursor */
  --gold: #b08d57;           /* Dorado tenue */
  --gold-soft: rgba(176, 141, 87, 0.35); /* Bordes sutiles */
  --text: #e5e5e5;           /* Texto principal */
  --text-muted: #b5b5b5;     /* Texto secundario */
  --whatsapp: #25d366;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 10px;
  --max-width: 1100px;
}

/* ---------- 2. Reset y base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
  margin: 0;
}

p { margin: 0 0 1rem; }

/* Foco visible para navegación con teclado */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Enlace de salto (accesibilidad) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--crimson);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Separador decorativo ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto 2rem;
  width: min(220px, 60%);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.divider span {
  width: 8px;
  height: 8px;
  margin: 0 0.75rem;
  background: var(--crimson);
  border: 1px solid var(--gold);
  transform: rotate(45deg); /* pequeño rombo central */
}

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Botón principal (rojo oscuro) */
.btn--primary {
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 4px 18px rgba(139, 0, 0, 0.4);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--crimson-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(168, 15, 15, 0.5);
}

/* Botón delineado (outline) */
.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
  font-size: 0.95rem;
  padding: 0.7rem 1.4rem;
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

/* ---------- 5. Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Alto ajustado al contenido (sin pantalla completa) para que la
     distancia entre el botón y "Nuestros Guías" sea corta */
  padding: 6rem 1.5rem 2.5rem;
  /* Gradiente radial: simula una luz tenue en el centro */
  background:
    radial-gradient(ellipse at center, rgba(139, 0, 0, 0.30) 0%, rgba(40, 0, 0, 0.18) 35%, transparent 75%);
}

.hero__content { max-width: 800px; }

.hero h1 {
  font-size: clamp(2.1rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 30px rgba(139, 0, 0, 0.6);
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.05rem, 3.2vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ---------- 6. Secciones generales ---------- */
.section {
  padding: 5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Fondo alterno que ocupa todo el ancho */
.section--alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}
.section--alt > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}
/* El separador conserva su ancho propio dentro de la sección alterna */
.section--alt > .divider { width: min(220px, 60%); }

.section__title {
  text-align: center;
  color: var(--gold);
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  font-weight: 600;
}

/* ---------- 7. Tarjetas de guías ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 880px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 16px 40px rgba(139, 0, 0, 0.35);
}

.card__img {
  width: 100%;
  height: auto;            /* la proporción la define aspect-ratio, no el atributo height */
  aspect-ratio: 10 / 7;
  object-fit: cover;
  border-bottom: 1px solid var(--gold-soft);
}

.card__body { padding: 1.5rem; text-align: center; }

.card__title {
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.card__body p { color: var(--text-muted); margin: 0; }

/* ---------- 8. Servicios ---------- */
.services {
  display: grid;
  grid-template-columns: 1fr; /* apilado en móviles */
  gap: 1.75rem;
}

.service {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--gold-soft);
  border-top: 3px solid var(--crimson);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.service:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(139, 0, 0, 0.3);
}

.service__title {
  color: var(--text);
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}
.service p {
  color: var(--text-muted);
  flex-grow: 1;           /* empuja los botones al mismo nivel */
  margin-bottom: 1.5rem;
}

/* ---------- 9. Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1.5rem 5.5rem; /* espacio extra para no tapar con el botón flotante */
  border-top: 1px solid var(--gold-soft);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer p { margin: 0; }

/* ---------- 10. Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  z-index: 50;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
}

/* ---------- 11. Responsive ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .section { padding: 6rem 2rem; }
  .services { grid-template-columns: repeat(3, 1fr); } /* 3 columnas en escritorio */
}

/* ---------- 11b. Ambientación: fondo, adornos e íconos ---------- */

/* Fondo: humo oscuro. Se usa una capa fija en lugar de
   background-attachment: fixed porque funciona mejor en celulares. */
body { background-color: var(--bg-main); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("img/fondo.jpg") center / cover no-repeat;
  z-index: -1;
}

/* Reduce el espacio entre el hero y la primera sección */
.hero + .section { padding-top: 3rem; }

/* Adornos junto al título del hero (solo pantallas grandes) */
.hero { position: relative; overflow: hidden; }
.hero__deco {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(150px, 18vw, 270px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}
.hero__deco--left  { left: 8%; }
.hero__deco--right { right: 8%; }

/* Íconos dorados de servicios */
.service__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  color: var(--gold);
}

/* Resplandor rojizo en las tarjetas de guías */
.card {
  box-shadow: 0 0 22px rgba(139, 0, 0, 0.45), 0 8px 28px rgba(0, 0, 0, 0.6);
}

/* Secciones semitransparentes para que se vea el humo */
.section--alt { background: rgba(10, 10, 10, 0.55); }

@media (min-width: 900px) {
  .hero__deco { display: block; }
}

/* ---------- 12. Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
