/* ==========================================================================
   SECCIÓN: NUESTRO TRABAJO (GALERÍA 2 · 21st.dev Expandable Gallery)
   + PILARES EDITORIALES (P7 + ManuCuts) + BOTÓN LIQUID GLASS + CARTA DESPLEGABLE
   P7 Barber Master Studio · Mobile-First (320px -> 480px -> 768px -> 1024px -> 1280px)
   ========================================================================== */

:root {
  --p7-emerald-950: #050403;
  --p7-emerald-900: #0B0702;
  --p7-emerald-800: #0A0909;
  --p7-cream-100: #141313;
  --p7-cream-200: #F6F5F5;
  --p7-cream-muted: #9D9B95;
  --p7-cream-soft: rgba(157, 155, 149, 0.6);
  --p7-gold-300: #C3B9A0;
  --p7-gold-500: #AC986C;
  --p7-gold-hairline: rgba(172, 152, 108, 0.22);
}

/* --------------------------------------------------------------------------
   0. Header contextual del laboratorio (nunca se mezcla al hacer scroll)
   -------------------------------------------------------------------------- */
.lab-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: rgba(11, 7, 2, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(172, 152, 108, 0.18);
}

/* --------------------------------------------------------------------------
   1. Contenedor de sección
   -------------------------------------------------------------------------- */
.trabajo-v2 {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background-color: var(--p7-emerald-900);
  color: var(--p7-cream-200);
  padding-block: clamp(44px, 5.5vw, 76px) clamp(64px, 8vw, 112px);
  overflow-x: clip;
}

.trabajo-v2-shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------------------------
   2. Intro Editorial
   -------------------------------------------------------------------------- */
.trabajo-v2-intro {
  width: 100%;
  max-width: 660px;
  padding-inline: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.trabajo-v2-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-wrap: balance;
}

.trabajo-v2-lead {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.975rem, 1.3vw, 1.08rem);
  line-height: 1.65;
  color: var(--p7-bone);
  max-width: 54ch;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   3. Galería 2: Expandable Gallery (adaptada de 21st.dev gallery-animation.tsx)
      - Móvil (< 768px): Acordeón vertical táctil (sin tiras estrechas ni cortes)
      - Desktop (>= 768px): Paneles verticales en fila (flex 1 -> 2.4 / 0.6)
   -------------------------------------------------------------------------- */
.exp-gallery-stage {
  position: relative;
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.exp-side-label {
  display: none;
  flex-shrink: 0;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 213, 146, 0.82);
  writing-mode: vertical-rl;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.exp-side-label--right {
  display: block;
}

@media (max-width: 767px) {
  .exp-side-label--right {
    display: none;
  }
}

@media (min-width: 1024px) {
  .exp-gallery-stage {
    gap: 18px;
  }

  .exp-side-label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: rgba(241, 213, 146, 0.82);
    transition:
      color 300ms ease,
      opacity 1000ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 1100ms cubic-bezier(0.22, 1, 0.36, 1),
      clip-path 1150ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .exp-side-label--left {
    transform: rotate(180deg);
  }

  /* Animación fade-in + revelado de arriba hacia abajo al llegar a la sección */
  @media (prefers-reduced-motion: no-preference) {
    .exp-gallery-stage:not(.is-revealed) .exp-side-label--right {
      opacity: 0;
      transform: translateY(-16px);
      clip-path: inset(0 0 100% 0);
    }

    .exp-gallery-stage:not(.is-revealed) .exp-side-label--left {
      opacity: 0;
      transform: rotate(180deg) translateY(16px);
      clip-path: inset(100% 0 0 0);
    }

    .exp-gallery-stage.is-revealed .exp-side-label--right {
      opacity: 1;
      transform: translateY(0);
      clip-path: inset(0 0 0 0);
    }

    .exp-gallery-stage.is-revealed .exp-side-label--left {
      opacity: 1;
      transform: rotate(180deg) translateY(0);
      clip-path: inset(0 0 0 0);
    }
  }

  .exp-gallery-stage:hover .exp-side-label {
    color: rgba(241, 213, 146, 0.84);
  }
}

.exp-gallery {
  position: relative;
  z-index: 1;
  isolation: isolate;
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  max-width: 1120px;
  display: flex;
  flex-direction: row;
  gap: 6px;
  height: clamp(340px, 52vh, 430px);
}

.exp-panel {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(248, 241, 228, 0.08);
  border-radius: 10px;
  background-color: var(--p7-emerald-950);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition:
    flex 520ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 280ms ease;
}

.exp-panel:focus-visible {
  outline: 2px solid var(--p7-gold-300);
  outline-offset: 3px;
}

/* En móvil: todas iguales por defecto; al tocar una, se despliega y las demás se afilan */
.exp-gallery.has-active .exp-panel {
  flex: 0.42 1 0%;
}

.exp-gallery.has-active .exp-panel.is-active {
  flex: 4.5 1 0%;
  border-color: rgba(241, 213, 146, 0.32);
}

.exp-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.exp-img,
.exp-video {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center 20%;
  pointer-events: none;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.exp-panel.is-active .exp-img,
.exp-panel.is-active .exp-video {
  transform: scale(1.02);
}

/* Velo oscuro sutil (fiel a gallery-animation.tsx: opacity 0.3 -> 0 al enfocar) */
.exp-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 9, 0.42);
  opacity: 1;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.exp-panel.is-active .exp-scrim {
  opacity: 0;
}

/* Pie sutil en la parte inferior de cada lámina (solo visible en la lámina abierta) */
.exp-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(
    to top,
    rgba(10, 9, 9, 0.84) 0%,
    rgba(10, 9, 9, 0.4) 58%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 280ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.exp-panel.is-active .exp-overlay {
  opacity: 1;
  transform: translateY(0);
}

.exp-title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.exp-sub {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--p7-bone);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    opacity 260ms ease,
    max-height 320ms ease;
}

.exp-panel.is-active .exp-sub {
  max-height: 44px;
  opacity: 1;
}

/* Indicador discreto de ampliar (visible solo en el panel abierto) */
.exp-expand-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background: rgba(10, 9, 9, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(248, 241, 228, 0.18);
  color: #FDFDFC;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}

.exp-panel.is-active .exp-expand-hint {
  opacity: 1;
  transform: scale(1);
}

.exp-mobile-tip {
  margin: 12px 0 0;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--p7-bone-soft);
  text-align: center;
}

.exp-more-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(22px, 3vw, 30px);
  margin-bottom: clamp(32px, 4.5vw, 48px);
}

.liquid-glass-btn--sm {
  min-height: 46px;
  padding: 0 26px;
  font-size: 0.875rem;
}

/* ESCRITORIO Y TABLET (>= 768px): Expandable Gallery Horizontal de 21st.dev */
@media (min-width: 768px) {
  .exp-gallery {
    flex-direction: row;
    gap: 10px;
    height: clamp(380px, 42vw, 470px);
    margin-bottom: 0;
  }

  .exp-panel,
  .exp-panel.is-active,
  .exp-gallery.has-active .exp-panel,
  .exp-gallery.has-active .exp-panel.is-active {
    width: auto;
    height: 100%;
    flex: 1 1 0%;
    min-width: 0;
    border-radius: 12px;
    border-color: rgba(248, 241, 228, 0.08);
  }

  /* En reposo: velo sutil uniforme (0.26) y sin texto tapando las fotos */
  .exp-scrim,
  .exp-panel.is-active .exp-scrim {
    background: rgba(10, 9, 9, 0.28);
    opacity: 1;
  }

  .exp-overlay,
  .exp-panel.is-active .exp-overlay {
    opacity: 0;
    transform: translateY(8px);
    padding: 36px 22px 20px;
    transition:
      opacity 280ms ease,
      transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .exp-sub,
  .exp-panel.is-active .exp-sub {
    max-height: none;
    opacity: 1;
  }

  .exp-expand-hint,
  .exp-panel.is-active .exp-expand-hint {
    opacity: 0;
    transform: scale(0.9);
  }

  /* Al pasar el cursor por la galería: el panel enfocado se expande (flex 2.35) y los demás ceden (flex 0.6) */
  .exp-gallery.has-hover .exp-panel {
    flex: 0.6 1 0%;
  }

  .exp-gallery.has-hover .exp-panel .exp-scrim {
    background: rgba(10, 9, 9, 0.42);
    opacity: 1;
  }

  .exp-gallery.has-hover .exp-panel.is-hovered {
    flex: 2.35 1 0%;
    border-color: rgba(241, 213, 146, 0.32);
  }

  .exp-gallery.has-hover .exp-panel.is-hovered .exp-scrim {
    opacity: 0;
  }

  .exp-gallery.has-hover .exp-panel.is-hovered .exp-img {
    transform: scale(1.03);
  }

  .exp-gallery.has-hover .exp-panel.is-hovered .exp-overlay {
    opacity: 1;
    transform: translateY(0);
  }

  .exp-gallery.has-hover .exp-panel.is-hovered .exp-expand-hint {
    opacity: 1;
    transform: scale(1);
  }

  .exp-mobile-tip {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   3.5 Showcase Editorial Full-Bleed: Cómo se trabaja en P7 (Crema #EAE4D7)
   Compacto en móvil (selector 01·02·03 + tarjeta estable sin saltos)
   y editorial en desktop (ancla + 3 tarjetas marfil cálido #F3EFE6)
   -------------------------------------------------------------------------- */
.trabajo-showcase {
  position: relative;
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  margin-block: clamp(36px, 5vw, 64px);
  padding-block: clamp(36px, 5vw, 68px);
  padding-inline: clamp(16px, 4vw, 44px);
  background-color: #EAE4D7;
  border-top: 1px solid rgba(10, 9, 9, 0.08);
  border-bottom: 1px solid rgba(10, 9, 9, 0.08);
  color: #0A0909;
  box-sizing: border-box;
}

.trabajo-showcase-inner {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}

.showcase-anchor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.showcase-header {
  margin: 0;
  min-width: 0;
}

.showcase-kicker {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C4B2B;
  margin-bottom: 6px;
}

.showcase-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.06;
  color: #0A0909;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.showcase-subtitle {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #46443F;
  max-width: 38ch;
  text-wrap: pretty;
}

/* Escudo 3D libre a la derecha (sin fondo negro ni círculo contenedor) */
.showcase-emblem-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}



.coin-3d-pedestal {
  perspective: 900px;
  -webkit-perspective: 900px;
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(10, 9, 9, 0.16));
}

.coin-3d-mesh {
  position: relative;
  width: 72px;
  height: 72px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: coinSpin360Smooth 14s linear infinite;
  will-change: transform;
  pointer-events: none;
  user-select: none;
}



@keyframes coinSpin360Smooth {
  0% {
    transform: rotateX(10deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(10deg) rotateY(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coin-3d-mesh {
    animation: none;
    transform: rotateX(10deg) rotateY(-15deg);
  }
}

.coin-edge {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: radial-gradient(circle, #0B0702 60%, #AC986C 85%, #C3B9A0 95%, #786540 100%);
  border: 1px solid rgba(195, 185, 160, 0.45);
  transform: translateZ(0);
}

.coin-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.coin-front {
  transform: translateZ(1px);
}

.coin-back {
  transform: rotateY(180deg) translateZ(1px);
}

.coin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.showcase-seal-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seal-brand {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0A0909;
}

.seal-loc {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: #6B675E;
}

/* Adaptación editorial para Ordenador y Tablet apaisada (≥ 900px) */
@media (min-width: 900px) {
  .trabajo-showcase-inner {
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(36px, 4.5vw, 64px);
    align-items: center;
  }

  .showcase-anchor {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .showcase-head-row {
    display: contents;
  }

  .showcase-header {
    order: 1;
    width: 100%;
  }

  .showcase-subtitle {
    order: 2;
    margin: 0;
    max-width: 44ch;
  }

  .showcase-emblem-wrap {
    order: 3;
    width: 124px;
    height: 124px;
    margin-top: 10px;
    align-self: flex-start;
  }

  .coin-3d-pedestal {
    width: 120px;
    height: 120px;
  }

  .coin-3d-mesh {
    width: 118px;
    height: 118px;
  }
}

/* Columna Derecha: Tarjetas editoriales en marfil cálido #F3EFE6 */
.showcase-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.showcase-tabs {
  display: none;
}

.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 20px 22px;
  border-radius: 12px;
  background-color: #F3EFE6;
  border: 1px solid rgba(10, 9, 9, 0.85);
  box-shadow:
    0 1px 2px rgba(10, 9, 9, 0.06),
    0 8px 20px -12px rgba(10, 9, 9, 0.14);
  transition:
    transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color 200ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .showcase-item:hover {
    transform: translateY(-2px);
    border-color: #0A0909;
    box-shadow:
      0 2px 4px rgba(10, 9, 9, 0.08),
      0 14px 26px -12px rgba(10, 9, 9, 0.20);
  }

  .showcase-item:hover .item-num {
    color: #9E0718;
  }
}

.showcase-item .item-num {
  font-family: var(--font-accent);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--p7-brick-red, #C1091E);
  transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.showcase-item .item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.showcase-item .item-tag {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C4B2B;
}

.showcase-item .item-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.7vw, 1.48rem);
  font-weight: 700;
  line-height: 1.15;
  color: #0A0909;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.showcase-item .item-text {
  margin: 4px 0 0 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #3D3C38;
  max-width: 56ch;
  text-wrap: pretty;
}

/* Móvil (< 768px): Pestañas editoriales limpias sin cajas + tarjeta única de altura estable (0 saltos) */
@media (max-width: 767px) {
  .trabajo-showcase {
    padding-block: 30px;
    padding-inline: 16px;
  }

  .showcase-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(10, 9, 9, 0.12);
  }

  .showcase-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 4px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(10, 9, 9, 0.68);
    font-family: var(--font-sans);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
      color 200ms cubic-bezier(0.23, 1, 0.32, 1),
      transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  .showcase-tab:active {
    transform: scale(0.97);
  }

  .showcase-tab.is-active {
    color: #0A0909;
  }

  .showcase-tab-top {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1;
  }

  .showcase-tab-num {
    font-family: var(--font-accent);
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: rgba(165, 8, 26, 0.88);
    transition: color 200ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  .showcase-tab.is-active .showcase-tab-num {
    color: var(--p7-brick-red, #C1091E);
  }

  .showcase-tab-label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
  }

  .showcase-tab.is-active .showcase-tab-label {
    font-weight: 600;
  }

  .showcase-tab-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    overflow: hidden;
  }

  .showcase-tab-track span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    border-radius: 999px;
    background: var(--p7-brick-red, #C1091E);
  }

  .showcase-tab.is-done .showcase-tab-track span {
    width: 100%;
    background: rgba(172, 152, 108, 0.55);
  }

  .showcase-tab.is-active.is-static .showcase-tab-track span {
    width: 100%;
  }

  .showcase-tab.is-active:not(.is-static) .showcase-tab-track span {
    animation: showcaseBarFill 4.8s linear forwards;
  }

  /* Grid 1x1 superpuesto: los 3 paneles comparten altura -> CERO saltos verticales */
  .showcase-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    touch-action: pan-y;
    user-select: none;
  }

  .showcase-item {
    grid-area: 1 / 1;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    filter: blur(2px);
    transition:
      opacity 260ms cubic-bezier(0.23, 1, 0.32, 1),
      transform 260ms cubic-bezier(0.23, 1, 0.32, 1),
      filter 220ms cubic-bezier(0.23, 1, 0.32, 1),
      visibility 0ms linear 260ms;
  }

  .showcase-item.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    filter: blur(0);
    transition:
      opacity 260ms cubic-bezier(0.23, 1, 0.32, 1),
      transform 260ms cubic-bezier(0.23, 1, 0.32, 1),
      filter 220ms cubic-bezier(0.23, 1, 0.32, 1),
      visibility 0ms linear 0ms;
  }
}

@media (max-width: 640px) {
  .trabajo-showcase {
    padding-inline: 16px;
  }

  .showcase-item {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 16px;
  }
}

@keyframes showcaseBarFill {
  from { width: 0%; }
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-item {
    transform: none !important;
    filter: none !important;
    transition: opacity 180ms ease !important;
  }
  .showcase-tab.is-active .showcase-tab-track span {
    animation: none !important;
    width: 100%;
  }
}

/* Bloque de reseñas Booksy bajo "Cómo se trabaja en P7" + animación al scroll */
.showcase-booksy-block {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-booksy-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0A0909;
}

.contacto-booksy-strip {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2.5vw, 24px) clamp(20px, 3vw, 32px);
  border-radius: 14px;
  background-color: #F3EFE6;
  border: 1px solid rgba(10, 9, 9, 0.85);
  box-shadow:
    0 1px 2px rgba(10, 9, 9, 0.06),
    0 10px 24px -14px rgba(10, 9, 9, 0.16);
}

@media (min-width: 768px) {
  .contacto-booksy-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
}

.booksy-strip-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .booksy-strip-main {
    flex-direction: row;
    align-items: center;
    gap: 22px;
  }
}

.booksy-score-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.booksy-score-num {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #0A0909;
}

.booksy-stars-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.booksy-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #9A7B38;
}

.booksy-stars svg {
  width: 15px;
  height: 15px;
}

.contacto-booksy-strip.is-anim-ready .booksy-stars svg {
  opacity: 0.15;
  transform: scale(0.65);
  transition:
    opacity 360ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 440ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contacto-booksy-strip.is-anim-ready.is-revealed .booksy-stars svg {
  opacity: 1;
  transform: scale(1);
}

.contacto-booksy-strip.is-anim-ready.is-revealed .booksy-stars svg:nth-child(1) { transition-delay: 0ms; }
.contacto-booksy-strip.is-anim-ready.is-revealed .booksy-stars svg:nth-child(2) { transition-delay: 90ms; }
.contacto-booksy-strip.is-anim-ready.is-revealed .booksy-stars svg:nth-child(3) { transition-delay: 180ms; }
.contacto-booksy-strip.is-anim-ready.is-revealed .booksy-stars svg:nth-child(4) { transition-delay: 270ms; }
.contacto-booksy-strip.is-anim-ready.is-revealed .booksy-stars svg:nth-child(5) { transition-delay: 360ms; }

.booksy-platform {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C4B2B;
}

.booksy-divider {
  display: none;
}

@media (min-width: 640px) {
  .booksy-divider {
    display: block;
    width: 1px;
    height: 36px;
    background-color: rgba(10, 9, 9, 0.12);
    flex-shrink: 0;
  }
}

.booksy-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.booksy-headline {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #0A0909;
  font-variant-numeric: tabular-nums;
}

.booksy-sub {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(10, 9, 9, 0.66);
  text-wrap: pretty;
}

.booksy-strip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 9999px;
  background-color: #0A0909;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background-color 180ms cubic-bezier(0.23, 1, 0.32, 1),
    color 180ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (min-width: 768px) {
  .booksy-strip-link {
    align-self: center;
  }
}

@media (hover: hover) and (pointer: fine) {
  .booksy-strip-link:hover {
    background-color: #242423;
    color: var(--p7-gold-300);
  }
}

.booksy-strip-link:active {
  transform: scale(0.97);
}

.booksy-strip-link:focus-visible {
  outline: 2px solid #786540;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   4. Botón Liquid Glass (base y --dark ya viven en sobre.css; aquí solo extras)
   -------------------------------------------------------------------------- */
#lista-precios.trabajo-v2-cta-wrap,
.trabajo-v2-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: transparent;
  padding: 0;
  color: inherit;
}

.liquid-glass-chevron {
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.liquid-glass-btn[aria-expanded="true"] .liquid-glass-chevron {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   5. Carta de Servicios Desplegable (Cuerpo Completo Full-Bleed · Referencia Pinterest)
   -------------------------------------------------------------------------- */
.precios-drawer {
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition:
    grid-template-rows 520ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 360ms ease,
    margin-top 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.precios-drawer.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: clamp(18px, 2.5vh, 28px);
}

.precios-drawer-inner {
  overflow: hidden;
}

.precios-poster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
  min-height: auto;
  background-color: #C3B9A0;
  background-image: none;
  color: #0A0909;
  border-radius: 0;
  border-top: 1px solid rgba(10, 9, 9, 0.16);
  border-bottom: 1px solid rgba(10, 9, 9, 0.16);
  box-shadow: none;
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.precios-drawer.is-open .precios-poster {
  transform: translateY(0);
}

/* Columna izquierda monumental sangrada al borde (entrecortada por el margen izquierdo) */
.precios-poster-rail {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: clamp(40px, 8vw, 84px);
  padding: 20px 0;
  background-color: transparent;
  overflow: hidden;
  user-select: none;
}

.precios-poster-word {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7.5vw, 3.4rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: 0.04em;
  color: #0A0909;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  transform: rotate(180deg) translateX(26%);
}

@media (min-width: 640px) {
  .precios-poster-rail {
    width: clamp(58px, 6.5vw, 88px);
    padding: 24px 0;
  }

  .precios-poster-word {
    font-size: clamp(3.1rem, 5.2vw, 4.6rem);
    transform: rotate(180deg) translateX(28%);
  }
}

/* Columna derecha: cuerpo editorial proporcionado para verse completo en un pantallazo */
.precios-poster-body {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(26px, 3.6vh, 42px) clamp(20px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3vh, 30px);
  text-align: left;
}

.precios-poster-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(10, 9, 9, 0.22);
}

.precios-poster-brand {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #0A0909;
}

.precios-poster-meta {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #242423;
}

.precios-poster-role {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  font-weight: 600;
  color: #242423;
}

.precios-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.precios-group-title {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(10, 9, 9, 0.22);
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0A0909;
}

.precios-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.precios-list--compact {
  gap: 10px;
}

.precios-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(10, 9, 9, 0.14);
}

.precios-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.precios-item-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.precios-item-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.precios-item-num {
  flex-shrink: 0;
  font-family: var(--font-accent);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #8F0616;
}

.precios-item-name {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: #0A0909;
}

.precios-item-price {
  font-family: var(--font-accent);
  font-size: clamp(1.125rem, 2.2vw, 1.45rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: #0A0909;
  white-space: nowrap;
}

.precios-item-meta {
  font-family: var(--font-accent);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #242423;
  white-space: nowrap;
}

.precios-item-sub {
  margin: 2px 0 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: #242423;
  max-width: 44ch;
}

.precios-poster-foot {
  padding-top: 18px;
  border-top: 1px solid rgba(10, 9, 9, 0.22);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

@media (min-width: 640px) {
  .precios-poster-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.precios-address {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #242423;
}

.precios-foot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.precios-online-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #0A0909;
  background: transparent;
  border: 1px solid #C1091E;
  transition: background-color 220ms ease, color 220ms ease, transform 220ms ease;
}

.precios-online-btn:hover {
  background: #C1091E;
  color: #FDFDFC;
  transform: translateY(-1px);
}

.precios-booksy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #FDFDFC;
  background: #0A0909;
  transition:
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 220ms ease;
}

.precios-booksy-btn:hover {
  transform: translateY(-1px);
  background: #242423;
}

.precios-booksy-btn:active {
  transform: scale(0.97);
}

/* Móvil (<= 640px): carta compacta para encuadrarse completa en un solo pantallazo */
@media (max-width: 640px) {
  .precios-drawer.is-open {
    margin-top: 20px;
  }

  .precios-poster {
    min-height: auto;
  }

  .precios-poster-rail {
    width: 38px;
    padding: 18px 0;
  }

  .precios-poster-body {
    padding: 24px 18px 26px;
    gap: 20px;
  }

  .precios-poster-head {
    padding-bottom: 12px;
  }

  .precios-group {
    gap: 12px;
  }

  .precios-group-title {
    padding-bottom: 8px;
  }

  .precios-list {
    gap: 14px;
  }

  .precios-list--compact {
    gap: 10px;
  }

  .precios-item {
    gap: 3px;
    padding-bottom: 12px;
  }

  .precios-item:last-child {
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   6. Lightbox Modal Flotante Sin Caja (Estilo galería pura sobre carbón oscuro)
   -------------------------------------------------------------------------- */
.trabajo-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f5f3ee;
  box-shadow: none;
  overflow: hidden;
}

.trabajo-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trabajo-dialog::backdrop {
  background: rgba(8, 8, 9, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.trabajo-dialog[open]::backdrop {
  animation: trabajoBackdropIn 220ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.trabajo-dialog[open] .trabajo-dialog-stage {
  animation: trabajoStageIn 260ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes trabajoBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes trabajoStageIn {
  from {
    opacity: 0;
    transform: scale(0.975);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.trabajo-dialog-stage {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
  padding-inline: 16px;
  gap: 16px;
}

@media (min-width: 768px) {
  .trabajo-dialog-stage {
    padding-top: calc(env(safe-area-inset-top, 0px) + 58px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    padding-inline: 72px;
  }
}

.trabajo-dialog-close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: 14px;
  z-index: 20;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid rgba(252, 209, 22, 0.82);
  border-radius: 9999px;
  background: rgba(10, 9, 9, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  color: #FCD116;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease, border-color 180ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .trabajo-dialog-close:hover {
    background: rgba(252, 209, 22, 0.14);
    border-color: #FCD116;
    transform: scale(1.08);
  }
}

.trabajo-dialog-close:active {
  transform: scale(0.92);
}

.trabajo-dialog-close:focus-visible {
  outline: 2px solid #FCD116;
  outline-offset: 3px;
}

.trabajo-dialog-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #C1091E;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 180ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .trabajo-dialog-nav:hover {
    color: #E0112A;
    transform: translateY(-50%) scale(1.12);
  }
}

.trabajo-dialog-nav:active {
  transform: translateY(-50%) scale(0.92);
}

.trabajo-dialog-nav:focus-visible {
  outline: 1.5px solid rgba(193, 9, 30, 0.7);
  outline-offset: 2px;
  border-radius: 6px;
}

.trabajo-dialog-nav--prev {
  left: 8px;
}

.trabajo-dialog-nav--next {
  right: 8px;
}

@media (min-width: 768px) {
  .trabajo-dialog-nav--prev {
    left: 24px;
  }

  .trabajo-dialog-nav--next {
    right: 24px;
  }
}

.trabajo-dialog-media {
  max-width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trabajo-dialog-img,
.trabajo-dialog-video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 960px);
  max-height: min(64dvh, 560px);
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

@media (min-width: 768px) {
  .trabajo-dialog-img,
  .trabajo-dialog-video {
    max-height: min(74dvh, 720px);
  }
}

.trabajo-dialog-foot {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  width: 100%;
  max-width: 90vw;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.trabajo-dialog-counter {
  flex-shrink: 0;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: #C1091E;
}

.trabajo-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #FDFDFC;
  text-wrap: balance;
}

.trabajo-dialog-caption {
  display: none;
}

/* --------------------------------------------------------------------------
   7. Accesibilidad: prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .exp-panel,
  .exp-img,
  .exp-scrim,
  .exp-overlay,
  .exp-sub,
  .exp-expand-hint,
  .liquid-glass-btn,
  .liquid-glass-surface,
  .liquid-glass-chevron,
  .precios-drawer,
  .precios-card,
  .trabajo-dialog-img,
  .trabajo-dialog-close,
  .trabajo-dialog-nav {
    transition: none;
  }

  .trabajo-dialog[open]::backdrop,
  .trabajo-dialog[open] .trabajo-dialog-stage {
    animation: none;
  }

  .contacto-booksy-strip.is-anim-ready .booksy-stars svg {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
