/* ==========================================================================
   Secciones del sitio, en orden de aparición
   ========================================================================== */

/* ---------- 01 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 85% 30%, #f7d2c8 0%, rgba(247, 210, 200, 0) 60%),
    linear-gradient(180deg, var(--blush), var(--paper));
}

.hero-grid {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-5) var(--sp-6);
}

.hero .badges {
  margin-bottom: var(--sp-4);
}

.hero-title {
  font-size: var(--fs-h1);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-title .line {
  display: block;
  padding-block: 0.06em;
  overflow: hidden;
}

.hero-title .line > span {
  display: block;
  animation: rise 1.1s var(--ease) both;
}

.hero-title .line:nth-of-type(2) > span {
  animation-delay: 0.14s;
}

.hero-title .line > .script {
  font-size: 1.3em;
  line-height: 0.9;
  background: linear-gradient(100deg, var(--accent) 0%, var(--gold) 25%, var(--accent) 50%, var(--gold) 75%, var(--accent) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 1.1s 0.14s var(--ease) both, sheen 8s linear infinite;
}

.hero .lead {
  max-width: 34em;
  margin-top: var(--sp-4);
  color: var(--ink);
  opacity: 0.85;
}

.hero-figure {
  position: relative;
  width: min(100%, 460px);
  margin-inline: auto;
}

.hero-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--gold);
  border-radius: var(--leaf);
  opacity: 0.7;
  transform: translate(16px, 16px);
}

.hero-media {
  box-shadow: var(--sh-lift);
}

/* La tarjeta del nombre ocupa la base: la leyenda del espacio reservado va arriba */
.hero-media .media-label {
  justify-content: flex-start;
  align-items: center;
  padding-top: 28%;
  text-align: center;
}

.hero-card {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  max-width: calc(100% - 28px);
  padding: 0.7rem 1rem;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px -14px rgba(42, 26, 23, 0.45);
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
}

.hero-card b {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--deep);
}

/* Sello giratorio */
.hero-seal {
  position: absolute;
  top: -22px;
  left: -6px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: var(--deep);
  box-shadow: var(--sh-lift);
}

.seal-text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--gold-light);
  font: 500 16px var(--sans);
  text-transform: uppercase;
  animation: spin 28s linear infinite;
}

.seal-core {
  width: 30px;
  height: 30px;
  color: var(--accent-light);
}

.hero-chip {
  position: absolute;
  top: 12%;
  right: -8px;
  z-index: 4;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--sh-lift);
  text-align: center;
  animation: float 6s ease-in-out infinite;
}

.hero-chip b {
  display: block;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.hero-chip span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.sparkle {
  position: absolute;
  z-index: 4;
  width: 20px;
  height: 20px;
  color: var(--gold);
  fill: currentColor;
  stroke: none;
  pointer-events: none;
  animation: twinkle 3.4s ease-in-out infinite;
}

.sparkle--a {
  top: 4%;
  left: 48%;
}

.sparkle--b {
  right: -6px;
  bottom: 16%;
  width: 26px;
  height: 26px;
  animation-delay: 1.1s;
}

.sparkle--c {
  top: 46%;
  left: -14px;
  width: 14px;
  height: 14px;
  animation-delay: 2s;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    min-height: calc(100svh - var(--header-h));
    padding-block: var(--sp-6);
  }

  .hero-figure {
    justify-self: end;
  }

  .hero-seal {
    top: -34px;
    left: -44px;
    width: 128px;
    height: 128px;
  }

  .hero-chip {
    right: -34px;
  }
}

/* ---------- Cinta de texto en movimiento ---------- */
.strip {
  overflow: hidden;
  padding: 1rem 0;
  background: var(--deep);
  color: var(--accent-light);
  white-space: nowrap;
}

.strip-track {
  display: inline-flex;
  animation: marquee 40s linear infinite;
}

.strip-group {
  display: inline-flex;
  flex: none;
}

.strip-group span {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
}

.strip-group span::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 2.5rem;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- 02 Áreas ---------- */
.areas {
  padding-block: var(--sp-6) var(--section-y);
}

.areas-grid {
  display: grid;
  gap: 14px;
}

.area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.5s var(--ease);
}

.area-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-mid);
  box-shadow: var(--sh-lift);
}

.area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.area-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--blush);
  color: var(--accent);
}

.area-icon .icon {
  width: 26px;
  height: 26px;
}

.area-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent-mid);
  opacity: 0.7;
}

.area-card h3 {
  margin-top: 0.75rem;
  font-size: 2rem;
}

.area-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.area-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.area-more .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.area-card:hover .area-more .icon {
  transform: translateX(5px);
}

@media (min-width: 860px) {
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .area-card {
    min-height: 320px;
    padding: 2.25rem;
  }
}

/* ---------- 03 Clínica estética ---------- */
.panel {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
  animation: appear 0.5s var(--ease);
}

.panel[hidden] {
  display: none;
}

/* El cuadro toma la proporción real de la foto (no la recorta) y usa esquinas
   más suaves para que no se pierda contenido en los costados. */
.panel-media {
  --ratio: auto;
  width: min(100%, 600px);
  margin-inline: auto;
  border-radius: 90px 16px 90px 16px;
  box-shadow: var(--sh-lift);
}

.panel-media img {
  height: auto;
  object-fit: contain;
}

/* Si la foto todavía no existe, se muestra el espacio reservado */
.panel-media.is-empty {
  --ratio: 1 / 1;
}

@media (min-width: 640px) {
  .panel .check-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (min-width: 860px) {
  .panel {
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2.5rem, 5vw, 4rem);
  }

  .panel-media {
    margin-inline: 0;
  }
}

/* ---------- 04 Protocolos que combinan recursos ---------- */
.protocol-media {
  --ratio: 4 / 5;
  box-shadow: var(--sh-lift);
}

.protocol-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(174, 69, 96, 0.35);
  border-radius: var(--r-lg);
  transform: translate(-14px, 14px);
}

/* ---------- 05 Cómo es la experiencia ---------- */
.steps-wrap {
  position: relative;
}

.steps {
  display: grid;
  gap: var(--sp-5);
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--sp-3) var(--sp-4);
  align-items: start;
}

.step-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px -14px rgba(174, 69, 96, 0.6);
  transition: transform 0.5s var(--ease-spring), background 0.4s;
}

.step.is-on .step-icon {
  transform: scale(1.06);
  background: linear-gradient(145deg, #fff, #fbe6df);
}

.step-n {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--deep);
  box-shadow: 0 0 0 3px var(--blush);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.step-body h3 {
  margin-top: 0.6rem;
  font-size: 1.6rem;
}

.step-body p {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.steps-rail {
  position: absolute;
  left: 31px;
  top: 32px;
  bottom: 60px;
  width: 2px;
  border-radius: 2px;
  background: rgba(201, 133, 143, 0.35);
}

.steps-rail i {
  display: block;
  width: 100%;
  height: var(--riel, 0%);
  border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-mid));
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .step {
    grid-template-columns: 1fr;
    padding-right: var(--sp-4);
  }

  .step-body h3 {
    margin-top: 0.5rem;
  }

  .steps-rail {
    left: 32px;
    right: auto;
    top: 31px;
    bottom: auto;
    width: 75%;
    height: 2px;
  }

  .steps-rail i {
    width: var(--riel, 0%);
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  }
}

/* ---------- 06 Fibroblast ---------- */
.fibro-media {
  --ratio: 4 / 5;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

.fibro-glow {
  position: absolute;
  top: -10%;
  right: 0;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 194, 184, 0.35), transparent);
  pointer-events: none;
}

.fibro-grid {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.fibro-grid + .fibro-grid {
  margin-top: var(--sp-4);
}

.glass h3 {
  margin-bottom: var(--sp-3);
  color: var(--accent-light);
}

.glass > p {
  color: rgba(255, 255, 255, 0.78);
}

.glass .line-list {
  margin-top: var(--sp-3);
}

.timeline {
  position: relative;
  display: grid;
  gap: var(--sp-4);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line-light);
}

.timeline-item {
  position: relative;
  padding-left: 2.25rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 194, 184, 0.2);
}

.timeline-item h4 {
  font-size: 1.5rem;
  color: #fff;
}

.timeline-item p {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}

.caution {
  padding: 1.75rem;
  background: var(--blush);
  color: var(--ink);
  border: 1.5px dashed var(--accent-mid);
  border-radius: var(--r-lg);
}

.caution h3 {
  margin-bottom: var(--sp-3);
  color: var(--deep);
}

.caution > p {
  color: var(--muted);
}

.caution-list {
  margin-top: var(--sp-3);
}

.caution-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.caution-list li:last-child {
  border-bottom: 0;
}

.caution-list .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

.caution .note {
  color: var(--deep);
}

@media (min-width: 860px) {
  .fibro-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
    align-items: start;
  }

  .glass,
  .caution {
    padding: 2.25rem;
  }
}

/* ---------- 07 Academia ---------- */
/* Cuadro más alto y foto anclada arriba para que no se corte la cabeza */
.academy-media {
  --ratio: 4 / 5.6;
  box-shadow: var(--sh-lift);
}

.academy-media img,
.about-media img {
  object-position: center top;
}

.pillars {
  display: grid;
  gap: 14px;
  margin-top: var(--sp-7);
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.pillar:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-lift);
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.5rem;
  border-radius: 16px;
  background: var(--blush);
  color: var(--accent);
}

.pillar-icon .icon {
  width: 26px;
  height: 26px;
}

.pillar h3 {
  font-size: 1.55rem;
}

.pillar p {
  font-size: 0.95rem;
  color: var(--muted);
}

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

@media (min-width: 1000px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.pull {
  max-width: 980px;
  margin: var(--sp-7) auto 0;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  color: var(--deep);
  text-wrap: balance;
}

.pull::before {
  content: "\201C";
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--script);
  font-size: 5rem;
  font-style: normal;
  line-height: 0.6;
  color: var(--accent);
}

/* ---------- 08 Capacitaciones ---------- */
.course {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(86vw, 400px);
  height: 22rem;
  padding: 2rem 1.75rem 1.5rem;
  overflow: hidden;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.course:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lift);
}

.course::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.course-n {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--gold);
}

.course h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.7rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.course-body {
  flex: 1;
  min-height: 0;
  margin-top: 0.75rem;
  overflow: hidden;
}

/* Si el contenido no entra, se difumina el final y aparece "Ver más" */
.course.is-clipped .course-body {
  -webkit-mask-image: linear-gradient(#000 72%, transparent);
  mask-image: linear-gradient(#000 72%, transparent);
}

.course-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  font-weight: 600;
  color: var(--accent-ink);
  cursor: pointer;
}

.course-more[hidden] {
  display: none;
}

.course-more .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.course-more:hover .icon {
  transform: translateX(5px);
}

.courses-foot {
  margin-top: var(--sp-3);
}

/* ---------- 09 Sobre Tamara ---------- */
.about-grid {
  display: grid;
  gap: var(--sp-6);
}

/* Cuadro más alto y foto anclada arriba para que no se corte la cabeza */
.about-media {
  --ratio: 4 / 5.6;
  width: min(100%, 460px);
  margin-inline: auto;
  box-shadow: var(--sh-lift);
}

.datos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: var(--sp-4);
}

.dato {
  padding: 1rem 0.5rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.dato b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4.6vw, 1.9rem);
  line-height: 1;
  color: var(--accent);
}

.dato span {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
}

.about-copy h2 {
  margin-bottom: var(--sp-4);
}

.about-copy .pull {
  max-width: none;
  margin: var(--sp-5) 0;
  padding-left: 1.5rem;
  text-align: left;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  border-left: 2px solid var(--accent);
}

.about-copy .pull::before {
  content: none;
}

.about-copy .chips {
  margin-top: var(--sp-4);
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
  }

  .about-side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }

  .about-media {
    margin-inline: 0;
  }
}

/* ---------- 10 Contacto ---------- */
.contact-grid {
  display: grid;
  gap: var(--sp-6);
}

.contact-copy h2 {
  margin-bottom: var(--sp-3);
}

.contact-links {
  display: grid;
  gap: 10px;
  margin-top: var(--sp-5);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--glass);
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  text-decoration: none;
  transition: background 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-light);
  transform: translateX(6px);
}

.contact-link .icon {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 14px;
  background: rgba(242, 194, 184, 0.16);
  color: var(--accent-light);
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.contact-value {
  display: block;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.contact-copy .chips {
  margin-top: var(--sp-4);
}

.contact-copy .chip {
  background: transparent;
  border-color: var(--line-light);
  color: #fff;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
  }
}

/* ---------- Resultados (galería de antes y después) ----------
   Grilla ordenada: todas las fotos tienen el mismo tamaño de cuadro y se ven
   enteras (sin recortes).
   Para cambiar la proporción, editar --ratio (por ejemplo 1 / 1 o 3 / 4). */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery-item {
  --ratio: 4 / 5;
  border-radius: var(--r);
  box-shadow: var(--sh-card);
}

/* La foto entra completa en el cuadro, sea vertical, cuadrada u horizontal.
   El espacio que sobra queda en beige liso. */
.gallery-item.is-loaded {
  background: var(--blush);
}

.gallery-item img {
  position: absolute;
  inset: 0;
  object-fit: contain;
}

/* Sin zoom al pasar el cursor, para que no se corten los bordes */
.gallery-item.media.is-loaded:hover img {
  scale: 1;
}

/* Sin el marco blanco interior en las fotos cargadas: se ve la foto completa */
.gallery-item.is-loaded::after {
  display: none;
}

.gallery-item .media-label {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gallery-item.is-loaded::before {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff var(--icon-zoom) center / 20px no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s, transform 0.4s var(--ease-spring);
  pointer-events: none;
}

.gallery-item.is-loaded:hover::before {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .gallery-item.is-loaded::before {
    opacity: 0.9;
    transform: none;
  }
}

/* En cuanto hay fotos cargadas, los lugares vacíos se ocultan para no mostrar huecos */
.gallery.has-photos .gallery-item.is-empty {
  display: none;
}

/* Elementos filtrados */
.gallery-item[hidden] {
  display: none;
}

.gallery-foot {
  margin-top: var(--sp-5);
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}