/*
Theme Name: Cedarline Magazine
Description: A responsive editorial theme with an automatic latest-stories homepage.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cedarline-magazine
*/

.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wrap { max-width: 1180px; width: calc(100% - 64px); margin-inline: auto; }
.masthead { background: #164f43; color: #fffaf1; }
.masthead-content { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 106px; padding-block: 14px; }
.masthead .wp-block-site-title, .site-footer .wp-block-site-title { margin: 0; font-family: Georgia, serif; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.08; font-weight: bold; overflow-wrap: anywhere; }
.masthead a, .site-footer a { color: inherit; text-decoration: none; }
.masthead a:hover, .site-footer a:hover { text-decoration: underline; }
.masthead .wp-block-search { margin: 0; width: min(100%, 320px); }
.wp-block-search__input { min-width: 0; padding: 10px 12px; background: #fffdf7; color: #163630; border: 1px solid #8c9d90; border-radius: 4px; }
.wp-block-search__button { margin-inline-start: 6px; padding: 8px 12px; background: #164f43; color: #fff; border: 1px solid #bcd2c3; border-radius: 4px; font: inherit; cursor: pointer; }
.masthead .wp-block-search__button { background: #fffaf1; color: #163630; }
.category-strip { background: #e7eee4; color: #163630; border-bottom: 1px solid #cad6c9; }
.category-strip:not(:has(.cat-item)) { display: none; }
.category-strip ul, .site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 12px 0; }
.category-strip a { font-size: .92rem; font-weight: 650; }
.content-area { padding-block: 36px 60px; min-height: 46vh; }
.section-title, .wp-block-query-title { margin-block: 0 24px; padding-block-end: 12px; border-block-end: 2px solid #164f43; font-size: clamp(2rem, 4vw, 3.25rem); }
.content-area .wp-block-post-template { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; }
.content-area .wp-block-post-template > li { min-width: 0; margin: 0; }
.story { height: 100%; box-sizing: border-box; overflow: hidden; border: 1px solid #d8ddcf; border-radius: 8px; background: #fffdf7; }
.story .wp-block-post-featured-image { margin: 0; }
.story .wp-block-post-featured-image a { display: block; }
.story .wp-block-post-featured-image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.story-copy { padding: 17px 20px 21px; }
.story-copy .wp-block-post-title { font-size: clamp(1.16rem, 2vw, 1.65rem); margin-block: 6px 9px; overflow-wrap: anywhere; }
.story-copy .wp-block-post-title a { color: inherit; text-decoration: none; }
.story-copy .wp-block-post-title a:hover, .story-copy .wp-block-post-title a:focus-visible { text-decoration: underline; }
.wp-block-post-terms { color: #a64327; font-size: .83rem; font-weight: 700; }
.wp-block-post-terms a { color: inherit; }
.wp-block-post-date { font-size: .83rem; opacity: .82; }
.front-feed .wp-block-post-template > li:first-child { grid-column: span 2; grid-row: span 2; }
.front-feed .wp-block-post-template > li:first-child:last-child { grid-column: 1 / -1; grid-row: auto; }
.front-feed .wp-block-post-template > li:first-child .story { background: #164f43; color: #fffaf1; display: flex; flex-direction: column; }
.front-feed .wp-block-post-template > li:first-child .wp-block-post-terms { color: #ffe0ae; }
.front-feed .wp-block-post-template > li:first-child .story-copy { padding: clamp(20px, 4vw, 40px); margin-block-start: auto; }
.front-feed .wp-block-post-template > li:first-child .wp-block-post-title { font-size: clamp(1.8rem, 4vw, 3.4rem); }
.front-feed .wp-block-post-template > li:first-child img { aspect-ratio: 16 / 9; }
.front-feed .wp-block-post-template > li:nth-child(2) img, .front-feed .wp-block-post-template > li:nth-child(3) img { aspect-ratio: 16 / 7; }
.wp-block-query-pagination { gap: 12px; margin-top: 28px; }
.wp-block-query-pagination .page-numbers { display: inline-block; margin-inline: 4px; padding: 3px 8px; }
.wp-block-query-pagination .current { background: #164f43; color: white; border-radius: 4px; }
.empty-state { padding: 24px; background: #e7eee4; border-radius: 8px; }
.article-body { max-width: 940px; margin-inline: auto; }
.article-body > .wp-block-post-title { font-size: clamp(2.1rem, 5.5vw, 4rem); margin-block: 12px 20px; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 24px; }
.article-body > .wp-block-post-featured-image img { width: 100%; height: auto; border-radius: 8px; }
.article-body .wp-block-post-content { font-size: 1.075rem; overflow-wrap: anywhere; }
.article-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 28px; border-top: 1px solid #cad6c9; padding-top: 18px; }
.site-footer { background: #163630; color: #fffaf1; }
.footer-content { padding-block: 34px; }
.footer-content .wp-block-site-title { font-size: 1.7rem; }
.footer-content .wp-block-site-tagline { margin-block: 8px; }
:where(a, button, input):focus-visible { outline: 3px solid #b34d2e; outline-offset: 3px; }
@media (max-width: 900px) {
    .content-area .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .front-feed .wp-block-post-template > li:first-child { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 580px) {
    .wrap { width: calc(100% - 32px); }
    .masthead-content { flex-direction: column; align-items: stretch; justify-content: center; gap: 14px; }
    .category-strip ul { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding-inline: 4px; }
    .content-area { padding-block: 24px 40px; }
    .content-area .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
}
