/* =============================================================
   KFC33 — AREA PAGE ("ΕΠΙΛΕΞΤΕ ΠΕΡΙΟΧΗ")
   Page-specific styling for the area-selection step. Loaded after
   core.css. The reusable .select-list card system (card shell,
   thumbnail veil, hover lift) lives in core.css — this file only
   styles what is unique to the area grid.
   ============================================================= */

/* Back button sits on the SAME line as the centered page title (left side),
   instead of taking its own row above it. */
.content {
    position: relative;
}

.back-bar {
    position: absolute;
    top: clamp(0.5rem, 2vw, 1rem);
    left: 0;
    margin: 0;
    z-index: 3;
}

.content > .general-ttl {
    /* Reserve room so the centered title clears the inline back button. */
    padding-inline: 3.2rem;
}

/* Sub-title sits directly under the city title — tighten the rhythm. */
.content > .sub-ttl {
    margin-top: -0.4rem;
    margin-bottom: clamp(1.1rem, 4vw, 1.75rem);
    color: var(--c-ink-soft);
    letter-spacing: 0.08em;
}

/* -------------------------------------------------------------
   Area card grid
   ------------------------------------------------------------- */
.select-list.area-list {
    /* Flex (not grid) so an incomplete final row stays CENTERED, matching the
       product grid. 1-up on phones / 3-up from 560px. */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap);
    width: 100%;
    margin: 0 auto;
}

.select-list.area-list li {
    flex: 0 0 100%; /* 1-up on phones */
}

@media (min-width: 560px) {
    .select-list.area-list li {
        flex-basis: calc((100% - 2 * var(--gap)) / 3); /* 3-up tablet/desktop */
    }
}

.select-list.area-list li.has-thumb {
    aspect-ratio: 4 / 3;
    border-color: var(--c-line-strong);
}

/* Whole card tappable: mobile WebKit doesn't resolve height:100% on an
   aspect-ratio-derived box, so the link must fill the card explicitly. */
.select-list.area-list li.has-thumb > a {
    position: absolute;
    inset: 0;
}

/* Area tile link — label centered over the photo (short place names). */
.select-list.area-list li > a {
    justify-content: center;
    align-items: center;
    padding: clamp(0.9rem, 4vw, 1.2rem);
    text-align: center;
}

.select-list.area-list li > a > span {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 4.2vw, 1.45rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
    user-select: none;
    transition: transform var(--t-med) var(--ease);
}

/* Label lift on hover/focus (the underline affordance below the name was removed per design). */
.select-list.area-list li:hover > a > span,
.select-list.area-list li:focus-within > a > span {
    transform: translateY(-2px);
}

/* Chevron affordance — signals the tile is selectable, mirroring the score
   city card (css/score.css .city-list .city-wrap::after): a bottom-right "›"
   that nudges inward on hover/focus. White over the always-dark photo veil
   (same as the tile label), so it reads correctly in light + dark. */
.select-list.area-list li > a::after {
    content: "";
    position: absolute;
    right: clamp(0.7rem, 3.5vw, 0.95rem);
    bottom: clamp(0.7rem, 3.5vw, 0.95rem);
    width: 0.65rem;
    height: 0.65rem;
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    border-right: 2px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    opacity: 0.55;
    transition: opacity var(--t-med) var(--ease), right var(--t-med) var(--ease);
}

.select-list.area-list li:hover > a::after,
.select-list.area-list li:focus-within > a::after {
    opacity: 1;
    right: clamp(0.45rem, 2.5vw, 0.7rem);
}

/* -------------------------------------------------------------
   Entrance — gentle staggered rise on load
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .select-list.area-list li {
        animation: area-rise 0.5s var(--ease) both;
    }

    .select-list.area-list li:nth-child(1) { animation-delay: 0.04s; }
    .select-list.area-list li:nth-child(2) { animation-delay: 0.1s; }
    .select-list.area-list li:nth-child(3) { animation-delay: 0.16s; }
    .select-list.area-list li:nth-child(4) { animation-delay: 0.22s; }
    .select-list.area-list li:nth-child(n+5) { animation-delay: 0.28s; }
}

@keyframes area-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
