:root {
    --gp-green: #66CC00;
    --gp-green-hover: #5bb600;
    --action-yellow: #FFFF00;
    --cyan: #18B7C4;
    --orange: #FF8A00;
    --danger-red: #E31A1C;

    --ui-white: #FFFFFF;
    --ui-light-grey: #EEEEF4;
    --ui-soft-grey: #F4F3F3;
    --ui-black: #262626;
    --ui-muted: #646464;
    --ui-body: #262D30;
    --ui-border: #E0E0E6;

    --buttons-border-radius: 10px;
    --buttons-language-radius: 15px;
    --buttons-language-bg-color: #F4F3F3;
    --buttons-shadow: 0px 0px 20px rgba(0, 0, 0, 0.15);
    --header-height: 110px;
    --container-max: 1400px;
}

/* vietnamese */
@font-face {
    font-family: "Work Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/WorkSans-Viet.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
    font-family: "Work Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/WorkSans-LatinExt.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: "Work Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/WorkSans-Latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Greenpeace Sans Bold";
    src: url("../fonts/GreenpeaceSans-Bold.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Work Sans", "Segoe UI", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--ui-white);
    color: var(--ui-body);
    min-height: 100vh;
}

a {
    color: var(--gp-green);
}

/* gmh template loader */
#loadingOverlay.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background-color: var(--ui-white);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loadingOverlay.loader.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.spinner-wrapper {
    display: flex;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 20px;
}

.spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(farthest-side, #66cc00 94%, #0000) top/9px 9px no-repeat,
        conic-gradient(#0000 30%, #66cc00);
    -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 0);
    mask: radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 0);
    animation: spinner 1s infinite linear;
}

@keyframes spinner {
    100% { transform: rotate(1turn); }
}

/* hero block, full-bleed globe with overlaid text */
.hero {
    position: relative;
    color: var(--ui-white);
    min-height: min(100dvh, 920px);
    overflow: hidden;
    background:
        radial-gradient(
            ellipse 55% 50% at 0% 0%,
            rgba(102, 204, 0, 0.22) 0%,
            rgba(58, 167, 78, 0.1) 28%,
            transparent 65%
        ),
        radial-gradient(
            ellipse 45% 55% at 18% 42%,
            rgba(26, 105, 18, 0.35) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 50% 55% at 72% 48%,
            rgba(102, 204, 0, 0.1) 0%,
            rgba(0, 75, 0, 0.12) 35%,
            transparent 70%
        ),
        #070f0c;
    border-bottom: 6px solid var(--gp-green);
}

/* full-size globe canvas, with left padding */
.hero-map {
    --globe-pad-left: clamp(12rem, 28vw, 30rem);
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: transparent;
}

.hero-map #heroMap,
.hero-map .mapboxgl-map {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--globe-pad-left);
    width: auto;
    height: 100%;
    background: transparent !important;
}

.hero-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: inherit;
    display: flex;
    align-items: center;
    padding: 5.5rem 40px 5rem;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 34rem;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

/* avoid the hard box edge of the ::after shadow */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(7, 15, 12, 0.78) 0%,
        rgba(7, 15, 12, 0.5) 22%,
        rgba(7, 15, 12, 0.18) 40%,
        transparent 58%
    );
}

.hero h1 {
    font-family: "Greenpeace Sans Bold", "Work Sans", sans-serif;
    font-size: clamp(2.6rem, 5.2vw, 4.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-align: left;
    text-transform: none;
    max-width: 14ch;
    text-shadow: 0 2px 24px rgba(7, 15, 12, 0.45);
}

.hero h1 span {
    color: var(--action-yellow);
    text-decoration: underline;
    text-decoration-color: var(--action-yellow);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.hero p,
.hero #pageSubtitle {
    font-family: "Work Sans", sans-serif;
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
    margin-bottom: 1rem;
    text-align: left;
    font-weight: 400;
    max-width: 36rem;
    line-height: 1.65;
    text-shadow: 0 1px 16px rgba(7, 15, 12, 0.4);
}

.hero .badge-container {
    justify-content: flex-start;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.hero .badge-container:empty {
    display: none;
}

.hero .badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ui-white);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero .badge i {
    color: var(--action-yellow);
}

.hero-map .mapboxgl-canvas-container,
.hero-map .mapboxgl-canvas {
    background: transparent !important;
}

/* hide attribution / info */
.hero-map .mapboxgl-ctrl-attrib,
.hero-map .mapboxgl-ctrl-attrib-button,
.hero-map .mapboxgl-compact-attrib-button {
    display: none !important;
}

/* mapbox logo, bottom-right, translucent */
.hero-map .mapboxgl-ctrl-bottom-left {
    left: auto !important;
    right: 0 !important;
    bottom: 0 !important;
}

.hero-map .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl {
    margin: 0 10px 10px 0;
}

.hero-map a.mapboxgl-ctrl-logo {
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.hero-map a.mapboxgl-ctrl-logo:hover {
    opacity: 0.55;
}

/* pause/start rotation, "liquid glass-y" control */
.hero-map #btn-spin {
    font-family: "Work Sans", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.02em;
    background: rgba(7, 15, 12, 0.45);
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: absolute;
    bottom: 14px;
    left: calc((100% + var(--globe-pad-left)) / 2);
    transform: translateX(-50%);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.14);
    min-width: 0;
    max-width: calc(100% - var(--globe-pad-left) - 32px);
    display: block;
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: none;
}

.hero-map #btn-spin:hover {
    background: rgba(7, 15, 12, 0.62);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.hero-map #btn-spin:focus-visible {
    outline: 2px solid rgba(102, 204, 0, 0.55);
    outline-offset: 2px;
}

/* map popups */
.hero-map .mapboxgl-popup-content {
    font-family: "Work Sans", "Segoe UI", sans-serif;
    color: #262D30;
    padding: 14px 16px 16px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.hero-map .gp-popup__title {
    font-family: "Greenpeace Sans Bold", "Work Sans", sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0 0 8px;
    color: #262626;
}

.hero-map .gp-popup__desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 10px;
    color: #555555;
}

.hero-map .gp-popup__link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #66CC00;
    text-decoration: none;
}

.hero-map .gp-popup__link:hover {
    text-decoration: underline;
    color: #5bb600;
}

.hero-map .custom-marker {
    background-size: cover;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.hero-map .mapboxgl-cooperative-gesture-screen {
    font-family: "Work Sans", "Segoe UI", sans-serif;
}

.hero-anim {
    opacity: 0;
    transform: translateY(1.1rem);
}

.hero.is-ready .hero-anim {
    animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero.is-ready .hero-anim--1 { animation-delay: 0.15s; }
.hero.is-ready .hero-anim--2 { animation-delay: 0.4s; }
.hero.is-ready .hero-anim--3 { animation-delay: 0.65s; }

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-anim,
    .hero.is-ready .hero-anim {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* language selector, overlaid on hero */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
    display: block !important;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.language-selector select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 0;
    color: #000;
    background-color: var(--buttons-language-bg-color);
    background-image:
        url("../img/gp-template/globe.svg"),
        linear-gradient(45deg, transparent 50%, #000 50%),
        linear-gradient(135deg, #000 50%, transparent 50%);
    background-position:
        15px center,
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 23px 22px, 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    border-radius: var(--buttons-language-radius);
    padding: 10px 36px 10px 48px;
    font-family: "Work Sans", sans-serif;
    font-size: 16px;
    line-height: 22px;
    min-height: 46px;
}

.language-selector select:hover,
.language-selector select:focus {
    outline: 2px solid rgba(102, 204, 0, 0.45);
    outline-offset: 2px;
}

/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px;
}

.intro-section {
    padding: 4rem 0 1rem;
}

.page-detail {
    font-family: "Work Sans", sans-serif;
    font-size: 1.35em;
    line-height: 1.7;
    color: #555555;
    /*margin-bottom: 1.5rem;*/
}

.badge {
    background: var(--ui-soft-grey);
    color: var(--ui-black);
    padding: 8px 14px;
    border-radius: 40px;
    font-size: 1em;
    font-weight: 400;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge i {
    color: var(--gp-green);
}

.section-title {
    font-family: "Greenpeace Sans Bold", "Work Sans", sans-serif;
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 400;
    text-transform: none;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--ui-black);
    margin: 0 0 1.25rem;
    position: relative;
    display: block;
}

.stories-section {
    margin: 3rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ui-border);
}

.stories-intro {
    margin-bottom: 1.75rem;
    max-width: 40rem;
}

.stories-intro .section-title {
    margin-bottom: 0.85rem;
}

.stories-detail {
    margin-bottom: 0;
}

/* Stories grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 0 0 3rem;
}

.story-card {
    background: var(--ui-white);
    border-radius: var(--buttons-border-radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ui-border);
}

.story-card:hover {
    /*transform: translateY(-3px);*/
    box-shadow: var(--buttons-shadow);
    /*border-color: rgba(102, 204, 0, 0.45);*/
}

.story-card:focus-visible {
    outline: 3px solid rgba(102, 204, 0, 0.55);
    outline-offset: 2px;
}

.card-media {
    height: 180px;
    background-size: cover;
    background-position: center 30%;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.card-overlay-icon {
    background: rgba(38, 38, 38, 0.72);
    margin: 12px;
    padding: 6px 12px;
    border-radius: 40px;
    color: white;
    font-weight: 400;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.card-content {
    padding: 1.5rem 1.35rem 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: "Greenpeace Sans Bold", "Work Sans", sans-serif;
    font-size: 1.5em;
    font-weight: 400;
    text-transform: none;
    letter-spacing: -0.01em;
    margin-bottom: 0.65rem;
    color: var(--ui-black);
    line-height: 1.2;
}

.card-desc {
    font-size: 1em;
    color: #75757A;
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(102, 204, 0, 0.12);
    padding: 6px 12px;
    border-radius: 40px;
    font-size: 0.9em;
    font-weight: 600;
    color: #1a6912;
    margin-top: auto;
    width: fit-content;
}

.under-construction {
    position: absolute;
    top: 24px;
    right: -24px;
    z-index: 20;
    width: 180px;
    padding: 8px 0;
    background: rgba(255, 255, 0, 0.92);
    color: var(--ui-black);
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: rotate(35deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Map */
.map-section {
    display: none;
    width: 100%;
    border-radius: var(--buttons-border-radius);
    overflow: hidden;
    background: var(--ui-white);
    border: 1px solid var(--ui-border);
    margin: 1rem 0 0.5rem;
}

.map-container {
    position: relative;
    width: 100%;
    border-radius: var(--buttons-border-radius);
    overflow: hidden;
    background: var(--ui-light-grey);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: 0;
}

/* Footer */
.footer {
    background: var(--ui-black);
    color: #D9D9D9;
    padding: 2.5rem 0 2rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1em;
    line-height: 1.6;
}

.footer p {
    margin-bottom: 0.75rem;
}

.footer a {
    color: var(--gp-green);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--ui-white);
    border-radius: 15px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ui-border);
    background: var(--ui-soft-grey);
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-family: "Greenpeace Sans Bold", "Work Sans", sans-serif;
    font-size: 1.35em;
    text-transform: none;
    color: var(--ui-black);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--ui-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-red);
}

.modal-content {
    padding: 1.5rem;
    font-family: "Work Sans", sans-serif;
    font-size: 1.15em;
    line-height: 1.6;
    color: var(--ui-body);
}

.modal-content p {
    margin-bottom: 1rem;
}

.modal-content a {
    color: var(--gp-green);
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

.modal-content .acknowledgments {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 0 5px;
}

@media (max-width: 680px) {
    .modal-content .acknowledgments {
        width: 80px;
        height: 80px;
    }

    .modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .map-container iframe {
        height: 400px;
    }

    /* stack things, copy first, globe as a block below */
    .hero {
        display: flex;
        flex-direction: column;
        min-height: auto;
        overflow: visible;
    }

    .hero-map {
        --globe-pad-left: 0;
        position: relative;
        inset: auto;
        z-index: 1;
        width: 100%;
        height: min(58vh, 420px);
        min-height: 300px;
        flex-shrink: 0;
    }

    .hero-map #heroMap,
    .hero-map .mapboxgl-map {
        left: 0;
    }

    .hero-inner {
        position: relative;
        z-index: 2;
        min-height: auto;
        align-items: flex-start;
        padding: 5rem 28px 1.75rem;
        pointer-events: auto;
    }

    .hero-copy {
        max-width: none;
        padding-bottom: 0;
    }

    /* on stacked mobile layout the globe sits below */
    .hero::before {
        background: linear-gradient(
            180deg,
            rgba(7, 15, 12, 0.35) 0%,
            transparent 55%
        );
    }

    .hero h1,
    .hero #pageSubtitle {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }

    .hero .badge-container {
        justify-content: flex-start;
    }

    .hero-map #btn-spin {
        bottom: 14px;
        top: auto;
        left: 50%;
    }
}

@media (max-width: 600px) {
    .language-selector {
        top: 12px;
        right: 12px;
    }

    .container {
        padding: 0 20px;
    }

    .hero-inner {
        padding: 4.5rem 20px 1.5rem;
    }

    .hero-map {
        height: min(65vh, 380px);
        min-height: 280px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero #pageSubtitle {
        font-size: 1.1em;
        margin-bottom: 0;
    }

    .intro-section {
        padding-top: 2.5rem;
    }

    .section-title {
        font-size: 2.1rem;
        max-width: none;
    }

    .page-detail {
        font-size: 1.1em;
    }

    .card-title {
        font-size: 1.1em;
    }

    .card-desc {
        font-size: 0.95em;
    }

    .stories-grid {
        gap: 1rem;
    }
}
