/* ==========================================================================
   Philanthropy Social Project: editorial page shell
   ========================================================================== */

/* The philanthropy page extends the shared warm-neutral editorial system. */
.philanthropy-page {
    --philanthropy-ink: #171717;
    --philanthropy-copy: #5d5d5d;
    --philanthropy-muted: #5d5d5d;
    --philanthropy-red: #f10100;
    --philanthropy-red-deep: #b90201;
    --philanthropy-line: #e8e4de;
    --philanthropy-soft: #f5f2ed;
    --philanthropy-warm: #fff8f1;
    --philanthropy-earth: #8c5c3c;
    --philanthropy-radius: 7px;
    background-color: #ffffff;
}

/* Hero crops keep the community visible behind the existing title treatment. */
.philanthropy-page .tour-category-hero-image {
    object-position: center 38%;
}

/* The longer page title keeps an editorial measure on desktop and mobile. */
.philanthropy-page .tour-category-hero-title {
    max-width: 13ch;
}

/* Shared chapter navigation remains visually connected to the white content surface. */
.philanthropy-nav {
    border-bottom-color: var(--philanthropy-line);
}

/* All editorial figures reset browser margins for predictable compositions. */
.philanthropy-page figure {
    margin: 0;
}

/* Chapter labels establish a quiet narrative sequence without oversized numerals. */
.philanthropy-chapter {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.3rem;
    color: var(--philanthropy-red-deep);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Light chapter labels maintain contrast over the dark cooperative section. */
.philanthropy-chapter.is-light {
    color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   Introduction and documentary video
   ========================================================================== */

/* The opening spread pairs a readable story column with the source video. */
.philanthropy-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
}

/* Intro copy maintains a comfortable long-form reading width. */
.philanthropy-intro-copy {
    max-width: 600px;
}

/* The video group is separated from its caption without a nested card surface. */
.philanthropy-video-wrap {
    min-width: 0;
}

/* Responsive video frame uses the mandated 7px image corner treatment. */
.philanthropy-video-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--philanthropy-radius);
    background-color: var(--philanthropy-ink);
    box-shadow: 0 24px 60px rgba(23, 23, 23, 0.18);
}

/* The documentary poster fills its frame without fixed pixel dimensions. */
.philanthropy-video-frame > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* A solid dark veil keeps the video controls legible over the authentic photograph. */
.philanthropy-video-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(17, 17, 17, 0.34);
    transition: background-color 220ms ease;
}

/* The familiar play affordance clearly communicates the external video action. */
.philanthropy-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: var(--philanthropy-radius);
    background-color: var(--philanthropy-red);
    color: #ffffff;
    font-size: 1rem;
    transform: translate(-50%, -50%);
    transition: background-color 180ms ease, transform 180ms ease;
}

/* Optical centering compensates for the triangular play icon. */
.philanthropy-video-play i {
    margin-left: 3px;
}

/* Video label anchors the action in plain language. */
.philanthropy-video-label {
    position: absolute;
    right: 1.25rem;
    bottom: 1.1rem;
    left: 1.25rem;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Video hover adds a measured zoom and strengthens the action cue. */
.philanthropy-video-frame:hover > img {
    transform: scale(1.035);
}

/* Video hover deepens the veil so text remains clear over movement. */
.philanthropy-video-frame:hover .philanthropy-video-overlay {
    background-color: rgba(17, 17, 17, 0.46);
}

/* Video hover moves the play affordance forward without changing its geometry. */
.philanthropy-video-frame:hover .philanthropy-video-play {
    background-color: var(--philanthropy-red-deep);
    transform: translate(-50%, -50%) scale(1.06);
}

/* Media notes use compact editorial metadata styling. */
.philanthropy-media-note {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.85rem 0 0;
    color: var(--philanthropy-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* A short red marker connects the caption with the brand system. */
.philanthropy-media-note::before {
    width: 28px;
    height: 2px;
    border-radius: var(--philanthropy-radius);
    background-color: var(--philanthropy-red);
    content: "";
}

/* ==========================================================================
   Willoq Alto community spread
   ========================================================================== */

/* The community chapter uses a warm background to distinguish place from introduction. */
.philanthropy-community {
    background-color: var(--philanthropy-warm);
}

/* Community layout gives photography more visual weight than copy. */
.philanthropy-community-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
}

/* The two photographs overlap gently to feel like an editorial contact sheet. */
.philanthropy-community-gallery {
    position: relative;
    min-height: 640px;
    padding: 0 12% 12% 0;
}

/* Community images keep a documentary crop and restrained shadow. */
.philanthropy-community-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 47%;
    aspect-ratio: 0.9;
    overflow: hidden;
    border: 8px solid var(--philanthropy-warm);
    border-radius: var(--philanthropy-radius);
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
}

/* The wider image anchors the composition behind the detail frame. */
.philanthropy-community-photo.is-wide {
    top: 0;
    right: 12%;
    bottom: auto;
    left: 0;
    width: 88%;
    aspect-ratio: 1.35;
    border: 0;
}

/* Community photography fills each editorial frame. */
.philanthropy-community-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Community copy stays readable alongside the large image composition. */
.philanthropy-community-copy {
    max-width: 590px;
}

/* ==========================================================================
   Weaving cooperative dark chapter
   ========================================================================== */

/* A dark chapter gives the textile story a focused, gallery-like atmosphere. */
.philanthropy-cooperative {
    background-color: var(--philanthropy-ink);
}

/* Cooperative layout balances narrative copy and stacked documentary images. */
.philanthropy-cooperative-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
    align-items: center;
    gap: clamp(3rem, 8vw, 8rem);
}

/* Cooperative copy remains visually stable against the varied photographs. */
.philanthropy-cooperative-copy {
    max-width: 610px;
}

/* Light prose preserves soft contrast for sustained reading on dark surfaces. */
.philanthropy-cooperative .welcome-prose.is-light p {
    color: rgba(255, 255, 255, 0.7);
}

/* The pull quote is separated by spacing and tone, never a left border. */
.philanthropy-pullquote {
    max-width: 25ch;
    margin: 2.2rem 0 0;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

/* Cooperative media creates depth with one principal and one offset image. */
.philanthropy-cooperative-media {
    position: relative;
    min-height: 650px;
    padding: 0 0 14% 16%;
}

/* The principal photograph fills most of the media column. */
.philanthropy-cooperative-main {
    position: absolute;
    inset: 0 0 14% 16%;
    overflow: hidden;
    border-radius: var(--philanthropy-radius);
}

/* The detail image overlaps the main frame while remaining secondary. */
.philanthropy-cooperative-detail {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48%;
    aspect-ratio: 1.05;
    overflow: hidden;
    border: 8px solid var(--philanthropy-ink);
    border-radius: var(--philanthropy-radius);
    box-shadow: 0 28px 80px rgba(9, 16, 21, 0.24);
}

/* Cooperative images share a consistent full-bleed crop. */
.philanthropy-cooperative-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Lasting impact chapter
   ========================================================================== */

/* The impact section returns to a quiet white reading surface. */
.philanthropy-impact {
    background-color: #ffffff;
}

/* Impact content uses a two-column heading and copy followed by full-width evidence. */
.philanthropy-impact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2.5rem, 7vw, 7rem);
}

/* Impact heading stays compact enough to support the longer narrative column. */
.philanthropy-impact-heading {
    max-width: 600px;
}

/* Impact body begins level with the headline on larger screens. */
.philanthropy-impact-copy {
    align-self: end;
    max-width: 680px;
}

/* The evidence image spans both text columns as a strong editorial pause. */
.philanthropy-impact-photo {
    grid-column: 1 / -1;
    margin-top: clamp(1rem, 3vw, 2.5rem) !important;
}

/* The impact photograph uses a panoramic crop without decorative overlays. */
.philanthropy-impact-photo img {
    width: 100%;
    height: clamp(360px, 48vw, 650px);
    border-radius: var(--philanthropy-radius);
    object-fit: cover;
    object-position: center 44%;
}

/* Impact caption is intentionally concise and aligned with the body column. */
.philanthropy-impact-photo figcaption {
    max-width: 680px;
    margin: 1rem 0 0 auto;
    color: var(--philanthropy-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

/* ==========================================================================
   Participation actions
   ========================================================================== */

/* Participation section uses an ink surface to emphasize practical next steps. */
.philanthropy-participate {
    background-color: var(--philanthropy-ink);
}

/* Section introduction places the contact action beside the narrative heading. */
.philanthropy-participate-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
}

/* Contact link is a compact text action rather than a large pill control. */
.philanthropy-page .philanthropy-contact-link,
.philanthropy-page .philanthropy-contact-link:visited {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 2px solid var(--philanthropy-red);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 180ms ease, gap 180ms ease;
}

/* Contact hover uses motion and color without changing surrounding layout. */
.philanthropy-page .philanthropy-contact-link:hover,
.philanthropy-page .philanthropy-contact-link:focus-visible {
    gap: 1rem;
    color: #ffffff;
}

/* Action list forms one continuous series rather than a grid of detached boxes. */
.philanthropy-actions-list {
    margin-top: clamp(3rem, 6vw, 5.5rem);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Reusable action cards are horizontal, spacious and intentionally non-interactive. */
.philanthropy-action-card {
    display: grid;
    grid-template-columns: 56px 52px minmax(180px, 0.5fr) minmax(260px, 1fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    padding: clamp(1.5rem, 3vw, 2.2rem) 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--philanthropy-radius);
}

/* Action numbering is compact metadata rather than a visual centerpiece. */
.philanthropy-action-number {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

/* Action icons use a small square frame with the required corner radius. */
.philanthropy-action-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: var(--philanthropy-radius);
    background-color: var(--philanthropy-red);
    color: #ffffff;
    font-size: 1rem;
}

/* Action titles preserve the editorial display face. */
.philanthropy-action-card h3 {
    margin: 0;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.25rem, 2vw, 2rem) !important;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.18;
}

/* Action descriptions remain quiet enough for title-first scanning. */
.philanthropy-action-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.64);
    font-size: 1rem;
    line-height: 1.7;
}

/* ==========================================================================
   Responsible travel manifesto
   ========================================================================== */

/* Manifesto presents a photographic pause between practical actions and planning. */
.philanthropy-manifesto {
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    overflow: hidden;
    background-color: var(--philanthropy-ink);
}

/* Manifesto image and overlay fill the entire narrative band. */
.philanthropy-manifesto-image,
.philanthropy-manifesto-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
}

/* Community photography is kept wide enough to preserve the full gathering. */
.philanthropy-manifesto-image {
    object-fit: cover;
    object-position: center;
}

/* A solid veil protects text contrast without introducing decorative gradients. */
.philanthropy-manifesto-overlay {
    z-index: -1;
    background-color: rgba(12, 12, 12, 0.62);
}

/* Manifesto copy is anchored low and left like a documentary closing statement. */
.philanthropy-manifesto-content {
    padding-top: clamp(5rem, 10vw, 9rem);
    padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

/* Manifesto label separates topic from its primary statement. */
.philanthropy-manifesto-content > span {
    display: inline-block;
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Manifesto heading uses a broad but controlled editorial measure. */
.philanthropy-manifesto-content h2 {
    max-width: 13ch;
    margin: 0;
    color: #ffffff;
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
    text-wrap: balance;
}

/* Supporting manifesto copy stays readable without competing with the statement. */
.philanthropy-manifesto-content p {
    max-width: 60ch;
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.75;
}

/* ==========================================================================
   Responsive layout
   ========================================================================== */

@media (max-width: 991.98px) {
    /* Tablet stacks narrative columns while retaining spacious photo compositions. */
    .philanthropy-intro-grid,
    .philanthropy-community-grid,
    .philanthropy-cooperative-grid,
    .philanthropy-impact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Copy widths remain generous after columns collapse. */
    .philanthropy-intro-copy,
    .philanthropy-community-copy,
    .philanthropy-cooperative-copy,
    .philanthropy-impact-heading,
    .philanthropy-impact-copy {
        max-width: 760px;
    }

    /* Community photography appears before its copy at tablet size. */
    .philanthropy-community-gallery {
        min-height: 580px;
    }

    /* Cooperative copy stays first while its image spread follows naturally. */
    .philanthropy-cooperative-media {
        min-height: 620px;
    }

    /* Impact elements return to ordinary single-column flow. */
    .philanthropy-impact-photo {
        grid-column: auto;
    }

    /* Horizontal action rows use fewer columns at tablet widths. */
    .philanthropy-action-card {
        grid-template-columns: 44px 48px minmax(180px, 0.55fr) minmax(240px, 1fr);
    }

}

@media (max-width: 767.98px) {
    /* Mobile hero crop prioritizes faces in the wide source photograph. */
    .philanthropy-page .tour-category-hero-image {
        object-position: 48% center;
    }

    /* Mobile intro removes the desktop-only minimum media column width. */
    .philanthropy-intro-grid {
        gap: 2.75rem;
    }

    /* Community gallery becomes a stable layered composition on narrow screens. */
    .philanthropy-community-gallery {
        min-height: 440px;
        padding: 0 8% 15% 0;
    }

    /* Wide community photo uses most of the mobile canvas. */
    .philanthropy-community-photo.is-wide {
        right: 8%;
        width: 92%;
    }

    /* Detail community photo stays legible without covering important faces. */
    .philanthropy-community-photo {
        width: 46%;
        border-width: 6px;
    }

    /* Cooperative media is shortened for mobile while keeping overlap visible. */
    .philanthropy-cooperative-media {
        min-height: 450px;
        padding-left: 10%;
    }

    /* Main cooperative image follows the reduced mobile inset. */
    .philanthropy-cooperative-main {
        left: 10%;
    }

    /* Cooperative detail image uses a slightly broader crop on phones. */
    .philanthropy-cooperative-detail {
        width: 52%;
        border-width: 6px;
    }

    /* Impact image keeps a meaningful editorial presence on mobile. */
    .philanthropy-impact-photo img {
        height: 380px;
    }

    /* Participation intro stacks contact action below its heading. */
    .philanthropy-participate-intro {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    /* Mobile action cards become compact two-column rows. */
    .philanthropy-action-card {
        grid-template-columns: 44px 1fr;
        gap: 0.85rem 1rem;
        padding: 1.5rem 0.25rem;
    }

    /* Mobile removes numbering to prioritize the actionable title. */
    .philanthropy-action-number {
        display: none;
    }

    /* Action title aligns beside its icon on the first row. */
    .philanthropy-action-card h3 {
        align-self: center;
    }

    /* Action copy spans the complete mobile row below icon and title. */
    .philanthropy-action-card p {
        grid-column: 1 / -1;
    }

    /* Manifesto becomes shorter while preserving room for its statement. */
    .philanthropy-manifesto {
        min-height: 620px;
    }
}

@media (max-width: 420px) {
    /* Small phones receive simpler non-overlapping documentary images. */
    .philanthropy-community-gallery,
    .philanthropy-cooperative-media {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0;
    }

    /* Small-screen photos return to normal flow and consistent proportions. */
    .philanthropy-community-photo,
    .philanthropy-community-photo.is-wide,
    .philanthropy-cooperative-main,
    .philanthropy-cooperative-detail {
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 1.22;
        border: 0;
    }

    /* The secondary photo remains compact to keep the story moving. */
    .philanthropy-community-photo:not(.is-wide),
    .philanthropy-cooperative-detail {
        aspect-ratio: 1.65;
    }

    /* Manifesto headline stays inside narrow phone viewports. */
    .philanthropy-manifesto-content h2 {
        font-size: clamp(2.5rem, 13vw, 3rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Reduced-motion users receive immediate interaction changes. */
    .philanthropy-contact-link,
    .philanthropy-video-frame > img,
    .philanthropy-video-overlay,
    .philanthropy-video-play,
    .philanthropy-action-card {
        transition: none;
    }
}
