/* Explore menus (templates/components/explore/): the four public lists as photo cards (desktop) or tiles (phones),
   and "Where people play" badges. Shared by the landing header (landing/components/lp_header.html) and the app
   navbar and drawer (templates/base.html); each places them in its own container (css/landing.css .lp-mega--explore,
   css/navbar.css .explore-mega-menu). Loaded on every page by base.html. Colours: custom.css brand tokens; the
   green is a fill or an outline only, its text colour is --grundee-green-text. */

.explore-cards,
.explore-tiles,
.explore-places__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ---------- Cards: five across; two by two, photo beside the text, below 1200px ---------- */
.explore-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.explore-card {
    display: block;
    height: 100%;
    padding: 8px 8px 14px;
    border-radius: 18px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.explore-card:hover,
.explore-card:focus-visible {
    background-color: var(--grundee-accent);
}

.explore-card__photo {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    margin-bottom: 12px;
    border-radius: 12px;
    background-color: #21401a;
    transition: box-shadow 0.15s ease;
}

.explore-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.explore-card:hover .explore-card__photo,
.explore-card:focus-visible .explore-card__photo {
    box-shadow: 0 0 0 3px var(--grundee-green);
}

/* No photo yet: the card's icon on the dark green */
.explore-card__photo--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #3b6a24, #21401a 70%);
    font-size: 2.4rem;
    color: #f2c94c;
}

.explore-card:hover .explore-card__photo img,
.explore-card:focus-visible .explore-card__photo img {
    transform: scale(1.05);
}

.explore-card__title {
    display: block;
    padding: 0 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #17211a;
}

.explore-card__line {
    display: block;
    padding: 2px 4px 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #5f6b62;
}

@media (max-width: 1199.98px) {
    .explore-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .explore-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-content: center;
        column-gap: 14px;
        padding: 8px;
    }

    .explore-card__photo {
        grid-row: span 2;
        margin-bottom: 0;
    }

    .explore-card__photo--icon {
        font-size: 1.6rem;
    }

    /* The odd one out: across the whole row */
    .explore-cards > li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .explore-card__title,
    .explore-card__line {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ---------- Tiles (phones): two by two, the title in white on a dark fade, never on the green ---------- */
.explore-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.explore-tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100px;
    height: 100%;
    padding: 12px;
    overflow: hidden;
    border-radius: 16px;
    background: #121b14;
    text-decoration: none;
}

.explore-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 22, 8, 0.88) 10%, rgba(13, 22, 8, 0.15) 75%);
}

.explore-tile__title {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

/* The odd one out: across the whole row */
.explore-tiles > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.explore-tiles > li:last-child:nth-child(odd) .explore-tile {
    min-height: 84px;
}

/* No photo yet: the tile's icon, large and quiet, beside the title */
.explore-tile--icon {
    background: radial-gradient(circle at 80% 20%, #3b6a24, #121b14 75%);
}

.explore-tile__icon {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 2rem;
    color: #f2c94c;
}

.explore-tile:focus-visible {
    outline: 3px solid var(--grundee-green);
    outline-offset: 2px;
}

/* ---------- "Where people play": badges, the sport's picture small and muted until hovered ---------- */
.explore-places {
    margin: 6px 4px 4px;
    padding: 14px 8px 6px;
    border-top: 1px solid #e1e6dc;
}

.explore-places__title {
    margin-bottom: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5f6b62;
}

.explore-places__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.explore-places__list a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eceee8;
    font-size: 0.8rem;
    font-weight: 600;
    color: #17211a;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.explore-places__list a:has(img) {
    padding-left: 7px;
}

.explore-places__list a:hover,
.explore-places__list a:focus-visible {
    background: var(--grundee-accent);
    color: var(--grundee-green-text);
}

.explore-places__list img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.8;
    filter: saturate(0.55);
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.explore-places__list a:hover img,
.explore-places__list a:focus-visible img {
    opacity: 1;
    filter: none;
}

/* In a drawer: no rule above, larger badges for fingers */
.explore-places--drawer {
    margin: 20px 0 0;
    padding: 0;
    border-top: 0;
}

.explore-places--drawer .explore-places__list {
    gap: 8px;
}

.explore-places--drawer .explore-places__list a {
    padding: 8px 14px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e1e6dc;
    font-size: 0.9rem;
}

.explore-places--drawer .explore-places__list a:has(img) {
    padding-left: 9px;
}

@media (prefers-reduced-motion: reduce) {
    .explore-card,
    .explore-card__photo,
    .explore-card__photo img,
    .explore-places__list a,
    .explore-places__list img {
        transition: none;
    }

    .explore-card:hover .explore-card__photo img,
    .explore-card:focus-visible .explore-card__photo img {
        transform: none;
    }
}
