/* ==========================================================================
   WMOverland — Maps & Routes
   ========================================================================== */

.maps-hero {
    position: relative;
    min-height: 20rem;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(17, 24, 19, 0.9) 0%, rgba(17, 24, 19, 0.7) 42%, rgba(17, 24, 19, 0.2) 100%),
        url("/assets/images/home-hero.webp") 50% 58% / cover no-repeat;
}

.maps-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    background: url("/assets/images/topo-easter-eggs.svg") center / cover no-repeat;
}

.maps-hero__inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 4.75rem 0 4rem;
    color: #f4efe3;
}

.maps-hero .eyebrow {
    margin: 0 0 0.65rem;
    color: #d4b477;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.maps-hero h1 {
    margin: 0;
    color: #fffaf0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.maps-hero__inner > p:last-child {
    max-width: 42rem;
    margin: 1.25rem 0 0;
    color: rgba(255, 250, 240, 0.86);
    font-size: 1.05rem;
    line-height: 1.65;
}

.maps-journal {
    position: relative;
    overflow: hidden;
    background: #e8dfcb;
}

.maps-journal::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -1px;
    left: 0;
    width: 100%;
    height: 2rem;
    background: url("/assets/images/journal-top-edge.png") center top / 100% 100% no-repeat;
    pointer-events: none;
}

.maps-journal__trees {
    position: absolute;
    z-index: 0;
    width: 18rem;
    height: 32rem;
    opacity: 0.18;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.maps-journal__trees--left {
    top: 8rem;
    left: -6rem;
    background-image: url("/assets/images/journal-trees-left.png");
}

.maps-journal__trees--right {
    right: -7rem;
    bottom: 8rem;
    background-image: url("/assets/images/journal-trees-right.png");
}

.maps-layout {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 5.5rem 0 6rem;
}

.trail-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.trail-note {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.35rem;
    min-height: 12rem;
    padding: 2rem 2.2rem;
    background: #f4eddd;
    border: 1px solid rgba(62, 52, 37, 0.22);
    box-shadow: 0 12px 24px rgba(55, 45, 31, 0.12);
}

.trail-note--favorite {
    transform: rotate(-0.65deg);
}

.trail-note--bucket {
    transform: rotate(0.55deg);
}

.trail-note::after {
    content: "";
    position: absolute;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.trail-note--favorite::after {
    right: -0.25rem;
    bottom: -0.3rem;
    width: 10.5rem;
    height: 9rem;
    background-image: url("/assets/images/maps/coffee-ring-heavy.png");
    transform: rotate(-9deg);
}

.trail-note--bucket::after {
    top: -0.3rem;
    right: -0.15rem;
    width: 9.5rem;
    height: 9.5rem;
    background-image: url("/assets/images/maps/partial-muddy-boot.png");
    transform: rotate(4deg);
}

.trail-note__stamp {
    display: grid;
    width: 3.6rem;
    height: 3.6rem;
    place-items: center;
    border: 2px solid #8f352d;
    border-radius: 50%;
    color: #8f352d;
    font-size: 1.55rem;
    transform: rotate(-9deg);
}

.trail-note__stamp--pin {
    color: #324c3b;
    border-color: #324c3b;
    transform: rotate(8deg);
}

.trail-note__label,
.map-library__kicker,
.map-card__region {
    margin: 0 0 0.45rem;
    color: #8f352d;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.trail-note h2 {
    margin: 0 0 0.55rem;
    color: #28261f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    line-height: 1.1;
}

.trail-note p:not(.trail-note__label) {
    margin: 0 0 1rem;
    color: #665e50;
    line-height: 1.55;
}

.trail-note a {
    color: #314c3b;
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22rem;
}

.map-library__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(47, 45, 37, 0.72);
}

.map-library__heading h2 {
    margin: 0;
    color: #26251f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
}

.map-library__heading > p {
    margin: 0 0 0.2rem;
    color: #766c5b;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}

.map-card {
    position: relative;
    overflow: hidden;
    background: #f8f2e5;
    border: 1px solid rgba(53, 47, 36, 0.24);
    box-shadow: 0 14px 28px rgba(54, 45, 31, 0.16);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.map-card:hover,
.map-card:focus-within {
    z-index: 2;
    transform: translateY(-0.35rem) rotate(0);
    box-shadow: 0 19px 34px rgba(54, 45, 31, 0.22);
}

.map-card__link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.map-card__link:focus-visible {
    outline: 3px solid #9c3d32;
    outline-offset: -3px;
}

.map-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #d9d2c2;
    border-bottom: 1px solid rgba(53, 47, 36, 0.24);
}

.map-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) contrast(1.04);
    transition: transform 260ms ease, filter 260ms ease;
}

.map-card:hover .map-card__image img,
.map-card:focus-within .map-card__image img {
    transform: scale(1.035);
    filter: saturate(1) contrast(1.04);
}

.map-card__type {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    padding: 0.42rem 0.65rem 0.36rem;
    background: rgba(39, 54, 43, 0.92);
    color: #fff8e9;
    border: 1px solid rgba(255, 248, 233, 0.5);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.map-card__favorite {
    position: absolute;
    top: 0.75rem;
    right: 0.8rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    background: #f5ead0;
    color: #983d31;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(33, 28, 21, 0.28);
    font-size: 1rem;
}

.map-card__body {
    display: flex;
    min-height: 13.25rem;
    flex-direction: column;
    padding: 1.5rem 1.55rem 1.35rem;
}

.map-card__region {
    color: #8f352d;
}

.map-card h3 {
    margin: 0 0 0.65rem;
    color: #292720;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    line-height: 1.05;
}

.map-card__body > p:not(.map-card__region) {
    margin: 0 0 1.4rem;
    color: #6a6254;
    line-height: 1.55;
}

.map-card__action {
    margin-top: auto;
    color: #304b3a;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.map-field-note {
    position: relative;
    width: min(39rem, 92%);
    margin: 5.5rem auto 0;
    padding: 2.2rem 2.8rem 2rem;
    background: #efe4c8;
    border: 1px solid rgba(64, 53, 35, 0.18);
    box-shadow: 0 12px 24px rgba(54, 45, 31, 0.12);
    transform: rotate(-1.1deg);
    text-align: center;
}

.map-field-note__tape {
    position: absolute;
    top: -0.85rem;
    left: 50%;
    width: 7rem;
    height: 1.65rem;
    background: rgba(205, 190, 151, 0.68);
    transform: translateX(-50%) rotate(1.5deg);
}

.map-field-note p {
    margin: 0;
    color: #39362e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-style: italic;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .trail-notes,
    .map-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .maps-hero {
        min-height: 17rem;
    }

    .maps-hero__inner,
    .maps-layout {
        width: min(100% - 2rem, 1180px);
    }

    .maps-hero__inner {
        padding: 4rem 0 3rem;
    }

    .maps-layout {
        padding: 4.5rem 0 4rem;
    }

    .trail-notes,
    .map-grid {
        grid-template-columns: 1fr;
    }

    .trail-notes {
        gap: 1.4rem;
        margin-bottom: 4rem;
    }

    .trail-note {
        grid-template-columns: 1fr;
        transform: none;
    }

    .trail-note__stamp {
        width: 3rem;
        height: 3rem;
    }

    .map-library__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.65rem;
    }

    .map-card,
    .map-card--1,
    .map-card--2,

    .map-field-note {
        width: 100%;
        margin-top: 4rem;
        padding: 2rem 1.4rem 1.7rem;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .map-card,
    .map-card__image img {
        transition: none;
    }
}


/* Pass 7.5 — Published Trips index */
.trip-library { margin-bottom: 5rem; }
.trip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem; }
.trip-card { position: relative; overflow: hidden; background: #f8f2e5; border: 1px solid rgba(53, 47, 36, 0.24); box-shadow: 0 14px 28px rgba(54, 45, 31, 0.16); transition: transform 180ms ease, box-shadow 180ms ease; }
.trip-card--1 { transform: rotate(-0.35deg); }
.trip-card--2 { transform: rotate(0.3deg); }
.trip-card--3 { transform: rotate(-0.2deg); }
.trip-card:hover, .trip-card:focus-within { z-index: 2; transform: translateY(-0.35rem) rotate(0); box-shadow: 0 19px 34px rgba(54, 45, 31, 0.22); }
.trip-card__link { display: block; height: 100%; color: inherit; text-decoration: none; }
.trip-card__link:focus-visible { outline: 3px solid #9c3d32; outline-offset: -3px; }
.trip-card__topo { position: relative; min-height: 8.5rem; overflow: hidden; background: linear-gradient(rgba(47, 68, 53, 0.88), rgba(47, 68, 53, 0.88)), url("/assets/images/topo-easter-eggs.svg") center / cover no-repeat; border-bottom: 1px solid rgba(53, 47, 36, 0.24); }
.trip-card__stamp { position: absolute; top: 1rem; left: 1rem; padding: 0.42rem 0.7rem 0.36rem; color: #fff8e9; border: 1px solid rgba(255, 248, 233, 0.65); font-size: 0.64rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.trip-card__pin { position: absolute; right: 1.25rem; bottom: 0.8rem; color: #d4b477; font-size: 3.4rem; line-height: 1; transform: rotate(7deg); }
.trip-card__body { display: flex; min-height: 15rem; flex-direction: column; padding: 1.5rem 1.55rem 1.35rem; }
.trip-card__meta { margin: 0 0 0.55rem; color: #8f352d; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.11em; text-transform: uppercase; }
.trip-card h3 { margin: 0 0 0.7rem; color: #292720; font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; line-height: 1.05; }
.trip-card__body > p:not(.trip-card__meta) { margin: 0 0 1.4rem; color: #6a6254; line-height: 1.55; }
.trip-card__action { margin-top: auto; color: #304b3a; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.trip-library__empty { padding: 2rem 2.2rem; background: #f4eddd; border: 1px solid rgba(62, 52, 37, 0.22); }
.trip-library__empty h3 { margin: 0 0 0.5rem; color: #292720; font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; }
.trip-library__empty > p:last-child { margin-bottom: 0; color: #665e50; }
@media (max-width: 900px) { .trip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .trip-library { margin-bottom: 4rem; } .trip-grid { grid-template-columns: 1fr; } .trip-card, .trip-card--1, .trip-card--2, .trip-card--3 { transform: none; } }
@media (prefers-reduced-motion: reduce) { .trip-card { transition: none; } }

/* Trip Card Images 1.1 */
.trip-card__topo--image { min-height: 0; aspect-ratio: 16 / 9; background: #354437; }
.trip-card__topo--image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Trip Card Images 1.1.1 — match the homepage card treatment. */
.trip-card__topo--image {
    position: relative;
    overflow: hidden;
}

.trip-card__topo--image::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 70%, rgb(0 0 0 / 82%) 100%);
    content: "";
    pointer-events: none;
}

/* Match the Gallery hero navigation links without loading gallery.css. */
.maps-hero .gallery-back-link {
    display: inline-block;
    margin-top: 1rem;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
