/*
Theme Name: Celeb Daily Hub
Theme URI: https://example.com/celeb-daily-hub
Author: Genspark
Author URI: https://example.com
Description: A clean, elegant and responsive celebrity news WordPress theme.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: celeb-daily-hub
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, entertainment, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
    --cdh-bg: #f8f5ee;
    --cdh-bg-secondary: #f2ece2;
    --cdh-surface: #fbf8f2;
    --cdh-card: #f9f6f0;
    --cdh-accent: #c3a586;
    --cdh-accent-deep: #a88762;
    --cdh-text: #33271f;
    --cdh-text-soft: #7e7166;
    --cdh-border: #e7dfd3;
    --cdh-border-strong: #ddd1c0;
    --cdh-white: #ffffff;
    --cdh-radius-xs: 8px;
    --cdh-radius-sm: 12px;
    --cdh-radius: 16px;
    --cdh-radius-lg: 24px;
    --cdh-max-width: 1130px;
    --cdh-content-width: 760px;
    --cdh-shadow-soft: 0 4px 14px rgba(76, 57, 35, 0.03);
    --cdh-transition: 180ms ease;
    --cdh-grid-columns: 3;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cdh-bg);
    color: var(--cdh-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}

body::before,
body::after,
.site-shell::before,
.site-shell::after {
    content: "";
    position: fixed;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: rgba(239, 235, 224, 0.9);
    pointer-events: none;
    z-index: -2;
}

body::before {
    top: -8rem;
    left: -10rem;
}

body::after {
    top: -7rem;
    right: -7rem;
}

.site-shell::before {
    bottom: -8rem;
    left: -8rem;
}

.site-shell::after {
    bottom: -8rem;
    right: -8rem;
}

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

svg {
    display: block;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

a:hover {
    color: var(--cdh-accent-deep);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(195, 165, 134, 0.5);
    outline-offset: 3px;
}

.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;
}

.screen-reader-text:focus {
    clip: auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.8rem 1rem;
    top: 1rem;
    left: 1rem;
    background: var(--cdh-white);
    border-radius: 999px;
    z-index: 9999;
}

.site-shell {
    position: relative;
}

.site-container,
.cdh-archive__inner,
.cdh-single__wrap,
.cdh-page__wrap,
.cdh-footer-panel,
.cdh-footer-bottom,
.cdh-comments,
.cdh-related,
.cdh-author-box,
.cdh-404__inner,
.cdh-search-empty {
    width: min(calc(100% - 2rem), var(--cdh-max-width));
    margin-inline: auto;
}

.site-main {
    padding: 1rem 0 3.75rem;
}

.site-header {
    position: relative;
    z-index: 20;
    background: rgba(248, 245, 238, 0.94);
    border-bottom: 1px solid var(--cdh-border);
    backdrop-filter: blur(14px);
}

.site-header.is-sticky {
    position: sticky;
    top: 0;
}

.site-header__inner {
    width: min(calc(100% - 2rem), var(--cdh-max-width));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 270px) 1fr minmax(0, 110px);
    align-items: center;
    gap: 1rem;
    min-height: 74px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.site-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--cdh-border-strong);
    background: linear-gradient(180deg, #efe4d4, #f8f3eb);
}

.site-logo img,
.site-logo .custom-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: none;
}

.site-branding__text {
    min-width: 0;
}

.site-title {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.site-title a,
.site-title a:hover {
    color: var(--cdh-text);
    text-decoration: none;
}

.site-description {
    display: none;
}

.site-header__nav {
    justify-self: center;
    min-width: 0;
}

.primary-menu,
.footer-menu,
.social-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding: 0;
    margin: 0;
}

.primary-menu > li {
    position: relative;
}

.primary-menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 74px;
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    color: var(--cdh-text);
}

.primary-menu > li.current-menu-item > a::after,
.primary-menu > li.current-menu-ancestor > a::after,
.primary-menu > li.current_page_item > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--cdh-accent);
}

.primary-menu .sub-menu {
    position: absolute;
    left: 0;
    top: calc(100% - 8px);
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--cdh-border);
    background: var(--cdh-white);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--cdh-transition), transform var(--cdh-transition), visibility var(--cdh-transition);
    box-shadow: var(--cdh-shadow-soft);
}

.primary-menu > li:hover > .sub-menu,
.primary-menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu a {
    display: block;
    padding: 0.55rem 0.15rem;
    text-decoration: none;
}

.site-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.cdh-icon-button,
.cdh-mobile-toggle,
.cdh-load-more,
.cdh-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.comment-reply-link,
.post-page-numbers,
.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.72rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--cdh-border-strong);
    background: var(--cdh-white);
    color: var(--cdh-text);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--cdh-transition), border-color var(--cdh-transition), transform var(--cdh-transition);
}

.cdh-icon-button,
.cdh-mobile-toggle {
    width: 38px;
    min-height: 38px;
    min-width: 38px;
    padding: 0;
    border-color: var(--cdh-border);
    background: var(--cdh-bg-secondary);
}

.cdh-mobile-toggle {
    display: none;
}

.cdh-icon-button:hover,
.cdh-mobile-toggle:hover,
.cdh-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.comment-reply-link:hover,
.post-page-numbers:hover,
.page-links a:hover {
    background: var(--cdh-white);
    border-color: var(--cdh-accent);
    transform: translateY(-1px);
}

.cdh-search-panel {
    display: none;
    border-top: 1px solid var(--cdh-border);
}

.cdh-search-panel.is-open {
    display: block;
}

.cdh-search-panel__inner {
    width: min(calc(100% - 2rem), var(--cdh-max-width));
    margin-inline: auto;
    padding: 0.9rem 0 1.1rem;
}

.search-form {
    display: flex;
    gap: 0.75rem;
}

.search-form label {
    flex: 1;
}

.search-field,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--cdh-border);
    background: var(--cdh-white);
    color: var(--cdh-text);
    padding: 0.85rem 1rem;
}

textarea {
    min-height: 160px;
}

.cdh-front-page,
.cdh-post-feed {
    display: grid;
    gap: 1rem;
}

.cdh-post-grid,
.cdh-related__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.cdh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cdh-border);
    border-radius: var(--cdh-radius-xs);
    overflow: hidden;
    background: var(--cdh-card);
    box-shadow: none;
    transition: border-color var(--cdh-transition), transform var(--cdh-transition);
}

.cdh-card:hover,
.cdh-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--cdh-border-strong);
}

.cdh-card__media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9dfd1;
}

.cdh-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdh-card__category {
    position: absolute;
    left: 0.85rem;
    bottom: 0.7rem;
    z-index: 2;
}

.cdh-card__category a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--cdh-border-strong);
    background: rgba(250, 245, 238, 0.96);
    color: var(--cdh-text);
    text-decoration: none;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.cdh-card__body {
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem 0.9rem 0.95rem;
}

.cdh-card__title {
    margin: 0;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.02rem;
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cdh-card__title a {
    color: var(--cdh-text);
    text-decoration: none;
}

.cdh-card__excerpt {
    color: var(--cdh-text-soft);
    font-size: 0.82rem;
    line-height: 1.55;
}

.cdh-card__excerpt p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cdh-card__meta,
.cdh-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    color: var(--cdh-text-soft);
    font-size: 0.74rem;
}

.cdh-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cdh-meta-item::before {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    border: 1px solid var(--cdh-border-strong);
    background: var(--cdh-bg-secondary);
}

.cdh-load-more-wrap {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    padding-top: 0.1rem;
}

.cdh-load-more {
    min-height: 42px;
    padding: 0.7rem 1.45rem;
    border-color: var(--cdh-accent);
    background: var(--cdh-accent);
    color: var(--cdh-text);
}

.cdh-load-more::before {
    content: "↻";
    font-size: 0.9rem;
    line-height: 1;
}

.cdh-load-more:hover {
    background: #cfb395;
    border-color: #cfb395;
    transform: translateY(-1px);
}

.cdh-load-more[disabled] {
    opacity: 0.72;
    cursor: wait;
}

.cdh-load-more-note {
    margin: 0;
    color: var(--cdh-text-soft);
    font-size: 0.84rem;
}

.cdh-archive__header,
.cdh-front-page__header {
    margin-bottom: 1.1rem;
}

.cdh-archive__eyebrow,
.cdh-related__eyebrow,
.cdh-author-box__label {
    display: inline-flex;
    align-items: center;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cdh-text-soft);
}

.cdh-archive__title,
.cdh-section-title,
.cdh-page__title,
.cdh-404__title,
.comments-title,
.comment-reply-title,
.cdh-single__title {
    margin: 0.4rem 0 0;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(2rem, 1.45rem + 1.75vw, 3.15rem);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.cdh-archive__description,
.cdh-search-empty p,
.cdh-404__text,
.comment-notes,
.logged-in-as,
.no-comments,
.cdh-author-box__bio,
.cdh-footer-branding p,
.cdh-single__subtitle,
.cdh-page__intro {
    color: var(--cdh-text-soft);
}

.cdh-content-layout {
    display: grid;
    gap: 2rem;
}

body.cdh-has-sidebar .cdh-content-layout {
    grid-template-columns: minmax(0, 1fr);
}

.cdh-single,
.cdh-page {
    display: grid;
    gap: 1.5rem;
}

.cdh-single__lead,
.cdh-page__header {
    width: min(100%, 980px);
}

.cdh-single__categories {
    margin-bottom: 0.75rem;
    color: var(--cdh-text-soft);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cdh-single__categories a {
    text-decoration: none;
}

.cdh-single__subtitle,
.cdh-page__intro {
    margin: 0.95rem 0 0;
    max-width: 58ch;
    font-size: 1.02rem;
}

.cdh-single__featured {
    border-radius: var(--cdh-radius);
    overflow: hidden;
    border: 1px solid var(--cdh-border);
    background: var(--cdh-card);
}

.cdh-single__featured img {
    width: 100%;
    display: block;
}

.cdh-single__content,
.cdh-page__content {
    width: min(100%, var(--cdh-content-width));
}

.cdh-single__content > *:first-child,
.cdh-page__content > *:first-child {
    margin-top: 0;
}

.cdh-single__content > *:last-child,
.cdh-page__content > *:last-child {
    margin-bottom: 0;
}

.cdh-single__content h1,
.cdh-single__content h2,
.cdh-single__content h3,
.cdh-single__content h4,
.cdh-single__content h5,
.cdh-single__content h6,
.cdh-page__content h1,
.cdh-page__content h2,
.cdh-page__content h3,
.cdh-page__content h4,
.cdh-page__content h5,
.cdh-page__content h6 {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 1.9rem 0 0.85rem;
}

.cdh-single__content h2,
.cdh-page__content h2 {
    font-size: clamp(1.7rem, 1.35rem + 0.9vw, 2.15rem);
}

.cdh-single__content h3,
.cdh-page__content h3 {
    font-size: clamp(1.35rem, 1.15rem + 0.55vw, 1.7rem);
}

.cdh-single__content p,
.cdh-page__content p,
.cdh-single__content li,
.cdh-page__content li {
    font-size: 1.03rem;
}

.cdh-single__content p,
.cdh-page__content p,
.cdh-single__content ul,
.cdh-single__content ol,
.cdh-page__content ul,
.cdh-page__content ol,
.cdh-single__content blockquote,
.cdh-page__content blockquote,
.cdh-single__content table,
.cdh-page__content table,
.cdh-single__content figure,
.cdh-page__content figure,
.cdh-single__content .wp-block-embed,
.cdh-page__content .wp-block-embed,
.cdh-single__content .wp-block-buttons,
.cdh-page__content .wp-block-buttons {
    margin: 1.35rem 0;
}

.cdh-single__content ul,
.cdh-single__content ol,
.cdh-page__content ul,
.cdh-page__content ol {
    padding-left: 1.2rem;
}

.cdh-single__content a,
.cdh-page__content a {
    color: var(--cdh-accent-deep);
}

.cdh-single__content img,
.cdh-page__content img,
.cdh-single__content iframe,
.cdh-page__content iframe,
.cdh-single__content video,
.cdh-page__content video {
    border-radius: var(--cdh-radius-xs);
}

.cdh-single__content blockquote,
.cdh-page__content blockquote,
.wp-block-quote,
.wp-block-pullquote {
    margin-inline: 0;
    padding: 1rem 1.15rem;
    border-left: 4px solid var(--cdh-accent);
    border-radius: var(--cdh-radius-sm);
    background: rgba(242, 236, 226, 0.85);
}

.cdh-single__content table,
.cdh-page__content table,
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.cdh-single__content th,
.cdh-single__content td,
.cdh-page__content th,
.cdh-page__content td,
.wp-block-table th,
.wp-block-table td {
    border: 1px solid var(--cdh-border);
    padding: 0.85rem 0.9rem;
    text-align: left;
}

.cdh-single__content .alignwide,
.cdh-page__content .alignwide {
    width: min(100vw - 2rem, 1080px);
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.cdh-single__content .alignfull,
.cdh-page__content .alignfull {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.cdh-question,
.cdh-faq-question,
.cdh-single__content h2.is-style-cdh-question,
.cdh-single__content h3.is-style-cdh-question,
.cdh-single__content h4.is-style-cdh-question,
.cdh-page__content h2.is-style-cdh-question,
.cdh-page__content h3.is-style-cdh-question,
.cdh-page__content h4.is-style-cdh-question,
.cdh-single__content details summary,
.cdh-page__content details summary {
    margin: 1.4rem 0 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--cdh-border-strong);
    border-left: 4px solid var(--cdh-accent);
    background: rgba(242, 236, 226, 0.88);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 700;
}

.cdh-faq,
.cdh-single__content details,
.cdh-page__content details,
.wp-block-details {
    border: 1px solid var(--cdh-border);
    border-radius: 14px;
    padding: 0.2rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.cdh-author-box,
.cdh-related,
.cdh-comments,
.widget,
.cdh-archive-empty,
.cdh-search-empty,
.cdh-404__inner {
    border: 1px solid var(--cdh-border);
    border-radius: var(--cdh-radius);
    background: var(--cdh-surface);
}

.cdh-author-box,
.cdh-related,
.cdh-comments {
    padding: 1.35rem;
}

.cdh-author-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
}

.cdh-author-box__avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
}

.cdh-author-box__name {
    margin: 0.15rem 0 0;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.28rem;
}

.cdh-author-box__link {
    margin-top: 0.9rem;
}

.cdh-related__head {
    margin-bottom: 1rem;
}

.cdh-sidebar {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.widget {
    padding: 1.1rem;
}

.widget-title,
.wp-block-heading {
    margin: 0 0 0.8rem;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.02rem;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li + li {
    margin-top: 0.65rem;
}

.site-footer {
    padding: 0 0 1.25rem;
}

.cdh-footer-panel {
    border: 1px solid var(--cdh-border);
    background: var(--cdh-bg-secondary);
    border-radius: 0;
    margin-top: 0.75rem;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 1.4rem;
    padding: 1.2rem 1.35rem 1rem;
}

.cdh-footer-branding {
    max-width: 18rem;
}

.cdh-footer-branding-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.55rem;
}

.cdh-footer-title,
.site-footer h2 {
    margin: 0 0 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cdh-text-soft);
}

.cdh-footer-brand-name {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 600;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: var(--cdh-text-soft);
    font-size: 0.77rem;
    text-decoration: none;
}

.footer-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.social-menu,
.cdh-social-fallback {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-menu a,
.cdh-social-fallback a {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    border: 1px solid var(--cdh-border-strong);
    background: rgba(255, 255, 255, 0.72);
    color: var(--cdh-text);
    font-size: 0.7rem;
    font-weight: 700;
}

.cdh-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1.35rem 1rem;
    border-top: 1px solid var(--cdh-border);
    color: var(--cdh-text-soft);
    font-size: 0.68rem;
}

.cdh-footer-bottom .footer-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
}

.cdh-archive-empty,
.cdh-search-empty,
.cdh-404__inner {
    text-align: center;
    padding: 2.5rem 1.25rem;
}

.cdh-pagination {
    margin-top: 1rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.comment-body {
    border: 1px solid var(--cdh-border);
    border-radius: 14px;
    padding: 1rem;
    background: var(--cdh-white);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-author img {
    border-radius: 50%;
}

.comment-content > *:last-child {
    margin-bottom: 0;
}

.comment-form {
    display: grid;
    gap: 0.85rem;
}

.comment-form-cookies-consent {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}


@media (min-width: 680px) {
    .cdh-post-grid,
    .cdh-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cdh-post-grid {
        grid-template-columns: repeat(var(--cdh-grid-columns), minmax(0, 1fr));
    }

    body.cdh-has-sidebar .cdh-content-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        align-items: start;
    }

    .cdh-related__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    body.cdh-grid-4 .cdh-post-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .site-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 66px;
    }

    .site-header__nav {
        display: none;
        position: fixed;
        inset: 67px 0 auto 0;
        padding: 0.9rem 1rem 1rem;
        background: rgba(248, 245, 238, 0.98);
        border-bottom: 1px solid var(--cdh-border);
        z-index: 40;
    }

    .site-header__nav.is-open {
        display: block;
    }

    .site-header__nav .primary-menu {
        width: min(calc(100% - 2rem), var(--cdh-max-width));
        margin-inline: auto;
        flex-direction: column;
        gap: 0;
        padding: 0.35rem 1rem;
        background: var(--cdh-white);
        border: 1px solid var(--cdh-border);
        border-radius: 14px;
    }

    .site-header__nav .primary-menu > li > a {
        min-height: 44px;
        width: 100%;
    }

    .site-header__nav .primary-menu > li > a::after {
        display: none;
    }

    .site-header__nav .primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding: 0 0 0.3rem 0.75rem;
        background: transparent;
    }

    .cdh-mobile-toggle {
        display: inline-flex;
    }

    .site-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 781px) {
    .site-main {
        padding-top: 0.8rem;
    }

    .search-form {
        flex-direction: column;
    }

    .cdh-single__content .alignwide,
    .cdh-page__content .alignwide,
    .cdh-single__content .alignfull,
    .cdh-page__content .alignfull {
        width: 100%;
        margin-left: 0;
        transform: none;
    }

    .cdh-author-box {
        grid-template-columns: 1fr;
    }

    .cdh-footer-bottom,
    .site-footer__inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 640px) {
    .cdh-post-grid,
    .cdh-related__grid,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .site-title {
        font-size: 1.22rem;
    }

    .cdh-card__title {
        font-size: 1rem;
    }

    .cdh-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
