/* =========================================================
   REGION
   ========================================================= */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.region-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 160px;
    cursor: pointer;
}

.region-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: .4s;
}

.region-card:hover img {
    transform: scale(1.08);
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}

.overlay h3 {
    font-size: clamp(1.25rem, 1rem + 1.2vw, 2rem);
}

/* Tablet+ : larger region cards */
@media (min-width:768px) {
    .region-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .region-card,
    .trek-region-card .region-card {
        height: 350px;
    }

    .overlay {
        padding: 25px;
    }
}

/* =========================================================
   TREK REGION (secondary region grid)
   ========================================================= */
.trek-region-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

@media (min-width:768px) {
    .trek-region-card {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

/* =========================================================
   SEASON
   ========================================================= */
.season-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width:480px) {
    .season-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:992px) {
    .season-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.25rem;
    }
}

.season-card {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 180px;
    border-radius: 12px;
    padding: 1.25rem;
    color: #fff;
    font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
    font-weight: 600;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width:768px) {
    .season-card {
        min-height: 220px;
        padding: 20px;
    }
}

.season-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
}

.season-card span {
    position: relative;
    z-index: 1;
}

.season-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* Season-specific backgrounds (unchanged) */
.season-card.spring {
    background-image: url('https://images.unsplash.com/photo-1490750967868-88aa4486c946?w=600');
    background-color: #a8e063;
}

.season-card.summer {
    background-image: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=600');
    background-color: #f6d365;
}

.season-card.monsoon {
    background-image: url('https://images.unsplash.com/photo-1438449805896-28a666819a20?w=600');
    background-color: #4b6cb7;
}

.season-card.autumn {
    background-image: url('https://images.unsplash.com/photo-1507371341162-763b5e419408?w=600');
    background-color: #d76d77;
}

.season-card.winter {
    background-image: url('https://images.unsplash.com/photo-1483728642387-6c3bdd6c93e5?w=600');
    background-color: #83a4d4;
}

/* =========================================================
   TREK LAYOUT (filters + grid wrapper) - mobile-first
   ========================================================= */
.trek-layout {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 1rem;
}

@media (min-width:576px) {
    .trek-layout {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width:768px) {
    .trek-layout {
        gap: 1.5rem;
    }
}

@media (min-width:992px) {
    .trek-layout {
        grid-template-columns: 1fr / auto;
        gap: 2rem;
    }
}

/* =========================================================
   FILTERS
   ========================================================= */
.filters {
    background: #fff;
    padding: 1.25rem;
    border-radius: 15px;
    height: fit-content;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
}

@media (min-width:768px) {
    .filters {
        padding: 25px;
    }
}

.filter-group {
    margin-top: 1.25rem;
}

.filter-group label {
    display: block;
    margin-top: 10px;
}

/* Mobile-friendly form controls */
.filters input,
.filters select,
.filters button {
    min-height: 44px;
    font-size: 1rem;
    width: 100%;
}

.filters input:focus,
.filters select:focus,
.filters button:focus-visible {
    outline: 2px solid var(--green, #15803d);
    outline-offset: 2px;
}

/* =========================================================
   TREK GRID
   ========================================================= */
.trek-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width:576px) {
    .trek-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width:1200px) {
    .trek-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

/* =========================================================
   TREK CARD
   ========================================================= */
.trekcard {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--cream);
    box-shadow: var(--shadow);
    border: 1px solid var(--green-mid);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.trekcard:hover,
.trekcard:focus-within {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.trekcard:focus-within {
    outline: 2px solid var(--green, #15803d);
    outline-offset: 2px;
}

.trekcard__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--green-mid);
}

.trekcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trekcard__grade {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-family: var(--font-body);
    background-color: var(--cream) !important;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--green-mid);
    font-weight: 800;
}

.trekcard__grade--easy,
.trekcard__grade--moderate {
    color: var(--green);
}

.trekcard__grade--difficult {
    color: var(--green);
}

.trekcard__body {
    padding: 1rem 1rem 0.5rem;
    flex: 1;
}

@media (min-width:768px) {
    .trekcard__body {
        padding: 1.25rem 1.25rem 0.5rem;
    }
}

.trekcard__region {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.trekcard__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 1rem + 1vw, 2.05rem);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.trekcard__overview {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--green);
    margin-bottom: 1rem;
}

.trekcard__specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
    border-top: 1px solid var(--gold);
    padding-top: 0.85rem;
    margin-bottom: 0.25rem;
}

.trekcard__specs dt {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.15rem;
    font-weight: 800;
}

.trekcard__specs dd {
    font-size: 0.875rem;
}

.trekcard__cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
    min-height: 44px;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gold);
    margin-top: 0.5rem;
    transition: gap 0.15s ease, color 0.15s ease;
}

.trekcard__cta span {
    transition: transform 0.15s ease;
}

.trekcard:hover .trekcard__cta {
    color: var(--green);
}

.trekcard:hover .trekcard__cta span {
    transform: translateX(3px);
}

/* =========================================================
   MISC: badges, content, meta, tags
   ========================================================= */
.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.trek-content {
    padding: 1rem;
}

@media (min-width:768px) {
    .trek-content {
        padding: 20px;
    }
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 15px 0;
    color: #64748b;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tags span {
    background: #ecfdf5;
    color: #15803d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}


.trek-details {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (min-width:768px) {
    .trek-details {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* ---------------------------------------------------------
   HERO CARD
   --------------------------------------------------------- */
.trek-hero-card {
    border: 1px solid var(--green-mid);
    border-radius: var(--radius);
    background: var(--cream);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.trek-hero-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--card-bg);
}

@media (min-width:768px) {
    .trek-hero-media {
        aspect-ratio: 16 / 9;
    }
}

.trek-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trek-hero-badge-row {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trek-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--cream);
    color: var(--green);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--green-mid);
    text-decoration: none;
    min-height: 36px;
    transition: background-color .2s ease, color .2s ease;
}

.trek-pill:hover {
    background: var(--green);
    color: var(--cream);
}

.trek-hero-body {
    padding: 1.25rem;
}

@media (min-width:768px) {
    .trek-hero-body {
        padding: 1.75rem;
    }
}

.trek-section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--green);
}

.trek-overview {
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    line-height: 1.7;
    color: var(--green);
    max-width: 70ch;
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   INFO BOXES (Duration / Difficulty / Best time)
   --------------------------------------------------------- */
.info-box {
    height: 100%;
    background: var(--card-bg);
    border: 1px solid var(--green-mid);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: left;
    transition: transform .18s ease, box-shadow .18s ease;
}

.info-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.info-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 0.35rem;
}

.info-value {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
    font-weight: 600;
    color: var(--green);
}

@media (min-width:768px) {
    .w-md-auto {
        width: auto !important;
    }
}

/* ---------------------------------------------------------
   SIDEBAR CARD
   --------------------------------------------------------- */
.trek-side-card {
    border: 1px solid var(--green-mid);
    border-radius: var(--radius);
    background: var(--cream);
    box-shadow: var(--shadow);
}

.side-heading {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 0.6rem;
}

.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.side-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    background: var(--card-bg);
    color: var(--green);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--green-mid);
    border-radius: 999px;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.side-link:hover,
.side-link.active {
    background: var(--gold);
    color: black;
    border-color: var(--gold);
}

.side-link:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.divider {
    height: 1px;
    width: 100%;
    background: var(--gold);
    border: none;
}

/* ---------------------------------------------------------
   SIDE CTA
   --------------------------------------------------------- */
.side-cta {
    background: var(--card-bg);
    border: 1px solid var(--green-mid);
    border-radius: var(--radius);
    padding: 1.1rem;
}

.side-cta-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
    color: var(--green);
    margin-bottom: 0.4rem;
}

.side-cta-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--green);
    margin-bottom: 1rem;
}

/* ---------------------------------------------------------
   RESPONSIVE FINE-TUNING
   --------------------------------------------------------- */
@media (max-width:767.98px) {
    .trek-section-title {
        margin-bottom: 0.6rem;
    }

    .trek-hero-body {
        padding: 1rem;
    }

    .info-box {
        padding: 0.85rem;
    }


    /* Large screens: cap hero card content width for readability */
    @media (min-width:1920px) {
        .trek-overview {
            font-size: 1.1rem;
        }
    }
}