/*
Theme Name: Heart Story Haven
Author: Heart Story Haven
Description: Cream and burgundy, mobile-first storytelling theme with configurable cards, accessible title previews and standard WordPress plugin hooks. Ads are managed by your existing plugins.
Version: 1.0.11
Requires at least: 6.2
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: heart-story-haven
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, footer-widgets, theme-options, translation-ready
*/
:root{--hsh-accent:#78263e;--hsh-background:#fbf7f0;--hsh-surface:#fff;--hsh-text:#292526;--hsh-body:Arial,Helvetica,sans-serif;--hsh-heading:Georgia,'Times New Roman',serif;--hsh-body-size:19px;--hsh-leading:1.75;--hsh-width:1240px;--hsh-reading-width:780px;--hsh-lines:3;--hsh-feature-lines:4;--hsh-border:#e4d9d2}
body{margin:0;background:var(--hsh-background);color:var(--hsh-text);font:16px/1.6 var(--hsh-body)}
.hsh-wrap{width:calc(100% - 36px);max-width:var(--hsh-width);margin-inline:auto;box-sizing:border-box}
a{color:var(--hsh-accent)}a:hover{text-decoration:none}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--hsh-accent);outline-offset:4px}
h1,h2,h3,h4{font-family:var(--hsh-heading);line-height:1.22;overflow-wrap:anywhere}h1,h2,h3{color:var(--hsh-accent)}
.hsh-header{background:var(--hsh-surface);border-bottom:1px solid var(--hsh-border)}.hsh-header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding-block:18px}
.hsh-brand{min-width:0;flex:1}.hsh-brand-name{font:700 clamp(20px,2.1vw,30px)/1.2 var(--hsh-heading);text-decoration:none;display:inline-block;overflow-wrap:anywhere}.hsh-brand-name span{font-size:1.4em;vertical-align:middle}.custom-logo-link{display:inline-block;max-width:100%}.custom-logo{width:auto;max-width:min(280px,100%);height:auto;max-height:70px;object-fit:contain}.hsh-tagline{font-size:12px;margin:4px 0 0}.hsh-menu-toggle{flex:none;border:1px solid var(--hsh-border);background:none;color:var(--hsh-accent);font-size:24px;min-width:44px;min-height:44px;border-radius:5px;cursor:pointer;display:none}
.hsh-navigation{width:100%}.hsh-navigation ul{list-style:none;margin:0;padding:0}.hsh-navigation a{display:block;padding:10px 12px;text-decoration:none;font-size:14px;font-weight:600;overflow-wrap:anywhere}.hsh-navigation .current-menu-item>a{border-bottom:2px solid var(--hsh-accent)}.hsh-navigation .sub-menu,.hsh-navigation .children{padding-inline-start:16px}.hsh-top{font-size:12px;border-bottom:1px solid var(--hsh-border)}.hsh-top ul,.hsh-footer-bottom ul{display:flex;flex-wrap:wrap;gap:8px 20px;list-style:none;padding:6px 0;margin:0}.hsh-top a{display:inline-block;padding:6px 0}
.hsh-search{display:flex;max-width:460px;gap:6px;margin-block:10px}.hsh-search input{min-width:0;flex:1;border:1px solid var(--hsh-border);border-radius:4px;padding:10px;font:inherit;background:var(--hsh-surface);color:var(--hsh-text)}.hsh-search button,.hsh-comments input[type=submit]{border:0;border-radius:4px;background:var(--hsh-accent);color:#fff;padding:10px 14px;font:inherit;cursor:pointer;min-height:44px}
.hsh-home,.hsh-archive{padding-block:28px 48px}.hsh-intro{text-align:center;font:italic clamp(20px,2vw,26px)/1.5 var(--hsh-heading);color:var(--hsh-accent);margin:0 0 28px}.hsh-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:26px}.hsh-feature-grid{display:grid;gap:24px;margin-bottom:40px}.hsh-card{min-width:0;display:flex;flex-direction:column;position:relative}.hsh-card-media{position:relative;min-width:0;container-type:inline-size}.hsh-card-media>a:first-child{display:block}.hsh-card-image,.hsh-image-placeholder{width:100%;aspect-ratio:8/5;object-fit:cover;display:block;border-radius:7px;height:auto}.hsh-image-placeholder{background:#ecdfd7;color:var(--hsh-accent);font:64px/1.5 var(--hsh-heading);display:grid;place-items:center}
.hsh-badge{position:absolute;inset-inline-start:8px;bottom:8px;max-width:calc(100% - 16px);box-sizing:border-box;background:var(--hsh-accent);color:#fff;border:1px solid #fff;border-radius:9px;font:700 11px/1.25 var(--hsh-body);text-transform:uppercase;letter-spacing:.02em;padding:3px 7px;text-decoration:none;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;z-index:1}.hsh-badge:focus-visible{outline-offset:3px}.hsh-card-copy{padding:12px 2px 0;display:flex;flex:1;flex-direction:column;min-width:0}.hsh-card-title{font-size:22px;line-height:1.25;margin:0 0 9px}.hsh-card-title a{color:var(--hsh-accent);text-decoration:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--hsh-lines);overflow:hidden;min-height:calc(1.25em * var(--hsh-lines));overflow-wrap:anywhere}.hsh-card-title a:hover{text-decoration:underline;text-underline-offset:3px}.hsh-excerpt{font-size:15px;line-height:1.55;margin:0 0 10px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:3.1em}.hsh-read{display:inline-flex;gap:6px;align-items:center;align-self:flex-start;font-size:14px;font-weight:600;min-height:44px;margin-top:auto;text-underline-offset:4px}.hsh-featured .hsh-card-title{font-size:clamp(26px,3vw,36px)}.hsh-featured .hsh-card-title a{-webkit-line-clamp:var(--hsh-feature-lines);min-height:calc(1.25em * var(--hsh-feature-lines))}.hsh-section-title{display:flex;align-items:center;gap:18px;font-size:26px;margin:28px 0 24px}.hsh-section-title:after{content:'';height:1px;background:var(--hsh-border);flex:1}.hsh-browse{margin-top:40px}.hsh-category-links{display:flex;flex-wrap:wrap;gap:12px}.hsh-category-links a{border:1px solid var(--hsh-border);border-radius:24px;padding:10px 18px;text-decoration:none;font-weight:600;background:var(--hsh-surface)}
.hsh-story-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:40px;padding-block:32px 48px}.hsh-story-main{min-width:0;width:100%;max-width:var(--hsh-reading-width);margin-inline:auto}.hsh-entry-categories{font-size:13px;font-weight:700;margin-bottom:12px}.entry-title{font-size:clamp(30px,4vw,48px);margin:0 0 18px}.hsh-meta{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:13px;margin-bottom:24px}.hsh-featured-image img{width:100%;height:auto;border-radius:7px;display:block;margin-bottom:24px}
/* Content stays in normal document flow. No theme rules target ad iframes, videos, script loaders or provider wrappers. */
.entry-content{font-family:var(--hsh-body);font-size:var(--hsh-body-size);line-height:var(--hsh-leading);overflow-wrap:break-word}.entry-content>p{margin:0 0 1.25em}.entry-content>h2,.entry-content>h3{margin-top:1.5em}.entry-content img{max-width:100%;height:auto}.entry-content figure{max-width:100%;margin-inline:0}.entry-content table{border-collapse:collapse;max-width:100%}.entry-content td,.entry-content th{border:1px solid var(--hsh-border);padding:8px;overflow-wrap:anywhere}.entry-content pre{white-space:pre-wrap;overflow-wrap:anywhere}.entry-content blockquote{border-inline-start:3px solid var(--hsh-accent);padding-inline-start:20px;margin-inline:0}.wp-caption{max-width:100%}.wp-caption-text,.gallery-caption{font-size:14px}.alignleft{float:left;margin:8px 20px 16px 0}.alignright{float:right;margin:8px 0 16px 20px}.aligncenter{display:block;margin-inline:auto}.entry-content:after{content:'';display:table;clear:both}.hsh-sidebar{min-width:0;border-top:1px solid var(--hsh-border);padding-top:24px}.hsh-widget{margin-bottom:30px}.hsh-widget-title{font-size:24px;margin:0 0 20px}.hsh-widget img{max-width:100%;height:auto}.hsh-sidebar .hsh-card{margin-bottom:24px}.hsh-sidebar .hsh-card-title{font-size:20px}.hsh-sidebar .hsh-excerpt{display:none}.hsh-related{border-top:1px solid var(--hsh-border);margin-top:40px}.hsh-related .hsh-excerpt{display:none}.hsh-related .hsh-card-title{font-size:19px}.hsh-page{max-width:var(--hsh-reading-width);padding-block:40px;min-height:50vh}.hsh-archive-heading{margin-bottom:30px}.hsh-archive-heading h1{font-size:36px}
.navigation,.page-links{margin-block:28px}.nav-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between}.page-numbers,.page-links a,.page-links .current{padding:10px 16px;border:1px solid var(--hsh-border);display:inline-block;border-radius:4px}.page-numbers.current{background:var(--hsh-accent);color:#fff}.post-navigation a{display:block;max-width:330px;overflow-wrap:anywhere}.nav-next{margin-inline-start:auto}.hsh-comments{margin-top:40px;border-top:1px solid var(--hsh-border)}.comment-list{padding-inline-start:24px}.comment-body{padding:16px 0}.comment-list .children{padding-inline-start:16px}.hsh-comments label{display:block}.hsh-comments input:not([type=checkbox]):not([type=submit]),.hsh-comments textarea{box-sizing:border-box;max-width:100%;width:100%;padding:12px;border:1px solid var(--hsh-border);border-radius:4px;font:inherit}.comment-form-cookies-consent{display:flex;align-items:flex-start;gap:10px}.bypostauthor{border-inline-start:2px solid var(--hsh-accent)}
.hsh-footer{background:var(--hsh-accent);color:#fff;padding:32px 0 18px}.hsh-footer a,.hsh-footer h2,.hsh-footer h3{color:#fff}.hsh-footer-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}.hsh-footer-grid>div:empty{display:none}.hsh-footer h2{font-size:22px;margin-top:0}.hsh-footer p{font-size:14px}.hsh-footer-bottom{border-top:1px solid #ffffff50;margin-top:20px;padding-top:14px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px}.hsh-footer ul{padding-inline-start:18px}.hsh-footer-bottom ul{padding:0}.hsh-footer .hsh-widget{margin-bottom:0}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;padding:0;overflow:hidden;position:absolute!important;white-space:nowrap}.skip-link:focus{clip:auto;clip-path:none;width:auto;height:auto;top:8px;left:8px;background:#fff;padding:12px;z-index:10}.hsh-tooltip{position:fixed;box-sizing:border-box;max-width:min(360px,calc(100vw - 24px));padding:12px 14px;border:1px solid var(--hsh-border);background:var(--hsh-surface);color:var(--hsh-text);box-shadow:0 5px 20px #0002;border-radius:5px;font:15px/1.5 var(--hsh-body);overflow-wrap:anywhere;z-index:5}.hsh-tooltip[hidden]{display:none}
@media(max-width:1099px){.hsh-js .hsh-menu-toggle{display:block}.hsh-js .hsh-navigation:not(.is-open){display:none}.hsh-navigation li{border-bottom:1px solid var(--hsh-border)}}
@media(min-width:600px){.hsh-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hsh-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hsh-featured{grid-column:1/-1}.hsh-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1100px){.hsh-header-inner{flex-wrap:nowrap}.hsh-brand{flex:0 1 340px}.hsh-navigation{width:auto;display:flex;align-items:center;gap:14px}.hsh-menu,.hsh-navigation .menu>ul{display:flex;align-items:center;flex-wrap:wrap}.hsh-navigation li{position:relative}.hsh-navigation .sub-menu,.hsh-navigation .children{display:none;position:absolute;top:100%;left:0;min-width:200px;background:var(--hsh-surface);border:1px solid var(--hsh-border);padding:6px;z-index:3}.hsh-navigation li:hover>ul,.hsh-navigation li:focus-within>ul{display:block}.hsh-navigation .sub-menu .sub-menu,.hsh-navigation .children .children{left:100%;top:0}.hsh-navigation .hsh-search{max-width:220px}.hsh-navigation a{padding-inline:8px}.hsh-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hsh-feature-grid{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);grid-template-rows:auto auto}.hsh-featured{grid-column:1;grid-row:1/3}.hsh-feature-grid>.hsh-card:not(.hsh-featured) .hsh-card-media{max-height:none}.hsh-feature-grid>.hsh-card:not(.hsh-featured) .hsh-card-image{aspect-ratio:2.8/1}.hsh-feature-grid>.hsh-card:not(.hsh-featured) .hsh-image-placeholder{aspect-ratio:2.8/1}.has-sidebar{grid-template-columns:minmax(0,1fr) 290px}.hsh-sidebar{border-top:0;border-inline-start:1px solid var(--hsh-border);padding:0 0 0 26px}.hsh-footer-grid{grid-template-columns:1.4fr 1fr 1fr 1fr}}
@media(max-width:599px){.hsh-latest .hsh-card{display:grid;grid-template-columns:116px minmax(0,1fr);gap:14px;border-bottom:1px solid var(--hsh-border);padding-bottom:18px}.hsh-latest .hsh-card-copy{padding:0}.hsh-latest .hsh-card-image,.hsh-latest .hsh-image-placeholder{aspect-ratio:1/1}.hsh-latest .hsh-card-title{font-size:18px}.hsh-latest .hsh-excerpt{display:none}.hsh-latest .hsh-badge{font-size:10px;bottom:5px;inset-inline-start:5px;max-width:calc(100% - 10px);padding:2px 3px}.hsh-feature-grid>.hsh-card:not(.hsh-featured){display:none}.hsh-section-title{font-size:24px}.hsh-brand-name{font-size:20px}.hsh-tagline{font-size:11px}.hsh-featured .hsh-card-title a{min-height:0}.hsh-related .hsh-grid{grid-template-columns:1fr}.hsh-sidebar .hsh-widget>.hsh-card{max-width:420px}.hsh-top a{min-height:24px}.entry-content .alignleft,.entry-content .alignright{float:none;margin-inline:0}}
@media(prefers-reduced-motion:no-preference){.hsh-read{transition:color .15s ease}.hsh-category-links a{transition:background-color .15s ease}}

/* Compact badges follow their image container, including tablet layouts. */
@container (max-width:160px){.hsh-badge{font-size:10px;padding:2px 3px;inset-inline-start:5px;bottom:5px;max-width:calc(100% - 10px)}}

/* Header search is anchored outside the menu and never changes its width. */
.hsh-header-inner{position:relative}
.hsh-brand{min-width:0}
.hsh-tagline{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:340px}
.hsh-search-wrap{flex:0 0 auto}
.hsh-search-toggle{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px;background:transparent;color:var(--hsh-accent);border:1px solid #e8d8d1;border-radius:50%;cursor:pointer}
.hsh-search-toggle[hidden],.hsh-search-panel[hidden]{display:none!important}
.hsh-js .hsh-search-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(380px,100%);box-sizing:border-box;padding:16px;background:var(--hsh-surface,#fff);border:1px solid #e8d8d1;border-radius:10px;box-shadow:0 8px 24px #29252622;z-index:30}
.hsh-search-panel form{display:flex;gap:8px;margin:0}
.hsh-search-panel label{flex:1;min-width:0}
.hsh-search-panel input[type=search]{width:100%;min-width:0;box-sizing:border-box}
.hsh-footer-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.hsh-clean-footer .widget_custom_html .custom-html-widget,
.hsh-clean-footer .widget_custom_html .custom-html-widget>div{background:transparent!important;color:inherit}
.hsh-clean-footer .widget_custom_html h2,.hsh-clean-footer .widget_custom_html h3{color:inherit;border-color:#ffffff40!important}
@media(max-width:1099px){.hsh-navigation{order:3}.hsh-header-inner{gap:12px}.hsh-brand{flex:1}.hsh-menu-toggle{margin-left:auto}.hsh-search-wrap{margin-left:0}}

@media(prefers-reduced-motion:no-preference){.hsh-js .hsh-search-panel:not([hidden]){animation:hsh-search-reveal .16s ease-out}@keyframes hsh-search-reveal{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}}

/* Legacy navigation blocks: match the actual text widgets, not ad containers. */
.hsh-clean-footer .widget_block>nav[aria-label="Quick links"],
.hsh-clean-footer .widget_block>nav[aria-label="Information"]{background:transparent!important;color:#fff!important}
.hsh-clean-footer .widget_block>nav[aria-label="Quick links"] h3 span,
.hsh-clean-footer .widget_block>nav[aria-label="Information"] h3 span{border-color:#ffffff55!important}
/* Legacy brand text widget used in the article sidebar. */
.hsh-sidebar .widget_block>div[style*="color:#eeeeee"],
.hsh-sidebar .widget_block>div[style*="color: #eeeeee"]{color:var(--hsh-text)!important}
.hsh-sidebar .widget_block>div[style*="color:#eeeeee"] :is(h3,p,a),
.hsh-sidebar .widget_block>div[style*="color: #eeeeee"] :is(h3,p,a){color:var(--hsh-text)!important}
.hsh-sidebar .widget_block>div[style*="color:#eeeeee"] h3 a,
.hsh-sidebar .widget_block>div[style*="color: #eeeeee"] h3 a{color:var(--hsh-accent)!important;border-color:var(--hsh-accent)!important}
.hsh-tagline{font-size:12px;line-height:1.5;margin:5px 0 0;max-width:340px}
@media(max-width:599px){.hsh-tagline{font-size:11px;max-width:100%}}

/* Scoped replacement of the existing THALP list; no ad containers are hidden. */
.hsh-native-latest .entry-content>.thalp-latest-posts{display:none}
.hsh-recommendations{display:grid;gap:18px}
.hsh-recommendations .hsh-card{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;border-bottom:1px solid var(--hsh-border);padding:0 0 18px;align-items:start}
.hsh-recommendations .hsh-card-image,.hsh-recommendations .hsh-image-placeholder{aspect-ratio:1/1;border-radius:8px}
.hsh-recommendations .hsh-card-copy{padding:0;min-width:0}
.hsh-recommendations .hsh-badge{display:none}
.hsh-recommendations .hsh-card-title{font-size:17px;line-height:1.35;margin:0 0 7px}
.hsh-recommendations .hsh-title-link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;min-height:4.05em}
.hsh-recommendations .hsh-excerpt{font-size:13px;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:3em;min-height:3em;margin:0 0 10px}
.hsh-recommendations .hsh-read{font-size:13px;margin-top:8px}
.hsh-sidebar-stories .hsh-section-title,.hsh-sidebar-categories .hsh-section-title{font-size:23px;margin-bottom:20px}
.hsh-sidebar-categories{margin:30px 0}
.hsh-sidebar-categories ul{list-style:none;padding:0;margin:0}
.hsh-sidebar-categories a{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--hsh-border);text-decoration:none;font-size:14px}
.hsh-sidebar-categories a>span:first-child{overflow-wrap:anywhere}
.hsh-category-count{background:#78263e0d;color:var(--hsh-accent);border-radius:20px;padding:1px 9px;flex:none}
.hsh-end-stories{margin-block:36px}
.hsh-end-stories .hsh-recommendations{grid-template-columns:repeat(2,minmax(0,1fr))}
.hsh-end-stories .hsh-card{display:flex;background:var(--hsh-surface);border:1px solid var(--hsh-border);border-radius:12px;padding:12px}
.hsh-end-stories .hsh-card-image,.hsh-end-stories .hsh-image-placeholder{aspect-ratio:8/5}
.hsh-end-stories .hsh-card-copy{padding:12px 0 0}
.hsh-end-stories .hsh-read{margin-top:auto;padding-top:8px}
@media(max-width:599px){.hsh-end-stories .hsh-recommendations{grid-template-columns:1fr}.hsh-end-stories .hsh-card{display:grid;grid-template-columns:100px minmax(0,1fr)}.hsh-end-stories .hsh-card-copy{padding:0}.hsh-end-stories .hsh-card-image,.hsh-end-stories .hsh-image-placeholder{aspect-ratio:1/1}}

.hsh-recommendations .hsh-card-media{width:100%}
.hsh-recommendations .hsh-card-media>a{text-decoration:none}
.hsh-sidebar-stories .hsh-card{margin-bottom:0}
.hsh-sidebar-stories .hsh-read{margin-top:0}

/* Compact reading header and naturally flowing sidebar summaries. */
.hsh-header-inner{padding-block:12px}
.hsh-story .entry-title{font-size:clamp(36px,2.65vw,38px);line-height:1.25}
.hsh-sidebar-stories .hsh-title-link{min-height:0}
.hsh-sidebar-stories .hsh-excerpt{height:auto;min-height:0}
@media(max-width:1099px){.hsh-story .entry-title{font-size:clamp(30px,3vw,32px)}}
@media(max-width:599px){.hsh-header-inner{padding-block:10px}.hsh-story .entry-title{font-size:clamp(26px,6.5vw,28px)}}

/* Align the tagline with the site name, beneath the text rather than the heart. */
.hsh-brand-text .hsh-brand-name{display:flex;align-items:center;gap:8px;line-height:1.15}
.hsh-brand-text .hsh-brand-name>span{display:inline-flex;align-items:center;justify-content:center;width:28px;flex:0 0 28px;font-size:32px;line-height:1}
.hsh-brand-text .hsh-tagline{margin:2px 0 0 36px;font-size:11px;line-height:1.4;max-width:calc(100% - 36px)}
@media(max-width:599px){.hsh-brand-text .hsh-brand-name{gap:6px}.hsh-brand-text .hsh-brand-name>span{width:24px;flex-basis:24px;font-size:27px}.hsh-brand-text .hsh-tagline{margin-left:30px;max-width:calc(100% - 30px);font-size:10px}}

/* Mobile homepage: a five-story overview, followed by the paginated archive. */
.hsh-mobile-latest,.hsh-mobile-all-label{display:none}
@media(max-width:599px){
 .hsh-mobile-latest{display:block;margin-bottom:36px}
 .hsh-mobile-all-label{display:inline}
 .hsh-desktop-latest-label{display:none}
}

/* Keep archive pagination together, without changing previous/next article links. */
.pagination .nav-links{justify-content:center;align-items:center;gap:8px}
.pagination .page-numbers{flex:0 0 auto;margin:0;text-align:center}
@media(max-width:599px){
 .pagination .nav-links{gap:6px}
 .pagination .page-numbers{padding:10px 12px}
}
