/*
Theme Name: The Write Ways Home
Theme URI: https://example.com/
Author: The Write Ways Home
Description: Responsive editorial home-improvement magazine theme with contextual reading recommendations.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: the-write-ways-home
License: GPL-2.0-or-later
*/
:root{--forest:#063b2c;--orange:#bf4425;--ink:#172820;--cream:#faf7f1;--line:#e7e6de}*,*:before,*:after{box-sizing:border-box}html{overflow-x:clip;scroll-behavior:smooth}body{margin:0;overflow-x:clip;color:var(--ink);background:#fff;font:16px/1.65 system-ui,-apple-system,Segoe UI,sans-serif}img,video,iframe,svg{max-width:100%;height:auto}figure{max-width:100%;margin:0}p,h1,h2,h3,li,a,blockquote{overflow-wrap:anywhere}a{color:var(--forest)}a:hover{color:var(--orange)}.wrap{width:min(1180px,calc(100% - 40px));margin-inline:auto}.site-header{background:white;border-bottom:1px solid var(--line);position:relative;z-index:3}.header-inner{display:flex;align-items:center;gap:25px;min-height:84px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);min-width:0}.brand-icon{font-size:34px;color:var(--forest)}.brand-name{font:700 24px/1.1 Georgia,serif}.brand small{display:block;font-size:9px;letter-spacing:.13em;color:#9a5b38}.nav{margin-left:auto}.nav ul{display:flex;list-style:none;gap:18px;padding:0;margin:0;flex-wrap:wrap}.nav a{font-size:12px;text-decoration:none;font-weight:650}.search-form{display:flex;gap:5px;min-width:0}.search-form input,.newsletter input{min-width:0;padding:11px;border:1px solid #d7dcd7;border-radius:25px;width:180px}.btn,.search-form button,.newsletter button{background:var(--forest);color:white;border:0;border-radius:30px;padding:12px 20px;text-decoration:none;cursor:pointer;font-weight:700}.btn:hover{background:var(--orange);color:white}.hero{background:var(--cream);padding:65px 0}.hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center}.eyebrow{color:var(--orange);text-transform:uppercase;letter-spacing:.16em;font-size:12px;font-weight:800}.hero h1{font:clamp(44px,5vw,78px)/1.04 Georgia,serif;letter-spacing:-.035em;margin:18px 0}.hero h1 em{color:var(--orange)}.hero p{max-width:440px}.hero-visual{border-radius:180px 12px 12px 12px;overflow:hidden;background:#e9e2d6;min-height:350px}.hero-visual img{width:100%;height:420px;object-fit:cover}.hero-placeholder{display:grid;place-items:center;min-height:420px;font:italic 36px Georgia,serif;color:var(--forest);text-align:center;padding:30px}.features{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;padding:28px 0}.feature{font-size:13px}.feature strong{display:block;color:var(--forest)}section.section{padding:55px 0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.section h2,.section-head h2{font:clamp(30px,3vw,42px) Georgia,serif}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.card{border:1px solid var(--line);border-radius:12px;overflow:hidden;min-width:0;background:#fff}.card img{width:100%;aspect-ratio:16/10;object-fit:cover;display:block}.card-body{padding:20px}.card h3{font:25px/1.2 Georgia,serif;margin:8px 0}.card p{font-size:14px;color:#52605a;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.meta{font-size:12px;color:#718078}.categories{background:#f8f4ed}.category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.category-item{background:white;border:1px solid var(--line);padding:17px;border-radius:10px;text-decoration:none;font-weight:700}.category-item span{float:right;color:var(--orange)}.article-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:40px;padding:50px 0}.article-main{min-width:0}.article-main h1{font:clamp(38px,4.5vw,64px)/1.08 Georgia,serif;margin:12px 0 18px}.article-main .featured-image{width:100%;max-height:500px;object-fit:cover;border-radius:12px;margin:22px 0}.entry-content{font-size:17px;line-height:1.85;min-width:0;overflow-wrap:anywhere}.entry-content img,.entry-content table,.entry-content pre{max-width:100%}.entry-content pre,.entry-content table{overflow-x:auto;display:block}.entry-content a:not(.context-link){color:#1765d1;text-decoration:underline}.context-read{display:flex;gap:16px;align-items:center;background:#edf5ef;border-left:4px solid #087447;padding:18px;margin:26px 0;border-radius:7px}.context-read a{color:#07553a;font-weight:750}.sidebar{min-width:0}.widget-box{background:#f8f7f3;padding:20px;border-radius:12px;margin-bottom:20px}.widget-box h3{margin-top:0}.widget-box ul{list-style:none;margin:0;padding:0}.widget-box li{padding:8px 0;border-bottom:1px solid #e5e3db}.widget-box a{text-decoration:none}.related{padding:32px 0}.related .cards{grid-template-columns:repeat(3,minmax(0,1fr))}.newsletter{background:#d9a476;padding:36px 0}.newsletter .wrap{display:flex;justify-content:space-between;align-items:center;gap:20px}.site-footer{background:#052e22;color:#e5eee8;padding:55px 0 20px}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1.3fr;gap:30px}.site-footer a{color:#e5eee8;text-decoration:none}.site-footer a:hover{color:#ffb187}.site-footer ul{list-style:none;padding:0}.site-footer li{margin:8px 0}.site-footer .search-form input{width:100%}.copyright{border-top:1px solid #356052;padding-top:18px;margin-top:35px;font-size:12px}.pagination{margin:30px 0}.pagination a,.pagination span{margin-right:12px}.screen-reader-text{position:absolute;clip:rect(1px,1px,1px,1px);height:1px;width:1px;overflow:hidden}.skip-link:focus{position:fixed;clip:auto;top:10px;left:10px;z-index:999;background:#fff;padding:10px}.wp-block-image img{height:auto}@media(max-width:980px){.header-inner{flex-wrap:wrap;padding:15px 0}.nav{order:3;width:100%;margin:0}.nav ul{gap:12px}.footer-grid{grid-template-columns:repeat(2,1fr)}.article-layout{grid-template-columns:minmax(0,1fr) 240px;gap:24px}}@media(max-width:700px){.wrap{width:min(100% - 28px,1180px)}.hero-grid,.article-layout{grid-template-columns:minmax(0,1fr)}.hero{padding:35px 0}.hero-visual{min-height:230px}.hero-visual img,.hero-placeholder{height:260px;min-height:260px}.features,.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cards,.related .cards{grid-template-columns:minmax(0,1fr)}.footer-grid{grid-template-columns:1fr 1fr}.newsletter .wrap{display:block}.nav ul{justify-content:flex-start}.search-form{width:100%}.search-form input{flex:1;width:100%}}@media(max-width:420px){.footer-grid{grid-template-columns:1fr}.features{grid-template-columns:1fr 1fr}.brand-name{font-size:19px}}

/* Category image cards: independent from plugin CSS, responsive and overflow-safe. */
.category-grid{align-items:stretch;gap:16px}
.category-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-items:center;gap:10px 8px;padding:0 0 14px;overflow:hidden;min-width:0;box-shadow:0 8px 24px rgba(10,47,34,.055);transition:transform .2s ease,box-shadow .2s ease}
.category-item:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(10,47,34,.12)}
.category-image{grid-column:1/-1;display:block;aspect-ratio:16/10;overflow:hidden;background:#e9eee7;width:100%}
.category-image img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .3s ease}
.category-item:hover .category-image img{transform:scale(1.035)}
.category-label{padding-left:14px;font-size:14px;line-height:1.3;min-width:0;overflow-wrap:anywhere}
.category-arrow{float:none!important;margin-right:14px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--forest);color:white!important;font-size:16px}
.category-grid > *{min-width:0}
@media(max-width:700px){.category-grid{gap:10px}.category-label{font-size:12px;padding-left:10px}.category-arrow{margin-right:9px;width:22px;height:22px}}

/* v1.0.2: image fallback and resilient text containment */
.wwh-post-placeholder{display:block;width:100%;aspect-ratio:16/10;background:#e8eee7;overflow:hidden}
.card .wwh-post-placeholder img{width:100%;height:100%;object-fit:cover;display:block}
.cards,.card,.card-body,.card h3,.card p,.hero-grid>*,.article-layout>*,.section-head>*{min-width:0;max-width:100%}
.card h3 a{overflow-wrap:anywhere;word-break:normal;text-decoration:none}
.card h3 a:hover{text-decoration:underline}
.card-body p{overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}
.entry-content,.entry-content>*{max-width:100%;overflow-wrap:anywhere}
.entry-content :is(img,video,iframe,embed){max-width:100%;height:auto}
.entry-content :is(pre,table){max-width:100%;overflow-x:auto}
@media(max-width:700px){.cards{grid-template-columns:minmax(0,1fr)}.hero-grid{grid-template-columns:minmax(0,1fr)}}
