/* 
Theme Name: Twenty Twenty-Five Child 
Template: twentytwentyfive 
*/


/* =========================================================
   FONT IMPORT
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap');


/* =========================================================
   GENERAL LAYOUT
   ========================================================= */

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}


/* =========================================================
   BODY TYPOGRAPHY
   ========================================================= */

.wp-block-post-content,
.wp-block-post-content p,
.wp-block-post-content li {
    font-size: 21px;
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   HEADINGS - GLOBAL
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.post-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: #4f2b06;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   H1
   ========================================================= */

h1,
.entry-title,
.post-title {
    font-size: 3.2rem;
    font-weight: 500;
    line-height: 1.08;
}


/* =========================================================
   H2 - MAIN SECTIONS
   ========================================================= */

.wp-block-post-content h2 {
    position: relative;
    font-size: 2.3rem;
    font-weight: 500;
    line-height: 1.12;
    text-align: left;

    margin-top: 1.3em;
    margin-bottom: 0.65em;

    padding-bottom: 0.35em;
}


/* Decorative separator under H2 */

.wp-block-post-content h2::after {
    content: "";
    display: block;

    width: 55px;
    height: 1px;

    background: #9b7b32;

    margin-top: 0.3em;
}


/* =========================================================
   H3 - SUBSECTIONS
   ========================================================= */

.wp-block-post-content h3 {
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.15;

    margin-top: 1em;
    margin-bottom: 0.45em;
}


/* =========================================================
   H4 - INTERNAL SUBSECTIONS
   ========================================================= */

.wp-block-post-content h4 {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.2;

    margin-top: 0.9em;
    margin-bottom: 0.4em;
}


/* =========================================================
   H5 - MINOR HEADINGS
   ========================================================= */

.wp-block-post-content h5 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;

    margin-top: 0.8em;
    margin-bottom: 0.35em;
}


/* =========================================================
   H6
   ========================================================= */

.wp-block-post-content h6 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;

    margin-top: 0.75em;
    margin-bottom: 0.3em;
}


/* =========================================================
   PAGE CHAPTER COUNTER
   Only for WordPress pages, not posts
   ========================================================= */

.page .wp-block-post-content {
    counter-reset: td-chapter;
}

.page .wp-block-post-content h2 {
    counter-increment: td-chapter;
}

.page .wp-block-post-content h2:not(.td-no-chapter)::before {
    content: "Chapter " counter(td-chapter);

    display: block;

    margin-bottom: 0.4em;

    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;

    text-transform: uppercase;
    letter-spacing: 0.14em;

    color: #9b7b32;
}


/* =========================================================
   MOBILE TYPOGRAPHY
   ========================================================= */

@media (max-width: 768px) {

    .wp-block-post-content,
    .wp-block-post-content p,
    .wp-block-post-content li {
        font-size: 18px;
        line-height: 1.55;
    }

    h1,
    .entry-title,
    .post-title {
        font-size: 2.15rem;
        font-weight: 500;
        line-height: 1.08;
    }

    .wp-block-post-content h2 {
        font-size: 1.75rem;
        font-weight: 500;
        line-height: 1.12;

        margin-top: 1.2em;
        margin-bottom: 0.6em;

        padding-bottom: 0.3em;
    }

    .wp-block-post-content h2::after {
        width: 42px;
        margin-top: 0.3em;
    }

    .page .wp-block-post-content h2:not(.td-no-chapter)::before {
        font-size: 0.68rem;
        margin-bottom: 0.35em;
        letter-spacing: 0.12em;
    }

    .wp-block-post-content h3 {
        font-size: 1.4rem;
        font-weight: 500;
        line-height: 1.16;

        margin-top: 0.95em;
        margin-bottom: 0.4em;
    }

    .wp-block-post-content h4 {
        font-size: 1.25rem;
        font-weight: 600;
        line-height: 1.2;

        margin-top: 0.85em;
        margin-bottom: 0.35em;
    }

    .wp-block-post-content h5 {
        font-size: 1.12rem;
        font-weight: 600;
        line-height: 1.25;

        margin-top: 0.75em;
        margin-bottom: 0.3em;
    }

    .wp-block-post-content h6 {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.3;

        margin-top: 0.7em;
        margin-bottom: 0.3em;
    }
}


/* =========================================================
   IMAGES
   ========================================================= */

.aligncenter,
img.aligncenter,
.wp-block-image.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.wp-block-image.aligncenter img {
    margin: 0 auto;
}


/* =========================================================
   BLOCKQUOTE
   ========================================================= */

blockquote {
    background: transparent;
    border: none;
    border-top: 1px solid #9b7b32;
    border-bottom: 1px solid #9b7b32;
    text-align: center;
    max-width: 75%;
    margin: 3em auto;
    padding: 1.5em 1em;
    font-style: italic;
    font-size: 21px;
    line-height: 1.55;
    font-weight: 400;
    color: #543024;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

blockquote::before {
    content: "❦";
    display: block;
    text-align: center;
    color: #9b7b32;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 0.8em;
    font-style: normal;
}

blockquote::after {
    content: "";
    display: none;
}

@media (max-width: 768px) {

    blockquote {
        font-size: 18px;
        line-height: 1.55;
        max-width: 90%;
    }
}


/* =========================================================
   TABLES
   ========================================================= */

table {
    border: 1px solid #d8c79d;
    padding: 5px;
    font-size: 17px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    color: #1f1b18;
}

td {
    border: 1px solid #c9c3b8;
}

@media (max-width: 768px) {

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
}


/* =========================================================
   YOAST BREADCRUMBS
   ========================================================= */

div.yoast-breadcrumbs,
div.yoast-breadcrumbs a,
div.yoast-breadcrumbs span {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

div.yoast-breadcrumbs a:hover {
    color: #ffd059;
}


/* =========================================================
   RELATED PAGES
   ========================================================= */

.td-related-pages {
    padding: 60px 60px 70px;
    margin-top: 0;
}

.td-related-title {
    text-align: center;
    color: #4f2b06;
    margin-bottom: 40px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 26px;
    font-weight: 500;
}

.td-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
}

.td-related-item {
    border: 1px solid #c8b98f;
    border-radius: 6px;
    padding: 28px 24px 32px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.td-related-item:hover {
    border-color: #9b7b32;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.11);
    text-decoration: none;
}

.td-related-item-title {
    color: #4f2b06;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.td-related-item:hover .td-related-item-title {
    color: #7f237c;
}


/* =========================================================
   RELATED PAGES RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {

    .td-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .td-related-pages {
        padding: 40px 20px 50px;
    }

    .td-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .td-related-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}