/* The Earth Farer Editorial — Guides Hub v2.3.0 */
body.tef-guides-page,
body.tef-guides-page #page,
body.tef-guides-page .site,
body.tef-guides-page .site-content,
body.tef-guides-page .content-area {
    background: #fff !important;
}

body.tef-guides-page .site-content > .ast-container:has(> .tef-guides-hub),
body.tef-guides-page #content > .ast-container:has(> .tef-guides-hub) {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.tef-guides-hub,
.tef-guides-hub * {
    box-sizing: border-box;
}

.tef-guides-hub {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: #243746;
    background: #fff;
}

.tef-guides-shell {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin: 0 auto;
}

/* Hero — deliberately mirrors the working Trekking editorial hero. */
.tef-guides-hero {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    min-height: 650px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #15394a, #1d5669);
}

.tef-guides-hero-image {
    position: absolute;
    inset: 0;
}

.tef-guides-hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.tef-guides-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 31, 42, .86) 0%, rgba(7, 31, 42, .70) 38%, rgba(7, 31, 42, .36) 72%, rgba(7, 31, 42, .16) 100%),
        linear-gradient(to top, rgba(7, 27, 35, .70) 0%, rgba(7, 27, 35, .28) 56%, rgba(7, 27, 35, .16) 100%);
}

.tef-guides-hero-content {
    position: relative;
    z-index: 2;
    padding: 150px 0 48px;
}

.tef-guides-hero h1 {
    max-width: 960px;
    margin: 0;
    color: #fff !important;
    font-size: clamp(42px, 5.1vw, 72px);
    line-height: 1.01;
    letter-spacing: -.04em;
    font-weight: 780;
    text-wrap: balance;
}

.tef-guides-subtitle {
    max-width: 850px;
    margin: 20px 0 0;
    color: rgba(255,255,255,.94);
    font-size: 17px;
    line-height: 1.62;
}

/* Category filters live inside the hero and reuse the exact Earth Farer activity images. */
.tef-guide-category-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
}

.tef-guide-category-card {
    appearance: none;
    display: flex;
    min-width: 0;
    height: 108px !important;
    min-height: 108px !important;
    padding: 8px 10px 10px !important;
    border: 1px solid #e6e1d7 !important;
    border-radius: 18px;
    background: #fbfaf6 !important;
    color: #184f3d !important;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font: inherit;
    text-align: center;
    text-transform: none !important;
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.tef-guide-category-card:hover,
.tef-guide-category-card:focus-visible {
    transform: scale(1.03);
    border-color: #d7d1c6 !important;
    background: #fbfaf6 !important;
    color: #184f3d !important;
    box-shadow: 0 8px 24px rgba(9, 34, 27, .12);
    outline: none;
}

.tef-guide-category-card.is-active,
.tef-guide-category-card.is-active:hover,
.tef-guide-category-card.is-active:focus-visible {
    border-color: #18523e !important;
    background: #18523e !important;
    color: #fff !important;
    box-shadow: none;
}

.tef-guide-category-card.is-active:hover,
.tef-guide-category-card.is-active:focus-visible {
    transform: scale(1.03);
}

.tef-guide-category-card.is-active .tef-guide-category-icon img {
    filter: brightness(0) invert(1);
}

.tef-guide-category-icon {
    display: flex;
    width: 78px;
    height: 54px;
    align-items: center;
    justify-content: center;
}

.tef-guide-category-icon img {
    display: block;
    width: 78px;
    height: 54px;
    object-fit: contain;
}

.tef-guide-category-label {
    max-width: 100%;
    color: #184f3d !important;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 780;
    text-align: center;
    text-transform: none !important;
}

.tef-guide-category-card.is-active .tef-guide-category-label {
    color: #fff !important;
}

/* Seven categories fit on desktop; match the other icon/card styles. */
/* Latest Guides */
.tef-guides-latest {
    padding: 76px 0 110px;
    background: #fff;
}

.tef-guides-section-head {
    display: flex;
    margin-bottom: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tef-guides-section-head h2 {
    margin: 0;
    color: #0d2443;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 770;
}

/* Matches the solid Show Adventures CTA language from Adventure Core. */
.tef-guide-all-button {
    appearance: none;
    min-height: 58px;
    padding: 0 28px;
    border: 0;
    border-radius: 14px;
    background: #18523e;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    text-transform: none;
    transition: background-color .18s ease, transform .18s ease;
}

.tef-guide-all-button:hover,
.tef-guide-all-button:focus-visible,
.tef-guide-all-button.is-active {
    background: #113f30;
    color: #fff;
    outline: none;
}

.tef-guide-all-button:hover,
.tef-guide-all-button:focus-visible {
    transform: translateY(-1px);
}

.tef-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 26px;
}

.tef-guide-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e0e8e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(18, 50, 42, .045);
}

.tef-guide-card[hidden] {
    display: none !important;
}

.tef-guide-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eaf0ee;
}

.tef-guide-card-image img,
.tef-guide-card-image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.tef-guide-card:hover .tef-guide-card-image img {
    transform: scale(1.025);
}

.tef-guide-card-content {
    padding: 23px 23px 25px;
}

.tef-guide-card-category {
    margin: 0 0 9px;
    color: #168196;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tef-guide-card h3 {
    margin: 0;
    color: #0d2443;
    font-size: 24px;
    line-height: 1.16;
    letter-spacing: -.025em;
    font-weight: 760;
}

.tef-guide-card h3 a {
    color: inherit;
    text-decoration: none;
}

.tef-guide-card-excerpt {
    margin: 13px 0 0;
    color: #52616c;
    font-size: 15.5px;
    line-height: 1.6;
}

.tef-guide-card-link {
    display: inline-flex;
    margin-top: 18px;
    align-items: center;
    gap: 5px;
    color: #126f81;
    font-size: 14.5px;
    line-height: 1.2;
    font-weight: 800;
    text-decoration: none;
}

.tef-guide-card-link:hover,
.tef-guide-card-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tef-guide-empty {
    margin: 28px 0 0;
    padding: 28px;
    border: 1px solid #dce7e4;
    border-radius: 14px;
    background: #f8fbfa;
    color: #51635d;
    text-align: center;
}

@media (max-width: 1024px) {
    .tef-guides-hero {
        min-height: 690px;
    }

    .tef-guide-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }

    .tef-guide-category-card {
        height: 102px !important;
        min-height: 102px !important;
    }

    .tef-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .tef-guides-shell {
        width: min(100% - 28px, 1180px);
    }

    .tef-guides-hero {
        min-height: 0;
        align-items: stretch;
    }

    .tef-guides-hero-content {
        padding: 118px 0 36px;
    }

    .tef-guides-hero h1 {
        font-size: clamp(42px, 13vw, 58px);
    }

    .tef-guides-subtitle {
        margin-top: 16px;
        font-size: 17px;
        line-height: 1.55;
    }

    .tef-guide-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 28px;
    }

    .tef-guide-category-card {
        height: 94px !important;
        min-height: 94px !important;
        padding: 7px 7px 8px !important;
        border-radius: 14px;
        gap: 2px;
    }

    .tef-guide-category-icon,
    .tef-guide-category-icon img {
        width: 64px;
        height: 46px;
    }

    .tef-guide-category-label {
        font-size: 15.5px;
    }

    .tef-guides-latest {
        padding: 58px 0 82px;
    }

    .tef-guides-section-head {
        margin-bottom: 26px;
        align-items: center;
        gap: 14px;
    }

    .tef-guides-section-head h2 {
        font-size: 34px;
    }

    .tef-guide-all-button {
        min-height: 48px;
        padding: 0 18px;
        border-radius: 12px;
        font-size: 15px;
    }

    .tef-guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tef-guide-card-content {
        padding: 20px 19px 22px;
    }
}

@media (max-width: 430px) {
    .tef-guides-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
