/* ============================================================================
   DH-6 MAIN STYLESHEET
   Singapore Mediation Solutions
   Version: 6.1
   Last Updated: 2025-10-28
   Unified Hugo CSS with WordPress professionalism
   ============================================================================ */

/* ============================================================================
   BASE STYLES & RESET
   ============================================================================ */


/* 1. LOCAL FONTS (v50) */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/roboto-v50-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/roboto-v50-latin_latin-ext-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/roboto-v50-latin_latin-ext-700.woff2') format('woff2');
}

/* ==========================================================
   2. GLOBAL DEFAULTS (Dark-First & Accessibility)
   ========================================================== */

/* Universal Reset for consistent spacing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    /* Font Stack: Roboto v50 first */
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    line-height: 1.7;
    letter-spacing: 0.01rem;

    /* DEFAULT DARK MODE: Safety for field readers */
    background-color: #0d1117;
    color: #c9d1d9;

    /* Rendering & Transitions */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Light Mode Override (Triggered by .light class) */
body.light {
    background-color: #ffffff;
    color: #2d2d2d;
}


/* Position the accessibility skip-link off-screen by default */
/* Refined for your Dark Mode Bare-Bones Site */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    /* Slightly offset from the edge for better balance */
    background: #58a6ff;
    /* A lighter, more accessible blue for dark mode */
    color: #0d1117;
    /* High contrast dark text on light blue background */
    padding: 12px 24px;
    z-index: 9999;
    /* Ensure it stays above everything, including floating buttons */
    text-decoration: none;
    font-weight: 700;
    border: 2px solid #ffffff;
    /* White border helps it pop instantly when it appears */
    border-radius: 0 0 8px 8px;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    /* Bouncy "spring" entrance */
}

/* The accessibility skip-link focus state - triggered by the Tab key */
.skip-link:focus {
    top: 0;
    outline: none;
    /* We use the white border instead of a messy browser outline */
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.4);
}

/* ==========================================================
   3. LANGUAGE SPECIFIC FONT OVERRIDES (Master Logic)
   ========================================================== */

/* RTL Languages (Arabic, Persian, Urdu, Pashto, etc.) */
html[lang|="ar"],
html[lang|="fa"],
html[lang|="ur"],
html[lang|="ps"],
html[lang|="sd"],
html[lang|="ug"] {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 1.25rem;
    /* Arabic scripts need slightly more size for legibility */
}

/* Hebrew & Yiddish */
html[lang|="he"],
html[lang|="yi"] {
    font-family: 'Noto Sans Hebrew', sans-serif;
}

/* Ethiopic (Amharic, Tigrinya) */
html[lang|="am"],
html[lang|="ti"] {
    font-family: 'Noto Sans Ethiopic', sans-serif;
    font-size: 1.2rem;
}

/* Indic Scripts (Hindi, Marathi, Nepali, Sanskrit) */
html[lang|="hi"],
html[lang|="mr"],
html[lang|="ne"],
html[lang|="sa"] {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

/* Bengali & Assamese */
html[lang|="bn"],
html[lang|="as"] {
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Punjabi (Gurmukhi) */
html[lang|="pa"] {
    font-family: 'Noto Sans Gurmukhi', sans-serif;
}

/* Tamil */
html[lang|="ta"] {
    font-family: 'Noto Sans Tamil', sans-serif;
}

/* Telugu */
html[lang|="te"] {
    font-family: 'Noto Sans Telugu', sans-serif;
}

/* Kannada */
html[lang|="kn"] {
    font-family: 'Noto Sans Kannada', sans-serif;
}

/* Malayalam */
html[lang|="ml"] {
    font-family: 'Noto Sans Malayalam', sans-serif;
}

/* Thai */
html[lang|="th"] {
    font-family: 'Noto Sans Thai', sans-serif;
    line-height: 1.8;
    /* Thai script needs extra vertical space */
}

/* Khmer */
html[lang|="km"] {
    font-family: 'Noto Sans Khmer', sans-serif;
}

/* Lao */
html[lang|="lo"] {
    font-family: 'Noto Sans Lao', sans-serif;
}

/* Myanmar (Burmese) */
html[lang|="my"] {
    font-family: 'Noto Sans Myanmar', sans-serif;
}

/* Japanese (CJK) */
html[lang|="ja"] {
    font-family: 'Noto Sans JP', sans-serif;
}

/* Chinese (Simplified) */
:lang(zh) {
    font-family: 'Noto Sans SC', 'Noto Sans TC', system-ui, sans-serif;
}

/* Korean */
html[lang|="ko"] {
    font-family: 'Noto Sans KR', sans-serif;
}

/* ==========================================================
   3. TYPOGRAPHY & LAYOUT
   ========================================================== */

/* Heading Hierarchy (WCAG 1.3.1) */
h1,
h2,
h3,
h4 {
    color: #f0f6fc;
    /* Slightly brighter for dark mode headings */
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

body.light h1,
body.light h2,
body.light h3 {
    color: #000000;
}


h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid #30363d;
    padding-bottom: 0.3rem;
}

h3 {
    font-size: 1.5rem;
}

/* Paragraphs & Readability (WCAG 2.2) */
p {
    max-width: 72ch;
    /* Optimal line length for focus */
    margin-bottom: 1.5rem;
}

/* High-Contrast Focus (WCAG 2.2) */
:focus-visible {
    outline: 3px solid #4f9cf9;
    outline-offset: 3px;
}

/* Global Border Colors for Dark Mode */
header,
footer,
section {
    border-color: #30363d;
}

/* Image Safety */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ============================================================================
   CONTAINER SYSTEM
   ============================================================================ */
.header,
.main,
.footer,
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 70vh;
}

/* ============================================================================
   HEADER STYLES (Original)
   ============================================================================ */
header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    flex: 0 1 290px;
    display: flex;
    justify-content: flex-start;
}

.logo-container img {
    height: 80px;
    width: auto;
    display: block;
    object-fit: contain;
    margin-right: 20px;
}

.title-container {
    flex-grow: 1;
    text-align: center;
}

.title-container .title {
    margin: 0;
    font-size: 1.875rem;
    /* 30px */
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.title-container .subtitle {
    font-size: 1.65rem;
    /* 26px */
    margin: 5px 0 0;
    font-weight: 400;
}

.menu-container {
    flex: 0 0 200px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.menu-container #menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5em;
}

.menu-container #menu li {
    margin: 0;
}

.menu-container #menu a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border 0.2s;
}

.menu-container #menu a:hover,
.menu-container #menu a.active {
    border-bottom: 2px solid #2563eb;
}

.theme-toggle-container {
    margin-left: 1.5em;
}

/* ============================================================================
   HEADER STYLES (New Theme-Free Layout)
   These styles support the custom header.html partial
   ============================================================================ */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

body.dark .site-header {
    background: #0d1117;
    border-bottom: 1px solid #30363d;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #c9d1d9;
    /* Explicit color for light mode */
    font-weight: 600;
    font-size: 1.25rem;
}

body.dark .logo a {
    color: #c9d1d9;
    /* Explicit color for dark mode */
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

/* Main Navigation (New Theme-Free) */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
    justify-content: flex-end;
}

.main-nav a {
    color: #c9d1d9;
    /* EXPLICIT COLOR - Light mode */
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

body.dark .main-nav a {
    color: #c9d1d9;
    /* EXPLICIT COLOR - Dark mode */
}

.main-nav a:hover {
    color: #ff6b35;
    /* Orange on hover */
    background: rgba(255, 107, 53, 0.1);
}

.main-nav a:active {
    color: #ff6b35;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #eee;
}

body.dark .language-switcher {
    border-left: 1px solid #30363d;
}

.language-switcher a {
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

body.dark .language-switcher a {
    color: #c9d1d9;
}

.language-switcher a:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark .language-switcher a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-switcher a.active {
    background: #2563eb;
    color: #ffffff;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
main h1 {
    font-size: 1.875rem;
    /* 30px */
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: #c9d1d9;
    /* Explicit color */
}

body.dark main h1 {
    color: #c9d1d9;
}

main h2 {
    font-size: 1.65rem;
    /* 26px */
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: #c9d1d9;
}

body.dark main h2 {
    color: #c9d1d9;
}

main h3 {
    font-size: 1.5rem;
    /* 24px */
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: #c9d1d9;
}

body.dark main h3 {
    color: #c9d1d9;
}

main h4 {
    font-size: 1.25rem;
    /* 20px */
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: #c9d1d9;
}

body.dark main h4 {
    color: #c9d1d9;
}

main p {
    font-size: 1.5rem;
    /* 24px */
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

main img {
    max-width: 100%;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

ul,
ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Links */
a {
    color: #c9d1d9;
    transition: color 0.2s;
}

a:hover {
    color: #1d4ed8;
}

body.dark a {
    color: #58a6ff;
}

body.dark a:hover {
    color: #79c0ff;
}

/* ============================================================================
   TABLE OF CONTENTS
   ============================================================================ */
.toc {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc h2 {
    color: #c9d1d9;
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.toc a {
    color: #79c0ff;
    /* Light blue - easy to read on dark #58a6ff*/
    text-decoration: none;
}

.toc a:hover {
    color: #ADD8E6;
    /* Lighter blue on hover */
    text-decoration: underline;
}

.toc ul {
    list-style: none;
    padding-left: 1rem;
}

.toc li {
    margin-bottom: 0.5rem;
}





/* ============================================================================
   PAGE CONTENT
   ============================================================================ */

.home-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.home-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #c9d1d9;
}

body.dark .home-hero h1 {
    color: #c9d1d9;
}

.home-hero .tagline {
    font-size: 1.5rem;
    color: ##c9d1d9;
    margin-bottom: 1rem;
}

body.dark .home-hero .tagline {
    color: #c9d1d9#8b949e;
}

.home-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Post Listings */
.recent-posts {
    margin: 3rem 0;
}

.recent-posts h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.post-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.dark .post-card {
    border-color: #30363d;
    background: #161b22;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0;
}

.post-info {
    padding: 1.5rem;
}

.post-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.post-card h3 a {
    text-decoration: none;
    color: inherit;
}

.post-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

body.dark .post-description {
    color: #8b949e;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #999;
}

body.dark .post-meta {
    color: #6e7681;
}

.view-all {
    text-align: center;
}



/* ============================================================================
   ARTICLE LIST (Thumbnail Left, Text Right)
   ============================================================================ */
.article-list {
    max-width: 1200px;
    margin: 0 auto;
}

.article-summary {
    margin-bottom: 2rem;
    border-bottom: 1px solid #30363d;
    padding-bottom: 2rem;
}

.article-summary:last-child {
    border-bottom: none;
}

.summary-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.summary-card-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.summary-image {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0;
    /* Add this */
    padding: 0;
    /* Add this */
    display: block;
    /* Add this - removes inline spacing */
}

.text-content {
    flex: 1;
}

.text-content h2 {
    margin: 0 0 0.5rem 0;
    padding-top: 0;
    /* Add this line */
    font-size: 1.5rem;
    color: #58a6ff;
}

.text-content h2:hover {
    color: #79c0ff;
}

.summary-text {
    color: #c9d1d9;
    margin: 0.5rem 0;
    font-size: 1.25rem;
    line-height: 1.6;
}

.text-content time {
    color: #8b949e;
    font-size: 0.875rem;
}


/* ============================================================================
   FEATURED & RANDOM COVERS (Landscape 1200x630)
   ============================================================================ */
.article-featured-image,
.cover-featured-image {
    display: block;
    margin: 1.5rem 0;
    width: 100%;
}

.article-featured-image img,
.cover-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto;

    /* Technical Optimization */
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    background-color: #f6f8fa;

    /* Aesthetics */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Captions for Featured/Random */
.image-caption,
.image-credit-caption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #595959;
    /* WCAG 2.2 Compliant Contrast */
    text-align: center;
    font-style: italic;
}

/* ============================================================================
   GLOBAL PRINT STYLES (Ink-Saver & Aniconism Friendly)
   ============================================================================ */
@media print {
    img {
        filter: grayscale(100%) !important;
        max-height: 3in !important;
        /* Forces images to be small on paper */
        box-shadow: none !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }

    .image-caption,
    .image-credit-caption {
        color: #000 !important;
        font-size: 10pt !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    /* Hide navigation, buttons, and footers to save paper */
    nav,
    .series-navigation,
    footer,
    .toc {
        display: none !important;
    }

    /* Ensure links show their URL so people can type them manually from paper */
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
    }
}

/* 3. Hide non-essential decorative images if needed */
/* If you want to skip Random covers entirely on print to save ink: */
/* .cover-random-image { display: none !important; } */


/* ============================================================================
   RTL LANGUAGE SUPPORT
   ============================================================================ */

/* RTL text alignment */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] body {
    direction: rtl;
}

/* RTL-specific layout adjustments */
[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .main-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo img {
    margin-right: 0;
    margin-left: 0.75rem;
}

[dir="rtl"] .footer-content-row {
    flex-direction: row-reverse;
}

/* RTL navigation */
[dir="rtl"] .breadcrumb-nav .separator {
    transform: scaleX(-1);
    /* Flip › to ‹ */
}

[dir="rtl"] .post-navigation {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-previous {
    text-align: right;
}

[dir="rtl"] .nav-next {
    text-align: left;
}

/* RTL lists */
[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* RTL blockquotes */
[dir="rtl"] blockquote {
    border-left: none;
    border-right: 4px solid #2563eb;
    padding-left: 0;
    padding-right: 1.5rem;
}

/* RTL forms (for contact page if you add one) */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right;
}


/* ============================================================================
   BOOK OF THE DAY COMPONENT
   ============================================================================ */
.book-of-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    box-sizing: border-box;
}

.book-text {
    flex: 0 0 70%;
    padding-right: 15px;
}

.book-text h3 {
    font-size: 1.5rem;
    margin: 0 0 8px;
    line-height: 1.3;
}

.book-text .book-title {
    font-size: 1.2rem;
    margin: 0 0 8px;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.book-text .book-description {
    font-size: 1rem;
    margin: 0 0 8px;
    line-height: 1.4;
}

.book-text .book-link a {
    font-size: 1rem;
    color: #2563eb;
    text-decoration: none;
}

.book-text .book-link a:hover {
    text-decoration: underline;
}

.book-image {
    flex: 0 0 20%;
    text-align: right;
}

.book-image img {
    height: 125px;
    width: auto;
    max-width: 100%;
    display: block;
}

/* ============================================================================
   AUTHOR BIO COMPONENT
   ============================================================================ */
.author-bio {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px;
    box-sizing: border-box;
}

.author-image {
    flex: 0 0 150px;
    margin-right: 20px;
}

.author-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.author-text {
    flex: 1;
}

.author-text h2 {
    font-size: 1.3rem;
    margin: 0 0 10px;
}

.author-text p {
    font-size: 1rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Ensure the transliterated name stands out */
.author-attribution {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Language-specific adjustment example */
[lang="am"] .author-attribution {
    font-size: 1rem;
    /* Amharic script often needs to be slightly larger */
}

/* ============================================================================
   FAQ COMPONENT
   ============================================================================ */
.faq {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    box-sizing: border-box;
}

.faq h2 {
    font-size: 1.65rem;
    margin: 0 0 15px;
}

.faq-item {
    margin-bottom: 15px;
}

.faq-item h3 {
    font-size: 1.5rem;
    margin: 0 0 8px;
}

.faq-item p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

/* ============================================================================
   HOW-TO COMPONENT
   ============================================================================ */
.howto {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    box-sizing: border-box;
}

.howto h2 {
    font-size: 1.65rem;
    margin: 0 0 15px;
}

.howto p {
    font-size: 1rem;
    margin: 0 0 10px;
}

.howto-steps {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
}

.howto-steps li {
    font-size: 1rem;
    margin-bottom: 8px;
}

/* ============================================================================
   COMMENTS SECTION
   ============================================================================ */
.dh5-comments-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

body.dark .dh5-comments-section {
    background: #161b22;
}

.comments-header {
    margin-bottom: 1.5rem;
}

.comments-title {
    color: #333;
}

body.dark .comments-title {
    color: #c9d1d9;
}

.comments-prompt {
    color: #666;
    font-style: italic;
}

body.dark .comments-prompt {
    color: #8b949e;
}

.comments-container {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #ddd;
}

body.dark .comments-container {
    background: #0d1117;
    border-color: #30363d;
}

.dh5-comment-form textarea#comment {
    color: #333 !important;
    background-color: #fff !important;
}

body.dark .dh5-comment-form textarea#comment {
    color: #c9d1d9 !important;
    background-color: #0d1117 !important;
}

.dh5-comment-form textarea#comment:focus {
    color: #000 !important;
    background-color: #fff !important;
}

body.dark .dh5-comment-form textarea#comment:focus {
    color: #c9d1d9 !important;
    background-color: #0d1117 !important;
}

.dh5-comment-form input[type="text"],
.dh5-comment-form input[type="email"],
.dh5-comment-form input[type="url"],
.dh5-comment-form textarea {
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

body.dark .dh5-comment-form input[type="text"],
body.dark .dh5-comment-form input[type="email"],
body.dark .dh5-comment-form input[type="url"],
body.dark .dh5-comment-form textarea {
    color: #c9d1d9;
    background-color: #0d1117;
    border-color: #30363d;
}

.dh5-comment-form p {
    margin-bottom: 15px;
}

.dh5-comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.dh5-comment-form .submit {
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.dh5-comment-form .submit:hover {
    background-color: #1d4ed8;
}

/* ============================================================================
   CODE BLOCKS
   ============================================================================ */
pre {
    background: #f6f8fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 1.5rem 0;
}

code {
    background: #f1f3f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
}

body.dark pre {
    background: #161b22;
}

body.dark code {
    background: #21262d;
}

/* ============================================================================
   FOOTER STYLES
   ============================================================================ */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid #eee;
}

body.dark footer {
    border-top-color: #30363d;
}

.footer-content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 0;
}

.footer-content-row .logo-container {
    flex: 0 0 200px;
    justify-content: flex-start;
}

.footer-content-row .logo-container img {
    max-width: 200px;
    height: auto;
}

.footer-logo .made-with-love {
    margin: 0.8rem 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    color: var(--secondary);
    opacity: 0.9;
    line-height: 1.4;
}

.footer-logo .made-with-love::before {
    content: none;
}


.footer-nav-container {
    flex-grow: 1;
    text-align: center;
}

.footer-nav-container #footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 1.5em;
}

.footer-nav-container #footer-menu li {
    margin: 0;
}

.footer-nav-container #footer-menu a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav-container #footer-menu a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.footer-copyright-container {
    flex: 0 0 200px;
    text-align: right;
}

.footer-copyright-container p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

body.dark .footer-copyright-container p {
    color: #8b949e;
}

/* New Theme-Free Footer Styles */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

body.dark .site-footer {
    background: #161b22;
    border-top-color: #30363d;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-brand img {
    height: 40px;
    width: auto;
    margin: 0 auto 1rem;
}

.footer-brand p {
    color: #666;
    font-size: 0.875rem;
}

body.dark .footer-brand p {
    color: #8b949e;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-social a {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
}

body.dark .footer-social a {
    color: #8b949e;
}

.footer-social a:hover {
    color: #2563eb;
}

.footer-copyright {
    text-align: center;
    color: #999;
    font-size: 0.75rem;
}

body.dark .footer-copyright {
    color: #6e7681;
}

/* ============================================================================
   MOBILE RESPONSIVE STYLES
   ============================================================================ */
@media (max-width: 768px) {

    /* Container adjustments */
    .container,
    .header,
    .main,
    .footer {
        padding: 0 1rem;
    }

    /* Header Mobile (Original) */
    .nav {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo-container {
        flex: 1 1 auto;
        margin-right: 0;
        margin-bottom: 1em;
    }

    .logo-container img {
        margin-right: 0;
        height: 60px;
    }

    .title-container .title {
        font-size: 1.5rem;
    }

    .title-container .subtitle {
        font-size: 1.3rem;
    }

    .title-container .tagline {
        margin: 0.4rem 0 0;
        font-size: 1.1rem;
        opacity: 0.9;
        font-weight: 500;
    }

    .title-container .series {
        margin: 0.25rem 0 0;
        font-size: 1.35rem;
        font-weight: 600;
        color: var(--primary);
        letter-spacing: 0.5px;
    }



    .menu-container {
        flex: 1 1 auto;
        justify-content: center;
    }

    .menu-container #menu {
        gap: 1em;
        font-size: 0.95rem;
    }

    /* Header Mobile (New Theme-Free) */
    .header-container {
        flex-wrap: wrap;
        padding: 0 1rem;
    }

    .main-nav {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 1rem;
    }

    .main-nav a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
        text-align: center;
    }

    body.dark .main-nav a {
        border-bottom-color: #30363d;
    }

    .language-switcher {
        flex-basis: 100%;
        justify-content: center;
        margin: 1rem 0 0 0;
        padding: 1rem 0 0 0;
        border-left: none;
        border-top: 1px solid #eee;
    }

    body.dark .language-switcher {
        border-top-color: #30363d;
    }

    /* Typography Mobile */
    main h1 {
        font-size: 1.6rem;
    }

    main h2 {
        font-size: 1.4rem;
    }

    main h3 {
        font-size: 1.25rem;
    }

    main p {
        font-size: 1.1rem;
    }

    /* Post Grid Mobile */
    .post-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Book of Day Mobile */
    .book-of-day {
        flex-direction: column;
        align-items: center;
    }

    .book-text,
    .book-image {
        flex: 0 0 100%;
        text-align: center;
        padding: 0;
    }

    .book-image {
        margin-top: 10px;
    }

    /* Author Bio Mobile */
    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-image {
        margin: 0 0 15px 0;
    }

    /* FAQ and HowTo Mobile */
    .faq,
    .howto {
        max-width: 100%;
    }

    /* Footer Mobile */
    .footer-content-row {
        flex-direction: column;
        text-align: center;
        gap: 1em;
    }

    .footer-content-row .logo-container,
    .footer-nav-container,
    .footer-copyright-container {
        flex: none;
        width: 100%;
        text-align: center;
        margin-bottom: 1em;
    }

    .footer-nav-container #footer-menu {
        flex-wrap: wrap;
        gap: 1em;
    }

    .footer-copyright-container {
        text-align: center;
    }

    /* Footer Mobile (New Theme-Free) */
    .footer-nav,
    .footer-social {
        flex-direction: column;
        gap: 1rem;
    }

    /* Comments Mobile */
    .dh5-comments-section {
        padding: 1rem;
        margin: 1rem 0;
    }

    .comments-container {
        padding: 0.75rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {

    header nav,
    footer,
    .theme-toggle-container,
    .comments-section,
    .language-switcher {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* ============================================================================
   SERIES NAVIGATION
   ============================================================================ */
.series-nav-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.series-nav-wrapper a {
    flex: 1 1 45%;
    /* Allows links to take up roughly half the width, with some flexibility */
    padding: 0.5rem;
    text-decoration: none;
    color: #2563eb;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    /* Space between wrapped items */
}

.series-nav-wrapper a:hover {
    background-color: #f0f0f0;
}

.series-nav-wrapper a:first-child {
    margin-right: 1%;
    /* Small gap between previous and next when on same line */
    text-align: left;
}

.series-nav-wrapper a:last-child {
    margin-left: 1%;
    /* Small gap between previous and next when on same line */
    text-align: right;
}

/* Adjust for smaller screens */
@media (max-width: 768px) {
    .series-nav-wrapper a {
        flex: 1 1 100%;
        /* Full width on small screens */
        margin-left: 0;
        margin-right: 0;
    }
}

/* # ==================================================================
# BOOK DOWNLOAD BUTTONS MODULE
# ==================================================================
# Styles for the {{< book-download id="volXXyy" >}} shortcode.
# Uses Flexbox for responsive button alignment and consistent spacing.
# ------------------------------------------------------------------ */


/* The box that helps with 15k word performance */
.chapter-wrap {
    content-visibility: auto;
    contain-intrinsic-size: auto 100vh;
    /* Adjust if chapters are longer */
    margin-bottom: 3rem;
}

/* The footer area of each chapter */
.chapter-footer {
    text-align: end;
    /* Aligns right for EN, left for AR/HE */
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eeeeee;
    /* Subtle divider line */
}

.top-link {
    font-size: 0.9rem;
    color: #555555;
    text-decoration: none;
    font-family: sans-serif;
    /* Clean, modern look */
}

.top-link:hover {
    color: #000000;
    text-decoration: underline;
}



.book-download-buttons {
    /* Use flexbox to handle alignment and allow buttons to wrap on mobile */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    /* Consistent space between all buttons */
}

.book-download-buttons .button {
    /* Base styling for all links acting as buttons */
    margin: 0;
    /* Clear external margins to rely on 'gap' */
    padding: 0.85rem 1.4rem;
    font-weight: 600;
    text-decoration: none;

    /* Center text and icon vertically */
    display: inline-flex;
    align-items: center;

    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

/* --- Specific Button Colors --- */

.amazon-button {
    background: #FF9900;
    /* Amazon's brand yellow-orange */
    color: #000;
}

.amazon-button:hover {
    background: #ffae37;
    /* Slightly lighter on hover */
}

.google-button {
    background: #4285F4;
    /* Google's brand blue */
    color: #fff;
}

.google-button:hover {
    background: #5a9bff;
    /* Slightly lighter on hover */
}

/* --- FREE PDF Button (Emphasized) --- */

.free-pdf {
    /* Use !important overrides only when necessary to ensure the primary CTA stands out */
    background: #16a34a;
    color: #fff;
    font-size: 1.1em;
    padding: 1rem 1.8rem;
    /* Make the main button visually bigger */
}

.free-pdf:hover {
    background: #138843;
    /* Darker green on hover */
}

/***********************
COVER IMAGE
---
title: "How to Mediate: Vol 21"
volume_id: "vol21en"
---

/* ============================================================================
   PUBLICATION COVERS (Portrait 1600x2400)
   ============================================================================ */
.publication-cover-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    line-height: 0;
}

.publication-cover-wrapper img {
    /* Dimensions & Scaling */
    width: auto;
    max-width: 40%;
    /* Desktop: Keeps book from being huge */
    max-height: 50vh;
    /* Desktop: Keeps top half of text visible */
    height: auto;
    display: block;

    /* Technical Optimization */
    /* aspect-ratio: 2 / 3;  */
    /* Matches 1600x2400 exactly */
    /* object-fit: contain;   */
    background-color: #fafafa;
    /* Placeholder color while loading */

    /* Aesthetics */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

/* Captions for Publications */
.publication-cover-wrapper .image-credit-caption {
    width: 100%;
    max-width: 80%;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #595959;
    /* WCAG 2.2 Compliant Contrast */
    line-height: 1.5;
}

/* Mobile: Increase book size for small screens */
@media (max-width: 768px) {
    .publication-cover-wrapper img {
        max-width: 65%;
        max-height: 40vh;
        /* Tighter on mobile to show more text */
    }
}

/* ============================================================================
   PUBLICATION THUMBNAILS FOR CATEGORY PAGES (Portrait 1600x2400)
   ============================================================================ */
/* Layout for the list */

/* 1. Container for the whole list */
.publications-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

/* 2. Individual Book Row */
.pub-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* 3. The 150x150 Box - Softer and Darker */
.pub-thumbnail-wrapper {
    flex-shrink: 0;
    width: 225px;
    height: 225px;
    /* A deep charcoal/navy instead of white */
    background: #1a1a1b;
    /* A subtle border so it doesn't disappear into the pure black background */
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    /* Slightly rounder for a softer look */
}

/* 4. Handling your Partial's Internal Tags */
.pub-thumbnail-wrapper figure {
    margin: 0;
    /* Important: resets default browser figure margins */
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pub-thumbnail-wrapper img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    /* A stronger shadow for dark mode depth */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* 5. Hide the Credit/Caption in the list view */
.pub-thumbnail-wrapper figcaption {
    display: none;
}

/* 6. Text Styling */
.pub-content h2 {
    margin: 0 0 0.4rem 0;
    font-size: 1.25rem;
}

.pub-content h2 a {
    text-decoration: none;
    color: #333;
}

.pub-content h2 a:focus {
    outline: 2px solid #64b5f6;
    outline-offset: 4px;
    border-radius: 2px;
}

.pub-content h2 a:hover {
    color: #007bff;
}

.pub-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pub-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Mobile responsive tweak */
@media (max-width: 500px) {
    .pub-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ==================================================================
   ARTICLES GRID FOR CATEGORY PAGES

   ================================================================== */

/* Container for the articles */
.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

/* Row layout for each article */
.article-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.article-card:hover .article-thumb-wrapper {
    border-color: #64b5f6;
    /* Soft blue border on hover */
    transition: border-color 0.3s ease;
}

.article-card:hover h2 a {
    color: #64b5f6;
    transition: color 0.3s ease;
}


/* Landscape Thumbnail Box */
.article-thumb-wrapper {
    flex-shrink: 0;
    width: 240px;
    height: 135px;
    /* 16:9 Ratio */
    background: #1a1a1b;
    /* Softer dark background */
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
}

.article-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure the random partial fits perfectly in the 16:9 box */
.article-thumb-wrapper .cover-featured-image {
    margin: 0;
    width: 100%;
    height: 100%;
}

.article-thumb-wrapper .cover-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This is crucial for landscape uniformity */
}

/* Hide the long credits and captions in the list view (keep it clean) */
.article-thumb-wrapper .image-credit-caption {
    display: none;
}


.article-placeholder {
    color: #555;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Article Text Content */
.article-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
}

.article-content h2 a {
    color: #e2e2e2;
    text-decoration: none;
}

.article-content h2 a:hover {
    color: #64b5f6;
}

.article-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.8rem;
}

.article-summary {
    color: #bbb;
    line-height: 1.6;
    margin: 0;
}

/* Responsive: Stack on mobile */
@media (max-width: 600px) {
    .article-card {
        flex-direction: column;
    }

    .article-thumb-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}



/* ==================================================================
   TELEGRAM BUTTON – FINAL, WHACK-A-MOLE-PROOF VERSION
   Works perfectly on your dark #1a1a1a background
   ================================================================== */

/* Force dark site base (your "reminder" line — now unbreakable) */
body {
    background: #1a1a1a !important;
    color: #e2e8f0 !important;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.button:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.button-secondary {
    background: #6b7280;
}

.button-secondary:hover {
    background: #4b5563;
}

/* Your existing .button is excellent – just add these overrides */
.button.telegram-button {
    background: #229ED9;
    /* Official Telegram blue – perfect pop on dark */
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    /* space between icon and text */
    padding: 0.75rem 1.4rem;
    font-weight: 600;
}

.button.telegram-button:hover {
    background: #1B86B8;
    /* slightly darker blue on hover */
}

/* Optional: make the SVG icon white when you use secondary style */
.button-secondary.telegram-button {
    background: #4B5563;
}

.button-secondary.telegram-button .telegram-icon circle {
    fill: #229ED9;
}



/* Telegram = primary = (higher than WhatsApp on screen) */
#telegram-float {
    position: fixed;
    right: 1.5rem;
    bottom: 8.5rem;
    /* ← was 1.5rem → now higher */
    z-index: 999;
}


.telegram-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    /* ← slightly larger */
    height: 66px;
    /* ← slightly larger */
    background: #229ED9;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}

.telegram-float-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

@keyframes telegramPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .telegram-float-btn {
        width: 60px;
        height: 60px;
    }
}

.button.whatsapp-button {
    background: #25D366 !important;
}

.button.whatsapp-button:hover {
    background: #1DA851 !important;
}

/* WhatsApp = secondary = lower, in the prime corner spot */
#whatsapp-float {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    /* ← was 8.5rem → now in the corner */
    z-index: 998;
    /* optional: slightly lower so Telegram can overlap if needed */
}

.whatsapp-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}

.whatsapp-float-btn:hover {
    transform: scale(1.12);
}

@media (max-width: 480px) {
    #whatsapp-float {
        bottom: 7rem;
    }

    .whatsapp-float-btn {
        width: 60px;
        height: 60px;
    }
}

/* ==========================================================
   DH-6 REFINED HEADER (Added 2024-05)
   ========================================================== */
/* --- World-Class Header Layout --- */
.header {
    width: 100%;
    background-color: #0d1117;
    /* Adjust to match your dark theme */
    border-bottom: 1px solid #30363d;
    padding: 0.75rem 0;
}

.nav {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    /* Keeps Logo left, Nav right */
}

.logo-container {
    flex-shrink: 0;
}

.title-container {
    flex-grow: 1;
    padding: 0 1.5rem;
}

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

.title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.tagline {
    margin: 0.2rem 0 0.4rem 0;
    font-size: 0.95rem;
    color: #8b949e;
    /* Muted text color */
}

/* Author Attribution (David Hoicka - Professional Mediator) */
.author-attribution {
    margin: 0;
    font-size: 0.85rem;
    color: #58a6ff;
    /* Accent color for the name/entity */
    letter-spacing: 0.02em;
}

.menu-container ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.2rem;
}

.menu-container a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.menu-container a:hover,
.menu-container a.active {
    color: #58a6ff;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .menu-container ul {
        justify-content: center;
    }
}
