/*
 * Home page sections (front page only; also loaded in the editor).
 * Values copied from the approved assets/source/01-home/base.css and mobile.css.
 */

/* ==========================================================================
   01.02 Hero de expedición (pattern vac-theme/home-hero)
   section.hero > .hero__media (core/image .photo) + .hero__inner + .hero__seal.
   The curve is the ::after of .curve-bottom--to-sand (components.css); the
   legibility gradient is .hero__media::after (approved .hero__overlay).
   ========================================================================== */
.hero{position:relative;min-height:max(88vh,640px);display:flex;align-items:flex-end;background:var(--color-night);color:var(--color-sand);padding:calc(var(--header-h) + var(--space-3xl)) 0 calc(var(--curve) + var(--space-3xl));overflow:hidden}
.hero__media{position:absolute;inset:0}
.hero__media::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(78deg,rgba(12,21,38,.94) 0%,rgba(12,21,38,.78) 38%,rgba(12,21,38,.18) 72%,rgba(12,21,38,0) 100%),linear-gradient(0deg,rgba(12,21,38,.55) 0%,rgba(12,21,38,0) 45%)}
.hero__photo{object-position:50% 80%}
.hero__inner{position:relative;z-index:2}
.hero__content{max-width:820px}
.hero__title{font-family:var(--font-display);font-weight:600;font-size:var(--fs-h1);line-height:1.02;letter-spacing:-.025em;color:var(--color-white);margin-bottom:var(--space-lg)}
.hero__title .title-accent{color:var(--color-ochre)}
.hero__lead{font-size:var(--fs-lead);line-height:1.55;color:rgba(244,236,221,.9);max-width:600px;margin-bottom:var(--space-xl)}

/* core/buttons: the approved .hero__actions row (its own gap instead of the core 0.5em) */
.hero__actions.wp-block-buttons{display:flex;align-items:center;gap:var(--space-xl);flex-wrap:wrap}
.hero__actions .wp-block-button{margin:0}

/* Seal «Ruta de la Seda» (inline SVG in a GenerateBlocks Shape) */
.hero__seal{position:absolute;z-index:2;right:max(var(--gutter), calc((100% - var(--container))/2));bottom:calc(var(--curve) + var(--space-4xl));width:184px;height:184px;transform:rotate(-10deg);pointer-events:none}
.hero__seal .gb-shape,
.hero__seal svg{display:block;width:100%;height:100%}
.seal__bg{fill:var(--color-night);fill-opacity:.55;stroke:var(--color-ochre);stroke-width:2}
.seal__ring{fill:none;stroke:var(--color-ochre);stroke-width:1}
.seal__ring--dashed{stroke-width:1.5;stroke-dasharray:2 4}
.seal__text{font-family:var(--font-accent);font-weight:400;font-size:13px;letter-spacing:2px;fill:var(--color-sand)}
.seal__octagram rect{fill:var(--color-ochre);fill-opacity:.1;stroke:var(--color-ochre);stroke-width:1.25}
.seal__compass{fill:var(--color-sand)}
.seal__compass-north{fill:var(--color-terracotta)}
.seal__pin{fill:var(--color-night);stroke:var(--color-ochre);stroke-width:1.5}

/* ==========================================================================
   01.03 Nuestros viajes (pattern vac-theme/home-trips)
   section.trips > .container > .section-head + GB Query (div.trips__query) >
   Looper (div.trips__grid) > Loop Items (article.trip-card, styled in
   components.css) + core/buttons .section-foot with the «Contorno» button.
   ========================================================================== */
.trips{padding-top:var(--space-3xl)}
.trips__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-xl)}
/* core/buttons as the approved .section-foot (base.css): no core margins on the button */
.trips .section-foot .wp-block-button{margin:0}

/* ==========================================================================
   01.05 Destinos de Asia Central (pattern vac-theme/home-destinations)
   section.destinations.curve-bottom--to-ochre > .container > .section-head +
   .destinations__grid > a.dest-card (GB Element) > figure.photo (core/image) +
   div.dest-card__body (the approved span; GB's Element has no span tag).
   ========================================================================== */
.destinations{padding-bottom:calc(var(--space-4xl) + var(--curve))}
.destinations__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--space-lg)}
.dest-card{position:relative;display:block;aspect-ratio:3/4;border-radius:var(--radius);overflow:hidden;text-decoration:none;color:var(--color-white);outline-offset:4px;background:var(--color-night-deep)}
/* GP recolours every link on a:hover, a:focus, a:active (0,1,1) */
.dest-card:is(:hover,:focus,:active){color:var(--color-white);text-decoration:none}
.dest-card .photo{transition:transform .4s}
.dest-card:hover .photo{transform:scale(1.03)}
/* Framing of the approved photos (inline object-position in the approved HTML) */
.dest-card--uzbekistan .photo{object-position:40% 45%}
.dest-card--kyrgyzstan .photo{object-position:50% 40%}
.dest-card--kazakhstan .photo{object-position:50% 30%}
.dest-card--tajikistan .photo{object-position:30% 50%}
.dest-card__body{position:absolute;left:var(--space-sm);right:var(--space-sm);bottom:var(--space-sm);z-index:2;display:flex;flex-direction:column;gap:6px;padding:var(--space-md) var(--space-md) 14px;background:var(--color-veil);border-radius:var(--radius-sm)}
/* Country name in poster lettering (Russo One) */
.dest-card__name{font-family:var(--font-accent);font-weight:400;font-size:var(--fs-dest);line-height:1.1;letter-spacing:.02em}
.dest-card__more{font-size:var(--fs-xs);font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--color-ochre)}
/* «Ver viajes →»: the arrow is .dest-card__more::after in components.css (drawn, decoration only) */

/* ==========================================================================
   01.06 Por qué viajar con nosotros (pattern vac-theme/home-why-us)
   section.why > .container.why__inner > .why__media > .why__frame > figure.photo
   (core/image) + .why__content > eyebrow, h2, .why__text, ol.why__list >
   li.why__item > div.why__item-body, and core/buttons with «Enlace con flecha».
   The approved span.why__num is li::before with a CSS counter: «01», «02»… follow
   the order of the points and the client never types them.
   ========================================================================== */
.why{background:var(--color-ochre-light);padding:var(--space-3xl) 0 var(--space-4xl)}
.why__inner{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-4xl);align-items:center}
.why__media{position:relative;max-width:540px;width:100%}
.why__media::before{content:"";position:absolute;inset:20px -20px -20px 20px;border:2px solid var(--color-terracotta);border-radius:var(--radius-arch) var(--radius-arch) var(--radius-lg) var(--radius-lg)}
.why__frame{position:relative;aspect-ratio:6/7;border-radius:var(--radius-arch) var(--radius-arch) var(--radius-lg) var(--radius-lg);overflow:hidden;background:var(--color-night)}
.why__frame .photo{object-position:55% 50%}
.why__content .section-title{margin-bottom:var(--space-lg);max-width:520px}
.why__text{color:var(--color-ink-muted);max-width:540px;margin-bottom:var(--space-xl)}
.why__list{display:grid;gap:0;margin-bottom:var(--space-xl);border-top:1px solid rgba(31,26,21,.18);counter-reset:why-point}
.why__item{display:grid;grid-template-columns:76px 1fr;gap:var(--space-md);align-items:center;padding:var(--space-md) 0;border-bottom:1px solid rgba(31,26,21,.18);counter-increment:why-point}
/* Approved .why__num (aria-hidden): the ol already tells the position, so the number has an empty alternative text */
.why__item::before{content:counter(why-point, decimal-leading-zero);content:counter(why-point, decimal-leading-zero) / "";font-family:var(--font-accent);font-weight:400;font-size:var(--fs-num);line-height:1;color:var(--color-terracotta)}
.why__item-title{font-family:var(--font-display);font-weight:600;font-size:1.25rem;line-height:1.3;color:var(--color-night)}
.why__item-text{font-size:var(--fs-small);color:var(--color-ink-muted)}
/* core/buttons holding the approved a.link-arrow: no core gaps or margins */
.why__actions.wp-block-buttons{display:flex;gap:0}
.why__actions .wp-block-button{margin:0}

/* ==========================================================================
   Contact band (01.07): the component is in components.css, shared with the trip close.
   Only the home framing of its photo (approved inline object-position 50% 40%).
   ========================================================================== */
.contact-band[data-section="Banda de contacto"] .contact-band__photo{object-position:50% 40%}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width:1100px) and (min-width:768px){
  .trips__grid{grid-template-columns:repeat(2,1fr)}
  .destinations__grid{grid-template-columns:repeat(2,1fr)}
  .why__inner{grid-template-columns:1fr;gap:var(--space-3xl)}
  .why__media{margin-inline:auto;max-width:440px}
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width:767px){
  .hero{min-height:85svh;padding:calc(var(--header-h) + var(--space-2xl)) 0 calc(var(--curve) + var(--space-2xl))}
  .hero__photo{object-position:48% 50%}
  .hero__media::after{background:linear-gradient(0deg,rgba(12,21,38,.96) 0%,rgba(12,21,38,.85) 45%,rgba(12,21,38,.25) 75%,rgba(12,21,38,.45) 100%)}
  .hero__title{line-height:1.05;margin-bottom:var(--space-md)}
  .hero__lead{margin-bottom:var(--space-lg)}
  .hero__actions.wp-block-buttons{flex-direction:column;align-items:stretch;gap:var(--space-xs)}
  .hero__actions .wp-block-button{width:100%;--btn-h:52px}
  .hero__actions .wp-block-button > .wp-block-button__link{width:100%}
  .hero__actions .wp-block-button.is-style-link-light > .wp-block-button__link{justify-content:center}
  .hero__seal{display:none}

  .trips{padding-top:var(--space-2xl)}
  .trips__grid{grid-template-columns:1fr;gap:var(--space-lg)}
  /* Only the first 4 cards on mobile, and only in the home grid (approved mobile.css) */
  .trips__grid > .trip-card:nth-child(n+5){display:none}

  /* Destinations: horizontal carousel, 72 % per card, snap and a visible ochre bar.
     The cards are links, so Tab walks them in DOM order and scrolls each into view. */
  .destinations{padding-bottom:calc(var(--space-3xl) + var(--curve))}
  .destinations__grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:72%;gap:var(--space-md);overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:var(--gutter);margin-inline:calc(-1 * var(--gutter));padding:0 var(--gutter) var(--space-md);scrollbar-width:thin;scrollbar-color:var(--color-ochre) rgba(244,236,221,.12)}
  .dest-card{scroll-snap-align:start}
  .dest-card__name{letter-spacing:.015em}

  /* Why us: photo first (DOM order), 5:4 frame, numbers in a 56 px column */
  .why{padding:var(--space-2xl) 0 var(--space-3xl)}
  .why__inner{grid-template-columns:1fr;gap:var(--space-2xl)}
  .why__media{max-width:none;padding-right:10px}
  .why__media::before{inset:10px 0 -10px 10px}
  .why__frame{aspect-ratio:5/4}
  /* The approved mobile.css says 55% 62%, but the img's inline style (55% 50%) wins over it in the
     approved page, so 55% 50% is what the design shows: the desktop value stays (QA 1, mobile) */
  .why__item{grid-template-columns:56px 1fr;gap:var(--space-sm)}
  .why__item-title{font-size:1.125rem}
}

@media (prefers-reduced-motion:reduce){
  .dest-card:hover .photo{transform:none}
}
