@import url("https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@400;500;700&family=GFS+Didot&family=Noto+Serif:wght@400;500;600;700&display=swap");

:root {
    --bg: #f3efe7;
    --bg-deep: #ebe5d9;
    --surface: rgba(255, 251, 244, 0.76);
    --surface-strong: #faf7f0;
    --ink: #1d1a16;
    --muted: #625b50;
    --line: #d5ccbd;
    --accent: #6a5a43;
    --accent-deep: #41372b;
    --accent-soft: #e6ddcf;
    --font-body: "Noto Serif", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --font-display: "GFS Didot", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --font-ui: "Alegreya Sans SC", "Noto Sans", "Segoe UI", sans-serif;
    --max-width: 1100px;
    --radius: 0.95rem;
    --shadow: 0 14px 36px rgba(33, 31, 24, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.7), transparent 30%),
        linear-gradient(180deg, #f8f5ef 0%, var(--bg) 50%, var(--bg-deep) 100%);
    font-size: 1.02rem;
    line-height: 1.72;
    letter-spacing: 0.01em;
    font-weight: 400;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.container {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
}

.narrow {
    width: min(calc(100% - 2rem), 760px);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(248, 245, 239, 0.9);
    border-bottom: 1px solid rgba(106, 91, 71, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 5.25rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}

.site-brand-mark {
    width: 3.5rem;
    height: 3.5rem;
    display: grid;
    place-items: center;
    flex: 0 0 3.5rem;
    border-radius: 0.rem;
}

.site-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.site-brand-title,
h1,
h2 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    font-weight: 400;
}

h3 {
    font-family: var(--font-body);
    letter-spacing: -0.02em;
    font-weight: 600;
}

.site-brand-title {
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 400;
}

.site-brand-subtitle {
    margin-top: 0.25rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    line-height: 1.35;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15.5rem;
    min-height: 2.8rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.55);
}

.language-switcher:focus-visible {
    outline: none;
    border-color: rgba(65, 55, 43, 0.32);
    box-shadow: 0 0 0 3px rgba(65, 55, 43, 0.08);
}

.language-switcher-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
}

/* Navigation */

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.nav-link {
    padding: 0.7rem 0.9rem;
    border-radius: 0.85rem;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    color: var(--muted);
    white-space: nowrap;
    transition: background-color 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(106, 91, 71, 0.08);
    color: var(--ink);
}

.nav-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
    border-radius: 0.85rem;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    color: var(--ink);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 1rem;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
    content: "";
}

.nav-toggle-icon {
    position: relative;
}

.nav-toggle-icon::before {
    position: absolute;
    top: -0.35rem;
}

.nav-toggle-icon::after {
    position: absolute;
    top: 0.35rem;
}

/* Hero */

.hero,
.page-hero {
    padding: 5.5rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    gap: 2rem;
    align-items: start;
}

.hero-compact {
    padding-bottom: 2rem;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.45rem, 4vw, 4.2rem);
    line-height: 1.08;
}

.lead {
    margin: 1.25rem 0 0;
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 60ch;
}

.eyebrow,
.card-kicker,
.meta-label {
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.17em;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

/* Buttons */

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.8rem 1.15rem;
    border-radius: 0.85rem;
    background: var(--accent-deep);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    transition: transform 180ms ease, background-color 180ms ease;
}

.button-link:hover,
.button-link:focus-visible {
    transform: translateY(-1px);
    background: #302821;
}

.button-link.is-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.button-link.is-secondary:hover,
.button-link.is-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.5);
}

/* Panels and cards */

.info-panel,
.map-panel,
.feature-card,
.content-panel,
.preview-tile,
.gallery-item {
    background: var(--surface);
    border: 1px solid rgba(106, 91, 71, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-panel {
    padding: 1.5rem;
}

.info-panel h2 {
    margin: 0.35rem 0 0.75rem;
    font-size: 1.6rem;
    line-height: 1.15;
}

.meta-list {
    display: grid;
    gap: 0.85rem;
    padding: 0;
    margin: 1.8rem 0 0;
    list-style: none;
}

.meta-list li {
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(106, 91, 71, 0.14);
}

.meta-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.meta-list-compact {
    margin-top: 1rem;
}

/* Sections */

.section-shell {
    padding: 2.5rem 0;
}

.section-muted {
    background: rgba(255, 255, 255, 0.28);
}

.section-heading {
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    margin: 0.35rem 0 0.75rem;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.14;
}

.section-heading p {
    max-width: 60ch;
    color: var(--muted);
}

.section-heading-inline {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

/* Cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.card-grid-large .feature-card {
    min-height: 20rem;
}

.feature-card,
.map-panel,
.content-panel,
.preview-tile,
.gallery-item {
    padding: 1.5rem;
}

.feature-card h2,
.feature-card h3,
.content-panel h2 {
    margin: 0.45rem 0 0.8rem;
    font-size: 1.5rem;
    line-height: 1.18;
}

.feature-card p,
.content-panel p,
.preview-tile figcaption,
.gallery-item figcaption {
    color: var(--muted);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--ink);
}

.text-link::after {
    content: "\2192";
}

/* Split layouts */

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.5rem;
    align-items: stretch;
}

.athos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
    gap: 1.5rem;
    align-items: start;
}

.content-stack {
    display: grid;
    gap: 1.25rem;
}

/* Monastery history */

.monastery-history {
    padding-top: 4.5rem;
}

.monastery-history-intro,
.monastery-fascinating-intro,
.monastery-sources-intro {
    max-width: 72ch;
}

.monastery-history-article {
    max-width: 76ch;
}

.monastery-history-chapter {
    padding: 2.25rem 0;
    border-top: 1px solid rgba(106, 91, 71, 0.2);
}

.monastery-history-chapter h3,
.monastery-history-callout h3,
.monastery-fact-card h3 {
    margin: 0 0 0.85rem;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.18;
}

.monastery-history-chapter h3 {
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
}

.monastery-history-chapter p,
.monastery-history-callout p,
.monastery-fact-card p,
.monastery-source-item p {
    color: var(--muted);
}

.monastery-history-chapter p {
    margin: 0 0 1rem;
}

.monastery-history-chapter p:last-child,
.monastery-history-callout p:last-child,
.monastery-fact-card p:last-child,
.monastery-source-item p:last-child {
    margin-bottom: 0;
}

.monastery-history-callout {
    margin: 0.75rem 0 2.75rem;
    padding: 1.65rem 1.75rem;
    border: 1px solid rgba(106, 91, 71, 0.18);
    border-left: 0.3rem solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.monastery-history-callout .eyebrow {
    margin: 0 0 0.45rem;
}

.monastery-history-callout h3 {
    font-size: clamp(1.45rem, 2vw, 1.8rem);
}

.monastery-fascinating {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.monastery-facts-grid {
    counter-reset: monastery-fact;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.monastery-fact-card {
    counter-increment: monastery-fact;
    position: relative;
    min-height: 15rem;
    padding: 1.5rem;
    border: 1px solid rgba(106, 91, 71, 0.14);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.monastery-fact-card::before {
    content: counter(monastery-fact, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    margin-bottom: 1.1rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.monastery-fact-card h3 {
    font-size: 1.45rem;
}

.monastery-fact-card p {
    margin: 0;
}

.monastery-sources {
    padding-top: 4rem;
    padding-bottom: 4.5rem;
}

.monastery-source-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
    padding-left: 1.5rem;
    margin: 2rem 0 0;
}

.monastery-source-item {
    padding: 1.1rem 0 1.25rem 0.25rem;
    border-top: 1px solid rgba(106, 91, 71, 0.2);
}

.monastery-source-item p {
    margin: 0.2rem 0 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.monastery-source-institution {
    color: var(--ink) !important;
    font-family: var(--font-ui);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.monastery-source-item a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: rgba(106, 91, 71, 0.4);
    text-underline-offset: 0.16em;
}

.monastery-source-item a:hover,
.monastery-source-item a:focus-visible {
    color: var(--accent-deep);
    text-decoration-color: currentColor;
}

/* Mount Athos map */

.athos-map-frame {
    overflow: hidden;
    border-radius: calc(var(--radius) - 0.1rem);
    border: 1px solid rgba(106, 91, 71, 0.14);
    background: var(--surface-strong);
}

.athos-map {
    position: relative;
    min-height: 42rem;
    width: 100%;
}

.athos-map-embed {
    display: block;
    width: 100%;
    height: 42rem;
    border: 0;
    filter: saturate(0.9) sepia(0.08);
}

.athos-map-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.athos-map-note,
.athos-coordinates,
.athos-selection-note {
    color: var(--muted);
}

.athos-map-note {
    margin: 0.9rem 0 0;
    font-size: 0.95rem;
}

.athos-selection-note {
    margin: 0.15rem 0 0;
}

.athos-side-panel {
    display: grid;
    gap: 1rem;
}

.athos-side-panel h2,
.athos-selected-card h3 {
    margin: 0.35rem 0 0;
    font-size: 1.55rem;
    line-height: 1.15;
}

.athos-side-panel > p {
    margin: 0;
}

.athos-side-panel > p:not(.eyebrow) {
    color: var(--muted);
}

.athos-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.athos-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.92rem;
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.athos-tag:hover,
.athos-tag:focus-visible {
    background: rgba(106, 91, 71, 0.1);
    color: var(--ink);
    transform: translateY(-1px);
}

.athos-tag.is-active {
    background: var(--accent-deep);
    border-color: transparent;
    color: #fff;
}

.athos-selected-card {
    display: grid;
    gap: 0.35rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(106, 91, 71, 0.14);
}

.athos-selected-card .eyebrow {
    margin-top: 0;
}

.athos-coordinates {
    margin: 0.75rem 0 0;
}

.athos-pin {
    position: absolute;
    z-index: 2;
    width: 1.6rem;
    height: 1.6rem;
    margin-left: -0.8rem;
    margin-top: -1.45rem;
    display: grid;
    place-items: center;
    pointer-events: auto;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
}

.athos-pin::after {
    content: "";
    position: absolute;
    top: 1rem;
    width: 0.14rem;
    height: 0.55rem;
    background: rgba(65, 55, 43, 0.7);
    border-radius: 999px;
}

.athos-pin-dot {
    position: relative;
    z-index: 1;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid #faf7f0;
    background: var(--accent-deep);
    box-shadow: 0 0 0 4px rgba(250, 247, 240, 0.34);
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.athos-pin:hover .athos-pin-dot,
.athos-pin:focus-visible .athos-pin-dot {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(250, 247, 240, 0.42);
}

.athos-pin.is-active .athos-pin-dot {
    background: #8a6735;
    box-shadow: 0 0 0 7px rgba(138, 103, 53, 0.22);
}

.athos-popup {
    max-width: 16rem;
}

.athos-popup-title {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--ink);
    line-height: 1.35;
}

.athos-popup-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Media placeholders */

.placeholder-media {
    min-height: 13rem;
    display: grid;
    place-items: center;
    padding: 1rem;
    border: 1px dashed rgba(106, 91, 71, 0.38);
    border-radius: calc(var(--radius) - 0.15rem);
    background:
        linear-gradient(
            135deg,
            rgba(106, 91, 71, 0.08),
            rgba(255, 255, 255, 0.65)
        ),
        var(--surface-strong);
    color: var(--accent);
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.placeholder-media-tall {
    min-height: 23rem;
}

.placeholder-media-video {
    min-height: 20rem;
}

/* Preview */

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.preview-tile {
    display: grid;
    gap: 1rem;
}

.media-tile-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    overflow: hidden;
    border-radius: calc(var(--radius) - 0.15rem);
    border: 1px solid rgba(106, 91, 71, 0.12);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.preview-tile .placeholder-media {
    min-height: 14rem;
}

/* Gallery */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.gallery-item {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.gallery-item .placeholder-media {
    min-height: 12rem;
}

.gallery-photo-link {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    align-self: start;
    border-radius: calc(var(--radius) - 0.15rem);
    cursor: zoom-in;
}

.gallery-photo-link .media-tile-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}

.gallery-photo-link:focus-visible {
    outline: 3px solid var(--accent-deep);
    outline-offset: 4px;
}

.gallery-videos {
    border-top: 1px solid var(--line);
}

.gallery-audio {
    border-top: 1px solid var(--line);
}

.audio-recording-list {
    display: grid;
    gap: 1rem;
}

.audio-recording-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.75fr);
    gap: 1rem 2rem;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid rgba(106, 91, 71, 0.12);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.audio-recording-copy h3,
.audio-recording-copy p {
    margin: 0;
}

.audio-recording-copy p {
    margin-top: 0.55rem;
    color: var(--muted);
}

.audio-recording-card audio {
    width: 100%;
}

.audio-recording-card .text-link {
    grid-column: 2;
    margin-top: 0;
    justify-self: start;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

html.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox-open body {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

.gallery-lightbox {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 1rem;
    border: 0;
    background: transparent;
    color: var(--surface-strong);
}

.gallery-lightbox::backdrop {
    background: #14120f;
}

.gallery-lightbox[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 1rem;
}

.gallery-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-lightbox-toolbar h2 {
    margin: 0;
    font-size: 1.4rem;
}

.gallery-lightbox-stage {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    align-items: center;
    justify-items: center;
    gap: 1rem;
    min-height: 0;
}

.gallery-lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    object-fit: contain;
    border-radius: calc(var(--radius) - 0.15rem);
    touch-action: pan-y pinch-zoom;
}

.gallery-lightbox-control {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid rgba(255, 251, 244, 0.45);
    border-radius: 50%;
    background: var(--accent-deep);
    color: var(--surface-strong);
    font-family: Georgia, serif;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox-control:hover {
    background: var(--accent);
}

.gallery-lightbox-control:focus-visible {
    outline: 3px solid var(--surface-strong);
    outline-offset: 3px;
}

.gallery-lightbox-control:disabled {
    opacity: 0.35;
    cursor: default;
}

.gallery-lightbox-details {
    max-height: 25vh;
    overflow-y: auto;
    text-align: center;
    overflow-wrap: anywhere;
}

.gallery-lightbox-details p {
    max-width: 75ch;
    margin: 0 auto;
}

.gallery-lightbox-position {
    padding-top: 0.4rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--accent-soft);
}

@media (max-width: 720px) {
    .gallery-lightbox {
        padding: 0.75rem;
    }

    .gallery-lightbox[open] {
        gap: 0.75rem;
    }

    .gallery-lightbox-stage {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0.75rem;
    }

    .gallery-lightbox-image {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        grid-row: 2;
    }
}

/* Footer */

.site-footer {
    padding: 2rem 0 3rem;
    border-top: 1px solid rgba(106, 91, 71, 0.12);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Tablet layouts */

@media (max-width: 960px) {
    .hero-grid,
    .athos-layout,
    .split-layout,
    .card-grid,
    .preview-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid,
    .split-layout {
        align-items: start;
    }

    .section-heading-inline {
        align-items: start;
        flex-direction: column;
    }
}

/*
 * Switch to the compact navigation before the brand and navigation
 * become too narrow to coexist comfortably on the same line.
 */
@media (max-width: 1240px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        background: rgba(248, 245, 239, 0.96);
        border: 1px solid rgba(106, 91, 71, 0.14);
        border-radius: 1rem;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        border-radius: 0.85rem;
    }

    .header-inner {
        position: relative;
    }
}

/* Mobile */

@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0.9rem;
        padding: 0.85rem 0;
    }

    .site-brand {
        flex-basis: 100%;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .language-switcher {
        flex: 1;
        min-width: 0;
    }

    .hero,
    .page-hero {
        padding: 4rem 0 2rem;
    }

    .hero-grid,
    .split-layout,
    .card-grid,
    .preview-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .monastery-facts-grid,
    .monastery-source-list {
        grid-template-columns: 1fr;
    }

    .monastery-history {
        padding-top: 3.25rem;
    }

    .monastery-history-chapter {
        padding: 1.8rem 0;
    }

    .monastery-history-callout {
        margin-bottom: 2.25rem;
        padding: 1.35rem;
    }

    .monastery-fact-card {
        min-height: 0;
    }

    .monastery-source-list {
        padding-left: 1.3rem;
    }

    .site-brand-title {
        font-size: 0.95rem;
    }

    .site-brand-subtitle {
        font-size: 0.76rem;
    }

    .athos-map {
        min-height: 32rem;
    }

    .athos-map-embed {
        height: 32rem;
    }

    .athos-tag {
        width: 100%;
        justify-content: flex-start;
    }

    .footer-inner {
        flex-direction: column;
    }
}



#athos-map {
    width: 100%;
    height: 650px;
    border-radius: 12px;
    overflow: hidden;
}

/* Club page
   Keep both columns top-aligned and let every panel
   use only the height required by its content.
*/
.club-layout {
    align-items: start;
}

.club-layout > .content-stack {
    align-content: start;
    align-self: start;
}

.club-layout .content-panel {
    height: auto;
    min-height: 0;
    align-self: start;
}

.club-sidebar {
    align-content: start;
}


.club-hero .container {
    width: min(calc(100% - 2rem), var(--max-width));
}

.club-hero h1 {
    max-width: none;
}

.club-hero .lead {
    max-width: 70ch;
}

/* Event videos */

.event-video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.event-video-card {
    min-width: 0;
}

.event-video-frame,
.event-video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(106, 91, 71, 0.12);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.event-video-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.event-video-placeholder {
    display: grid;
    place-items: center;
    border-style: dashed;
    border-color: rgba(106, 91, 71, 0.32);
    color: var(--muted);
    font-family: var(--font-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.event-video-copy {
    padding: 1rem 0 0;
}

.event-video-copy .card-kicker {
    margin: 0;
}

.event-video-copy h3 {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

/* Event transcript */

.event-transcript-section {
    border-top: 1px solid var(--line);
}

.event-transcript {
    border: 1px solid rgba(106, 91, 71, 0.15);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.event-transcript summary {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    color: var(--ink);
    font-family: var(--font-ui);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.event-transcript[open] summary {
    border-bottom: 1px solid var(--line);
}

.event-transcript-content {
    padding: 0.5rem 1.5rem 1.75rem;
}

.event-transcript-content h3 {
    margin: 2rem 0 0.8rem;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    line-height: 1.25;
}

.event-transcript-content p {
    margin: 1rem 0 0;
    color: #38332d;
    line-height: 1.82;
}


/* Tablet */

@media (max-width: 960px) {
    .event-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Mobile */

@media (max-width: 720px) {
    .event-video-grid {
        grid-template-columns: 1fr;
    }

    .audio-recording-card {
        grid-template-columns: 1fr;
    }

    .audio-recording-card .text-link {
        grid-column: 1;
    }
}


/* Home gallery slider */

.gallery-slider {
    width: 100%;
}

.gallery-slider-stage {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 8;
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.gallery-slider-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 1;
    transition:
        opacity 350ms ease,
        transform 700ms ease;
}

.gallery-slider-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-slider-image.is-changing {
    opacity: 0;
    transform: scale(1.015);
}

.gallery-slider-overlay {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    padding: 3rem 1.5rem 1.25rem;

    background:
        linear-gradient(
            to top,
            rgba(20, 18, 15, 0.72),
            rgba(20, 18, 15, 0)
        );

    pointer-events: none;
}

.gallery-slider-caption {
    margin: 0;
    max-width: 60ch;
    color: #fff;
    font-size: 0.95rem;
}

.gallery-slider-caption:empty {
    display: none;
}

.gallery-slider-attribution {
    min-height: 1.4em;
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.76rem;
    line-height: 1.4;
    letter-spacing: 0.025em;
    text-align: center;
}

.gallery-slider-attribution:empty {
    display: none;
}

.gallery-slider-attribution a {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.gallery-slider-control {
    position: absolute;
    top: 50%;
    z-index: 2;

    width: 3rem;
    height: 3rem;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;

    background: rgba(20, 18, 15, 0.45);
    color: #fff;

    font-family: Georgia, serif;
    font-size: 2rem;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);
    backdrop-filter: blur(8px);

    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.gallery-slider-control:hover,
.gallery-slider-control:focus-visible {
    background: rgba(20, 18, 15, 0.72);
}

.gallery-slider-prev {
    left: 1rem;
}

.gallery-slider-next {
    right: 1rem;
}

.gallery-slider-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;

    margin-top: 1rem;
}

.gallery-slider-dot {
    width: 0.55rem;
    height: 0.55rem;
    padding: 0;

    border: 0;
    border-radius: 999px;

    background: var(--line);
    cursor: pointer;

    transition:
        width 180ms ease,
        background-color 180ms ease;
}

.gallery-slider-dot.is-active {
    width: 1.6rem;
    background: var(--accent);
}


@media (max-width: 720px) {
    .gallery-slider-stage {
        aspect-ratio: 4 / 3;
    }

    .gallery-slider-control {
        width: 2.6rem;
        height: 2.6rem;
    }

    .gallery-slider-prev {
        left: 0.65rem;
    }

    .gallery-slider-next {
        right: 0.65rem;
    }
}
