
/* ========================================
   CSS CUSTOM PROPERTIES
======================================== */
:root {
    /* Backgrounds */
    --bg-primary: #F7F3ED;
    --bg-warm: #F0EBE1;
    --bg-deep: #E8E1D5;
    --bg-card: #FFFDF9;
    --bg-dark: #2C2720;
    --bg-darker: #231F1A;

    /* Text */
    --text-primary: #3A342C;
    --text-secondary: #6B6157;
    --text-muted: #9B9184;
    --text-light: #B8AFA3;
    --text-on-dark: #E8DFD1;

    /* Accents */
    --accent-saffron: #C4923B;
    --accent-saffron-light: #D4A854;
    --accent-saffron-dark: #A67A2E;
    --accent-saffron-glow: rgba(196, 146, 59, 0.12);
    --accent-sage: #7D8E72;
    --accent-sage-light: #A3B396;
    --accent-burgundy: #7A3B3B;

    /* Borders */
    --border-light: rgba(196, 146, 59, 0.15);
    --border-soft: rgba(58, 52, 44, 0.08);
    --border-card: rgba(58, 52, 44, 0.06);

    /* Shadows */
    --shadow-soft: 0 2px 20px rgba(58, 52, 44, 0.06);
    --shadow-hover: 0 8px 40px rgba(58, 52, 44, 0.1);
    --shadow-card: 0 1px 8px rgba(58, 52, 44, 0.04);

    /* Typography */
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Crimson Pro', 'Georgia', serif;
    --font-heading: 'Lora', 'Georgia', serif;
    --font-ui: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
    --font-myanmar: 'Pyidaungsu', 'Myanmar Text', 'Padauk', sans-serif;

    /* Sizing */
    --max-width: 1200px;
    --content-width: 820px;
    --narrow-width: 680px;
    --nav-height: 72px;

    /* Motion */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition: 0.4s var(--ease);
    --transition-fast: 0.25s var(--ease);
}

/* ========================================
   RESET & BASE
======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle paper grain texture overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
    color: var(--accent-saffron);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-saffron-dark);
}

::selection {
    background: var(--accent-saffron-glow);
    color: var(--text-primary);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-saffron);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 300;
    line-height: 1.15;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 400;
    line-height: 1.25;
}

h3 {
    font-size: 1.3rem;
    font-weight: 500;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.2rem;
}

blockquote {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-saffron);
    padding: 1.5rem 0 1.5rem 2rem;
    margin: 2rem 0;
    line-height: 1.7;
}

/* Myanmar/Burmese text */
.myanmar-text,
[lang="my"],
[lang="my-MM"] {
    font-family: var(--font-myanmar);
    line-height: 2.2;
}

/* Section labels (small caps) */
.section-label {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent-saffron);
    margin-bottom: 1rem;
}

/* ========================================
   LAYOUT UTILITIES
======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2.5rem;
}

.container--narrow {
    max-width: var(--content-width);
}

.container--tight {
    max-width: var(--narrow-width);
}

.section {
    padding: 6rem 0;
}

.section--warm {
    background: var(--bg-warm);
}

.section--deep {
    background: var(--bg-deep);
}

.section--dark {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   NAVIGATION
======================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(247, 243, 237, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    transition: var(--transition);
    height: var(--nav-height);
}

.site-header.scrolled {
    box-shadow: 0 1px 12px rgba(58, 52, 44, 0.06);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.site-branding {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-branding a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
}

.custom-logo-link img,
.site-logo img {
    height: 38px;
    width: auto;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

/* Primary Navigation */
.primary-navigation {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.primary-navigation ul {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-navigation li {
    position: relative;
}

.primary-navigation a {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    display: block;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
    color: var(--accent-saffron);
    background: var(--accent-saffron-glow);
}

/* Sub-menus */
.primary-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    padding: 0.75rem 0;
    min-width: 220px;
    flex-direction: column;
    z-index: 100;
}

.primary-navigation li:hover > ul {
    display: flex;
}

.primary-navigation ul ul a {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    border-radius: 0;
    white-space: nowrap;
}

.primary-navigation ul ul a:hover {
    background: var(--accent-saffron-glow);
}

/* Search toggle */
.nav-search-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    margin-left: 1rem;
}

.nav-search-toggle:hover {
    border-color: var(--accent-saffron);
    color: var(--accent-saffron);
}

.nav-search-toggle svg {
    width: 16px;
    height: 16px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.menu-toggle .bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-secondary);
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translateY(4.6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-4.6px);
}

/* ========================================
   HERO SECTION (front page)
======================================== */
/* ---------- Hero Section (2.0 refinement) ----------
   Designed to work with a photographic background (bundled golden-sunrise
   mountain by default, or any Customizer-uploaded image). Key changes from
   the 1.x gradient-hero:
   - Left-side directional gradient anchors text on the left 60% of the
     viewport so it sits over less-busy imagery (like Image 2 reference)
   - White/cream text with proper shadow-layering for photographic legibility
   - Saffron is now an ACCENT (not primary text color) for better contrast
------------------------------------------------------- */
.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    margin-top: var(--nav-height);
    isolation: isolate;
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--dhamma-hero-image, none);
    background-size: cover;
    background-position: center;
    background-color: #6b6558; /* fallback if image fails */
    z-index: -2;
}

/* Left-to-right darkening gradient to anchor text — like the Quiet Altar ref.
   Plus a bottom fade that transitions back into the parchment page background. */
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg,
            rgba(44, 39, 32, calc(var(--dhamma-hero-overlay, 0.45) * 1.4)) 0%,
            rgba(44, 39, 32, calc(var(--dhamma-hero-overlay, 0.45) * 0.8)) 45%,
            rgba(44, 39, 32, 0.05) 75%,
            rgba(44, 39, 32, 0) 100%),
        linear-gradient(180deg,
            rgba(247, 243, 237, 0) 70%,
            rgba(247, 243, 237, 0.95) 100%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px;
    z-index: -1;
}

.hero-mandala {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.10;
    animation: rotate-slow 120s linear infinite;
    pointer-events: none;
    z-index: -1;
}

.hero-mandala svg circle,
.hero-mandala svg ellipse { stroke: #fff !important; }

@keyframes rotate-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 620px;
    padding: 2rem 2rem 2rem 8vw;
    margin-left: 0;
    margin-right: auto;
}

.hero-pali {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    font-style: normal;
    color: var(--accent-saffron-light);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
    line-height: 1.05;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.35),
        0 4px 24px rgba(0, 0, 0, 0.25);
}

.hero h1 em {
    font-weight: 400;
    font-style: italic;
    color: var(--accent-saffron-light);
}

.hero-divider {
    width: 48px;
    height: 1px;
    background: var(--accent-saffron-light);
    margin: 2rem 0;
    box-shadow: 0 0 8px rgba(196, 146, 59, 0.5);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 300;
    color: rgba(255, 253, 249, 0.92);
    line-height: 1.8;
    max-width: 480px;
    margin: 0 0 2rem 0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-myanmar {
    font-family: var(--font-myanmar);
    font-size: 0.95rem;
    color: rgba(255, 253, 249, 0.82);
    line-height: 2.1;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* Centered variant — pass .hero--centered on the <section> if you prefer
   the old centered layout (works well without a photo). */
.hero--centered { justify-content: center; }
.hero--centered .hero-content { text-align: center; padding: 2rem; }
.hero--centered .hero-divider { margin: 2rem auto; }
.hero--centered .hero-subtitle { margin-left: auto; margin-right: auto; }

@media (max-width: 768px) {
    .hero {
        min-height: 75vh;
        justify-content: center;
    }
    .hero-content {
        text-align: center;
        padding: 2rem 1.5rem;
    }
    .hero-divider {
        margin: 1.5rem auto;
    }
    .hero-subtitle {
        margin: 0 auto 1.5rem;
    }
    /* Stronger overlay on mobile where the image is cropped tighter */
    .hero-bg::after {
        background:
            linear-gradient(180deg,
                rgba(44, 39, 32, calc(var(--dhamma-hero-overlay, 0.45) * 1.2)) 0%,
                rgba(44, 39, 32, calc(var(--dhamma-hero-overlay, 0.45) * 0.9)) 50%,
                rgba(247, 243, 237, 0.9) 95%,
                rgba(247, 243, 237, 1) 100%);
    }
}

/* Hero entrance animations */
.hero-content > * {
    opacity: 0;
    transform: translateY(25px);
    animation: hero-fade-up 1s var(--ease) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.5s; }
.hero-content > *:nth-child(4) { animation-delay: 0.6s; }
.hero-content > *:nth-child(5) { animation-delay: 0.8s; }

@keyframes hero-fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    opacity: 0;
    animation: hero-fade-up 1s var(--ease) 1.2s forwards;
}

.scroll-hint span {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent-saffron), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   TEACHINGS GRID (homepage section)
======================================== */
.teachings-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

.teaching-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    min-height: 100%;
    box-shadow: var(--shadow-soft);
}

.teaching-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-light);
}

.teaching-card__link {
    display: grid;
    grid-template-rows: minmax(220px, 260px) 1fr;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.teaching-card__img {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-deep);
    transition: transform 800ms var(--ease);
    overflow: hidden;
}

.teaching-card__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(44, 39, 32, 0.05) 0%, rgba(44, 39, 32, 0.24) 100%),
        radial-gradient(circle at top right, rgba(255, 245, 220, 0.22), transparent 38%);
}

.teaching-card:hover .teaching-card__img {
    transform: scale(1.03);
}

.teaching-card__tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 253, 249, 0.92);
    color: var(--accent-saffron-dark);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.teaching-card__body {
    padding: 1.8rem 1.8rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.98) 0%, rgba(247, 243, 237, 0.96) 100%);
}

.teaching-card__meta {
    font-family: var(--font-myanmar), var(--font-display);
    font-size: 0.88rem;
    font-style: italic;
    color: var(--accent-saffron-dark);
    line-height: 1.5;
    margin: 0 0 0.4rem;
}

.teaching-card h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.teaching-card__desc {
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.teaching-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-saffron);
    transition: var(--transition);
    margin-top: auto;
}

.teaching-card:hover .teaching-card__cta {
    color: var(--accent-saffron-dark);
    gap: 0.7rem;
}

.teaching-card__cta svg {
    width: 14px;
    height: 14px;
}

.teaching-card:nth-child(1) {
    grid-column: span 7;
}

.teaching-card:nth-child(1) .teaching-card__link,
.teaching-card:nth-child(4) .teaching-card__link {
    grid-template-columns: minmax(220px, 1.05fr) minmax(0, 1fr);
    grid-template-rows: none;
}

.teaching-card:nth-child(1) .teaching-card__img,
.teaching-card:nth-child(4) .teaching-card__img {
    min-height: 100%;
}

.teaching-card:nth-child(1) .teaching-card__body,
.teaching-card:nth-child(4) .teaching-card__body {
    justify-content: center;
    padding: 2.2rem;
}

.teaching-card:nth-child(1) h3,
.teaching-card:nth-child(4) h3 {
    font-size: 1.75rem;
}

.teaching-card:nth-child(2),
.teaching-card:nth-child(3) {
    grid-column: span 5;
}

.teaching-card:nth-child(4) {
    grid-column: span 7;
}

.teaching-card:nth-child(4) .teaching-card__link {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.95fr);
}

.teaching-card:nth-child(4) .teaching-card__img {
    order: 2;
}

.teaching-card:nth-child(4) .teaching-card__body {
    order: 1;
}

/* ========================================
   POST LISTING — Timeline Style
======================================== */
.post-timeline {
    max-width: var(--content-width);
}

.post-timeline-item {
    display: flex;
    gap: 2.5rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-soft);
    transition: var(--transition);
}

.post-timeline-item:first-child {
    padding-top: 0;
}

.post-timeline-item:hover {
    padding-left: 1rem;
}

.post-timeline-item a {
    color: inherit;
    text-decoration: none;
}

.post-date-column {
    min-width: 80px;
    text-align: right;
    padding-top: 0.3rem;
    flex-shrink: 0;
}

.post-date-day {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--accent-saffron);
    line-height: 1;
}

.post-date-month {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
}

.post-timeline-divider {
    width: 1px;
    background: var(--border-light);
    position: relative;
    flex-shrink: 0;
}

.post-timeline-divider::before {
    content: '';
    position: absolute;
    top: 8px;
    left: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-saffron);
    opacity: 0.5;
}

.post-timeline-content {
    flex: 1;
}

.post-category-label {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-sage);
    margin-bottom: 0.5rem;
    display: block;
}

.post-category-label a {
    color: var(--accent-sage);
}

.post-category-label a:hover {
    color: var(--accent-saffron);
}

.post-timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.post-timeline-content h3 a:hover {
    color: var(--accent-saffron);
}

.post-timeline-content .excerpt {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   VERSE / QUOTE SECTION
======================================== */
.verse-section {
    padding: 8rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.verse-section::before,
.verse-section::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.verse-section::before { top: 0; }
.verse-section::after { bottom: 0; }

.verse-ornament {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--accent-saffron);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 2rem;
}

.verse-text {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 300;
    font-style: italic;
    color: var(--text-primary);
    max-width: 650px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

.verse-translation {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2rem;
    line-height: 1.9;
}

.verse-source {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

/* ========================================
   RESOURCE CARDS
======================================== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-light);
}

.resource-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.resource-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--accent-saffron-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.resource-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.resource-card .count {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ========================================
   INFO BAR (contact strip)
======================================== */
.info-bar {
    background: var(--bg-deep);
    padding: 3.5rem 0;
}

.info-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-saffron-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-saffron);
    font-size: 1rem;
    flex-shrink: 0;
}

.info-label {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.info-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Social links in info bar */
.social-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.social-icon:hover {
    color: var(--accent-saffron);
}

.social-icon svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.social-icon:hover svg {
    opacity: 1;
}

/* ========================================
   SINGLE POST / PAGE
======================================== */
.single-post-header {
    padding-top: calc(var(--nav-height) + 5rem);
    padding-bottom: 3rem;
    text-align: center;
}

.single-post-header .post-category-label {
    margin-bottom: 1.5rem;
}

.single-post-header h1 {
    max-width: var(--content-width);
    margin: 0 auto 1.5rem;
}

.single-post-meta {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.single-post-meta span {
    margin: 0 0.75rem;
    opacity: 0.3;
}

.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2.5rem 5rem;
}

.post-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.6rem;
    margin: 3rem 0 1.5rem;
}

.post-content h3 {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem;
}

.post-content img {
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: var(--shadow-soft);
}

.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.post-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.post-content .gallery img {
    margin: 0;
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Featured image */
.post-thumbnail {
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    padding: 0 2.5rem;
}

.post-thumbnail img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

/* Post navigation */
.post-navigation {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 2.5rem;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation a {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-navigation a:hover {
    color: var(--accent-saffron);
}

/* ========================================
   ARCHIVE / CATEGORY PAGE
======================================== */
.archive-header {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 3rem;
}

.archive-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.archive-header .archive-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: var(--content-width);
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 0;
    font-family: var(--font-ui);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.pagination a {
    color: var(--text-secondary);
    border: 1px solid var(--border-soft);
}

.pagination a:hover {
    border-color: var(--accent-saffron);
    color: var(--accent-saffron);
    background: var(--accent-saffron-glow);
}

.pagination .current {
    background: var(--accent-saffron);
    color: white;
    border: 1px solid var(--accent-saffron);
}

/* ========================================
   SEARCH FORM
======================================== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(247, 243, 237, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-overlay-inner {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

.search-overlay-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.search-overlay-close:hover {
    color: var(--accent-saffron);
    background: var(--accent-saffron-glow);
}

.search-form {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.search-form input[type="search"],
.search-form .search-field {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
    background: none;
    border: none;
    outline: none;
    width: 100%;
    padding: 0.5rem 0;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-form .search-submit {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent-saffron);
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

/* Inline search widget (sidebar/footer) */
.widget .search-form {
    border-bottom-width: 1px;
}

.widget .search-form input[type="search"] {
    font-size: 1rem;
}

/* ========================================
   WIDGETS
======================================== */
.widget {
    margin-bottom: 3rem;
}

.widget-title {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-saffron);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-soft);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.widget ul li a:hover {
    color: var(--accent-saffron);
}

/* Calendar widget */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.82rem;
}

.widget_calendar th {
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.widget_calendar td {
    text-align: center;
    padding: 0.4rem;
    color: var(--text-secondary);
}

.widget_calendar td a {
    font-weight: 600;
    color: var(--accent-saffron);
}

.widget_calendar caption {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    caption-side: top;
    color: var(--text-primary);
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 5rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-on-dark);
    margin-bottom: 1rem;
}

.footer-brand .footer-desc {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #8A8078;
}

.footer-heading {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-saffron-light);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #8A8078;
}

.footer-links a:hover {
    color: var(--accent-saffron-light);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: #5A5248;
}

.footer-pali {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-style: italic;
    color: #5A5248;
}

/* ========================================
   SCROLL ANIMATIONS
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger-children > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > .fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   WORDPRESS SPECIFIC OVERRIDES
======================================== */
/* WP Admin Bar spacing */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* WP Block styles */
.wp-block-image img {
    border-radius: 10px;
}

.wp-block-gallery {
    gap: 1rem !important;
}

.wp-block-gallery .wp-block-image img {
    border-radius: 8px;
}

.wp-block-separator {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 3rem 0;
}

.wp-block-quote {
    border-left: 3px solid var(--accent-saffron);
    padding-left: 2rem;
    margin: 2rem 0;
}

.wp-block-quote p {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
    color: var(--text-secondary);
}

.wp-block-quote cite {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: normal;
    letter-spacing: 0.05em;
}

/* Alignwide and alignfull */
.alignwide {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Comments */
.comments-area {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 2.5rem;
    border-top: 1px solid var(--border-soft);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-soft);
}

.comment-author {
    font-family: var(--font-heading);
    font-weight: 500;
}

.comment-metadata {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .teachings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .teaching-card:nth-child(1),
    .teaching-card:nth-child(2),
    .teaching-card:nth-child(3),
    .teaching-card:nth-child(4) {
        grid-column: auto;
    }

    .teaching-card:nth-child(1) .teaching-card__link,
    .teaching-card:nth-child(4) .teaching-card__link {
        grid-template-columns: none;
        grid-template-rows: minmax(220px, 250px) 1fr;
    }

    .teaching-card:nth-child(4) .teaching-card__img,
    .teaching-card:nth-child(4) .teaching-card__body {
        order: initial;
    }

    .teaching-card:nth-child(1) h3,
    .teaching-card:nth-child(4) h3 {
        font-size: 1.5rem;
    }

    .teaching-card:nth-child(1) .teaching-card__body,
    .teaching-card:nth-child(4) .teaching-card__body {
        padding: 1.8rem 1.8rem 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 900px) {
    .teachings-grid {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    /* Mobile nav */
    .menu-toggle {
        display: flex;
    }

    .primary-navigation {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-soft);
        box-shadow: var(--shadow-hover);
        padding: 1rem 0;
    }

    .primary-navigation.active {
        display: block;
    }

    .primary-navigation ul {
        flex-direction: column;
        padding: 0 1.5rem;
    }

    .primary-navigation ul ul {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        display: none;
    }

    .primary-navigation li.menu-item-has-children.open > ul {
        display: flex;
    }

    .nav-search-toggle {
        display: none;
    }

    /* Hero mobile */
    .hero {
        min-height: 70vh;
    }

    .hero-mandala {
        width: 350px;
        height: 350px;
    }

    /* Post timeline mobile */
    .post-timeline-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-date-column {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .post-timeline-divider {
        display: none;
    }

    /* Resources mobile */
    .resources-grid {
        grid-template-columns: 1fr;
    }

    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Info bar mobile */
    .info-bar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .verse-section {
        padding: 5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 65vh;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

/* =============================================================
   Dhamma Tranquil 2.0 — Additions
   Block pattern styles, hero image support, accessibility fixes.
   ============================================================= */

/* WP-standard screen-reader class */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: #fff;
	clip: auto !important;
	clip-path: none;
	color: var(--text-primary);
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 0.75rem 1.25rem;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}


/* ---------- Page Header ----------
   Used on regular pages (About, Contact, etc.) to clearly distinguish
   them from the homepage hero. Warm sand background, centered title. */
.page-header {
	background: var(--bg-warm);
	padding: calc(var(--nav-height) + 3rem) 0 3rem;
	margin-top: 0;
	border-bottom: 1px solid var(--border-light);
}
.page-header .page-title {
	font-family: var(--font-display);
	font-weight: 300;
	font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
	line-height: 1.15;
	color: var(--text-primary);
	letter-spacing: -0.01em;
	margin: 0 0 0.5rem;
}
.page-header .page-tagline {
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.15rem;
	color: var(--text-secondary);
	max-width: 36rem;
	margin: 0.5rem auto 0;
	line-height: 1.6;
}

/* View-all link wrapper on the homepage post timeline */
.view-all-link {
	text-align: center;
	padding-top: 3rem;
}
.view-all-link .card-link {
	font-family: var(--font-ui);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
}

/* Section description — the lede paragraph under each section title */
.section-desc {
	max-width: 580px;
	color: var(--text-secondary);
	line-height: 1.9;
	margin-bottom: 3.5rem;
}
