/* International Day of Yoga events page — "saffron dawn" theme.
   Accent colors are injected per-edition via inline :root vars in idy.html. */

:root {
    --accent: #F06220;
    --accent-dark: #C24E18;
    --ink: #433834;
    --ink-soft: #777777;
    --paper: #FBF6EE;
    --paper-2: #FFFFFF;
    --line: #ECE2D4;
    --online: #1F7A7A;
    --online-soft: #E3F1F1;
    --shadow: 0 18px 40px -22px rgba(58, 38, 18, 0.45);
    --radius: 18px;
    --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
    padding: clamp(1.8rem, 4vw, 3rem) 1.5rem;
    background:
        radial-gradient(120% 140% at 50% -30%, #FFB259 0%, var(--accent) 55%, var(--accent-dark) 100%);
}

/* Radiating sun-rays behind the content — conic gradient masked to a soft fade. */
.hero__rays {
    position: absolute;
    top: -45vw;
    left: 50%;
    width: 130vw;
    height: 130vw;
    transform: translateX(-50%);
    background: repeating-conic-gradient(from 0deg,
            rgba(255, 255, 255, 0.10) 0deg 6deg,
            rgba(255, 255, 255, 0) 6deg 14deg);
    -webkit-mask: radial-gradient(closest-side, #000 0%, transparent 72%);
    mask: radial-gradient(closest-side, #000 0%, transparent 72%);
    animation: spin 120s linear infinite;
    pointer-events: none;
}

@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

.hero__inner {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
}

.hero__brand img {
    height: 46px;
    width: auto;
    margin: 0 auto 0.9rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18));
}

.hero__eyebrow {
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0 0 0.5rem;
    opacity: 0.92;
}

.hero__title {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    line-height: 1.1;
    margin: 0 0 0.45rem;
    text-wrap: balance;
}

.hero__tagline {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-style: italic;
    margin: 0;
    opacity: 0.96;
}

/* ---------- Events section ---------- */
.events {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem 4rem;
}

.events__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 2.2rem;
}

.section-title {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    margin: 0;
    position: relative;
    padding-bottom: 0.6rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: var(--accent);
}

.events__controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.search { position: relative; }

.search__icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.55;
    pointer-events: none;
}

.search__input {
    font: inherit;
    font-size: 0.95rem;
    width: 230px;
    max-width: 60vw;
    padding: 0.55rem 0.9rem 0.55rem 2.3rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search__input::placeholder { color: var(--ink-soft); }

.search__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 98, 32, 0.15);
}

.select {
    font: inherit;
    font-size: 0.95rem;
    padding: 0.55rem 2rem 0.55rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink);
    cursor: pointer;
    max-width: 60vw;
    /* custom caret */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23777777' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 98, 32, 0.15);
}

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.filter {
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1.5px solid var(--line);
    background: var(--paper-2);
    color: var(--ink-soft);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    transition: all 0.16s ease;
}

.filter:hover { border-color: var(--accent); color: var(--accent-dark); }

.filter.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.filter__count {
    display: inline-block;
    margin-left: 0.3rem;
    opacity: 0.8;
    font-size: 0.82em;
}

/* ---------- Card grid ---------- */
.grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(16px);
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 48px -24px rgba(58, 38, 18, 0.55);
}

/* The `hidden` attribute (set by the JS filter) is otherwise defeated by
   `.card { display:flex }`, so re-assert display:none with higher specificity. */
.card[hidden] { display: none; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    .card { opacity: 1; transform: none; animation: none; }
    .hero__rays { animation: none; }
}

.card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #f0e7d9;
    overflow: hidden;
}

/* Cohesive warm wash over every photo so the varied city / IDY-celebration
   images feel unified and calm rather than overpowering. Eases back on hover. */
.card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg,
            rgba(240, 98, 32, 0.34) 0%,
            rgba(232, 115, 42, 0.30) 45%,
            rgba(194, 78, 24, 0.58) 100%);
    transition: opacity 0.25s ease;
}

.card:hover .card__media::after { opacity: 0.6; }

.badge {
    position: absolute;
    z-index: 2;
    top: 0.8rem;
    left: 0.8rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    backdrop-filter: blur(2px);
}

.badge--inperson { background: var(--accent); color: #fff; }
.badge--online { background: var(--online); color: #fff; }

.badge--full {
    left: auto;
    right: 0.8rem;
    background: rgba(42, 33, 26, 0.82);
    color: #fff;
}

.card__body { padding: 1.3rem 1.4rem 0.6rem; flex: 1; }

.card__title {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 600;
    font-size: 1.32rem;
    line-height: 1.2;
    margin: 0 0 0.4rem;
}

.card__subtitle {
    color: var(--ink-soft);
    font-size: 0.96rem;
    margin: 0 0 1rem;
}

.card__meta { margin: 0.4rem 0 0; padding: 0; }

.meta-row { display: flex; gap: 0.6rem; align-items: center; margin: 0 0 0.45rem; }

.meta-row dt { margin: 0; width: 1.15rem; flex: none; display: flex; align-items: center; }

/* Lucide-style line icons (inherit color via currentColor). */
.ico { width: 1.05rem; height: 1.05rem; stroke: var(--accent); flex: none; display: block; }

.search__icon svg { width: 1rem; height: 1rem; stroke: var(--ink-soft); display: block; }

.empty__mark svg { width: 2.6rem; height: 2.6rem; stroke: var(--accent); display: inline-block; }

.meta-row dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink);
    font-weight: 600;
}

.card__foot { padding: 0.8rem 1.4rem 1.4rem; }

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--accent);
    padding: 0.78rem 1.2rem;
    border-radius: 12px;
    transition: background 0.16s ease, transform 0.16s ease;
}

.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn--disabled {
    background: #E7DDCE;
    color: var(--ink-soft);
    cursor: not-allowed;
    pointer-events: none;
}

.grid__empty { text-align: center; color: var(--ink-soft); padding: 2rem 0; }

/* ---------- Empty state ---------- */
.empty {
    text-align: center;
    max-width: 460px;
    margin: 2rem auto 3rem;
    padding: 2.5rem 1.5rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty__mark { font-size: 3rem; display: block; margin-bottom: 0.8rem; }
.empty__title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 1.5rem; margin: 0 0 0.4rem; }
.empty__text { color: var(--ink-soft); margin: 0 0 1.6rem; }
.empty .btn { width: auto; }

/* ---------- Footer ---------- */
.footer {
    background: var(--ink);
    color: #EFE6DA;
    padding: 3rem 1.5rem 2rem;
}

.footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: space-between;
}

.footer__col { flex: 1 1 280px; }
.footer__logo { height: 52px; width: auto; margin-bottom: 1rem; }
.footer__col p { color: #C9BDAE; font-size: 0.95rem; margin: 0; }
.footer__col h4 { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 400; font-size: 1.2rem; margin: 0 0 0.8rem; }
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links li { margin-bottom: 0.5rem; }
.footer__links a { color: #EFE6DA; text-decoration: none; transition: color 0.15s ease; }
.footer__links a:hover { color: var(--accent); }

.footer__copy {
    max-width: var(--maxw);
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.85rem;
    color: #B5A896;
    letter-spacing: 0.05em;
}

/* Wikimedia attribution — deliberately tiny and faint, at the very bottom. */
.footer__credit {
    max-width: var(--maxw);
    margin: 0.5rem auto 0;
    text-align: center;
    font-size: 0.68rem;
    color: rgba(181, 168, 150, 0.55);
    letter-spacing: 0.03em;
}

.footer__credit a { color: inherit; text-decoration: underline; }
.footer__credit a:hover { color: rgba(255, 255, 255, 0.75); }
