/* Generic content article page (SiteController::renderArticle -> site/article).
   Applies to every /{lang}/article/{slug} prose page (mission, history, rules…).
   Scoped .art-* classes + a restyle of the legacy .about-menu sidebar; content
   HTML stays untouched, only its typography is enhanced. Brand red #E32D44. */

:root { --art-brand: #E32D44; --art-ink: #2b2b36; --art-muted: #4c4c58; }

/* ---------- hero cover (reuses .page-cover header-clearance) ---------- */
/* NOTE the doubled-up selector: legacy's `.page-cover.center-cover` pins the
   cover to height:357px with overflow hidden, so a tall title silently
   overflowed and got clipped. Matching its specificity lets the cover grow. */
.page-cover.center-cover.art-cover,
.art-cover {
    position: relative;
    min-height: clamp(190px, 26vh, 280px);
    height: auto;
    overflow: hidden;
    background:
        radial-gradient(120% 150% at 88% -10%, rgba(255, 255, 255, .16), transparent 45%),
        linear-gradient(105deg, #a8122c 0%, #E32D44 58%, #ec5a6d 100%) !important;
}
.art-cover::after {
    content: "";
    position: absolute;
    right: -40px; bottom: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    border: 44px solid rgba(255, 255, 255, .06);
}
.art-cover .art-cover__content {
    position: relative;
    z-index: 1;
    min-height: clamp(190px, 26vh, 280px);
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    /* 104px top keeps content clear of the fixed header when the box grows
       (legacy .page-cover__content used a 100px top padding for the same reason) */
    padding: 104px 4px 40px;
    gap: 16px;
}
/* Pages whose content block is pulled up over the cover (section, catalogue,
   contact, program) need the title to stop short of the bottom edge, or a
   two-line title ends up underneath the overlapping cards. */
.art-cover--overlap .art-cover__content { padding-bottom: 88px; }

.art-cover__title {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: 1.2;
    max-width: 900px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .22);
}
.art-cover__title::before {
    content: "";
    display: block;
    width: 54px; height: 5px;
    border-radius: 100px;
    background: #fff;
    opacity: .9;
    margin-bottom: 18px;
}

/* ---------- layout ---------- */
.art-wrap { margin-top: 46px; margin-bottom: 70px; }
.art-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.art-grid.has-side { grid-template-columns: 268px minmax(0, 1fr); }

/* ---------- sidebar (legacy .about-menu, restyled) ---------- */
.art-side .about-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(30, 20, 40, .05);
    position: sticky;
    top: 120px;
    /* neutralise the legacy mobile accordion collapse (height:80px;
       overflow:hidden; transform:translateY(-40px)) so the full list always
       shows without needing the legacy toggle JS. */
    height: auto;
    max-height: none;
    overflow: visible;
    transform: none;
}
.art-side .about-menu > li {
    margin: 0;
    width: 100%;
    height: auto;
    border-bottom: none;
    padding-left: 0;
}
.art-side .about-menu > li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 11px;
    color: var(--art-muted);
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
.art-side .about-menu > li a:hover {
    background: rgba(227, 45, 68, .06);
    color: var(--art-brand);
}
.art-side .about-menu > li.active > a {
    background: var(--art-brand);
    color: #fff;
    font-weight: 600;
}
/* the first row is the legacy mobile toggle (section title + burger icons) —
   keep it visible only where the legacy CSS shows it (small screens). */
.art-side .about-menu > li.aboutMenuActive { display: none; }
.art-side .about-menu > li.set { display: block; }
.art-side .about-menu > li a img { width: 18px; height: 18px; flex: none; }

/* ---------- prose typography ---------- */
.art-main {
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(30, 20, 40, .05);
    padding: clamp(24px, 4vw, 52px);
}
.art-prose {
    color: var(--art-muted);
    font-size: 17px;
    line-height: 1.85;
    max-width: 820px;
}
.art-prose > :first-child { margin-top: 0; }
.art-prose > :last-child { margin-bottom: 0; }
.art-prose p { margin: 0 0 1.15em; }
.art-prose :is(h1, h2, h3, h4, h5) {
    color: var(--art-ink);
    line-height: 1.35;
    margin: 1.6em 0 .7em;
    font-weight: 700;
}
.art-prose :is(h1, h2) { font-size: clamp(20px, 2.4vw, 27px); }
.art-prose h3 { font-size: 21px; }
.art-prose :is(h1, h2, h3, h4) span[style*="color"],
.art-prose :is(strong, b)[style*="color"] { /* keep authors' inline colors */ }
.art-prose a { color: var(--art-brand); text-decoration: underline; text-underline-offset: 2px; }
.art-prose a:hover { text-decoration: none; }
.art-prose img { max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0; }
.art-prose :is(ul, ol) { margin: 0 0 1.2em; padding-left: 0; list-style: none; }
.art-prose :is(ul, ol) li {
    position: relative;
    padding-left: 30px;
    margin-bottom: .6em;
}
.art-prose ul li::before {
    content: "";
    position: absolute;
    left: 4px; top: .62em;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--art-brand);
}
.art-prose ol { counter-reset: art-c; }
.art-prose ol li { counter-increment: art-c; }
.art-prose ol li::before {
    content: counter(art-c);
    position: absolute;
    left: 0; top: .1em;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(227, 45, 68, .1);
    color: var(--art-brand);
    font-size: 12.5px;
    font-weight: 700;
}
.art-prose blockquote {
    margin: 1.4em 0;
    padding: 6px 22px;
    border-left: 4px solid var(--art-brand);
    background: rgba(227, 45, 68, .04);
    border-radius: 0 12px 12px 0;
    color: var(--art-ink);
}
.art-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 15.5px;
}
.art-prose :is(td, th) { border: 1px solid #e7e7ec; padding: 10px 14px; text-align: left; }
.art-prose th { background: #faf7f8; color: var(--art-ink); }
.art-prose iframe { max-width: 100%; border-radius: 12px; }

/* Author-designed wide tables (they carry an inline min-width, like the
   admissions program tables) need more than the 820px reading measure:
   give that page the full card width and a scroll fallback so the table
   never clips at the card edge. Text-only articles keep the narrow measure. */
.art-prose:has(table[style*="min-width"]) {
    max-width: none;
    overflow-x: auto;
}

/* Grid items default to min-width:auto (= min-content), so one wide table
   inflates .art-main and the whole page gains a horizontal scroll on phones.
   Let grid children shrink; the table then scrolls inside .art-prose. */
.art-grid > * { min-width: 0; }

.art-empty { color: #9a9aa6; font-size: 16px; }

@media (max-width: 900px) {
    .art-grid.has-side { grid-template-columns: 1fr; }
    .art-side .about-menu { position: static; }
}

/* Legacy bodies are full of hard-justified paragraphs, which tears Georgian
   apart into rivers of whitespace at this measure. */
.art-prose p[style*="justify"],
.art-prose div[style*="justify"],
.art-prose span[style*="justify"] { text-align: left !important; }
