/* ==========================================================================
   Peru Custom Private Tours: page foundation and browser surfaces
   ========================================================================== */

/* The page inherits the established Andean editorial palette. */
.custom-private-page {
    --custom-red: #b90201;
    --custom-red-bright: #f10100;
    --custom-ink: #171717;
    --custom-copy: #525252;
    --custom-muted: #747474;
    --custom-paper: #fffaf5;
    --custom-soft: #f7f7f5;
    --custom-line: #e8e8e4;
    --custom-radius: 7px;
    overflow: clip;
    background: #ffffff;
    color: var(--custom-copy);
}

/* The body remains continuous with the shared dark footer. */
body.custom-private-body {
    background: #050505;
}

/* Selection and scrollbars carry the single-red brand signal. */
.custom-private-page ::selection {
    background: var(--custom-red);
    color: #ffffff;
}

.custom-private-page {
    scrollbar-color: var(--custom-red) var(--custom-soft);
    scrollbar-width: thin;
}

.custom-private-page::-webkit-scrollbar {
    width: 10px;
}

.custom-private-page::-webkit-scrollbar-track {
    background: var(--custom-soft);
}

.custom-private-page::-webkit-scrollbar-thumb {
    border-radius: var(--custom-radius);
    background: var(--custom-red);
}

/* All keyboard-operated controls share one visible focus treatment. */
.custom-private-page :where(a, button, input, select, textarea):focus-visible,
.custom-private-body .csp-site-header :where(a, button):focus-visible {
    border-radius: var(--custom-radius);
    outline: 3px solid var(--custom-red-bright);
    outline-offset: 3px;
}

/* Figures reset their browser margin for predictable editorial grids. */
.custom-private-page figure {
    margin: 0;
}

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

/* The first viewport stays immersive beneath the shared header. */
.custom-private-page .tour-category-hero {
    min-height: 680px;
    height: clamp(680px, calc(100svh - 69px), 840px);
}

/* The custom-tour title forms a compact two-line editorial statement. */
.custom-private-page .tour-category-hero-title {
    max-width: 12ch;
    font-size: clamp(3rem, 6.5vw, 5.8rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    text-wrap: balance;
}

/* Shared slider arrows meet the page's minimum pointer target size. */
.custom-private-page .tour-category-hero-nav-btn {
    min-width: 44px;
    min-height: 44px;
}

/* The sticky chapter strip uses the shared navigation behavior. */
.custom-private-nav {
    border-bottom-color: var(--custom-line);
}

/* ==========================================================================
   Literal editorial introduction
   ========================================================================== */

/* The source copy and decisive image share equal visual authority. */
.custom-private-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
}

/* The heading carries the source title without an added eyebrow. */
.custom-private-heading h2,
.custom-private-planning-heading h2,
.custom-private-tours-heading h2,
.custom-private-enquiry-heading h2,
.custom-private-destinations-heading h2 {
    margin: 0;
    color: var(--custom-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2.1rem, 4.7vw, 4.6rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 0.98;
    text-wrap: balance;
}

/* Long source paragraphs retain a comfortable reading measure. */
.custom-private-source-copy {
    max-width: 72ch;
    margin-top: 2rem;
}

/* The opening image creates a tall, hospitality-led counterweight. */
.custom-private-intro-media {
    position: relative;
    min-height: 780px;
    overflow: hidden;
    border-radius: var(--custom-radius);
    background: var(--custom-ink);
}

.custom-private-intro-media > img {
    width: 100%;
    height: 100%;
    min-height: 780px;
    object-fit: cover;
    transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-private-intro-media:hover > img {
    transform: scale(1.025);
}

/* The three source promises remain readable over changing image tones. */
.custom-private-intro-media figcaption {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    left: 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--custom-radius);
    background: rgba(10, 10, 10, 0.88);
    color: #ffffff;
}

.custom-private-intro-media figcaption span {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem;
    border-radius: var(--custom-radius);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

/* ==========================================================================
   Dark custom-journey manifesto
   ========================================================================== */

/* The dark interval turns the planning approach into a decisive statement. */
.custom-private-manifesto {
    padding: clamp(5rem, 9vw, 9rem) 0;
    background: var(--custom-ink);
    color: #ffffff;
}

.custom-private-manifesto-grid {
    display: grid;
    grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
    align-items: start;
    gap: clamp(3rem, 9vw, 9rem);
}

/* The compact mark gives the section one memorable typographic moment. */
.custom-private-manifesto-mark {
    position: sticky;
    top: 150px;
}

.custom-private-manifesto-mark strong {
    display: block;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(3.5rem, 8vw, 7.8rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 0.82;
}

/* Source paragraphs stay warm white against the dark ground. */
.custom-private-manifesto-copy {
    max-width: 76ch;
    color: #f2f2ee;
}

.custom-private-manifesto-copy.welcome-prose.is-lead p {
    margin-bottom: 1.6rem;
    color: #f2f2ee;
}

.custom-private-manifesto-copy a {
    color: var(--custom-red-bright);
    font-weight: 800;
    text-underline-offset: 4px;
}

/* ==========================================================================
   Planning atlas
   ========================================================================== */

/* The planning introduction keeps long source copy aligned to one reading rail. */
.custom-private-planning-heading {
    max-width: 1000px;
    margin-bottom: clamp(3rem, 6vw, 5.5rem);
}

.custom-private-planning-heading p,
.custom-private-tours-heading p,
.custom-private-enquiry-heading p,
.custom-private-destinations-heading p {
    max-width: 78ch;
    margin: 1.5rem 0 0;
    color: var(--custom-copy);
    font-size: 1.05rem;
    line-height: 1.8;
}

.custom-private-planning-heading a {
    color: var(--custom-red);
    text-underline-offset: 4px;
}

/* The atlas alternates dense choices with photographic pauses. */
.custom-private-plan-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
}

/* Planning blocks use full outlines instead of forbidden left accents. */
.custom-private-plan-block {
    padding: clamp(1.4rem, 3vw, 2.25rem);
    border: 1px solid var(--custom-line);
    border-radius: var(--custom-radius);
    background: #ffffff;
}

.custom-private-plan-block h3 {
    margin: 0 0 1.25rem;
    color: var(--custom-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.05;
}

.custom-private-plan-block ul {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding-left: 1.15rem;
}

.custom-private-plan-block li {
    padding-left: 0.25rem;
    line-height: 1.62;
}

.custom-private-plan-block li::marker {
    color: var(--custom-red);
}

.custom-private-plan-block strong,
.custom-private-plan-block a {
    color: var(--custom-red);
}

.custom-private-plan-block.is-personal {
    grid-column: span 4;
    background: var(--custom-paper);
}

.custom-private-plan-image.is-primary {
    grid-column: span 8;
}

.custom-private-plan-block.is-interests,
.custom-private-plan-block.is-destinations,
.custom-private-plan-block.is-themes {
    grid-column: span 6;
}

.custom-private-plan-image.is-secondary {
    grid-column: span 6;
}

/* Atlas photography fills clean rectangular pauses between lists. */
.custom-private-plan-image {
    min-height: 360px;
    overflow: hidden;
    border-radius: var(--custom-radius);
    background: var(--custom-ink);
}

.custom-private-plan-image img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

/* ==========================================================================
   Bestselling tours
   ========================================================================== */

/* Warm paper separates the decision grid from the planning atlas. */
.custom-private-tours {
    background: var(--custom-paper);
}

.custom-private-tours-heading,
.custom-private-enquiry-heading,
.custom-private-destinations-heading {
    max-width: 900px;
    margin: 0 auto clamp(3rem, 6vw, 5rem);
    text-align: center;
}

.custom-private-tours-heading p,
.custom-private-enquiry-heading p,
.custom-private-destinations-heading p {
    margin-right: auto;
    margin-left: auto;
}

/* Shared tour cards form a balanced three-column decision grid. */
.custom-private-tour-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.custom-private-tour-grid .tour-best-card {
    min-width: 0;
    height: 100%;
}

.custom-private-tour-grid .tour-best-card-title {
    min-height: 3.15em;
}

.custom-private-tour-grid .tour-best-card-button {
    min-height: 46px;
}

/* ==========================================================================
   Reusable enquiry form
   ========================================================================== */

/* The form section returns to white and keeps the task visually quiet. */
.custom-private-enquiry {
    background: #ffffff;
}

.custom-private-form-shell {
    padding: clamp(1.25rem, 4vw, 3.5rem);
    border: 1px solid var(--custom-line);
    border-radius: var(--custom-radius);
    background: var(--custom-soft);
}

/* The embedded reusable form follows the page's touch-size baseline. */
.custom-private-form-shell :where(input, select, textarea, button, .customize-whatsapp-cta) {
    min-height: 44px;
    border-radius: var(--custom-radius) !important;
}

/* ==========================================================================
   Customer service interlude
   ========================================================================== */

/* Contact details sit beside one panoramic image instead of another card grid. */
.custom-private-contact {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background: var(--custom-ink);
}

.custom-private-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    align-items: stretch;
    gap: 1.25rem;
}

.custom-private-contact-image {
    min-height: 420px;
    overflow: hidden;
    border-radius: var(--custom-radius);
}

.custom-private-contact-image img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.custom-private-contact-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: var(--custom-radius);
    background: var(--custom-red);
    color: #ffffff;
}

.custom-private-contact-copy h2 {
    margin: 0 0 1.5rem;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2rem, 3.6vw, 3.7rem);
    font-weight: 500;
    line-height: 0.98;
}

.custom-private-contact-copy p {
    margin: 0;
    color: #ffffff;
    line-height: 1.85;
}

.custom-private-contact-copy a {
    color: #ffffff;
    font-weight: 800;
    text-underline-offset: 4px;
}

/* ==========================================================================
   Destination inspiration cards
   ========================================================================== */

/* Destination examples use the existing editorial card include. */
.custom-private-destinations {
    background: var(--custom-soft);
}

.custom-private-destination-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.custom-private-destination-grid .travel-guide-article-card {
    height: 100%;
}

.custom-private-destination-grid .travel-guide-article-media {
    display: block;
    height: 230px;
}

.custom-private-destination-grid .travel-guide-article-title {
    min-height: 3.3em;
    font-size: 1.2rem;
}

.custom-private-destination-grid .travel-guide-article-excerpt {
    display: -webkit-box;
    min-height: 6.4em;
    margin: 0;
    overflow: hidden;
    color: var(--custom-copy);
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.custom-private-destination-grid .travel-guide-article-footer {
    margin-top: auto;
}

.custom-private-destination-grid .tour-best-card-button {
    width: 100%;
    min-height: 44px;
}

/* ==========================================================================
   Closing footage statement
   ========================================================================== */

/* The final source paragraph overlays a wide photographic field. */
.custom-private-footage {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--custom-ink);
}

.custom-private-footage::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 20%, rgba(0, 0, 0, 0.88) 100%);
}

.custom-private-footage-media {
    position: absolute;
    inset: 0;
}

.custom-private-footage-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-private-footage-copy {
    position: relative;
    z-index: 1;
    padding-bottom: clamp(3rem, 7vw, 6rem);
    color: #ffffff;
}

.custom-private-footage-copy p {
    max-width: 850px;
    margin: 0 0 1.5rem;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 3.6rem);
    line-height: 1.08;
}

.custom-private-footage-copy a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 1.1rem;
    border-radius: var(--custom-radius);
    background: var(--custom-red);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 180ms ease, transform 180ms ease;
}

.custom-private-footage-copy a:hover,
.custom-private-footage-copy a:focus-visible {
    background: var(--custom-red-bright);
    color: #ffffff;
    transform: translateY(-2px);
}

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

/* Tablet layouts preserve hierarchy while reducing columns. */
@media (max-width: 1199px) {
    .custom-private-intro-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
        gap: 3rem;
    }

    .custom-private-intro-media,
    .custom-private-intro-media > img {
        min-height: 680px;
    }

    .custom-private-tour-grid,
    .custom-private-destination-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Stacked layouts remove sticky reading rails before they can obscure content. */
@media (max-width: 991px) {
    .custom-private-page .tour-category-hero {
        min-height: 650px;
        height: 78svh;
    }

    .custom-private-intro-grid,
    .custom-private-manifesto-grid,
    .custom-private-contact-grid {
        grid-template-columns: 1fr;
    }

    .custom-private-intro-media,
    .custom-private-intro-media > img {
        min-height: 580px;
    }

    .custom-private-manifesto-mark {
        position: static;
    }

    .custom-private-manifesto-mark strong {
        font-size: clamp(4rem, 15vw, 7rem);
    }

    .custom-private-plan-block.is-personal,
    .custom-private-plan-image.is-primary,
    .custom-private-plan-block.is-interests,
    .custom-private-plan-block.is-destinations,
    .custom-private-plan-image.is-secondary,
    .custom-private-plan-block.is-themes {
        grid-column: span 12;
    }

    .custom-private-contact-copy {
        order: -1;
    }
}

/* Mobile layouts keep every target comfortable and every list readable. */
@media (max-width: 767px) {
    .custom-private-page .tour-category-hero {
        min-height: 620px;
        height: 78svh;
    }

    .custom-private-page .tour-category-hero-title {
        max-width: 11ch;
        font-size: clamp(2.65rem, 13vw, 4.2rem);
    }

    .custom-private-heading h2,
    .custom-private-planning-heading h2,
    .custom-private-tours-heading h2,
    .custom-private-enquiry-heading h2,
    .custom-private-destinations-heading h2 {
        font-size: clamp(2rem, 10vw, 3.1rem);
    }

    .custom-private-intro-media,
    .custom-private-intro-media > img {
        min-height: 460px;
    }

    .custom-private-intro-media figcaption {
        grid-template-columns: 1fr;
    }

    .custom-private-plan-grid {
        display: block;
    }

    .custom-private-plan-block,
    .custom-private-plan-image {
        margin-bottom: 1rem;
    }

    .custom-private-plan-image,
    .custom-private-plan-image img {
        min-height: 300px;
    }

    .custom-private-tour-grid,
    .custom-private-destination-grid {
        grid-template-columns: 1fr;
    }

    .custom-private-tour-grid .tour-best-card-title,
    .custom-private-destination-grid .travel-guide-article-title,
    .custom-private-destination-grid .travel-guide-article-excerpt {
        min-height: 0;
    }

    .custom-private-form-shell {
        padding: 1rem;
    }

    .custom-private-contact-image,
    .custom-private-contact-image img {
        min-height: 300px;
    }

    .custom-private-footage {
        min-height: 580px;
    }
}

/* Very small phones retain content without compressed gutters. */
@media (max-width: 359px) {
    .custom-private-page .tour-category-hero-title {
        font-size: 2.45rem;
    }

    .custom-private-intro-media figcaption {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
    }

    .custom-private-plan-block,
    .custom-private-contact-copy {
        padding: 1.2rem;
    }
}

/* Reduced-motion users receive every interaction without spatial movement. */
@media (prefers-reduced-motion: reduce) {
    .custom-private-page *,
    .custom-private-page *::before,
    .custom-private-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .custom-private-page :where(.custom-private-intro-media:hover > img, .tour-best-card:hover, .tour-best-card:focus-within, .tour-best-card:hover .tour-best-card-image, .tour-best-card:focus-within .tour-best-card-image, .custom-private-footage-copy a:hover, .custom-private-footage-copy a:focus-visible) {
        transform: none !important;
    }
}
