/*
Theme Name: Divergently Being Blog Shared
Theme URI: https://www.divergentlybeing.co.uk/
Author: Divergently Being
Author URI: https://www.divergentlybeing.co.uk/
Description: A lightweight WordPress blog theme designed to visually match the Divergently Being website. This version can use the shared main-site header and footer include for consistent navigation.
Version: 1.15.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: divergently-being-blog
*/

/* Brand Variables */
:root {
    --db-yellow: #fbdf00;
    --db-blue: #99cccc;
    --db-pale-blue: #e6f4f1;
    --db-cream: #fdf0ca;
    --db-white: #ffffff;
    --db-text: #111111;
    --db-soft-border: rgba(153, 204, 204, 0.75);
    --db-soft-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    --db-image-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --db-dark-teal: #214747;
}

/* Reset and base */
html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    font-family: 'proxima-nova', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--db-white);
    color: var(--db-text);
    font-size: 18px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.admin-bar {
    min-height: calc(100vh - 32px);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    min-width: 300px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Top Banner */
.top-banner {
    background-color: var(--db-blue);
    padding: 10px 0;
}

.top-banner .container {
    line-height: 0;
}

.top-banner a,
.top-banner a:hover,
.top-banner a:focus {
    display: inline-block;
    background-color: transparent;
    text-decoration: none;
    line-height: 0;
}

.top-banner img {
    width: 100%;
    max-width: 350px;
    height: auto;
}

.logo-hover {
    transition: transform 0.25s ease, filter 0.25s ease;
}

.logo-hover:hover,
.logo-hover:focus {
    transform: scale(1.02);
    filter: drop-shadow(0 0 5px rgba(251, 223, 0, 0.65));
}

/* Main Navigation */
.links-bar {
    background-color: var(--db-yellow);
    font-weight: 700;
    font-size: 17px;
    color: black;
    padding: 5px 0;
    border-bottom: 1px solid var(--db-soft-border);
}

.links-bar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-container {
    position: relative;
}

.menu-toggle {
    display: none;
}

.menu-button {
    display: none;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-links a,
.nav-dropdown-trigger {
    display: inline-block;
    text-decoration: none;
    color: black;
    margin: 3px 2px;
    padding: 6px 10px;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.nav-link-active,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger,
.nav-dropdown-active .nav-dropdown-trigger {
    background-color: rgba(153, 204, 204, 0.35);
    border-bottom-color: var(--db-blue);
    color: black;
    text-decoration: none;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-trigger::after {
    content: " ▾";
    font-size: 0.85em;
}

.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 2px;
    min-width: 230px;
    background-color: var(--db-cream);
    border: 1px solid var(--db-soft-border);
    box-shadow: var(--db-soft-shadow);
    z-index: 9999;
    text-align: left;
    padding: 6px 0;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
    display: block;
}

.nav-submenu a {
    display: block;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(153, 204, 204, 0.55);
    font-size: 16px;
    font-weight: 700;
    background-color: var(--db-cream);
}

.nav-submenu a:last-child {
    border-bottom: none;
}

.nav-submenu a:hover,
.nav-submenu a:focus,
.nav-submenu a.nav-link-active {
    background-color: rgba(153, 204, 204, 0.45);
    border-bottom-color: rgba(153, 204, 204, 0.55);
    text-decoration: none;
}

/* Blog hero */
.blog-hero {
    background-color: var(--db-pale-blue);
    padding: 34px 20px;
    border-bottom: 1px solid var(--db-soft-border);
    text-align: center;
}

.blog-hero .container {
    max-width: 1000px;
}

.blog-hero h1 {
    margin: 0 0 12px;
    font-size: 46px;
    line-height: 1.08;
    font-weight: 700;
}

.blog-hero p {
    margin: 0 auto;
    max-width: 820px;
    font-size: 22px;
    line-height: 1.45;
    font-weight: 300;
}

/* Main content */
.site-main {
    padding: 0 0 40px;
    background-color: var(--db-white);
    flex: 1 0 auto;
}

.content-wrap {
    width: 100%;
    max-width: 1000px;
    margin: 34px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: left;
}

.content-heading,
.archive-title,
.search-title,
.comments-title {
    background-color: var(--db-yellow);
    border-left: 10px solid var(--db-blue);
    padding: 12px 18px;
    margin: 32px 0 26px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    box-sizing: border-box;
}

.archive-title,
.search-title {
    margin-bottom: 30px;
}

.post-card,
.single-post-card,
.page-card,
.no-results-card {
    background-color: var(--db-cream);
    padding: 24px 28px;
    margin-bottom: 32px;
    border: 1px solid var(--db-soft-border);
    box-shadow: var(--db-soft-shadow);
    box-sizing: border-box;
    text-align: left;
}

.post-card h2,
.single-post-card h1,
.page-card h1 {
    background-color: var(--db-yellow);
    border-left: 10px solid var(--db-blue);
    margin: -24px -28px 18px;
    padding: 11px 18px;
    line-height: 1.2;
    font-weight: 700;
    box-sizing: border-box;
}

.post-card h2 {
    font-size: 23px;
}

.single-post-card h1,
.page-card h1 {
    font-size: 28px;
}

.post-card h2 a,
.single-post-card h1 a,
.page-card h1 a {
    text-decoration: none;
    color: black;
}

.post-card h2 a:hover,
.post-card h2 a:focus {
    text-decoration: underline;
    text-decoration-color: var(--db-blue);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
    background-color: transparent;
}

.post-meta {
    display: inline-block;
    background-color: var(--db-pale-blue);
    border-left: 8px solid var(--db-yellow);
    padding: 7px 12px;
    font-size: 15px;
    line-height: 1.45;
    margin: 0 0 18px;
    color: var(--db-text);
}

.post-meta a,
.post-taxonomies a {
    font-weight: 700;
}

.post-card::after {
    content: "";
    display: table;
    clear: both;
}

.post-thumbnail {
    margin: 18px 0;
}

.post-thumbnail img {
    display: block;
    height: auto;
    border: 4px solid var(--db-white);
    box-shadow: var(--db-image-shadow);
    box-sizing: border-box;
}

/* Smaller preview images on blog and category lists, with text wrapping */
.post-card .post-thumbnail {
    float: left;
    width: 205px;
    max-width: 34%;
    margin: 4px 22px 12px 0;
}

.post-card .post-thumbnail img {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background-color: var(--db-white);
}

.post-card .entry-summary {
    overflow: visible;
}

/* Featured image on single posts: larger floated image so post text wraps around it */
.single-post-card::after {
    content: "";
    display: table;
    clear: both;
}

.single-post-card .post-thumbnail {
    float: left;
    width: 380px;
    max-width: 46%;
    margin: 4px 30px 20px 0;
}

.single-post-card .post-thumbnail img {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background-color: var(--db-white);
}

.single-post-card .entry-content {
    overflow: visible;
}

.entry-content p,
.entry-summary p,
.page-card p,
.no-results-card p {
    margin: 0 0 16px;
    font-size: 18px;
    line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 18px;
    padding-left: 28px;
}

.entry-content li {
    margin-bottom: 8px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    line-height: 1.25;
    margin-top: 30px;
    margin-bottom: 12px;
}

.entry-content h2 {
    font-size: 28px;
}

.entry-content h3 {
    font-size: 24px;
}

.entry-content blockquote,
.wp-block-quote {
    border-left: 10px solid var(--db-yellow);
    background: var(--db-pale-blue);
    border-top: 1px solid var(--db-soft-border);
    border-right: 1px solid var(--db-soft-border);
    border-bottom: 1px solid var(--db-soft-border);
    padding: 18px 24px;
    margin: 24px 0;
}

.entry-content blockquote p,
.wp-block-quote p {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
}

.read-more,
.wp-block-button__link,
button,
input[type="submit"] {
    display: inline-block;
    background-color: var(--db-blue);
    color: black;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 18px;
    border: 2px solid var(--db-blue);
    transition: background-color 0.25s ease, border-color 0.25s ease;
    border-radius: 0;
    cursor: pointer;
}

.read-more:hover,
.read-more:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
    background-color: var(--db-yellow);
    border-color: black;
    color: black;
    text-decoration: none;
}

.post-taxonomies {
    clear: both;
    margin-top: 24px;
    padding: 12px 14px;
    background-color: var(--db-pale-blue);
    border-left: 8px solid var(--db-blue);
    border: 1px solid var(--db-soft-border);
    font-size: 16px;
    box-sizing: border-box;
}

.post-navigation,
.posts-navigation,
.pagination {
    margin: 28px 0;
    text-align: center;
}

.nav-links .nav-previous,
.nav-links .nav-next {
    display: inline-block;
    margin: 8px;
}


.same-category-post-navigation {
    clear: both;
    max-width: 980px;
    margin: 30px auto 34px;
    padding: 0 20px;
    box-sizing: border-box;
}

.same-category-post-navigation .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.same-category-post-navigation .nav-previous,
.same-category-post-navigation .nav-next {
    display: block;
    margin: 0;
}

.same-category-post-navigation .nav-next {
    text-align: right;
}

.same-category-post-navigation a {
    display: block;
    height: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    background-color: var(--db-cream);
    border: 1px solid var(--db-soft-border);
    border-left: 8px solid var(--db-blue);
    box-shadow: var(--db-soft-shadow);
    color: var(--db-text);
    text-decoration: none;
}

.same-category-post-navigation a:hover,
.same-category-post-navigation a:focus {
    background-color: var(--db-yellow);
    color: var(--db-text);
    text-decoration: none;
}

.same-category-post-navigation .nav-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--db-dark-teal);
}

.same-category-post-navigation .nav-title {
    display: block;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
}

/* Links */
a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--db-blue);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

a:hover,
a:focus {
    background-color: var(--db-yellow);
    color: black;
}

.top-banner a,
.nav-links a,
.footer a,
.footer-bottom a,
.post-card h2 a,
.read-more {
    text-decoration: none;
}

/* Forms */
input,
textarea,
select {
    font-family: 'proxima-nova', Arial, sans-serif;
    font-size: 18px;
    border: 1px solid var(--db-soft-border);
    padding: 10px;
    box-sizing: border-box;
    max-width: 100%;
}

textarea {
    width: 100%;
}

/* Footer */
.site-footer {
    margin-top: auto;
    flex-shrink: 0;
}

.footer,
.footer-bottom {
    text-align: center;
}

.footer-main {
    background-color: var(--db-yellow);
    padding: 12px 0;
    border-top: 1px solid var(--db-soft-border);
}

.footer-main-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.footer-copyright {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 400;
}

.footer-social-links,
.footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    text-align: center;
}

.footer a,
.footer-bottom a {
    display: inline-block;
    text-decoration: none;
    color: black;
    margin: 0;
    padding: 4px 6px;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.footer a:hover,
.footer a:focus {
    background-color: rgba(153, 204, 204, 0.35);
    border-bottom-color: var(--db-blue);
    color: black;
    text-decoration: none;
}

.footer-legal {
    background-color: var(--db-blue);
    padding: 10px 0;
}

.footer-legal-inner {
    text-align: center;
}

.footer-legal-links {
    font-size: 16px;
    line-height: 1.35;
}

.footer-legal-links span {
    font-weight: 700;
}

.footer-bottom a:hover,
.footer-bottom a:focus {
    background-color: rgba(251, 223, 0, 0.45);
    border-bottom-color: var(--db-yellow);
    color: black;
    text-decoration: none;
}

/* Comments */
.comments-area {
    background-color: var(--db-cream);
    border: 1px solid var(--db-soft-border);
    box-shadow: var(--db-soft-shadow);
    padding: 22px 28px;
    margin-bottom: 32px;
}

.comment-list {
    padding-left: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        width: 90%;
        max-width: 100%;
        min-width: auto;
    }

    .top-banner {
        padding: 8px 0;
    }

    .top-banner img {
        max-width: 195px;
    }

    .links-bar {
        padding: 0;
        font-size: 18px;
        border-bottom: none;
    }

    .links-bar .container {
        width: 100%;
        max-width: 100%;
        display: block;
        text-align: left;
    }

    .menu-button {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 18px;
        font-size: 20px;
        font-weight: 700;
        cursor: pointer;
        background-color: var(--db-yellow);
        color: black;
        box-sizing: border-box;
    }

    .menu-button span {
        font-size: 24px;
        line-height: 1;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background-color: var(--db-cream);
        border-top: 2px solid var(--db-blue);
    }

    .menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    .nav-links a,
    .nav-dropdown-trigger {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 13px 18px;
        margin: 0;
        border-bottom: 1px solid var(--db-blue);
        font-size: 18px;
        text-align: left;
        letter-spacing: 0.01em;
        background-color: var(--db-cream);
    }

    .nav-links a:hover,
    .nav-links a:focus,
    .nav-links a.nav-link-active,
    .nav-dropdown-active .nav-dropdown-trigger {
        background-color: var(--db-blue);
        color: black;
        text-decoration: none;
    }

    .nav-dropdown {
        display: block;
        width: 100%;
        position: static;
    }

    .nav-dropdown-trigger::after {
        content: "";
    }

    .nav-submenu {
        display: block;
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border: none;
        padding: 0;
        background-color: #fff8df;
    }

    .nav-submenu a {
        padding: 11px 18px 11px 34px;
        font-size: 16px;
        background-color: #fff8df;
        border-bottom: 1px solid rgba(153, 204, 204, 0.65);
    }

    .nav-submenu a:hover,
    .nav-submenu a:focus,
    .nav-submenu a.nav-link-active {
        background-color: var(--db-blue);
        text-decoration: none;
    }

    .blog-hero {
        padding: 28px 18px;
    }

    .blog-hero h1 {
        font-size: 34px;
    }

    .blog-hero p {
        font-size: 19px;
    }

    .site-main {
        padding: 0 0 34px;
    }

    .content-wrap {
        padding: 0;
        width: 90%;
        margin-top: 24px;
    }

    .post-card,
    .single-post-card,
    .page-card,
    .no-results-card,
    .comments-area {
        padding: 18px 20px;
    }

    .post-card h2,
    .single-post-card h1,
    .page-card h1 {
        margin: -18px -20px 16px;
        padding: 11px 15px;
    }

    .post-card h2 {
        font-size: 21px;
    }

    .single-post-card h1,
    .page-card h1 {
        font-size: 24px;
    }

    .post-card .post-thumbnail {
        float: none;
        width: 210px;
        max-width: 100%;
        margin: 0 auto 16px;
    }

    .post-card .post-thumbnail img {
        width: 100%;
    }

    .single-post-card .post-thumbnail {
        float: none;
        width: 340px;
        max-width: 100%;
        margin: 0 auto 20px;
    }

    .single-post-card .post-thumbnail img {
        width: 100%;
    }

    .content-heading,
    .archive-title,
    .search-title,
    .comments-title {
        font-size: 22px;
        padding: 12px 16px;
        margin: 28px 0 24px;
    }

    .entry-content p,
    .entry-summary p,
    .page-card p,
    .no-results-card p {
        font-size: 17px;
        line-height: 1.65;
    }

    body.admin-bar {
        min-height: calc(100vh - 46px);
    }

    .footer-main {
        padding: 10px 0;
    }

    .footer-legal {
        padding: 9px 0;
    }

    .footer-copyright,
    .footer-legal-links {
        font-size: 15px;
        padding: 0 12px;
    }

    .footer a,
    .footer-bottom a {
        padding: 4px 5px;
        margin: 0;
    }
}

/* Version 1.13: cleaner same-category post navigation */
.same-category-post-navigation {
    clear: both;
    max-width: 1000px;
    margin: 34px auto 36px;
    padding: 0;
    box-sizing: border-box;
    text-align: left;
}

.same-category-post-navigation h2 {
    background-color: var(--db-yellow);
    border-left: 10px solid var(--db-blue);
    margin: 0;
    padding: 12px 18px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.same-category-post-navigation .post-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    background-color: var(--db-cream);
    border: 1px solid var(--db-soft-border);
    box-shadow: var(--db-soft-shadow);
    padding: 20px;
    box-sizing: border-box;
}

.same-category-post-navigation .post-nav-card {
    display: block;
    min-height: 100%;
    padding: 16px 18px;
    background-color: var(--db-white);
    border: 1px solid var(--db-soft-border);
    border-left: 10px solid var(--db-blue);
    box-shadow: var(--db-soft-shadow);
    color: var(--db-text);
    text-decoration: none;
    box-sizing: border-box;
}

.same-category-post-navigation .post-nav-card-next {
    border-left-color: var(--db-yellow);
}

.same-category-post-navigation .post-nav-card:hover,
.same-category-post-navigation .post-nav-card:focus {
    background-color: var(--db-pale-blue);
    color: var(--db-text);
    text-decoration: none;
}

.same-category-post-navigation .nav-direction {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--db-dark-teal);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.same-category-post-navigation .nav-title {
    display: block;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
}

.same-category-post-navigation .post-nav-back-link {
    margin: 0;
    padding: 14px 20px;
    background-color: var(--db-pale-blue);
    border-left: 1px solid var(--db-soft-border);
    border-right: 1px solid var(--db-soft-border);
    border-bottom: 1px solid var(--db-soft-border);
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
}

.same-category-post-navigation .post-nav-back-link a {
    font-weight: 700;
}

@media (max-width: 768px) {
    .same-category-post-navigation {
        margin: 28px auto 32px;
    }

    .same-category-post-navigation h2 {
        font-size: 20px;
        padding: 12px 15px;
    }

    .same-category-post-navigation .post-nav-grid {
        display: block;
        padding: 16px;
    }

    .same-category-post-navigation .post-nav-card {
        margin-bottom: 14px;
        padding: 14px 16px;
    }

    .same-category-post-navigation .post-nav-card:last-child {
        margin-bottom: 0;
    }

    .same-category-post-navigation .post-nav-back-link {
        padding: 13px 16px;
    }
}
