/* ==========================================================================
   Samshvilde Archaeological Expedition — site theme
   Museum / archaeological look: parchment backgrounds, stone darks,
   colours taken from the logo (red, olive, sand). Built on Bootstrap 4 grid.
   ========================================================================== */

:root {
    /* palette */
    --parchment: #f7f2e8;
    --parchment-2: #efe6d4;
    --sand: #e3cb93;
    --sand-deep: #c9a45c;
    --olive: #6b7a46;
    --olive-dark: #4f5a33;
    --clay: #b23a2c;          /* accent (logo red, earthier) */
    --clay-dark: #8e2c21;
    --stone-900: #211c19;
    --stone-800: #2e2723;
    --stone-700: #4a403a;
    --ink: #2a2320;
    --muted: #6e6359;
    --line: #e0d5c1;
    --white: #fffdf9;

    /* type */
    --font-sans: "Noto Sans Georgian", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Noto Serif Georgian", "Noto Serif", Georgia, serif;

    /* shape */
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(33, 28, 25, .06), 0 8px 24px rgba(33, 28, 25, .08);
    --shadow-lg: 0 2px 4px rgba(33, 28, 25, .08), 0 18px 40px rgba(33, 28, 25, .14);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 76px;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--parchment);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, .serif {
    font-family: var(--font-serif);
    color: var(--stone-900);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.005em;
}
a { color: var(--clay); transition: color .2s var(--ease); }
a:hover { color: var(--clay-dark); text-decoration: none; }
img { max-width: 100%; height: auto; }
::selection { background: var(--sand); color: var(--stone-900); }
:focus-visible { outline: 3px solid var(--sand-deep); outline-offset: 2px; border-radius: 4px; }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 2000;
    background: var(--stone-900); color: var(--white); padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; color: var(--white); }

.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 575px) { .container-wide { padding: 0 16px; } }

.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--parchment-2); }
.section-dark { background: var(--stone-900); color: #e9e1d4; }
.section-dark h2, .section-dark h3 { color: var(--white); }
@media (max-width: 767px) { .section { padding: 60px 0; } }

/* eyebrow + section heading */
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--clay); margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); margin: 0; }
.section-head p { color: var(--muted); max-width: 560px; margin: 8px 0 0; }

/* ---------- buttons ---------- */
.btn-clay, .btn-ghost, .btn-light-ghost {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
    border: 2px solid transparent; transition: all .25s var(--ease); line-height: 1.2;
}
.btn-clay { background: var(--clay); color: var(--white); }
.btn-clay:hover { background: var(--clay-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--stone-800); color: var(--stone-800); }
.btn-ghost:hover { background: var(--stone-800); color: var(--white); }
.btn-light-ghost { border-color: rgba(255, 253, 249, .7); color: var(--white); }
.btn-light-ghost:hover { background: var(--white); color: var(--stone-900); }
.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.link-arrow .fa { transition: transform .25s var(--ease); }
.link-arrow:hover .fa { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255, 253, 249, .94);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(33, 28, 25, .08); }
.site-header .navbar { padding-top: 0; padding-bottom: 0; min-height: var(--header-h); }
.site-header .brand img { height: 54px; width: auto; display: block; }
.site-nav .nav-link {
    position: relative; color: var(--stone-800) !important; font-weight: 500; font-size: 15px;
    padding: 26px 14px !important;
}
.site-nav .nav-link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 18px; height: 2px;
    background: var(--clay); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.site-nav .nav-link:hover::after, .site-nav .active .nav-link::after { transform: scaleX(1); }
.site-nav .active .nav-link { color: var(--clay) !important; }

.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; background: var(--parchment-2); border-radius: 999px; padding: 3px; }
.lang-switch a {
    font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; color: var(--muted); letter-spacing: .04em;
}
.lang-switch a.is-active { background: var(--white); color: var(--stone-900); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: var(--stone-800); background: transparent; border: 1px solid var(--line); transition: all .2s var(--ease);
}
.icon-btn:hover { background: var(--stone-800); color: var(--white); border-color: var(--stone-800); }

.site-header .navbar-toggler { border: 0; padding: 8px; }
.burger { width: 24px; height: 16px; position: relative; display: block; }
.burger span, .burger::before, .burger::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--stone-900); border-radius: 2px;
    transition: transform .3s var(--ease), opacity .2s;
}
.burger::before { top: 0; } .burger span { top: 7px; } .burger::after { bottom: 0; }
.navbar-toggler[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .burger span { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
    .site-header .brand img { height: 44px; }
    .site-header .navbar { min-height: 64px; }
    .site-nav { padding: 8px 0 20px; }
    .site-nav .nav-link { padding: 12px 4px !important; font-size: 17px; border-bottom: 1px solid var(--line); }
    .site-nav .nav-link::after { display: none; }
    .header-tools { padding: 16px 0 8px; }
}

/* ---------- hero (home) ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--stone-900); }
.hero .carousel, .hero .carousel-inner, .hero .carousel-item { position: absolute; inset: 0; height: 100%; }
/* Brighter, livelier photos; the shading is kept only low and to the left, where the text is. */
.hero .carousel-item img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.06) saturate(1.12); }
.hero .carousel-item.active img { animation: kenburns 14s ease-out both; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(85% 70% at 10% 82%, rgba(33, 28, 25, .68) 0%, rgba(33, 28, 25, .4) 40%, rgba(33, 28, 25, 0) 72%),
        linear-gradient(180deg, rgba(33, 28, 25, 0) 0%, rgba(33, 28, 25, 0) 38%, rgba(33, 28, 25, .35) 62%, rgba(33, 28, 25, .72) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 0 72px; width: 100%; }
.hero h1 {
    color: var(--white); font-size: clamp(34px, 5vw, 64px); max-width: 900px; margin: 0 0 18px;
    letter-spacing: .01em; line-height: 1.2;
    text-shadow: 0 1px 2px rgba(20, 16, 14, .45), 0 4px 18px rgba(20, 16, 14, .45), 0 10px 40px rgba(20, 16, 14, .3);
}
.hero p.lead {
    font-size: clamp(16px, 1.6vw, 20px); font-weight: 500; line-height: 1.6; color: var(--white);
    max-width: 640px; margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(20, 16, 14, .5), 0 2px 14px rgba(20, 16, 14, .45);
}
.hero .eyebrow { color: var(--sand); font-weight: 700; letter-spacing: .16em; text-shadow: 0 1px 2px rgba(20, 16, 14, .55), 0 2px 10px rgba(20, 16, 14, .4); }
.hero .eyebrow::before { box-shadow: 0 1px 3px rgba(20, 16, 14, .4); }

/* Slider text: an edgeless #b23a2c haze (the "explore projects" button colour) that blurs the photo
   behind the text and fades out to the right and upward, so there is no box around it. */
.hero-content::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    /* extends past the slider's sides and bottom (clipped by .hero) so the blur has no soft, washed-out edge */
    left: -40px; right: -40px; top: -90px; bottom: -40px;
    /* light tint that runs along the whole width of the slider */
    background: linear-gradient(90deg, rgba(178, 58, 44, .44) 0%, rgba(178, 58, 44, .32) 35%, rgba(178, 58, 44, .2) 70%, rgba(178, 58, 44, .1) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(145%) brightness(1.08); backdrop-filter: blur(14px) saturate(145%) brightness(1.08);
    -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 62%, transparent 100%);
    mask-image: linear-gradient(0deg, #000 0%, #000 62%, transparent 100%);
}
.hero-content { padding-bottom: 34px; }
.hero-text { position: relative; max-width: 760px; padding-left: 22px; margin-bottom: 22px; }
.hero-text::before { /* thin sand line along the text */
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px;
    background: linear-gradient(180deg, var(--sand) 0%, var(--sand-deep) 70%, rgba(201, 164, 92, 0) 100%);
}
.hero-text .eyebrow { color: #f8e7bd; font-size: 11.5px; letter-spacing: .2em; margin-bottom: 12px; }
.hero-text .eyebrow::before { display: none; }
.hero-text h1 {
    font-weight: 800; font-size: clamp(26px, 2.9vw, 42px); line-height: 1.2; letter-spacing: .01em; margin-bottom: 12px;
    text-shadow: 0 1px 1px rgba(70, 16, 10, .35), 0 4px 22px rgba(70, 16, 10, .32);
}
.hero-text p.lead {
    margin-bottom: 0; max-width: 540px; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.65; color: #fff8ef; opacity: .95;
    text-shadow: 0 1px 1px rgba(70, 16, 10, .35), 0 2px 14px rgba(70, 16, 10, .3);
}
.hero-content .btn-clay, .hero-content .btn-light-ghost { padding: 10px 20px; font-size: 14px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .hero-content::before { background: linear-gradient(90deg, rgba(178, 58, 44, .7) 0%, rgba(178, 58, 44, .45) 60%, rgba(178, 58, 44, .25) 100%); }
}
@media (max-width: 767px) {
    .hero-content::before { top: -60px; }
    .hero-content { padding-bottom: 26px; }
    .hero-text { padding-left: 16px; }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-controls { position: absolute; right: 24px; bottom: 32px; z-index: 3; display: flex; gap: 8px; }
.hero-controls a {
    width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 253, 249, .5); color: var(--white); backdrop-filter: blur(4px);
}
.hero-controls a:hover { background: var(--white); color: var(--stone-900); }
@media (max-width: 767px) { .hero { min-height: 72vh; } .hero-controls { display: none; } .hero-content { padding-bottom: 26px; } }

/* ---------- page header (inner pages) ---------- */
.page-hero {
    position: relative; color: var(--white); background: var(--stone-900) center/cover no-repeat;
    padding: 96px 0 56px; overflow: hidden;
}
.page-hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(33, 28, 25, .92) 0%, rgba(33, 28, 25, .7) 55%, rgba(33, 28, 25, .45) 100%);
}
.page-hero > * { position: relative; }
.page-hero h1 { color: var(--white); font-size: clamp(30px, 4vw, 52px); margin: 0; max-width: 920px; }
.page-hero .eyebrow { color: var(--sand); }
.page-hero .lead { color: rgba(255, 253, 249, .82); max-width: 720px; margin: 14px 0 0; }
.breadcrumbs { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.breadcrumbs li { color: rgba(255, 253, 249, .65); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumbs a { color: rgba(255, 253, 249, .85); }
.breadcrumbs a:hover { color: var(--white); }

/* ---------- cards ---------- */
.card-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 575px) { .card-grid.cols-2 { grid-template-columns: 1fr; } }

.x-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); color: var(--ink);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.x-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.x-card .media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--parchment-2); }
.x-card .media.portrait { aspect-ratio: 3 / 4; }
.x-card .media img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.x-card:hover .media img { transform: scale(1.05); }
.x-card .media .placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--sand-deep); font-size: 40px;
    background: repeating-linear-gradient(45deg, var(--parchment-2), var(--parchment-2) 10px, #eadfca 10px, #eadfca 20px);
}
.x-card .body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.x-card .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 12px; align-items: center; }
.x-card h3 { font-size: 19px; margin: 0 0 10px; transition: color .2s; }
.x-card:hover h3 { color: var(--clay); }
.x-card p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.x-card .more { margin-top: auto; font-weight: 600; font-size: 14px; color: var(--clay); display: inline-flex; gap: 8px; align-items: center; }
.x-card .stretched { position: absolute; inset: 0; z-index: 1; }
.x-card .card-actions { position: relative; z-index: 2; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; }
.x-card .card-actions a { font-size: 14px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }

/* text-only tile (types, services) */
.tile {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 24px 26px; border-radius: var(--radius); background: var(--white);
    border: 1px solid var(--line); color: var(--stone-900);
    font-family: var(--font-serif); font-weight: 700; font-size: 18px; line-height: 1.35;
    transition: all .3s var(--ease); height: 100%;
}
.tile .fa { color: var(--clay); transition: transform .3s var(--ease); flex-shrink: 0; }
.tile:hover { border-color: var(--clay); box-shadow: var(--shadow); color: var(--clay); transform: translateY(-2px); }
.tile:hover .fa { transform: translateX(4px); }
.tile .num { font-family: var(--font-sans); font-size: 13px; color: var(--sand-deep); font-weight: 600; display: block; margin-bottom: 4px; letter-spacing: .1em; }

/* ---------- album / gallery ---------- */
.album {
    position: relative; display: block; border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 4 / 3; background: var(--stone-800); box-shadow: var(--shadow);
}
.album img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .4s; }
.album::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(33, 28, 25, .85)); }
.album .caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px 22px; color: var(--white); }
.album .caption h3 { color: var(--white); font-size: 19px; margin: 0; }
.album .caption span { font-size: 13px; color: var(--sand); display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; }
.album:hover img { transform: scale(1.06); }

.masonry { column-count: 3; column-gap: 16px; }
@media (max-width: 991px) { .masonry { column-count: 2; } }
@media (max-width: 575px) { .masonry { column-count: 1; } }
.masonry a { display: block; margin-bottom: 16px; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; position: relative; background: var(--parchment-2); }
.masonry img { width: 100%; display: block; transition: transform .6s var(--ease); }
.masonry a::after {
    content: "\f00e"; font-family: FontAwesome; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--white); background: rgba(33, 28, 25, .35); opacity: 0; transition: opacity .3s;
}
.masonry a:hover::after { opacity: 1; }
.masonry a:hover img { transform: scale(1.04); }

/* ---------- article (detail pages) ---------- */
.article-wrap { padding: 64px 0 96px; }
.article {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 64px);
}
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 36px; box-shadow: var(--shadow); }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.prose { font-size: 17px; line-height: 1.85; color: var(--ink); overflow-wrap: anywhere; }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .6em; }
.prose p { margin: 0 0 1.15em; }
.prose img { border-radius: var(--radius-sm); height: auto !important; max-width: 100% !important; }
.prose iframe { max-width: 100%; border: 0; border-radius: var(--radius-sm); }
.prose table { width: 100% !important; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose blockquote { border-left: 3px solid var(--clay); margin: 1.5em 0; padding: .4em 0 .4em 1.2em; color: var(--muted); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
/* Legacy TinyMCE content: inline fonts, sizes and justification override the theme. */
.prose * { font-family: inherit !important; }
.prose [style*="font-size"]:not(h1):not(h2):not(h3):not(h4) { font-size: inherit !important; }
.prose [style*="justify"], .prose[style*="justify"] { text-align: left !important; }
.prose [style*="padding-left"] { padding-left: 0 !important; }
.prose [style*="text-indent"] { text-indent: 0 !important; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--font-serif) !important; }
.prose p:empty, .prose p:has(> br:only-child) { display: none; }
/* Small portrait photos at the start of a paragraph (team lists etc.) sit beside the text. */
.prose p > img:first-child[width] { float: left; margin: 4px 20px 10px 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { clear: both; }
.prose::after { content: ""; display: block; clear: both; }

.aside-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; position: sticky; top: calc(var(--header-h) + 24px); }
.aside-card h4 { font-size: 16px; margin-bottom: 16px; }
.aside-card .meta-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.aside-card .meta-row .fa { color: var(--clay); width: 16px; margin-top: 4px; }

.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.back-link:hover { color: var(--clay); }
.back-link .fa { transition: transform .25s var(--ease); }
.back-link:hover .fa { transform: translateX(-4px); }

.doc-viewer { margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--parchment-2); }
.doc-viewer .bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; background: var(--white); border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; flex-wrap: wrap; }
.doc-viewer iframe { width: 100%; height: min(85vh, 960px); border: 0; display: block; }

.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--stone-900); }
.video-frame iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }

/* ---------- about (home) ---------- */
.about-intro .prose { font-size: 17px; }
.about-intro .prose p:empty { display: none; }
.prose-clamp { max-height: 360px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.about-intro .video-frame { margin-top: 34px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-serif); font-size: 30px; color: var(--clay); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 575px) { .stat-row { grid-template-columns: 1fr 1fr; } }

/* ---------- team ---------- */
.team-card { display: flex; gap: 24px; background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); height: 100%; }
.team-card .photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--parchment-2); border: 3px solid var(--sand); }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card .role { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--olive); margin-bottom: 6px; }
.team-card h3 { font-size: 20px; margin: 0 0 4px; }
.team-card .position { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.team-card .contacts { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.team-card .contacts li { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; overflow-wrap: anywhere; }
.team-card .contacts .fa { color: var(--clay); width: 14px; }
@media (max-width: 575px) { .team-card { flex-direction: column; align-items: flex-start; } .team-card .photo { width: 96px; height: 96px; } }

/* ---------- accordion (summer school) ---------- */
.acc { border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 26px; background: none; border: 0; text-align: left; cursor: pointer;
    font-family: var(--font-serif); font-weight: 700; font-size: 18px; color: var(--stone-900);
}
.acc-btn .fa { color: var(--clay); transition: transform .3s var(--ease); }
.acc-btn[aria-expanded="true"] .fa { transform: rotate(45deg); }
.acc-btn:hover { color: var(--clay); }
.acc-body { padding: 0 26px 24px; }

/* ---------- partners ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.partners a {
    display: flex; align-items: center; justify-content: center; padding: 22px; height: 120px;
    background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); transition: all .3s var(--ease);
}
.partners img { max-height: 72px; width: auto; filter: grayscale(1); opacity: .75; transition: all .3s var(--ease); }
.partners a:hover { box-shadow: var(--shadow); border-color: transparent; }
.partners a:hover img { filter: none; opacity: 1; }

/* ---------- pagination ---------- */
.pagination { justify-content: center; margin-top: 48px; gap: 6px; }
.pagination .page-link { border: 1px solid var(--line); border-radius: 999px !important; color: var(--stone-800); min-width: 42px; text-align: center; background: var(--white); }
.pagination .page-item.active .page-link { background: var(--clay); border-color: var(--clay); color: var(--white); }
.pagination .page-link:hover { background: var(--parchment-2); color: var(--stone-900); }

.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.empty-state .fa { font-size: 36px; color: var(--sand-deep); margin-bottom: 12px; display: block; }

/* ---------- footer ---------- */
.site-footer { background: var(--stone-900); color: #cfc5b6; font-size: 15px; }
.site-footer .map { display: block; width: 100%; height: 320px; border: 0; filter: grayscale(.6) sepia(.25) contrast(.95); }
.site-footer .footer-main { padding: 64px 0 40px; }
.site-footer h4 { color: var(--white); font-size: 16px; margin-bottom: 18px; font-family: var(--font-sans); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.site-footer a { color: #e9e1d4; }
.site-footer a:hover { color: var(--sand); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul ul { display: contents; }
.site-footer .contact-list li { display: flex; gap: 12px; }
.site-footer .contact-list .fa { color: var(--sand); width: 16px; margin-top: 5px; }
.footer-brand img { height: 64px; background: var(--white); border-radius: var(--radius-sm); padding: 6px 10px; }
.footer-brand p { margin-top: 18px; max-width: 360px; color: #a99e8f; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; font-size: 14px; color: #8f8578; }
.footer-bottom .container-wide { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 1020; width: 46px; height: 46px; border-radius: 50%;
    background: var(--clay); color: var(--white); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .3s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--white); background: var(--clay-dark); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero .carousel-item.active img { animation: none; }
    * { transition-duration: .01ms !important; }
}
