/* ==========================================================================
   Choquequirao guide: page tokens and browser behavior
   ========================================================================== */

/* The guide extends the established Andean editorial palette and 7px corners. */
.choquequirao-guide {
    --choquequirao-ink: #171717;
    --choquequirao-copy: #5d5d5d;
    --choquequirao-muted: #818181;
    --choquequirao-red: #b90201;
    --choquequirao-red-bright: #f10100;
    --choquequirao-line: #e8e8e4;
    --choquequirao-soft: #f7f7f5;
    --choquequirao-warm: #fffaf5;
    --choquequirao-radius: 7px;
    overflow: clip;
    background: #ffffff;
    color: var(--choquequirao-copy);
}

/* Anchored chapters stop below the sticky guide navigation. */
.choquequirao-guide section[id] {
    scroll-margin-top: 74px;
}

/* Text selection and scrollbars use the confirmed brand palette. */
.choquequirao-guide ::selection {
    background: var(--choquequirao-red);
    color: #ffffff;
}

/* The browser scrollbar belongs to the same visual system as the guide. */
html:has(.choquequirao-guide) {
    scrollbar-color: #b90201 #f7f7f5;
    scrollbar-width: thin;
}

/* Keyboard users receive one visible focus treatment throughout the page. */
.choquequirao-guide a:focus-visible,
.choquequirao-guide button:focus-visible,
.choquequirao-guide summary:focus-visible,
.choquequirao-guide iframe:focus-visible {
    border-radius: var(--choquequirao-radius);
    outline: 3px solid rgba(185, 2, 1, 0.34);
    outline-offset: 3px;
}

/* Figures align with their editorial grids without browser margins. */
.choquequirao-guide figure {
    margin: 0;
}

/* Source paragraphs preserve a comfortable long-form reading rhythm. */
.choquequirao-editorial-copy > p,
.choquequirao-story-copy > p,
.choquequirao-practical-row > div > p,
.choquequirao-preparation-copy > p {
    max-width: 72ch;
    margin: 0 0 1.2rem;
    color: var(--choquequirao-copy);
    font-size: 1rem;
    line-height: 1.8;
}

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

/* The shared hero delivers the source landscape within the first viewport. */
.choquequirao-guide .tour-category-hero {
    min-height: 620px;
    height: clamp(620px, calc(100svh - 69px), 790px);
}

/* The hero crop keeps the ruin and mountain terrain legible. */
.choquequirao-guide .tour-category-hero-image {
    object-position: center 48%;
}

/* The exact H1 remains bold but leaves space for the original photography. */
.choquequirao-guide .tour-category-hero-title {
    max-width: 12ch;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 0.98;
    text-wrap: balance;
}

/* The breadcrumb creates a quiet transition from hero to field guide. */
.choquequirao-breadcrumb {
    border-bottom: 1px solid var(--choquequirao-line);
    background: #ffffff;
}

/* Breadcrumb copy stays compact and easy to scan. */
.choquequirao-breadcrumb p {
    padding: 0.85rem 0;
    margin: 0;
    color: var(--choquequirao-copy);
    font-size: 0.82rem;
}

/* Breadcrumb links use the deeper red for accessible contrast. */
.choquequirao-breadcrumb a {
    color: var(--choquequirao-red);
    font-weight: 900;
    text-decoration: none;
}

/* The chapter navigation inherits the field guide divider color. */
.choquequirao-nav {
    border-bottom-color: var(--choquequirao-line);
}

/* ==========================================================================
   Opening statement and overview
   ========================================================================== */

/* The source introduction becomes a concise dark transition into the guide. */
.choquequirao-opening {
    padding: clamp(2rem, 4vw, 3.5rem) 0;
    background: var(--choquequirao-ink);
}

/* The opening statement holds a confident editorial reading measure. */
.choquequirao-opening p {
    max-width: 920px;
    margin: 0;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.55;
}

/* Overview copy and source image split the page evenly. */
.choquequirao-editorial-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
}

/* The overview image uses a definite frame to avoid lazy-load collapse. */
.choquequirao-editorial-media {
    height: 620px;
    overflow: hidden;
    border-radius: var(--choquequirao-radius);
    background: var(--choquequirao-soft);
}

/* The source overview photograph fills its dedicated half. */
.choquequirao-editorial-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Historical and family narrative
   ========================================================================== */

/* The history chapter alternates source photography over a quiet field. */
.choquequirao-history {
    background: var(--choquequirao-soft);
}

/* Each story row gives equal space to evidence and narrative. */
.choquequirao-story-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

/* The final historical row closes without unnecessary bottom space. */
.choquequirao-story-row:last-child {
    margin-bottom: 0;
}

/* Alternating rows move photography to the left while preserving DOM order. */
.choquequirao-story-row.is-reversed .choquequirao-story-media {
    order: -1;
}

/* Historical titles carry the hierarchy without decorative labels. */
.choquequirao-story-copy h2,
.choquequirao-practical-row h2 {
    max-width: 19ch;
    margin: 0 0 1.1rem;
    color: var(--choquequirao-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.25rem, 2.7vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.08;
    text-wrap: balance;
}

/* Source history photographs share a stable editorial frame. */
.choquequirao-story-media {
    height: 560px;
    overflow: hidden;
    border-radius: var(--choquequirao-radius);
    background: #ffffff;
}

/* Historical photography fills the frame without distortion. */
.choquequirao-story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Physical grade, distance and seasonality
   ========================================================================== */

/* Trek grading and route distances sit on a decisive dark field. */
.choquequirao-facts {
    padding: clamp(4.5rem, 8vw, 7rem) 0;
    background: var(--choquequirao-ink);
    color: #ffffff;
}

/* The physical grade remains readable at long-form measure. */
.choquequirao-grade {
    display: grid;
    grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
    gap: clamp(2.5rem, 7vw, 7rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Fact titles use the established display voice on dark. */
.choquequirao-grade h2,
.choquequirao-distance h2 {
    margin: 0;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    text-wrap: balance;
}

/* Grade copy keeps the original sequence and challenge description together. */
.choquequirao-grade p {
    max-width: 72ch;
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.8;
}

/* Distance content starts as a second chapter inside the same fact field. */
.choquequirao-distance {
    padding-top: clamp(3rem, 6vw, 5rem);
}

/* Three source route definitions align for direct comparison. */
.choquequirao-distance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 4rem);
    margin-top: 2.5rem;
}

/* Route distances use horizontal rules instead of boxed fact cards. */
.choquequirao-distance-grid p {
    padding-top: 1.4rem;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    line-height: 1.72;
    font-variant-numeric: tabular-nums;
}

/* The season chapter separates explanation and exact month list. */
.choquequirao-season-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 7vw, 7rem);
}

/* Season explanation remains inside the recommended reading measure. */
.choquequirao-season-grid > p {
    max-width: 72ch;
    margin: 0;
    color: var(--choquequirao-copy);
    line-height: 1.82;
}

/* The source month list uses clean dividers rather than nested cards. */
.choquequirao-season-grid ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Each seasonal range is separated by a simple horizontal rule. */
.choquequirao-season-grid li {
    padding: 1rem 0;
    border-top: 1px solid var(--choquequirao-line);
    color: var(--choquequirao-copy);
    line-height: 1.65;
}

/* ==========================================================================
   Trail and water chapters
   ========================================================================== */

/* Practical trail chapters use the warm editorial surface. */
.choquequirao-practical {
    background: var(--choquequirao-warm);
}

/* Image and source copy each occupy half of the practical row. */
.choquequirao-practical-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

/* The final practical row closes without surplus space. */
.choquequirao-practical-row:last-child {
    margin-bottom: 0;
}

/* Reversed practical rows place the second source image on the right. */
.choquequirao-practical-row.is-reversed figure {
    order: 2;
}

/* Trail and water photography uses a consistent 3:2 frame. */
.choquequirao-practical-row figure {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: var(--choquequirao-radius);
    background: var(--choquequirao-soft);
}

/* Practical photography fills its frame cleanly. */
.choquequirao-practical-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Campsite disclosures
   ========================================================================== */

/* The campsite section returns to a clean reading canvas. */
.choquequirao-campsites-heading {
    max-width: 980px;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Dense campsite records form two readable disclosure columns. */
.choquequirao-campsite-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
}

/* Each interactive campsite record uses a single neutral outline. */
.choquequirao-campsite {
    overflow: clip;
    border: 1px solid var(--choquequirao-line);
    border-radius: var(--choquequirao-radius);
    background: #ffffff;
}

/* Open campsite records use a quiet tonal state rather than extra elevation. */
.choquequirao-campsite[open] {
    background: var(--choquequirao-soft);
}

/* Campsite summaries provide a generous, native keyboard target. */
.choquequirao-campsite summary {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    color: var(--choquequirao-ink);
    cursor: pointer;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    list-style: none;
}

/* The disclosure indicator uses the existing Font Awesome icon system. */
.choquequirao-campsite-icon {
    display: inline-flex;
    width: 1rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 1rem;
    color: var(--choquequirao-red);
    font-size: 0.82rem;
}

/* The closed disclosure shows only the expansion icon. */
.choquequirao-campsite-icon .fa-minus {
    display: none;
}

/* The open disclosure swaps to the collapse icon at the same dimensions. */
.choquequirao-campsite[open] .choquequirao-campsite-icon .fa-plus {
    display: none;
}

/* The open disclosure reveals the collapse icon. */
.choquequirao-campsite[open] .choquequirao-campsite-icon .fa-minus {
    display: inline-block;
}

/* Native disclosure markers are hidden after supplying a consistent indicator. */
.choquequirao-campsite summary::-webkit-details-marker {
    display: none;
}

/* Campsite detail copy is separated from its control by a horizontal rule. */
.choquequirao-campsite-content {
    padding: 1.2rem;
    border-top: 1px solid var(--choquequirao-line);
}

/* Source campsite descriptions preserve their complete wording. */
.choquequirao-campsite-content p {
    margin: 0 0 1rem;
    color: var(--choquequirao-copy);
    line-height: 1.7;
}

/* Facility facts use compact bullets within the expanded record. */
.choquequirao-campsite-content ul {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--choquequirao-copy);
}

/* Facility rows retain comfortable spacing for rapid scanning. */
.choquequirao-campsite-content li {
    margin-bottom: 0.45rem;
    line-height: 1.55;
}

/* The loop-heading starts a clearly separate campsite group. */
.choquequirao-loop-heading {
    max-width: 920px;
    padding-top: clamp(3.5rem, 7vw, 6rem);
    margin-bottom: 2rem;
}

/* Loop campsite title follows the established guide hierarchy. */
.choquequirao-loop-heading h2 {
    margin: 0;
    color: var(--choquequirao-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-wrap: balance;
}

/* ==========================================================================
   Source footage and preferred campsites
   ========================================================================== */

/* Footage title and original video form one balanced spread. */
.choquequirao-footage {
    background: var(--choquequirao-soft);
}

/* Video and title each receive half of the available width. */
.choquequirao-footage-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: clamp(2.5rem, 7vw, 7rem);
}

/* The original YouTube footage sits in a responsive 16:9 frame. */
.choquequirao-video {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--choquequirao-radius);
    background: var(--choquequirao-ink);
}

/* The embedded video fills its stable media frame. */
.choquequirao-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Favorite campsites become a compact warm planning interlude. */
.choquequirao-favorites {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background: var(--choquequirao-warm);
}

/* Favorite campsite heading and exact list share a didactic split. */
.choquequirao-favorites-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2.5rem, 7vw, 7rem);
}

/* The source heading carries the section without a decorative label. */
.choquequirao-favorites h2 {
    margin: 0;
    color: var(--choquequirao-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-wrap: balance;
}

/* The exact favorite list stays compact and readable. */
.choquequirao-favorites ul {
    padding-left: 1.1rem;
    margin: 0 0 1.5rem;
    color: var(--choquequirao-copy);
}

/* Favorite entries use steady source-reading rhythm. */
.choquequirao-favorites li,
.choquequirao-favorites p {
    margin-bottom: 0.65rem;
    color: var(--choquequirao-copy);
    line-height: 1.7;
}

/* ==========================================================================
   Preparation and supplemental planning guidance
   ========================================================================== */

/* The preparation chapter uses a dark field suited to safety-critical reading. */
.choquequirao-preparation {
    background: var(--choquequirao-ink);
}

/* Preparation title and complete source copy use an asymmetric editorial split. */
.choquequirao-preparation-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1.32fr);
    align-items: start;
    gap: clamp(3rem, 8vw, 8rem);
}

/* The preparation heading remains visible while readers scan the long guidance. */
.choquequirao-preparation-grid > div:first-child {
    position: sticky;
    top: 108px;
}

/* Shared heading color is reversed on the dark chapter. */
.choquequirao-preparation .welcome-section-heading h2 {
    color: #ffffff;
}

/* Source preparation copy preserves full contrast on dark. */
.choquequirao-preparation-copy > p {
    color: #f7f7f5;
}

/* Supplemental guidance is separated by a full outline, never a left rail. */
.choquequirao-planning-note {
    padding: clamp(1.4rem, 3vw, 2rem);
    margin-top: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: var(--choquequirao-radius);
    background: rgba(255, 255, 255, 0.06);
}

/* Supplemental guidance title remains visibly subordinate to the chapter. */
.choquequirao-planning-note h3 {
    margin: 0 0 0.7rem;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Supplemental guidance copy closes without surplus spacing. */
.choquequirao-planning-note p {
    margin: 0;
    color: #ffffff;
    line-height: 1.7;
}

/* ==========================================================================
   Trek options and direct contact
   ========================================================================== */

/* The route introduction stays centered above four comparable choices. */
.choquequirao-options-heading {
    max-width: 980px;
    margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
    text-align: center;
}

/* Shared route heading aligns its title and source copy with the collection. */
.choquequirao-options-heading .welcome-section-heading,
.choquequirao-options-heading .welcome-section-heading h2,
.choquequirao-options-heading .welcome-section-heading p {
    margin-right: auto;
    margin-left: auto;
}

/* Four exact source routes form a balanced comparison grid. */
.choquequirao-tour-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.35rem;
}

/* Shared tour cards conform to the page's 7px geometry. */
.choquequirao-tour-grid .tour-best-card,
.choquequirao-tour-grid .tour-best-card-media,
.choquequirao-tour-grid .tour-best-card-image,
.choquequirao-tour-grid .tour-best-card-badge,
.choquequirao-tour-grid .tour-best-card-button {
    border-radius: var(--choquequirao-radius) !important;
}

/* Tour numerals align while comparing duration and price. */
.choquequirao-tour-grid .tour-best-card-price-duration,
.choquequirao-tour-grid .tour-best-card-price-total {
    font-variant-numeric: tabular-nums;
}

/* Orange source badges use dark ink to meet accessible small-text contrast. */
.choquequirao-tour-grid .tour-best-card-badge {
    color: var(--choquequirao-ink);
}

/* The final contact band gives the completed reading journey a direct next step. */
.choquequirao-contact {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background: var(--choquequirao-red);
    color: #ffffff;
}

/* Contact context and confirmed channels share equal space. */
.choquequirao-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(3rem, 8vw, 8rem);
}

/* The added next-step title uses the established display scale. */
.choquequirao-contact h2 {
    max-width: 15ch;
    margin: 0 0 1rem;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    text-wrap: balance;
}

/* Contact support copy remains subordinate but fully readable. */
.choquequirao-contact p {
    max-width: 58ch;
    margin: 0;
    color: #ffffff;
    line-height: 1.7;
}

/* Confirmed contact channels stack as generous touch targets. */
.choquequirao-contact-actions {
    display: grid;
    justify-items: start;
    gap: 0.8rem;
}

/* Phone and email remain recognizable as text links. */
.choquequirao-contact-actions > a:not(.choquequirao-contact-primary) {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

/* The primary planning action uses a white surface against the red band. */
.choquequirao-contact-primary {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.8rem 1.25rem;
    margin-top: 0.5rem;
    border-radius: var(--choquequirao-radius);
    background: #ffffff;
    color: var(--choquequirao-red);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 180ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* The main action acknowledges pointer and keyboard interaction. */
.choquequirao-contact-primary:hover,
.choquequirao-contact-primary:focus-visible {
    color: var(--choquequirao-ink);
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive composition
   ========================================================================== */

/* Four source tour cards become two before their metadata feels compressed. */
@media (max-width: 1199.98px) {
    .choquequirao-tour-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Editorial spreads and fact layouts collapse at tablet width. */
@media (max-width: 991.98px) {
    .choquequirao-editorial-grid,
    .choquequirao-story-row,
    .choquequirao-season-grid,
    .choquequirao-practical-row,
    .choquequirao-footage-grid,
    .choquequirao-favorites-grid,
    .choquequirao-preparation-grid,
    .choquequirao-contact-grid,
    .choquequirao-grade {
        grid-template-columns: 1fr;
    }

    .choquequirao-story-row.is-reversed .choquequirao-story-media,
    .choquequirao-practical-row.is-reversed figure {
        order: initial;
    }

    .choquequirao-editorial-media,
    .choquequirao-story-media {
        height: 480px;
    }

    .choquequirao-preparation-grid > div:first-child {
        position: static;
    }

    .choquequirao-distance-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile converts campsite and tour collections to one readable column. */
@media (max-width: 767.98px) {
    .choquequirao-guide .tour-category-hero {
        min-height: 570px;
        height: 78svh;
    }

    .choquequirao-guide .tour-category-hero-image {
        object-position: center;
    }

    .choquequirao-guide .tour-category-hero-title {
        max-width: 11ch;
        font-size: clamp(2rem, 10vw, 3.6rem);
    }

    .choquequirao-editorial-media,
    .choquequirao-story-media {
        height: 360px;
    }

    .choquequirao-campsite-list,
    .choquequirao-tour-grid {
        grid-template-columns: 1fr;
    }

    .choquequirao-tour-grid .tour-best-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .choquequirao-tour-grid .tour-best-card-price-group {
        width: 100%;
    }

    .choquequirao-contact-actions > a:not(.choquequirao-contact-primary) {
        font-size: 1rem;
    }
}

/* Reduced-motion visitors keep stable disclosure and action states. */
@media (prefers-reduced-motion: reduce) {
    .choquequirao-contact-primary,
    .choquequirao-tour-grid .tour-best-card,
    .choquequirao-tour-grid .tour-best-card-image {
        transition: none;
    }
}
