/* ==========================================================================
   Wild Boar Safaris Limited - Mount Kilimanjaro Routes Overview
   Page-specific layout for kilimanjaro/routes/Mount-kilimanjaro-routes.php
   --------------------------------------------------------------------------
   Built on the standalone itinerary page system (style.css + routes.css):
   every section keeps the 1000px column from .wbs-itinpage-section, the
   centred editorial headings and the justified body copy. This file only adds
   the 3-column route card grid, the tabbed route-map explorer, the comparison
   table and the closing call to action.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Route card grid - 3 across, final odd card centred on its own row
   -------------------------------------------------------------------------- */
.wbs-ro-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.15rem;
    margin-top: 1.9rem;
}

.wbs-ro-card-grid > .wbs-ro-card {
    height: 100%;
}

/* 7 cards: rows of 3, 3 and then one centred card in the middle column */
.wbs-ro-card-grid > .wbs-ro-card:last-child:nth-child(3n + 1) {
    grid-column: 2;
}

.wbs-ro-card .wbs-kili-route-body {
    padding: 1.05rem 1.05rem 1.1rem;
}

.wbs-ro-card .wbs-kili-route-body h3 {
    font-size: 1.02rem;
}

.wbs-ro-card-sub {
    display: block;
    margin: -0.1rem 0 0.6rem;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-primary-dark, #8E591F);
}

.wbs-ro-card .wbs-kili-route-body p {
    font-size: 0.82rem;
    line-height: 1.55;
}

.wbs-ro-card .wbs-kili-route-meta {
    gap: 0.32rem;
    margin-bottom: 0.9rem;
}

.wbs-ro-card .wbs-kili-route-meta li {
    font-size: 0.66rem;
    padding: 0.24rem 0.48rem;
}

.wbs-ro-card-flag {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    max-width: 62%;
    padding: 0.26rem 0.5rem;
    border-radius: 3px;
    background: rgba(181, 120, 51, 0.94);
    color: #FFFFFF;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: right;
    backdrop-filter: blur(4px);
}

@media (max-width: 900px) {
    .wbs-ro-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wbs-ro-card-grid > .wbs-ro-card:last-child:nth-child(3n + 1) {
        grid-column: auto;
    }

    /* With an odd card count the final card spans both columns and centres */
    .wbs-ro-card-grid > .wbs-ro-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 360px;
        width: 100%;
        justify-self: center;
    }
}

@media (max-width: 620px) {
    .wbs-ro-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wbs-ro-card-grid > .wbs-ro-card:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: none;
    }
}

/* --------------------------------------------------------------------------
   2. Tabbed route-map explorer - route tabs left, map + field notes right
   -------------------------------------------------------------------------- */
.wbs-ro-map-layout {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
    margin-top: 1.9rem;
}

.wbs-ro-map-side {
    min-width: 0;
}

.wbs-ro-map-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.55rem;
    background: #F5F6F7;
    border: 1px solid #E5E7EA;
    border-radius: 8px;
}

.wbs-ro-map-tab {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.65rem 0.7rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-text-body, #2C3630);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.wbs-ro-map-tab:hover {
    background: #ECEEF0;
}

.wbs-ro-map-tab:focus-visible {
    outline: 2px solid var(--color-primary-dark, #8E591F);
    outline-offset: 2px;
}

.wbs-ro-map-tab.is-active {
    background: #FFFFFF;
    box-shadow: 0 3px 10px rgba(14, 26, 20, 0.07);
}

.wbs-ro-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #E9EBEE;
    color: var(--color-primary-dark, #8E591F);
    font-size: 0.68rem;
    transition: background 0.18s ease, color 0.18s ease;
}

.wbs-ro-map-tab.is-active .wbs-ro-tab-icon {
    background: var(--color-primary, #B57833);
    color: #FFFFFF;
}

.wbs-ro-tab-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.wbs-ro-tab-name {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text-title, #141C17);
}

.wbs-ro-tab-meta {
    font-size: 0.68rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: var(--color-text-muted, #6B7B71);
}

.wbs-ro-map-tab > .fa-chevron-right {
    flex: 0 0 auto;
    font-size: 0.58rem;
    color: var(--color-primary, #B57833);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.wbs-ro-map-tab:hover > .fa-chevron-right,
.wbs-ro-map-tab.is-active > .fa-chevron-right {
    opacity: 1;
}

.wbs-ro-map-tab.is-active > .fa-chevron-right {
    transform: translateX(2px);
}

.wbs-ro-map-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding: 0.8rem 0.85rem;
    border: 1px dashed #E0D6C5;
    border-radius: 6px;
    font-size: 0.7rem;
    line-height: 1.55;
    color: var(--color-text-muted, #6B7B71);
}

.wbs-ro-map-note i {
    margin-top: 0.15rem;
    color: var(--color-primary, #B57833);
    font-size: 0.72rem;
}

/* Map stage */
.wbs-ro-map-stage {
    position: relative;
    min-width: 0;
}

.wbs-ro-map-panel {
    position: relative;
}

.wbs-ro-map-panel[hidden] {
    display: none;
}

.wbs-ro-map-panel.is-active {
    animation: wbs-ro-map-fade 0.35s ease both;
}

@keyframes wbs-ro-map-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wbs-ro-map-canvas {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 0.25rem;
    border-radius: 8px;
    background: #FFFFFF;
    overflow: hidden;
}

.wbs-ro-map-canvas img {
    display: block;
    width: 100%;
    max-height: 530px;
    height: auto;
    object-fit: contain;
    transform: none !important;
    transition: none !important;
    -webkit-mask-image: radial-gradient(ellipse 90% 86% at 50% 50%, #000000 64%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(ellipse 90% 86% at 50% 50%, #000000 64%, rgba(0, 0, 0, 0) 100%);
}

.wbs-ro-map-canvas::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 38px 22px #FFFFFF,
                inset 0 0 78px 46px rgba(255, 255, 255, 0.72);
}

/* Field-notes card - keeps the Lemosho route-page look, blended into the map */
.wbs-ro-map-card.wbs-map-overlay-card {
    top: 0.35rem;
    /* Nudge the card further right as the viewport widens, so it covers less
       of the map itself while staying clear of the viewport edge. */
    right: calc(-1 * min(9rem, 3rem + (100vw - 1101px) / 5));
    max-width: 306px;
    padding: 1.15rem 1.2rem 1.1rem 1.75rem;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000000 13%, #000000 100%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000000 13%, #000000 100%);
}

.wbs-ro-map-card .wbs-map-card-title {
    font-size: 1.02rem;
    margin-bottom: 0.55rem;
}

.wbs-ro-map-card .wbs-map-card-text {
    font-size: 0.8rem;
    line-height: 1.62;
    margin-bottom: 0.75rem;
}

.wbs-ro-map-card .wbs-map-card-stats {
    justify-content: flex-start;
    gap: 1.15rem;
    padding-top: 0.65rem;
}

.wbs-ro-map-card .wbs-map-card-stats span strong {
    font-size: 0.9rem;
}

.wbs-ro-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-primary-dark, #8E591F);
    text-decoration: none;
    transition: color 0.18s ease;
}

.wbs-ro-map-link i {
    font-size: 0.66rem;
    transition: transform 0.18s ease;
}

.wbs-ro-map-link:hover {
    color: var(--color-text-title, #141C17);
}

.wbs-ro-map-link:hover i {
    transform: translateX(3px);
}

.wbs-ro-map-link:focus-visible {
    outline: 2px solid var(--color-primary-dark, #8E591F);
    outline-offset: 3px;
}

/* Keep the overlay inside the column on narrower desktops */
@media (min-width: 981px) and (max-width: 1100px) {
    .wbs-ro-map-card.wbs-map-overlay-card {
        right: 0;
    }
}

@media (max-width: 980px) {
    .wbs-ro-map-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .wbs-ro-map-tabs {
        flex-direction: row;
        gap: 0.35rem;
        overflow-x: auto;
        padding: 0.45rem;
        scrollbar-width: none;
    }

    .wbs-ro-map-tabs::-webkit-scrollbar {
        display: none;
    }

    .wbs-ro-map-tab {
        flex: 0 0 auto;
        width: auto;
        padding: 0.6rem 0.75rem;
        border-left: 0;
        border-bottom: 3px solid transparent;
        border-radius: 6px;
    }

    .wbs-ro-map-tab.is-active {
        border-left-color: transparent;
        border-bottom-color: var(--color-primary, #B57833);
    }

    .wbs-ro-tab-icon,
    .wbs-ro-map-tab > .fa-chevron-right {
        display: none;
    }

    .wbs-ro-map-note {
        display: none;
    }

    .wbs-ro-map-canvas {
        min-height: 0;
    }

    .wbs-ro-map-card.wbs-map-overlay-card {
        position: static;
        max-width: 100%;
        margin-top: 1.15rem;
        padding: 1.15rem;
        border: 1px solid #EBE3D5;
        border-radius: 8px;
        background: #FAF7F2;
        box-shadow: none;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

@media (max-width: 768px) {
    .wbs-ro-map-canvas img {
        -webkit-mask-image: radial-gradient(ellipse 92% 90% at 50% 50%, #000000 66%, rgba(0, 0, 0, 0) 100%);
        mask-image: radial-gradient(ellipse 92% 90% at 50% 50%, #000000 66%, rgba(0, 0, 0, 0) 100%);
    }

    .wbs-ro-map-canvas::after {
        box-shadow: inset 0 0 28px 18px #FFFFFF,
                    inset 0 0 56px 34px rgba(255, 255, 255, 0.7);
    }
}

/* --------------------------------------------------------------------------
   3. Route FAQ — editorial Q&A paragraphs
   -------------------------------------------------------------------------- */
.wbs-ro-qna {
    margin-top: 1.9rem;
}

.wbs-ro-qna-item {
    padding: 1.7rem 0;
    border-top: 1px solid #EDE7DC;
}

.wbs-ro-qna-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.wbs-ro-qna-item:last-child {
    padding-bottom: 0;
}

.wbs-ro-qna-title {
    margin: 0 0 0.7rem;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--color-text-title, #141C17);
}

.wbs-ro-qna-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.6rem;
    border-radius: 50%;
    background: var(--color-primary, #B57833);
    vertical-align: 0.18em;
}

.wbs-ro-qna-para {
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--color-text-body, #2C3630);
    text-align: justify;
    text-justify: inter-word;
    letter-spacing: 0.005em;
    margin: 0 0 0.9rem;
}

.wbs-ro-qna-para:last-child {
    margin-bottom: 0;
}

@media (max-width: 620px) {
    .wbs-ro-qna-item {
        padding: 1.3rem 0;
    }

    .wbs-ro-qna-para {
        font-size: 0.93rem;
        text-align: left;
    }
}
