/*
Theme Name: Nimtex Proverbs
Theme URI: [https://nimtex.com/](https://nimtex.com/)
Author: Nimtex
Author URI: [https://nimtex.com/](https://nimtex.com/)
Description: A clean, modern theme designed for displaying a collection of proverbs.
Version: 3.6.4
License: GNU General Public License v2 or later
License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
Tags: clean, blog, minimalist, modern, custom-menu, proverbs, one-column, responsive-layout
Text Domain: nimtex
*/

/* --- Global Styles & Variables --- */
:root {
    --book-bg: #fdfaf3; /* Creamy paper */
    --book-cover-color: #5d4037; /* Brown leather */
    --text-color: #3a2e28;
    --heading-color: #2d231e;
    --accent-color: #a1887f; /* Muted accent */
    --accent-hover-color: #795548;
    --border-color: #d7ccc8;
    --ink-black: #1a1a1a;
}

body {
    font-family: 'EB Garamond', serif;
    background-color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60' xmlns='[http://www.w3.org/2000/svg'%3E%3Cg](http://www.w3.org/2000/svg'%3E%3Cg) fill='none' fill-rule='evenodd'%3E%3Cg fill='%23bdbdbd' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--text-color);
    line-height: 1.8;
}

.site {
    padding: 2rem 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--heading-color);
    line-height: 1.3;
}

a {
    color: var(--accent-hover-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--heading-color);
    text-decoration: underline;
}

/* --- Header & Footer --- */
.site-header {
    text-align: center;
    margin-bottom: 2rem;
}
.site-title a {
    font-size: 3.5rem; /* Increased size */
    font-family: 'Playfair Display', serif;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5); /* More prominent shadow */
    text-decoration: none;
}
.site-description {
    font-style: italic;
    color: #f5f5f5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.site-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.site-disclaimer {
    max-width: 800px;
    margin: 1.5rem auto 0;
    font-size: 0.9rem; /* Increased size */
    font-style: normal; /* Removed italics for readability */
    line-height: 1.7;
    opacity: 0.9; /* Made less transparent */
}

/* --- Book Container --- */
.book-container {
    background: var(--book-cover-color);
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 5px 10px 10px 5px;
    box-shadow: 
        0 1px 1px rgba(0,0,0,0.15),
        0 10px 0 -5px var(--book-cover-color),
        0 10px 1px -4px rgba(0,0,0,0.15),
        0 20px 0 -10px var(--book-cover-color),
        0 20px 1px -9px rgba(0,0,0,0.15);
    position: relative;
    margin-bottom: 1rem; /* Space for navigation */
}

.book-container.is-open {
    padding: 20px 10px 20px 20px;
}

.front-page-book {
    margin-top: 2rem;
}

.book-container > .book-page,
.book-container > article {
    background: var(--book-bg);
}

/* Contents/Search Page */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}
.search-results-title,
.archive-title {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.search-results-title span,
.archive-title span {
    font-style: italic;
}
.contents-title {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}
.book-container > .book-page {
    padding: 2rem 3rem;
}
.no-results .search-form {
    margin-top: 2rem;
}

/* Two-Page Spread (Single Post & Search Result) */
.book-container.is-open > article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    position: relative;
}

/* Spine effect */
.book-container.is-open > article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 20%,
        rgba(0,0,0,0.2) 45%,
        rgba(0,0,0,0.2) 55%,
        rgba(0,0,0,0.1) 80%,
        rgba(0,0,0,0) 100%);
    z-index: 10;
}

.left-page, .right-page {
    padding: 2rem 2.5rem 3.5rem;
    box-sizing: border-box;
    position: relative;
    background: var(--book-bg);
}

.left-page::after, .right-page::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 20%);
    z-index: 5;
    pointer-events: none;
}
.left-page::after {
    left: 100%;
    transform: translateX(-100%);
}
.right-page::after {
    right: 100%;
    transform: translateX(100%) rotate(180deg);
}

.left-page {
    border-right: 1px solid var(--border-color);
}
.right-page {
    border-left: 1px solid var(--border-color);
}

.entry-title {
    font-size: 2rem; /* Reduced title size */
    margin-bottom: 1.5rem;
}

/* --- ANCIENT FONT STYLES --- */
.entry-content,
.entry-summary {
    font-family: 'MedievalSharp', cursive;
    font-size: 2.2rem; /* Increased size */
    font-weight: bold; /* Make it stand out */
    line-height: 1.7;
    color: var(--ink-black); /* Use black ink color */
}

/* Drop Cap Effect */
.entry-content p:first-of-type::first-letter,
.entry-summary p:first-of-type::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 4.5em;
    float: left;
    line-height: 0.8;
    margin-right: 0.1em;
    margin-top: 0.1em;
    color: var(--heading-color);
}

.entry-footer {
    margin-top: 2rem;
}
.meta-item {
    margin-bottom: 1rem;
}
.meta-item strong {
    font-family: 'Playfair Display', serif;
    display: block;
    margin-bottom: 0.25rem;
}
.meta-item p {
    margin: 0;
    font-style: italic;
    line-height: 1.6;
}

.meta-author a {
    font-style: italic;
}

.meta-categories a,
.meta-tags a,
.meta-author a {
    text-decoration: none;
    background-color: #eee;
    color: var(--text-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-style: normal;
}

.meta-categories a:hover,
.meta-tags a:hover,
.meta-author a:hover {
    background-color: var(--border-color);
    color: var(--heading-color);
}

/* --- Main Post Navigation (Below Book) --- */
.post-navigation {
    max-width: 1000px;
    margin: 1rem auto 0;
    padding: 0.5rem 1rem;
    background: var(--book-cover-color);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: center; /* Center the single link */
    align-items: center;
}

.post-navigation a {
    color: #fff;
    font-style: italic;
    font-size: 1.2rem; /* Slightly larger */
    text-decoration: none;
    padding: 0.5rem 1.5rem; /* More padding */
    border: 1px solid transparent;
    border-radius: 25px;
    transition: all 0.2s ease-in-out;
}
.post-navigation a:hover {
    color: var(--book-bg);
    border-color: var(--book-bg);
    text-decoration: none;
}

/* --- Search Form --- */
.search-form {
    max-width: 600px;
    margin: 0 auto 2rem; /* Add margin-bottom */
    display: flex;
    border: 3px solid var(--book-cover-color);
    border-radius: 5px;
    overflow: hidden;
    background: var(--book-bg);
}

.search-form label {
    flex-grow: 1;
}

.search-field {
    flex-grow: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    background: transparent;
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
}
.search-field:focus {
    outline: none;
}
.search-submit {
    border: none;
    background: var(--book-cover-color);
    color: #fff;
    padding: 0 1.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.search-submit:hover {
    background-color: var(--accent-hover-color);
}

/* --- Share Button --- */
.share-button {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    color: var(--accent-color);
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    padding: 8px 16px;
    font-style: italic;
}

.share-button:hover {
    color: var(--accent-hover-color);
}

.share-button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%; /* Adjusted for centering */
    transform: translateX(-50%);
    background-color: var(--heading-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
}

.share-button:hover::before {
    opacity: 1;
    visibility: visible;
}

/* --- Cookie Consent Banner --- */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(45, 35, 30, 0.95); /* Darker, semi-transparent background */
    color: #fdfaf3;
    padding: 1rem 2rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    transition: transform 0.3s ease-in-out;
}
#cookie-consent-banner.hidden {
    transform: translateY(100%);
}
.cookie-consent-text {
    text-align: center;
    max-width: 600px;
}
.cookie-consent-text a {
    color: #fff;
    text-decoration: underline;
}
#cookie-consent-accept {
    background-color: var(--book-bg);
    color: var(--book-cover-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    transition: background-color 0.2s, color 0.2s;
}
#cookie-consent-accept:hover {
    background-color: #fff;
    color: #000;
}

/* --- Archive Page Navigation --- */
.archive-navigation {
    max-width: 1000px;
    margin: 1rem auto 0;
    padding: 0.5rem 1rem;
    background: var(--book-cover-color);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.archive-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.archive-navigation a {
    color: #fff;
    font-style: italic;
    font-size: 1.2rem;
}
.archive-navigation a:hover {
    color: var(--book-bg);
}


/* --- Responsive Styles --- */
@media screen and (max-width: 800px) {
    .site {
        padding: 1rem 0.5rem;
    }

    /* Stack book pages on mobile */
    .book-container.is-open > article {
        display: block; /* Change from grid to block */
    }

    /* Remove spine effect and 3D effect */
    .book-container.is-open > article::before,
    .left-page::after, .right-page::after {
        display: none;
    }

    .left-page, .right-page {
        padding: 1.5rem;
        border: none; /* Remove side borders */
    }

    .right-page {
        border-top: 2px dashed var(--border-color);
    }
    
    .entry-title {
        font-size: 1.5rem; /* Further reduce title on mobile */
    }

    .entry-content, .entry-summary {
        font-size: 1.8rem; /* Adjust ancient font for mobile */
    }

    .share-button {
        bottom: 0rem;
        right: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
     .site-title a {
        font-size: 2.5rem;
    }
    .search-field {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    .search-submit {
        padding: 0 1rem;
    }
    #cookie-consent-banner {
        flex-direction: column;
        padding: 1rem;
    }
}
