/**
 * Homepage "Where to Go, When" seasonal planner
 * (Views/Home/_SeasonalPicks.cshtml, js/apps/home/seasonal-picks.js).
 *
 * Plain CSS - no Tailwind build step. The section's tint follows the
 * selected season ([data-season] swaps four custom properties; the
 * background colour fades between them). Picks are tilted postcards with a
 * postmark stamp; they straighten on hover and deal in one by one when a
 * season is chosen. Active tab uses the brand red like every other button.
 * Logical properties keep it correct in RTL; motion stops under
 * prefers-reduced-motion.
 */

.season {
    --season-red: #8B2225;
    --season-ink: #1F1A17;
    --season-muted: #6B625C;

    /* Winter defaults; overridden per season below. */
    --season-bg: #E9F1FA;
    --season-glow: #BFD6F2;
    --season-accent: #2F6DB5;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 56px 64px;
    background: var(--season-bg);
    transition: background-color 0.6s ease;
}

.season[data-season="spring"] {
    --season-bg: #FBEEF3;
    --season-glow: #F5C6D8;
    --season-accent: #C2457A;
}

.season[data-season="summer"] {
    --season-bg: #FFF4DC;
    --season-glow: #FFDD8F;
    --season-accent: #C98A12;
}

.season[data-season="autumn"] {
    --season-bg: #FBEBDD;
    --season-glow: #F2BE93;
    --season-accent: #B5541C;
}

/* Soft seasonal bloom in the corner. */
.season-glow {
    position: absolute;
    top: -180px;
    inset-inline-end: -120px;
    z-index: -1;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: var(--season-glow);
    filter: blur(70px);
    opacity: 0.7;
    transition: background-color 0.6s ease;
}

.season .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

/* ---- Heading + tabs ---------------------------------------------------- */

.season-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px 24px;
    margin-bottom: 28px;
}

.season-title {
    margin: 0;
    color: var(--season-ink);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.season-subtitle {
    margin: 8px 0 0;
    color: var(--season-muted);
    font-size: 15px;
    line-height: 1.55;
}

/* Segmented tab bar; swipes sideways on narrow screens. */
.season-tabs {
    display: flex;
    gap: 6px;
    max-width: 100%;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid rgba(31, 26, 23, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    scrollbar-width: none;
}

.season-tabs::-webkit-scrollbar {
    display: none;
}

.season-tab {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border: none;
    border-radius: 13px;
    background: transparent;
    color: var(--season-ink);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.season-tab .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(31, 26, 23, 0.06);
    font-size: 19px;
}

.season-tab-text {
    display: flex;
    flex-direction: column;
}

.season-tab-label {
    font-size: 14px;
    font-weight: 800;
}

.season-tab-months {
    color: var(--season-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.season-tab[aria-selected="true"] {
    background: var(--season-red);
    color: #FFFFFF;
    box-shadow: 0 10px 20px -12px rgba(139, 34, 37, 0.9);
}

.season-tab[aria-selected="true"] .material-symbols-outlined {
    background: rgba(255, 255, 255, 0.18);
}

.season-tab[aria-selected="true"] .season-tab-months {
    color: rgba(255, 255, 255, 0.8);
}

.season-tab:focus-visible {
    outline: 3px solid var(--season-accent);
    outline-offset: 2px;
}

/* ---- Postcards --------------------------------------------------------- */

.season-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    margin: 0;
    padding: 6px 4px 0;
    list-style: none;
}

.season-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px 10px 18px;
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--season-ink);
    text-decoration: none;
    box-shadow:
        0 1px 2px rgba(20, 12, 8, 0.06),
        0 22px 40px -24px rgba(20, 12, 8, 0.45);
    transform: rotate(var(--tilt, -1.5deg));
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.season-cards > li:nth-child(2) .season-card { --tilt: 1.2deg; }
.season-cards > li:nth-child(3) .season-card { --tilt: -0.8deg; }

.season-card:hover,
.season-card:focus-visible {
    transform: rotate(0deg) translateY(-6px);
    box-shadow:
        0 1px 2px rgba(20, 12, 8, 0.06),
        0 30px 50px -26px rgba(20, 12, 8, 0.55);
}

.season-card:focus-visible {
    outline: 3px solid var(--season-red);
    outline-offset: 4px;
}

.season-photo {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: #EEE8E2;
}

.season-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.season-card:hover .season-photo img {
    transform: scale(1.05);
}

/* Postmark: a dashed ring in the season's colour, slightly turned. */
.season-stamp {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-end: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border: 2px dashed var(--season-accent);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--season-accent);
    transform: rotate(-12deg);
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.5);
}

.season-stamp .material-symbols-outlined {
    font-size: 20px;
}

.season-stamp-text {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.season-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px 6px 0;
}

.season-name {
    font-size: 21px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.season-country {
    margin-top: 2px;
    color: var(--season-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.season-reason {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: var(--season-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.season-reason .material-symbols-outlined {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--season-accent) 14%, #FFFFFF);
    color: var(--season-accent);
    font-size: 17px;
}

.season-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--season-red);
    font-size: 14px;
    font-weight: 800;
}

.season-cta-icon {
    transition: transform 0.25s ease;
}

.season-card:hover .season-cta-icon {
    transform: translateX(4px);
}

/* Postcards deal in one after another when a season is shown. */
.season-panel:not([hidden]) .season-cards > li {
    animation: season-deal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.season-panel:not([hidden]) .season-cards > li:nth-child(2) { animation-delay: 0.08s; }
.season-panel:not([hidden]) .season-cards > li:nth-child(3) { animation-delay: 0.16s; }

@keyframes season-deal {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- RTL --------------------------------------------------------------- */

[dir="rtl"] .season-cta-icon {
    transform: scaleX(-1);
}

[dir="rtl"] .season-card:hover .season-cta-icon {
    transform: scaleX(-1) translateX(4px);
}

/* ---- Wider screens ----------------------------------------------------- */

@media (min-width: 640px) {
    .season-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 900px = the site's compact breakpoint. */
@media (min-width: 900px) {
    .season {
        padding-block: 80px 88px;
    }

    .season-head {
        margin-bottom: 36px;
    }

    .season-title {
        font-size: 40px;
    }

    .season-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .season,
    .season-glow,
    .season-tab,
    .season-card,
    .season-photo img,
    .season-cta-icon {
        transition: none;
    }

    .season-panel:not([hidden]) .season-cards > li {
        animation: none;
    }
}
