/* ==========================================================================
   AYNI Experiencias - Hero Gallery 30 Module
   Inspirado na composicao scattered draggable collage do Shadcnblocks Gallery 30
   Sem contorno, sem legendas, sem indicacao de arraste, sem zoom de hover (anti-slop)
   Foto principal: Mulheres reunidas durante a expedicao (encounter)
   ========================================================================== */

/* Hero Container */
@media (max-width: 760px) {
  .expedition-page .site-footer--compact .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }

  .expedition-page .site-footer--compact .footer-brand {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 12px;
  }

  .expedition-page .site-footer--compact .footer-brand-logo {
    width: 110px;
    height: auto;
  }

  .expedition-page .site-footer--compact .footer-brand p {
    max-width: 28ch;
  }

  .expedition-page .site-footer--compact .footer-contact-heading {
    margin-top: 0;
    margin-bottom: 12px;
  }
}

.expedition-hero--gallery30 {
  position: relative;
  overflow: hidden;
  background-color: var(--paper, #F8F4ED);
  min-height: min(720px, calc(100vh - 78px));
  padding-block: clamp(32px, 4vw, 56px);
}

/* Background Subtle Vector Curves (Inspired by Gallery 30 negative-space arcs) */
.gallery30-backdrop-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  color: var(--gold, #D4A359);
}

.gallery30-backdrop-svg circle,
.gallery30-backdrop-svg path {
  vector-effect: non-scaling-stroke;
}

.gallery30-backdrop-mobile {
  display: none;
}

@media (max-width: 760px) {
  .expedition-hero--gallery30 > .gallery30-backdrop-svg {
    display: none;
  }

  .gallery30-stage .gallery30-backdrop-mobile {
    display: block;
    inset: 0 -25%;
    width: 150%;
    height: 100%;
  }
}

/* Hero Grid Alignment */
.expedition-hero--gallery30 .hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 4.8fr) minmax(0, 7.2fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

/* Copy Styling */
.expedition-hero--gallery30 .hero-copy {
  position: relative;
  z-index: 2;
}

/* Title Doodle da Hero */
.lead-magnet-title-doodle {
  display: block;
  width: min(10rem, 44vw);
  height: auto;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  color: var(--terracotta, #9E4A2B);
}

/* Gallery 30 Stage */
.gallery30-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.08;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

/* Gallery 30 Photo Items - Absolutely Positioned & Draggable */
.gallery30-item {
  position: absolute;
  overflow: hidden;
  border: none;
  outline: none;
  border-radius: 8px;
  background-color: var(--paper-warm, #F0DFC2);
  box-shadow:
    0 10px 24px -4px rgba(28, 25, 23, 0.14),
    0 4px 10px -2px rgba(28, 25, 23, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  aspect-ratio: 4 / 5;
  height: auto;
  /* Sem transicao de transform durante arrasto manual */
  transition: box-shadow 0.25s ease;
}

.gallery30-item.is-dragging {
  cursor: grabbing !important;
  box-shadow:
    0 24px 48px -6px rgba(28, 25, 23, 0.26),
    0 8px 18px -2px rgba(28, 25, 23, 0.14);
}

/* SEM ZOOM / SEM ESCALA NO HOVER (Anti IA-slop) */
.gallery30-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform: none !important; /* Estritamente sem zoom */
  transition: none !important;
}

.gallery30-item:hover img {
  transform: none !important;
}

/* ==========================================================================
   Composicao inicial baseada na disposicao montada pelo usuario.
   Coordenadas proporcionais preservam as nove fotos dentro da galeria.
   ========================================================================== */

/* Foto principal: grupo sob o portal, em primeiro plano. */
.gallery30-item--main {
  top: 27%;
  left: 0%;
  width: 44%;
  z-index: 10;
  border-radius: 10px;
  box-shadow:
    0 18px 40px -6px rgba(28, 25, 23, 0.22),
    0 8px 16px -2px rgba(28, 25, 23, 0.12);
}

/* 2. Topo Esquerda: A turma reunida na entrada do Parque Nacional */
.gallery30-item--1 {
  top: 2%;
  left: 16%;
  width: 21.5%;
  z-index: 2;
}

/* 3. Topo Centro: Mulheres no poço de águas cristalinas (Selfie) */
.gallery30-item--2 {
  top: 3.5%;
  left: 46%;
  width: 23.5%;
  z-index: 3;
}

/* 4. Topo Meio-Direita: Trilha de pedras do Cerrado */
.gallery30-item--7 {
  top: 20.5%;
  left: 63%;
  width: 22%;
  z-index: 4;
}

/* 5. Meio Extremo Direita: Queda d'água e imersão */
.gallery30-item--3 {
  top: 37%;
  left: 79%;
  width: 21%;
  z-index: 4;
}

/* 6. Meio Centro: Pôr do sol dourado no horizonte */
.gallery30-item--8 {
  top: 37%;
  left: 46%;
  width: 16.5%;
  z-index: 2;
}

/* 7. Meio Direita (Em Destaque): Banho no poço natural com deck (Loquinhas) */
.gallery30-item--6 {
  top: 54%;
  left: 62%;
  width: 22%;
  z-index: 8;
}

/* 8. Base Extremo Direita: Viajantes observando o entardecer */
.gallery30-item--5 {
  top: 67%;
  left: 76%;
  width: 23%;
  z-index: 6;
}

/* 9. Base Centro: Mirante da Janela contemplando os Saltos */
.gallery30-item--9 {
  top: 63%;
  left: 46%;
  width: 19%;
  z-index: 5;
}

/* Selo Postal Oficial AYNI (Sobreposto entre o portal e a selfie) */
.gallery30-seal {
  position: absolute;
  top: 27%;
  left: 40%;
  width: clamp(62px, 13%, 90px);
  height: auto;
  aspect-ratio: 1;
  z-index: 50;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  will-change: transform;
}

.gallery30-seal * {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.gallery30-seal.is-dragging {
  cursor: grabbing !important;
  transition: none !important;
  z-index: 60;
}

/* ==========================================================================
   Fact Rail Refinement (Desktop 5 colunas / Mobile 2x2 + 1)
   Cores nativas da página preservadas (terracotta / paper)
   ========================================================================== */

.gallery30-facts-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 auto;
}

.gallery30-facts-grid .fact-item {
  min-width: 0;
  padding: clamp(26px, 2.8vw, 34px) 20px;
  border-left: 1px solid rgba(248, 244, 237, 0.24);
}

.gallery30-facts-grid .fact-item:first-child {
  border-left: none;
}

.gallery30-facts-grid .fact-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 14px;
  color: var(--paper-warm);
}

.gallery30-facts-grid .fact-item dt {
  color: var(--paper-warm);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery30-facts-grid .fact-item dd {
  margin: 7px 0 0;
  color: var(--paper);
  font-size: clamp(0.88rem, 1.05vw, 0.98rem);
  line-height: 1.45;
}

/* ==========================================================================
   Adaptacoes Responsivas (Tablet e Mobile)
   ========================================================================== */

@media (max-width: 1024px) {
  .expedition-hero--gallery30 .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .gallery30-stage {
    width: min(100%, 640px);
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  .gallery30-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0;
  }

  .gallery30-facts-grid .fact-item,
  .gallery30-facts-grid .fact-item:nth-child(n) {
    min-width: 0;
    padding: 1.15rem 1rem;
    border: none;
    border-top: 1px solid rgba(248, 244, 237, 0.22);
  }

  .gallery30-facts-grid .fact-item:nth-child(1),
  .gallery30-facts-grid .fact-item:nth-child(2) {
    border-top: none;
  }

  .gallery30-facts-grid .fact-item:nth-child(odd):not(:nth-child(5)) {
    border-right: 1px solid rgba(248, 244, 237, 0.22);
  }

  .gallery30-facts-grid .fact-item:nth-child(3),
  .gallery30-facts-grid .fact-item:nth-child(4) {
    grid-column: auto;
  }

  .gallery30-facts-grid .fact-item:nth-child(5) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1.35rem max-content minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border-right: none;
    border-top: 1px solid rgba(248, 244, 237, 0.22);
    padding: 1.15rem 1rem;
  }

  .gallery30-facts-grid .fact-icon {
    width: 1.35rem;
    height: 1.35rem;
    margin-bottom: 0.5rem;
  }

  .gallery30-facts-grid .fact-item dt {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }

  .gallery30-facts-grid .fact-item dd {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .gallery30-facts-grid .fact-item:nth-child(5) .fact-icon,
  .gallery30-facts-grid .fact-item:nth-child(5) dd {
    margin: 0;
  }
}

@media (max-width: 640px) {
  .expedition-hero--gallery30 {
    padding-block: 24px 32px;
  }

  .expedition-hero--gallery30 .hero-grid {
    gap: 28px;
  }

  /* As nove fotos continuam visiveis em uma composicao mais vertical. */
  .gallery30-stage {
    width: 100%;
    max-width: 355px;
    margin-inline: auto;
    aspect-ratio: 0.85;
  }

  .gallery30-item--main {
    top: 23%;
    left: 0%;
    width: 49%;
    border-radius: 8px;
    box-shadow:
      0 14px 32px -4px rgba(28, 25, 23, 0.22),
      0 4px 12px -2px rgba(28, 25, 23, 0.10);
  }

  .gallery30-item--1 {
    top: 0%;
    left: 3%;
    width: 28%;
  }

  .gallery30-item--2 {
    top: 0%;
    left: 39%;
    width: 30%;
  }

  .gallery30-item--7 {
    top: 12%;
    left: 71%;
    width: 29%;
  }

  .gallery30-item--3 {
    top: 44%;
    left: 77%;
    width: 23%;
  }

  .gallery30-item--8 {
    top: 34%;
    left: 51%;
    width: 20%;
  }

  .gallery30-item--6 {
    top: 57%;
    left: 52%;
    width: 27%;
  }

  .gallery30-item--5 {
    top: 70%;
    left: 72%;
    width: 28%;
  }

  .gallery30-item--9 {
    top: 69%;
    left: 19%;
    width: 27%;
  }

  .gallery30-seal {
    top: 25%;
    left: 41%;
    width: 55px;
  }
}

/* Roteiro: fotografia acompanha a leitura, sem movimento de escala. */
/* Fundo do roteiro sem as linhas topograficas cinzas. */
#roteiro::before {
  content: none;
  display: none;
}

@media (min-width: 761px) {
  #roteiro .itinerary-layout {
    grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 4vw, 64px);
  }

  #roteiro .itinerary-heading {
    display: flex;
    flex-direction: column;
    height: calc(100svh - 136px);
  }

  #roteiro .itinerary-heading > * {
    flex-shrink: 0;
  }

  #roteiro .route-figure {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    margin-top: 24px;
  }

  #roteiro .route-intro {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 800ms ease-in-out, opacity 500ms ease;
  }

  #roteiro .route-intro-content {overflow: hidden;min-height: 0;}
  #roteiro .route-intro-content > p:not(.kicker) {color: var(--ink-soft);}

  #roteiro .itinerary-heading:has(.route-slide.is-active:not([data-route-slide="1"])) .route-intro {
    grid-template-rows: 0fr;
    opacity: 0;
  }

  #roteiro .route-figure {transition: margin-top 800ms ease-in-out;}

  #roteiro .itinerary-heading:has(.route-slide.is-active:not([data-route-slide="1"])) .route-figure {
    margin-top: 0;
  }

  #roteiro [data-route-slide="1"] .route-photo img {
    object-position: center 82%;
  }
}

#roteiro .itinerary-day {
  scroll-margin-top: 112px;
}

#roteiro .itinerary-day:last-child {
  min-height: calc(100svh - 112px);
}

#roteiro .route-slide {
  visibility: visible;
  transform: none;
  transition: opacity 800ms ease-in-out;
  min-height: 0;
}

#roteiro .route-figure-stage {
  flex: 1;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
}

#roteiro .route-photo {
  display: block;
}

#roteiro .route-photo img {
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

@media (prefers-reduced-motion: reduce) {
  #roteiro .route-intro,
  #roteiro .route-figure,
  #roteiro .route-slide {transition: none;}
}

#roteiro .route-caption {
  font-size: 0.72rem;
  line-height: 1.55;
  letter-spacing: 0.03em;
  text-transform: none;
  min-height: 3.1em;
}

#roteiro .route-reading-progress {
  height: 2px;
  margin-top: 16px;
  background: var(--line);
}

#roteiro .route-reading-progress::after {
  display: block;
  width: var(--route-reading-progress, 14.2857%);
  height: 100%;
  background: var(--terracotta);
  content: "";
  transition: width 350ms ease;
}

#roteiro .route-figure:has([data-route-slide="2"].is-active) { --route-reading-progress: 28.5714%; }
#roteiro .route-figure:has([data-route-slide="3"].is-active) { --route-reading-progress: 42.8571%; }
#roteiro .route-figure:has([data-route-slide="4"].is-active) { --route-reading-progress: 57.1429%; }
#roteiro .route-figure:has([data-route-slide="5"].is-active) { --route-reading-progress: 71.4286%; }
#roteiro .route-figure:has([data-route-slide="6"].is-active) { --route-reading-progress: 85.7143%; }
#roteiro .route-figure:has([data-route-slide="7"].is-active) { --route-reading-progress: 100%; }

#roteiro .itinerary-day-photo {
  display: none;
}

/* Dados do passeio e galeria em uma apresentacao editorial discreta. */
#roteiro .day-meta {
  gap: 10px 20px;
  margin-top: 18px !important;
}

#roteiro .day-meta-item {
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink-muted);
  background: transparent;
  font-weight: 500;
  line-height: 1.45;
}

#roteiro .day-meta-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#roteiro .day-gallery-trigger {
  gap: 8px;
  min-height: 24px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--terracotta);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  transition: color 160ms ease;
}

#roteiro .day-gallery-trigger .ayni-consolidated-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#roteiro .day-gallery-trigger:hover,
#roteiro .day-gallery-trigger:focus-visible {
  color: var(--terracotta);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#roteiro .day-gallery-trigger:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  #roteiro .day-gallery-trigger {
    justify-content: flex-start;
    width: auto;
  }

  #roteiro .itinerary-day:last-child {
    min-height: 0;
  }

  #roteiro .route-figure {
    display: none;
  }

  #roteiro .itinerary-day-photo {
    display: block;
    margin: 18px 0;
  }

  #roteiro .itinerary-day-photo picture,
  #roteiro .itinerary-day-photo img {
    display: block;
    width: 100%;
  }

  #roteiro .itinerary-day-photo img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }
}

.excluded-block .plain-list li::before {
  content: "\00d7";
  color: var(--terracotta);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ==========================================================================
   Secao Hospedagem: Correcao de contraste e legibilidade
   ========================================================================== */

.lodging-section {
  color: var(--bone, #FFFFFF);
}

.lodging-section .kicker,
.lodging-section .section-kicker,
.lodging-section .lodging-kicker {
  color: var(--bone, #FFFFFF) !important;
}

.lodging-section .section-kicker-icon {
  color: var(--bone, #FFFFFF) !important;
  stroke: var(--bone, #FFFFFF) !important;
}

.lodging-section .lodging-copy h2 {
  color: var(--bone, #FFFFFF) !important;
}

.lodging-section .lodging-copy p {
  color: rgba(255, 255, 255, 0.92) !important;
}

.lodging-section .lodging-features {
  color: var(--bone, #FFFFFF);
}

.lodging-section .lodging-feature {
  color: rgba(255, 255, 255, 0.92);
}

.lodging-section .lodging-feature strong {
  color: var(--bone, #FFFFFF);
}

.lodging-memory-container {
  margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
}

.lodging-section .lead-magnet-memory-hint,
.lead-magnet-memory-hint {
  margin-block: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.lead-magnet-memory-gallery {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: 1.75rem 0 0;
  padding: 0 0 0.9rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  scrollbar-color: var(--terracotta, #D07A34) rgba(255, 255, 255, 0.15);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  list-style: none;
}

.lead-magnet-memory-gallery:focus-visible {
  outline: 2px solid var(--bone, #FFFFFF);
  outline-offset: 4px;
}

.lead-magnet-memory {
  flex: 0 0 clamp(17rem, 30vw, 23rem);
  scroll-snap-align: start;
  cursor: pointer;
}

.lead-magnet-memory figure,
.lead-magnet-memory-image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.lead-magnet-memory-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
}

/* Object-position fine-tuning for each vertical photo */
.lead-magnet-memory:nth-child(1) img { object-position: center 36%; }
.lead-magnet-memory:nth-child(2) img { object-position: center 30%; }
.lead-magnet-memory:nth-child(3) img { object-position: center 32%; }
.lead-magnet-memory:nth-child(4) img { object-position: center 50%; }
.lead-magnet-memory:nth-child(5) img { object-position: center 60%; }
.lead-magnet-memory:nth-child(6) img { object-position: center 50%; }
.lead-magnet-memory:nth-child(7) img { object-position: center 40%; }
.lead-magnet-memory:nth-child(8) img { object-position: center 55%; }
.lead-magnet-memory:nth-child(9) img { object-position: center 70%; }

@media (max-width: 760px) {
  .lead-magnet-memory-gallery {
    gap: 0.8rem;
    margin-top: 1.25rem;
    margin-right: calc(0px - var(--gutter, 24px));
    padding-right: 1rem;
    padding-left: 0;
  }

  .lead-magnet-memory {
    flex-basis: min(78vw, 21rem);
  }
}


/* Verde territorio da marca na secao de preparo. */
#preparo {
  background: var(--ayni-forest);
  color: var(--paper);
}

#preparo .kicker,
#preparo .prose-block > p:not(.kicker) {
  color: var(--paper);
}

#preparo .practical-note {
  color: var(--ink);
}
/* Keep the photograph inside its stage and reserve space for its caption. */
@media (min-width: 761px) {
  #roteiro .route-figure-stage { position: relative; overflow: hidden; }
  #roteiro .route-slide { position: absolute; inset: 0; height: 100%; }
  #roteiro .route-reading-progress,
  #roteiro .route-caption { flex-shrink: 0; }
}

/* Preserve the approved outline icons without mask backgrounds. */
svg.ayni-custom-icon, svg.ayni-consolidated-icon {
  background: transparent;
  fill: none;
  mask: none;
  -webkit-mask: none;
}
svg.ayni-custom-icon *, svg.ayni-consolidated-icon * { fill: none; }

/* One outline weight across summary, itinerary and lodging icons. */
.quick-summary svg, .quick-summary svg *,
#roteiro svg.day-meta-icon, #roteiro svg.day-meta-icon *,
#roteiro .day-gallery-trigger svg, #roteiro .day-gallery-trigger svg *,
svg.lodging-feature-icon, svg.lodging-feature-icon * {
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
