/* ==========================================================================
   Machu Picchu Hiking Tours: page tokens and global behavior
   ========================================================================== */

/* The page extends the established trekking palette with a consistent 7px radius. */
.hiking-page {
    --hiking-ink: #171717;
    --hiking-copy: #5d5d5d;
    --hiking-muted: #818181;
    --hiking-red: #f10100;
    --hiking-red-dark: #b90201;
    --hiking-line: #e8e8e4;
    --hiking-soft: #f7f7f5;
    --hiking-warm: #fffaf5;
    --hiking-dark: #171717;
    --hiking-radius: 7px;
    overflow: clip;
    background: #ffffff;
    color: var(--hiking-copy);
}

/* Anchor targets stop below the sticky chapter navigation. */
.hiking-page section[id] {
    scroll-margin-top: 72px;
}

/* Keyboard users receive an obvious focus indicator throughout this surface. */
.hiking-page a:focus-visible,
.hiking-page button:focus-visible,
.hiking-page input:focus-visible,
.hiking-page textarea:focus-visible {
    border-radius: var(--hiking-radius);
    outline: 3px solid rgba(241, 1, 0, 0.34);
    outline-offset: 3px;
}

/* Inline links remain clearly distinguishable inside long-form editorial text. */
.hiking-reading-copy a,
.hiking-editorial-copy a {
    color: var(--hiking-red-dark);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Figure margins reset so all image columns align with their paired copy. */
.hiking-page figure {
    margin: 0;
}

/* ==========================================================================
   Shared hero, breadcrumb and chapter navigation
   ========================================================================== */

/* The hero keeps the same cinematic scale used by the related trekking pages. */
.hiking-page .tour-category-hero {
    min-height: 620px;
    height: clamp(620px, calc(100svh - 69px), 790px);
}

/* Landscape hero photography stays focused on the trail and citadel. */
.hiking-page .tour-category-hero-image {
    object-position: center 52%;
}

/* The long hero title is balanced without overpowering the award badge. */
.hiking-page .tour-category-hero-title {
    max-width: 14ch;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2.45rem, 5vw, 3.65rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 0.98;
    text-wrap: balance;
}

/* The breadcrumb uses a quiet divider below the immersive hero. */
.hiking-breadcrumb {
    border-bottom: 1px solid var(--hiking-line);
    background: #ffffff;
}

/* Breadcrumb typography stays compact and scannable. */
.hiking-breadcrumb p {
    padding: 0.85rem 0;
    margin: 0;
    color: var(--hiking-copy);
    font-size: 0.84rem;
}

/* Breadcrumb links use the darker brand red for accessible contrast. */
.hiking-breadcrumb a {
    color: var(--hiking-red-dark);
    font-weight: 800;
    text-decoration: none;
}

/* The chapter navigation receives the page divider color. */
.hiking-nav {
    border-bottom-color: var(--hiking-line);
}

/* ==========================================================================
   Overview and traveler planning note
   ========================================================================== */

/* The overview separates the headline from the full reference copy. */
.hiking-intro-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    gap: clamp(3rem, 7vw, 7rem);
}

/* The overview heading follows the reader while the long source copy advances. */
.hiking-intro-heading {
    position: sticky;
    top: 108px;
}

/* The long-form copy remains within a comfortable reading measure. */
.hiking-reading-copy {
    max-width: 780px;
}

/* Paragraph rhythm is compact enough for the substantial reference copy. */
.hiking-reading-copy > p,
.hiking-editorial-copy > p {
    margin: 0 0 1.2rem;
    color: var(--hiking-copy);
    font-size: 1rem;
    line-height: 1.82;
}

/* The authored planning note is visually distinct without a left-hand border. */
.hiking-planning-note {
    padding: clamp(1.5rem, 3vw, 2.15rem);
    margin-top: 2.25rem;
    border: 1px solid var(--hiking-line);
    border-radius: var(--hiking-radius);
    background: var(--hiking-warm);
}

/* The small note label sets context before the supplemental guidance. */
.hiking-eyebrow {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--hiking-red-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

/* The planning note title uses the same editorial display type as section titles. */
.hiking-planning-note h3 {
    margin: 0 0 0.65rem;
    color: var(--hiking-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
    font-weight: 500;
}

/* The supplemental note closes without surplus bottom spacing. */
.hiking-planning-note p {
    margin: 0;
    color: var(--hiking-copy);
    line-height: 1.72;
}

/* ===========================================================================
   Founder field note
   ========================================================================== */

/* The founder story restores the supplied portrait-and-quotation composition. */
.hiking-founder-story {
    padding-top: 0;
    background: #ffffff;
}

/* Portrait and quotation receive equal weight on wider screens. */
.hiking-founder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(2.5rem, 6vw, 6rem);
}

/* The founder portrait uses the shared image corner treatment. */
.hiking-founder-media {
    min-height: 590px;
    overflow: hidden;
    border-radius: var(--hiking-radius);
    background: var(--hiking-soft);
}

/* The portrait fills its editorial column without distortion. */
.hiking-founder-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The quotation remains borderless and relies on type and spacing for emphasis. */
.hiking-founder-quote {
    align-self: center;
    max-width: 680px;
    padding: 0;
    margin: 0;
    color: var(--hiking-ink);
}

/* Quotation paragraphs use a measured editorial scale and relaxed leading. */
.hiking-founder-quote p {
    margin: 0 0 1.35rem;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.25rem, 2.1vw, 1.75rem);
    line-height: 1.5;
}

/* Founder links use the accessible deep brand red. */
.hiking-founder-quote a {
    color: var(--hiking-red-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* The attribution closes without extra whitespace below the quote. */
.hiking-founder-quote p:last-child {
    margin-bottom: 0;
    color: var(--hiking-red-dark);
    font-size: 1rem;
}

/* ==========================================================================
   Trending tour collection
   ========================================================================== */

/* The tour collection sits on a quiet neutral field to separate it from the overview. */
.hiking-tour-collection {
    background: var(--hiking-soft);
}

/* Centered section copy keeps the introduction readable above the larger card grid. */
.hiking-section-heading {
    max-width: 900px;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

/* Fifteen tour cards use three even columns on wide screens. */
.hiking-tour-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

/* Every reusable card retains the shared 7px corner treatment. */
.hiking-tour-grid .tour-best-card,
.hiking-tour-grid .tour-best-card-media,
.hiking-tour-grid .tour-best-card-image,
.hiking-tour-grid .tour-best-card-button,
.hiking-tour-grid .tour-best-card-badge {
    border-radius: var(--hiking-radius);
}

/* Deep red card actions and badges keep white text above AA contrast. */
.hiking-tour-grid .tour-best-card-button,
.hiking-tour-grid .tour-best-card-badge {
    border-color: var(--hiking-red-dark);
    background: var(--hiking-red-dark);
    color: #ffffff;
}

/* ==========================================================================
   Editorial image-and-copy chapters
   ========================================================================== */

/* Editorial chapters balance reference copy with a strong photographic anchor. */
.hiking-editorial-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
    align-items: stretch;
    gap: clamp(2.5rem, 6vw, 6rem);
}

/* Reversed chapters move the photograph to the right on larger screens. */
.hiking-editorial-grid.is-reversed .hiking-editorial-media {
    order: 2;
}

/* Tall image frames preserve the expedition character of the source page. */
.hiking-editorial-media {
    min-height: 640px;
    overflow: hidden;
    border-radius: var(--hiking-radius);
    background: #272727;
}

/* Editorial images fill their available column without distortion. */
.hiking-editorial-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Editorial copy is vertically centered next to its image. */
.hiking-editorial-copy {
    align-self: center;
    max-width: 760px;
}

/* The dark proof section creates a confident visual pause within the long page. */
.hiking-editorial-dark {
    background: var(--hiking-dark);
}

/* Light text preserves contrast inside the dark proof section. */
.hiking-editorial-dark .welcome-section-heading h2,
.hiking-editorial-dark .hiking-editorial-copy > p {
    color: #ffffff;
}

/* Links use a warm tint against the dark proof background. */
.hiking-editorial-dark .hiking-editorial-copy a {
    color: #ffffff;
}

/* ==========================================================================
   Detailed trek guides
   ========================================================================== */

/* The guide section uses a white surface and compact vertical pacing. */
.hiking-guides {
    background: #ffffff;
}

/* Individual guides are separated by generous space instead of floating cards. */
.hiking-guide-list {
    display: grid;
    gap: clamp(4rem, 8vw, 7.5rem);
}

/* Each guide gives the image and exact source information equal visual weight. */
.hiking-guide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(2rem, 4vw, 4.5rem);
}

/* Alternating guide images move to the right without changing source order. */
.hiking-guide.is-reversed .hiking-guide-media {
    order: 2;
}

/* Guide media remains visible alongside the long route fact list. */
.hiking-guide-media {
    position: sticky;
    top: 105px;
    align-self: start;
    height: min(72vh, 690px);
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--hiking-radius);
    background: var(--hiking-soft);
}

/* Guide photography fills its sticky frame. */
.hiking-guide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Guide copy is readable but compact enough for long fact lists. */
.hiking-guide-copy {
    max-width: 720px;
}

/* Route sequence numbers establish hierarchy without decorative pills. */
.hiking-guide-number {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--hiking-red);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

/* Guide headings use the project display face and balanced wrapping. */
.hiking-guide-copy h3 {
    max-width: 18ch;
    margin: 0 0 1.25rem;
    color: var(--hiking-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.07;
    text-wrap: balance;
}

/* Guide introductions retain the source's full narrative before the details. */
.hiking-guide-copy > p {
    margin: 0 0 1.6rem;
    color: var(--hiking-copy);
    line-height: 1.78;
}

/* Fact lists remove browser defaults and use understated row dividers. */
.hiking-guide-copy ul {
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--hiking-line);
    list-style: none;
}

/* Every route fact gains a consistent check marker and readable spacing. */
.hiking-guide-copy li {
    position: relative;
    padding: 0.9rem 0 0.9rem 1.65rem;
    border-bottom: 1px solid var(--hiking-line);
    color: var(--hiking-copy);
    line-height: 1.62;
}

/* Check markers make the long technical lists easier to scan. */
.hiking-guide-copy li::before {
    position: absolute;
    top: 0.92rem;
    left: 0;
    color: var(--hiking-red);
    content: "✓";
    font-weight: 900;
}

/* ==========================================================================
   Planning form and emergency contact
   ========================================================================== */

/* The final planning area uses a soft field behind the two-column conversion block. */
.hiking-plan {
    background: var(--hiking-soft);
}

/* The planning form and contact panel divide available width evenly. */
.hiking-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(2rem, 4vw, 4rem);
}

/* The form uses a clean white working surface with the shared corner radius. */
.hiking-plan-form {
    padding: clamp(1.5rem, 3.5vw, 3.25rem);
    border-radius: var(--hiking-radius);
    background: #ffffff;
}

/* Submission feedback uses a full outline instead of a left-side accent border. */
.hiking-form-notice {
    padding: 0.9rem 1rem;
    margin-top: 1.25rem;
    border: 1px solid var(--hiking-line);
    border-radius: var(--hiking-radius);
    background: var(--hiking-soft);
    color: var(--hiking-ink);
    font-weight: 700;
    line-height: 1.55;
}

/* Successful form feedback uses the warm editorial surface. */
.hiking-form-notice.is-success {
    background: var(--hiking-warm);
    color: var(--hiking-ink);
}

/* Error feedback uses the accessible deep brand red on a neutral surface. */
.hiking-form-notice.is-error {
    border-color: var(--hiking-red-dark);
    color: var(--hiking-red-dark);
}

/* Form fields use predictable vertical rhythm. */
.hiking-plan .treks-machu-form {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

/* Paired trip fields share a row on larger screens. */
.hiking-plan .treks-machu-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

/* Every field keeps its label attached to the matching input. */
.hiking-plan .treks-machu-form-field {
    display: grid;
    gap: 0.45rem;
}

/* Form labels remain compact and high contrast. */
.hiking-plan .treks-machu-form-field label {
    color: var(--hiking-ink);
    font-size: 0.82rem;
    font-weight: 850;
}

/* Inputs use neutral borders, generous targets and exactly 7px corners. */
.hiking-plan .treks-machu-form-field input,
.hiking-plan .treks-machu-form-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 0.78rem 0.9rem;
    border: 1px solid #d7d7d2;
    border-radius: var(--hiking-radius);
    background: #ffffff;
    color: var(--hiking-ink);
}

/* Textareas allow vertical resizing without breaking the form width. */
.hiking-plan .treks-machu-form-field textarea {
    min-height: 140px;
    resize: vertical;
}

/* The submit action uses the primary brand color and a full-width mobile-ready target. */
.hiking-plan .treks-machu-form-submit {
    justify-self: start;
    min-height: 48px;
    padding: 0.75rem 1.7rem;
    border: 1px solid var(--hiking-red-dark);
    border-radius: var(--hiking-radius);
    background: var(--hiking-red-dark);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    transition: background-color 180ms ease, border-color 180ms ease;
}

/* The submit hover state deepens color without introducing movement. */
.hiking-plan .treks-machu-form-submit:hover {
    border-color: var(--hiking-red-dark);
    background: var(--hiking-red-dark);
}

/* Emergency contact imagery and details form one continuous dark panel. */
.hiking-contact {
    display: grid;
    grid-template-rows: minmax(280px, 1fr) auto;
    overflow: hidden;
    border-radius: var(--hiking-radius);
    background: var(--hiking-dark);
    color: #ffffff;
}

/* Contact photography fills the upper portion of the panel. */
.hiking-contact > img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
}

/* Contact details remain readable over the dark background. */
.hiking-contact-copy {
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* Emergency contact heading uses the compact display treatment. */
.hiking-contact-copy h3 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 500;
    line-height: 1.12;
}

/* Contact details keep enough leading for telephone and email scanning. */
.hiking-contact-copy p {
    margin: 0;
    color: #eeeeeb;
    line-height: 1.75;
}

/* Contact links use the warm light accent against the dark panel. */
.hiking-contact-copy a {
    color: #ffffff;
}

/* Quick contact actions sit in one predictable row. */
.hiking-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Quick action links use outlined targets instead of pill styling. */
.hiking-contact-actions a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--hiking-radius);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

/* Quick action hover states gain a modest translucent fill. */
.hiking-contact-actions a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===========================================================================
   Supplied closing video
   ========================================================================== */

/* The video closes the source content on a calm white surface before the footer. */
.hiking-video {
    background: #ffffff;
}

/* The video remains focused at a readable width rather than spanning the full page. */
.hiking-video-shell {
    max-width: 980px;
}

/* A responsive 16:9 frame preserves the original YouTube presentation. */
.hiking-video-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--hiking-radius);
    background: var(--hiking-dark);
    aspect-ratio: 16 / 9;
}

/* The YouTube player fills the responsive frame. */
.hiking-video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   Responsive behavior
   ========================================================================== */

/* Medium desktop widths reduce the tour grid to two comfortable columns. */
@media (max-width: 1199.98px) {
    .hiking-tour-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet layouts stack editorial relationships while preserving reading order. */
@media (max-width: 991.98px) {
    .hiking-page .tour-category-hero {
        min-height: 580px;
        height: 72svh;
    }

    .hiking-intro-grid,
    .hiking-founder-grid,
    .hiking-editorial-grid,
    .hiking-guide,
    .hiking-plan-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.25rem;
    }

    .hiking-intro-heading,
    .hiking-guide-media {
        position: static;
    }

    .hiking-editorial-grid.is-reversed .hiking-editorial-media,
    .hiking-guide.is-reversed .hiking-guide-media {
        order: 0;
    }

    .hiking-editorial-media,
    .hiking-founder-media,
    .hiking-guide-media {
        width: 100%;
        height: min(62vw, 600px);
        min-height: 420px;
    }

    .hiking-editorial-copy,
    .hiking-guide-copy,
    .hiking-reading-copy {
        max-width: none;
    }
}

/* Mobile layouts reduce spacing and keep all controls easy to reach. */
@media (max-width: 767.98px) {
    .hiking-page .tour-category-hero {
        min-height: 540px;
        height: 72svh;
    }

    .hiking-page .tour-category-hero-title {
        max-width: 12ch;
        font-size: clamp(2.05rem, 10vw, 3rem);
    }

    .hiking-tour-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.15rem;
    }

    .hiking-editorial-media,
    .hiking-founder-media,
    .hiking-guide-media {
        height: 118vw;
        min-height: 390px;
        max-height: 580px;
    }

    .hiking-plan .treks-machu-form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .hiking-plan .treks-machu-form-submit {
        width: 100%;
        justify-self: stretch;
    }

    .hiking-contact-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .hiking-contact-actions a {
        justify-content: center;
    }
}

/* Reduced-motion users retain the interface without animated transitions. */
@media (prefers-reduced-motion: reduce) {
    .hiking-page *,
    .hiking-page *::before,
    .hiking-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
