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

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

html {
    font-size: 16px;
    /* Base for rem */
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.7;
    color: #c9d1d9;
    /* Light text for dark mode */
    background: #0d1117;
    /* Dark background */
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* Dark mode support */
body.dark {
    background: #0d1117;
    color: #c9d1d9;
}

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

/* ============================================================================
   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;
}


/* ============================================================================
   ARTICLE FEATURED IMAGE
   ============================================================================ */
.article-section class="hero">-image {
    margin: 2rem 0;
    max-width: 100%;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    /* CRITICAL - maintains aspect ratio */
    display: block;
    border-radius: 8px;
}

.image-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #8b949e;
    font-style: italic;
    text-align: center;
}


/* ============================================================================
   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;
}

/* ============================================================================
   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 Cover Container */
.publication-cover-wrapper {
    display: flex;
    justify-content: center;
    /* Centers the image horizontally */
    margin: 2rem 0;
    /* Adds breathing room top and bottom */
    width: 100%;
}

.publication-cover-wrapper img {
    width: 100%;
    /* Default for mobile (full width of container) */
    max-width: 50%;
    /* Half-page width on larger screens */
    height: auto;
    /* Maintains aspect ratio */

    /* 2026 Best Practice: Force A4 Aspect Ratio to prevent jumping */
    aspect-ratio: 1 / 1.414;

    /* Subtle professional touches */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Soft shadow for depth */
    border: 1px solid #eee;
    /* Defines edges on white pages */
    object-fit: contain;
    /* Ensures no cropping */
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .publication-cover-wrapper img {
        max-width: 80%;
        /* Slightly larger on tablets/phones */
    }
}


/* ==================================================================
   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;
    }
}
