/* =====================================================================
   SHADHANA — Hoja de estilos CENTRALIZADA
   Compartida por: shadhana.html, talleres.html, el-origen.html,
   contacto_shadhana.html y TALLER_1_DEMO_PAGINA_PRUEBA.html
   (index.html, cookies.html y privacidad.html tienen su propio CSS)
   ===================================================================== */

:root {
  --cream:        #efe6d3;
  --cream-light:  #f7f0df;
  --cream-shadow: #e2d4b6;
  --teal:         #1a7b76;
  --teal-bright:  #00c1bc;
  --teal-soft:    #2fc4be;
  --gold:         #a67c3f;
  --ink:          #4a3d29;
  --ochre:        #6a4a1e;
  --ease:         cubic-bezier(.19, 1, .22, 1); /* easeOutExpo: muy suave */
}

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

html, body {
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Fondo marfil (sin mandala) */
.page-bg {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse at 26% 18%, rgba(166,124,63,0.10), transparent 60%),
    linear-gradient(180deg, var(--cream-light) 0%, var(--cream) 55%, var(--cream-shadow) 100%);
}
.page-grain {
  position: fixed; inset: -50%; z-index: -2; pointer-events: none;
  opacity: 0.07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.29  0 0 0 0 0.24  0 0 0 0 0.16  0 0 0 0.55 0'/></filter><rect width='260' height='260' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
}

/* ---------- HEADER / FOOTER FLOTANTES ---------- */
.topbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  display: flex; align-items: center;
  gap: clamp(10px, 2vw, 22px);
  padding: 8px 18px 8px 10px;
  max-width: calc(100vw - 24px);
  background: #ffffff; border: 1.2px solid var(--teal); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(74, 61, 41, 0.14);
}
.bottombar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: grid; place-items: center;
}
.bar-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: min(365px, calc(100vw - 24px));
  padding: 7px 16px;
  background: #ffffff; border: 1.2px solid var(--teal); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(74, 61, 41, 0.14);
  transform-origin: center;
}

.brand {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}
.brand:hover { transform: scale(1.06); }
.brand img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: contain;
  transition: opacity 0.3s var(--ease);
}
.brand .brand-hover { opacity: 0; }
.brand:hover .brand-rest, .brand:focus-visible .brand-rest { opacity: 0; }
.brand:hover .brand-hover, .brand:focus-visible .brand-hover { opacity: 1; }

.topnav { display: flex; align-items: center; gap: clamp(8px, 1.8vw, 20px); }
.topnav a {
  position: relative;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(12px, 1.15vw, 15px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  white-space: nowrap;
  padding: 4px 2px 5px;
  transition: color 0.25s var(--ease);
}
.topnav a:hover { color: var(--teal-bright); }
.topnav a.current { color: var(--teal); }
.topnav a.current::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; bottom: 1px;
  height: 1px;
  background: var(--teal-soft);
  border-radius: 2px;
}

/* Botón toggle (solo visible en móvil) */
.bar-toggle {
  display: none;
  position: relative;
  width: 52px; height: 52px;
  background: transparent; border: 0; cursor: pointer; padding: 0; flex-shrink: 0;
}
.bt-line {
  position: absolute; left: 50%;
  width: 22px; height: 2px; background: var(--teal); border-radius: 2px;
  transform: translateX(-50%);
  transition: top 0.45s var(--ease), transform 0.45s var(--ease);
}
.bt-line.l1 { top: 21px; }
.bt-line.l2 { top: 29px; }

/* ---------- CONTENIDO ---------- */
.content {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(96px, 15vh, 130px) clamp(16px, 4vw, 40px) clamp(120px, 18vh, 160px);
}

/* Título de página (Talleres, El Origen, Contacto) */
.page-title {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(34px, 5vw, 58px); color: var(--teal-bright); text-align: center;
  letter-spacing: 0.01em; margin: clamp(20px, 4vh, 44px) 0 6px;
}

/* Párrafos en itálica (sin sombra/relieve) */
.prose {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500;
  font-size: clamp(18px, 2vw, 25px); line-height: 1.55; color: var(--ochre);
  text-align: center; max-width: 820px; margin: clamp(30px, 5vh, 56px) auto; text-shadow: none;
}
/* Párrafos agrupados (intro/cierre de secciones): espaciado más compacto */
.talleres-intro .prose,
.origin-text .prose { margin: clamp(14px, 2.5vh, 26px) auto 0; }
.origin-text .prose:first-child { margin-top: 0; }

/* Imagen fija (parallax) — la imagen se define por modificador */
.fixed-img {
  height: clamp(240px, 46vh, 460px); border-radius: 16px;
  background-size: cover; background-position: center; background-attachment: fixed;
  box-shadow: 0 10px 30px rgba(74,61,41,0.18); margin: clamp(30px, 5vh, 56px) 0;
}
.fixed-img.sh       { background-image: url("https://picsum.photos/seed/shfixed/1920/1080"); }
.fixed-img.a        { background-image: url("./img/origen_top.jpg"); }
.fixed-img.b        { background-image: url("./img/origen_bottom.jpg?v=2"); }
.fixed-img.bosque   { background-image: url("./img/taller_bosque.jpg"); }
.fixed-img.contacto {
  background-image: url("./img/contacto_playa.jpg");
  filter: grayscale(100%) brightness(1.15); /* B/N + un poco más de brillo */
}

/* ---------- GALERÍA (shadhana) ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.6vw, 18px); }
.gallery .item {
  display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 4 / 3;
  background: #000; box-shadow: 0 6px 18px rgba(74,61,41,0.12); cursor: pointer;
}
.gallery .item img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.6; transform: scale(1.15);
  transition: transform 0.5s, opacity 0.5s;
}
.gallery .item:hover img,
.gallery .item:focus-visible img { opacity: 1; transform: scale(1.03); }

/* ---------- VÍDEO (shadhana) ---------- */
.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(74,61,41,0.18); margin: clamp(30px, 5vh, 56px) 0; background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- EL ORIGEN ---------- */
.origin-text { max-width: 820px; margin: 0 auto; }

/* ---------- CONTACTO ---------- */
.contact-wrap { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-lead {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500;
  font-size: clamp(18px, 2vw, 25px); line-height: 1.55; color: var(--ochre);
  margin: clamp(10px, 2vh, 18px) auto 0;
}
.contact-social {
  display: flex; justify-content: center; align-items: center; gap: 28px;
  margin: clamp(24px, 4vh, 38px) 0 0;
}
.contact-social a {
  display: inline-flex; align-items: center; justify-content: center; color: var(--teal);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact-social a:hover, .contact-social a:focus-visible { color: var(--teal-bright); transform: translateY(-3px); }
.contact-social svg { width: 34px; height: 34px; display: block; fill: currentColor; }
.contact-rule { width: 90px; height: 1px; border: 0; background: var(--teal); opacity: 0.8; margin: clamp(20px, 3.5vh, 30px) auto; }
.contact-email {
  display: inline-block;
  font-family: "Cormorant Garamond", serif; font-weight: 500;
  font-size: clamp(19px, 2.3vw, 28px); letter-spacing: 0.01em;
  color: var(--teal); text-decoration: none;
  transition: color 0.25s var(--ease);
}
.contact-email:hover, .contact-email:focus-visible { color: var(--teal-bright); }

/* ---------- TALLERES: grid de cards ---------- */
.talleres-intro { max-width: 840px; margin: 0 auto; }
.cards {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 28px); margin: clamp(40px, 7vh, 74px) 0 0; padding: 0;
}
.cards_item { display: flex; animation: cardIn 0.7s var(--ease) both; }
.cards_item:nth-child(1) { animation-delay: 0.04s; }
.cards_item:nth-child(2) { animation-delay: 0.10s; }
.cards_item:nth-child(3) { animation-delay: 0.16s; }
.cards_item:nth-child(4) { animation-delay: 0.22s; }
.cards_item:nth-child(5) { animation-delay: 0.28s; }
.cards_item:nth-child(6) { animation-delay: 0.34s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card {
  display: flex; flex-direction: column; width: 100%;
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(155deg, #19b0a8 0%, #139089 55%, #0f6c71 100%);
  box-shadow: 0 10px 30px rgba(74, 61, 41, 0.16);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card:hover, .card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 108, 113, 0.30);
}
.card_image { overflow: hidden; aspect-ratio: 4 / 3; background: #000; }
.card_image img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.6; transform: scale(1.15);
  transition: transform 0.5s, opacity 0.5s;
}
.card:hover .card_image img,
.card:focus-within .card_image img { opacity: 1; transform: scale(1.03); }
.card_content {
  display: flex; flex-direction: column; flex: 1;
  padding: clamp(18px, 2vw, 26px); color: #ffffff;
}
.card_title {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(21px, 1.7vw, 27px); color: #ffffff; margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.card_title::after {
  content: ""; display: block; height: 1px;
  background: rgba(255, 255, 255, 0.7);
  margin: 12px calc(-1 * clamp(18px, 2vw, 26px)) 2px;
}
.card_text {
  font-family: "Cormorant Garamond", serif; font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.5; color: rgba(255, 255, 255, 0.92); margin-bottom: 18px;
}
.card_btn {
  margin-top: auto; align-self: flex-start;
  color: #ffffff; padding: 0.62rem 1.15rem;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1.2px solid rgba(255, 255, 255, 0.55); background: transparent;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease);
}
.card_btn:hover, .card_btn:focus-visible { background: #ffffff; color: #0f6c71; transform: translateY(-1px); }

/* ---------- PÁGINA DE TALLER (demo) ---------- */
.taller-wrap { max-width: 840px; margin: 0 auto; }
.taller-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: clamp(18px, 3vh, 30px);
}
.taller-title {
  flex: 1; text-align: center;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(23.8px, 3.5vw, 40.6px);
  color: var(--teal-bright); letter-spacing: 0.01em;
}
.nav-btn {
  flex-shrink: 0;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(11px, 1.15vw, 13px); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); background: transparent; border: 1px solid var(--teal);
  border-radius: 999px; padding: 6px 13px; text-decoration: none; white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-btn:hover, .nav-btn:focus-visible { background: var(--teal); color: #fff; transform: translateY(-1px); }
.nav-btn.is-disabled { opacity: 0.32; pointer-events: none; }
.taller-prose {
  font-family: "Cormorant Garamond", serif; font-size: clamp(17px, 1.75vw, 21px);
  line-height: 1.65; color: var(--ink); margin: 0 0 16px;
}
.taller-subtitle {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px); color: var(--teal-bright);
  margin: clamp(30px, 5vh, 46px) 0 10px;
}
.cta-wrap { text-align: center; margin-top: clamp(30px, 5vh, 48px); }
.cta-contact {
  display: inline-block;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(13px, 1.4vw, 16px); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal); border: 1.2px solid var(--teal); border-radius: 999px;
  padding: 12px 28px; text-decoration: none;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease);
}
.cta-contact:hover, .cta-contact:focus-visible { background: var(--teal); color: #fff; transform: translateY(-2px); }

/* ---------- FOOTER (contenido) ---------- */
.legal { display: flex; align-items: center; gap: 16px; }
.legal-btn {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(10px, 1vw, 12px); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ochre); background: transparent; border: 0; padding: 4px 2px; cursor: pointer;
  transition: color 0.22s var(--ease); white-space: nowrap; text-decoration: none;
}
.legal-btn:hover { color: var(--teal); }
.social { display: flex; align-items: center; gap: 14px; }
.social a {
  display: inline-flex; align-items: center; justify-content: center; color: var(--teal);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.social a:hover { color: var(--teal-bright); transform: translateY(-2px); }
.social svg { width: 22px; height: 22px; display: block; fill: currentColor; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

@media (max-width: 720px) {
  .bar-toggle { display: flex; align-items: center; justify-content: center; }

  /* HEADER: esfera que despliega en columna */
  .topbar {
    width: 52px; height: 52px; padding: 0; gap: 0; overflow: hidden; max-width: none;
    justify-content: center; align-items: center;
    transition: width 0.5s var(--ease), height 0.5s var(--ease),
                border-radius 0.5s var(--ease), padding 0.4s var(--ease);
  }
  .topbar .brand, .topbar .topnav { display: none; }
  .topbar.is-open {
    width: min(80vw, 300px); height: auto; border-radius: 24px;
    flex-direction: column; gap: 14px; padding: 18px 18px; justify-content: flex-start;
  }
  /* Al abrir, se oculta la X: el menú cierra con clic en enlace o fuera */
  .topbar.is-open .bar-toggle { display: none; }
  .topbar.is-open .brand { display: inline-flex; }
  .topbar.is-open .topnav { display: flex; flex-direction: column; gap: 14px; align-items: center; }
  .topbar.is-open .topnav a { font-size: 15px; letter-spacing: 0.16em; }

  /* FOOTER: esfera central; la píldora se despliega en FILA hacia AMBOS lados (scaleX) */
  #bottombar { pointer-events: none; }
  #bottombar .bar-toggle {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
    pointer-events: auto;
    width: 52px; height: 52px; border-radius: 50%;
    background: #ffffff; border: 1.2px solid var(--teal);
    box-shadow: 0 8px 24px rgba(74, 61, 41, 0.14);
  }
  #bottombar .bar-panel {
    width: min(92vw, 440px); padding: 8px 44px; gap: 12px;
    transform: scaleX(0); transform-origin: center;
    transition: transform 0.42s cubic-bezier(.7, 0, .2, 1);
    pointer-events: none;
  }
  #bottombar .bar-panel .legal,
  #bottombar .bar-panel .social { opacity: 0; transition: opacity 0.2s ease; }
  #bottombar.is-open .bar-panel { transform: scaleX(1); pointer-events: auto; padding: 8px 18px; }
  #bottombar.is-open .bar-panel .legal,
  #bottombar.is-open .bar-panel .social { opacity: 1; transition: opacity 0.35s ease 0.34s; }
  #bottombar.is-open .bar-panel .social { margin-left: auto; }
  #bottombar.is-open .bar-toggle { opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }

  /* toggle → X al abrir */
  .is-open .bar-toggle .bt-line.l1 { top: 25px; transform: translateX(-50%) rotate(45deg); }
  .is-open .bar-toggle .bt-line.l2 { top: 25px; transform: translateX(-50%) rotate(-45deg); }

  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .fixed-img { background-attachment: scroll; } /* iOS no soporta bien fixed */
}
/* Móvil en HORIZONTAL (cabe el ancho): header desplegado como en PC y fijo
   arriba; footer deja de flotar y queda al final del contenido. */
@media (orientation: landscape) and (max-height: 500px) {
  /* HEADER: barra completa en fila (estilo PC), fija arriba, sin esfera */
  .topbar {
    width: auto; height: auto; max-width: calc(100vw - 24px);
    padding: 8px 18px 8px 10px; gap: clamp(10px, 2vw, 22px);
    border-radius: 999px; overflow: visible;
    flex-direction: row; justify-content: flex-start; align-items: center;
  }
  .topbar .bar-toggle { display: none; }
  .topbar .brand { display: inline-flex; }
  .topbar .topnav { display: flex; flex-direction: row; gap: clamp(8px, 1.8vw, 20px); }
  .topbar .topnav a { font-size: clamp(12px, 1.15vw, 15px); letter-spacing: 0.14em; }

  /* FOOTER: deja de flotar y fluye al final del contenido */
  .bottombar {
    position: static; transform: none;
    display: flex; justify-content: center;
    padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 14px);
    pointer-events: auto;
  }
  #bottombar .bar-toggle { display: none; }
  #bottombar .bar-panel {
    transform: none; pointer-events: auto;
    width: min(560px, calc(100vw - 24px)); padding: 7px 16px;
  }
  #bottombar .bar-panel .legal,
  #bottombar .bar-panel .social { opacity: 1; }
  .content { padding-bottom: clamp(16px, 4vh, 28px); }
}
