/* Theme layout. Content and plugin classes stay compatible. */
:root {
    --font-body: Georgia, serif;
    --font-h1: Georgia, serif;
    --font-headings: Georgia, serif;
    --font-nav: Georgia, serif;
    --site-width: 1600px;
    --header-width: 1920px;
    --sidebar-width: 260px;
    --body-size: 18px;
    --h1-size: 48px;
    --h2-size: 24px;
    --h3-size: 22px;
    --h4-size: 22px;
    --h5-size: 18px;
    --h6-size: 18px;
    --h1-align: center;
    --button-radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); font-size: var(--body-size); line-height: 1.7; }
[hidden] { display: none !important; }
#main { min-height: 100vh; font-size: var(--body-size); background-color: var(--bg); }
a { color: var(--accent); }
a:hover, .entry-content a:hover, .widget-content a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 10010; padding: 10px 20px; background: var(--bg); }
.skip-link:focus { top: 12px; }
.container { flex: 1; width: 100%; border-bottom: 1px solid var(--border); }
.container-inner { width: 100%; max-width: var(--site-width); margin-inline: auto; padding: 20px clamp(12px, 2vw, 32px); }
.layout { display: flex; align-items: stretch; gap: clamp(16px, 2vw, 32px); }
.content { flex: 1 1 0; min-width: 0; order: 2; }
.post { padding: 5px; display: flex; flex-direction: column; }
.section { width: 100%; }
.section-inner { max-width: var(--site-width); margin-inline: auto; }
.entry-content, .widget-content { font-family: var(--font-body); color: var(--text); font-size: inherit; }
.entry-content { font-size: var(--body-size); line-height: 1.7; }
.entry-heading, .entry-content :is(h1,h2,h3,h4,h5,h6), .widget-content :is(h1,h2,h3,h4,h5,h6), .widget-title { font-family: var(--font-headings); color: var(--heading-1); font-weight: 400; }
h1.entry-heading, .entry-content h1, .widget-content h1 { font-family: var(--font-h1); font-size: clamp(28px, 5vw, var(--h1-size)); text-align: var(--h1-align); text-transform: none; letter-spacing: normal; }
h2.entry-heading { font-size: var(--h2-size); }
.entry-heading a { color: inherit; text-decoration: none; }
.entry-content h5, .widget-content h5 { color: var(--dog); }
.entry-content h6, .widget-content h6 { color: var(--bitch); }
.site-header { position: relative; width: 100%; }
.header { position: relative; width: 100%; max-width: var(--header-width); margin: 0 auto; text-align: center; }
.header-widgets { width: 100%; }
.header-widgets .widget { margin: 0; }
.header-widgets .widget-title { display: none; }
.header-widgets img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px clamp(12px, 2vw, 32px); color: var(--nav-text); background: var(--nav-bg); z-index: 200; }
.nav-overlay .nav { position: absolute; top: 0; left: 0; background: transparent; }
.nav.is-stuck { position: fixed; top: 0; left: 0; right: 0; background: var(--nav-bg); box-shadow: 0 2px 12px #0002; }
.admin-bar .nav.is-stuck { top: 32px; }
.menu-panel { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav .menu { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nav .menu li { position: relative; margin: 0; padding: 0; }
.nav .menu li::before { content: none; }
.nav .menu a { display: block; padding: 5px 12px; font: 400 18px/1.5 var(--font-nav); text-transform: uppercase; text-decoration: none; color: var(--nav-text); }
.nav .menu a:hover, .nav .current-menu-item > a { color: var(--accent-hover); }
.nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px; margin: 0; list-style: none; background: var(--nav-bg); box-shadow: 0 8px 20px #0002; z-index: 2; }
.nav .sub-menu .sub-menu { top: 0; left: auto; right: 100%; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu, .nav li.open > .sub-menu { display: block; }
.nav .menu > li:last-child > .sub-menu { left: auto; right: 0; }
.nav-before { margin-right: auto; }
.nav-after { margin-left: auto; }
.sidebar { flex: 0 0 var(--sidebar-width); width: var(--sidebar-width); min-width: 0; align-self: stretch; background: var(--sidebar-bg); color: var(--sidebar-text); padding: 0 16px; }
.sidebar-left { order: 1; border-right: 1px solid var(--border); }
.sidebar-right { order: 3; border-left: 1px solid var(--border); }
.sidebar .widget-content, .sidebar .widget-content li { color: var(--sidebar-text); }
.block { margin-top: 10px; }
.widget-title { margin: 0 0 10px; padding: 0; font-size: 20px; }
.sidebar .widget { border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 15px; }
.sidebar .widget:last-child { border-bottom: 0; }
.sidebar :is(ul.menu, ul.sub-menu) { padding: 0; margin: 0; list-style: none; }
.sidebar ul.menu li { position: relative; padding: 0; margin: 0; }
.sidebar ul.menu li::before { content: none; }
.sidebar ul.menu a { display: inline-block; max-width: 100%; padding: 5px 0; color: var(--accent); text-decoration: none; font-family: var(--font-nav); }
.sidebar ul.menu a:hover { color: var(--accent-hover); }
.sidebar ul.menu > li > a::before { content: ''; display: inline-block; width: 20px; height: 20px; margin-right: 8px; vertical-align: -3px; background: currentColor; mask: url('images/paw.svg') center / contain no-repeat; -webkit-mask: url('images/paw.svg') center / contain no-repeat; }
.sidebar ul.menu .sub-menu { padding-left: 16px; }
.sidebar ul.sub-menu ul.sub-menu { display: none; }
.sidebar li.open > ul.sub-menu { display: block; }
.submenu-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 2px; margin-left: 4px; border: 1px solid var(--border); border-radius: 3px; font: inherit; color: inherit; background: transparent; cursor: pointer; }
.nav .submenu-toggle { color: var(--nav-text); }
.nav .menu-item-has-children > a { display: inline-block; }
.menu-toggle, .sidebar-toggle, .panel-close { display: none; }
.footer { width: 100%; margin-top: auto; background: var(--footer-bg); color: var(--footer); text-align: center; padding: 24px clamp(12px, 2vw, 32px); font-size: 15px; }
.footer-image { display: block; max-width: min(100%, var(--site-width)); height: auto; margin: 0 auto 16px; }
.footer-widgets { display: flex; flex-wrap: wrap; gap: 24px; max-width: var(--site-width); margin: 0 auto 24px; text-align: left; }
.footer-column { flex: 1 1 220px; min-width: 0; }
.footer a, .footer .widget-content a { color: var(--footer-link); }
.footer .widget-content { color: var(--footer); }
.footer-copy { max-width: var(--site-width); margin: 0 auto; }
.footer-copy a:hover { text-decoration: underline; }
.button, a.button, button.button, input.button, .wp-block-button__link { color: var(--button-text); background: var(--button-bg); border-radius: var(--button-radius); border: 1px solid var(--button-bg); }
.button:hover, a.button:hover, .wp-block-button__link:hover { color: var(--button-text); background: var(--button-hover); border-color: var(--button-hover); }
.hero-scroll, .scroll-top { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid currentColor; border-radius: 50%; color: var(--button-text); background: var(--button-bg); font-family: var(--font-body); font-size: 25px; font-weight: 400; line-height: 1; text-decoration: none; cursor: pointer; }
.hero-scroll:visited { color: var(--button-text); }
.hero-scroll:hover, .hero-scroll:focus-visible, .scroll-top:hover, .scroll-top:focus-visible { color: var(--button-text); background: var(--button-hover); }
.scroll-top { position: fixed; right: 20px; bottom: 20px; z-index: 190; }
.scroll-top img { display: block; width: 32px; height: 32px; object-fit: contain; }
.hero { height: 100svh; min-height: 440px; overflow: hidden; }
.hero .header-widgets, .hero .widget, .hero .widget-content, .hero figure { height: 100%; margin: 0; padding: 0; }
.hero .header-widgets { display: flex; flex-direction: column; }
.hero .widget { flex: 1; min-height: 0; }
.hero .widget-content img { width: 100%; height: 100%; object-fit: cover; }
.hero-scroll { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); }
.home-image .container-inner { max-width: none; padding: 0; }
.home-image .content > .post { padding: 0; }
.home-image .content > .post > .entry-heading { display: none; }
.home-image .entry-content > :first-child { margin-top: 0; }
.home-image .entry-content > :last-child { margin-bottom: 0; }
#content { scroll-margin-top: 80px; }
.panel-overlay { position: fixed; inset: 0; z-index: 900; border: 0; padding: 0; background: #0007; cursor: pointer; }
body.panel-open { overflow: hidden; }
@media (max-width: 1100px) and (min-width: 1025px) {
    .sidebars-both .layout { gap: 14px; }
    .sidebars-both .sidebar { flex-basis: 190px; width: 190px; padding: 0 10px; }
}
@media (max-width: 1024px) {
    .layout { display: block; }
    .sidebar { position: fixed; top: 0; bottom: 0; z-index: 1000; width: min(360px, 88vw); max-width: none; padding: 56px 20px 24px; overflow-y: auto; overscroll-behavior: contain; transition: transform .2s; visibility: hidden; }
    .sidebar-left { left: 0; transform: translateX(-100%); }
    .sidebar-right { right: 0; transform: translateX(100%); }
    .sidebar.is-open { visibility: visible; transform: translateX(0); }
    .sidebar-toggle { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .sidebar-toggle-right { margin-left: auto; }
    .sidebar .panel-close { display: block; }
    .sidebar-toggle, .menu-toggle { min-height: 42px; padding: 7px 12px; width: auto; height: auto; border: 1px solid var(--nav-text); border-radius: var(--button-radius); background: var(--nav-bg); color: var(--nav-text); cursor: pointer; font: 16px/1.4 var(--font-nav); }
    .panel-close { position: absolute; top: 8px; right: 12px; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; }
    .admin-bar .sidebar { top: 32px; }
}
@media (max-width: 782px) {
    .admin-bar .nav.is-stuck, .admin-bar .sidebar { top: 46px; }
}
@media (max-width: 768px) {
    .nav { flex-wrap: wrap; gap: 8px; }
    .menu-toggle { display: inline-flex; align-items: center; margin-left: auto; }
    .menu-from-left:not(.menu-from-right) .menu-toggle { margin-left: 0; margin-right: auto; }
    .menu-panel { display: block; position: fixed; top: 0; bottom: 0; z-index: 1000; width: min(768px, 92vw); padding: 60px 20px 24px; background: var(--nav-bg); overflow-y: auto; overscroll-behavior: contain; transition: transform .2s; visibility: hidden; }
    .menu-from-right .menu-panel { left: auto; right: 0; transform: translateX(100%); }
    .menu-from-left:not(.menu-from-right) .menu-panel { left: 0; right: auto; transform: translateX(-100%); }
    .menu-panel.is-open { visibility: visible; transform: translateX(0); }
    .menu-panel .panel-close { display: block; }
    .admin-bar .menu-panel { top: 46px; }
    .nav .menu { display: block; }
    .nav .menu a { padding: 8px 0; }
    .nav .sub-menu, .nav .sub-menu .sub-menu, .nav .menu > li:last-child > .sub-menu { position: static; min-width: 0; padding: 0 0 0 18px; box-shadow: none; }
    .nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: none; }
    .nav li.open > .sub-menu { display: block; }
    .footer-widgets { flex-direction: column; }
    .footer-column { flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.widget-row { display: flex; flex-wrap: wrap; gap: 20px; }
.widget-column { flex: 1 1 240px; min-width: 0; }
.button, .wp-block-button__link { display: inline-block; padding: 8px 20px; text-decoration: none; cursor: pointer; font: inherit; }
.fpc-button, .fpc-button:visited { background: var(--button-bg); color: var(--button-text); border-radius: var(--button-radius); border-color: var(--button-bg); }
.fpc-button:hover { background: var(--button-hover); color: var(--button-text); border-color: var(--button-hover); }
.header { z-index: 0; }
body.menu-open .site-header { z-index: 1001; }
@media (max-width: 768px) {
    .menu-from-left:not(.menu-from-right) .menu-panel.is-open { transform: translateX(0); }
}
/* Core's Image widget adds inline height:auto; fullscreen must override it. */
.hero .widget-content img { height: 100% !important; width: 100%; object-fit: cover; }
.hero .widget-content > a { display: block; height: 100%; }

/* Keep button labels readable in every link state, including visited links. */
a:is(.button, .fpc-button, .wp-block-button__link):is(:link, :visited) {
    color: var(--button-text);
    background: var(--button-bg);
    border-color: var(--button-bg);
}
a:is(.button, .fpc-button, .wp-block-button__link):is(:hover, :focus-visible, :active) {
    color: var(--button-text);
    background: var(--button-hover);
    border-color: var(--button-hover);
}

/* Independent heading sizes from the Customizer. */
h2, h2.entry-heading, h2.widget-title, .entry-content h2, .widget-content h2 { font-size: var(--h2-size); }
h3, h3.entry-heading, h3.widget-title, .entry-content h3, .widget-content h3 { font-size: var(--h3-size); }
h4, h4.entry-heading, h4.widget-title, .entry-content h4, .widget-content h4 { font-size: var(--h4-size); }
h5, h5.entry-heading, h5.widget-title, .entry-content h5, .widget-content h5 { font-size: var(--h5-size); }
h6, h6.entry-heading, h6.widget-title, .entry-content h6, .widget-content h6 { font-size: var(--h6-size); }

/* Dedicated fullscreen photograph; regular header widgets stay independent. */
.hero > .hero-image { display: block; width: 100%; height: 100% !important; max-width: none; object-fit: cover; object-position: center; }

/* Fullscreen photo sizing and optional navigation in its own row. */
.hero { position: relative; }
.hero > .hero-image,
.hero .widget-content img {
    width: var(--hero-scale, 100%);
    height: var(--hero-scale, 100%) !important;
    object-fit: var(--hero-fit, cover);
    object-position: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
.home-fullscreen:not(.nav-overlay) .hero {
    height: calc(100svh - var(--hero-nav-height, 0px));
}
.hero-scroll { --arrow-bg: var(--scroll-down-bg); --arrow-text: var(--scroll-down-text); --arrow-border: var(--scroll-down-border); --arrow-width: var(--scroll-down-border-width); --arrow-hover-bg: var(--scroll-down-hover-bg); --arrow-hover-text: var(--scroll-down-hover-text); --arrow-hover-border: var(--scroll-down-hover-border); }
.scroll-top { --arrow-bg: var(--scroll-up-bg); --arrow-text: var(--scroll-up-text); --arrow-border: var(--scroll-up-border); --arrow-width: var(--scroll-up-border-width); --arrow-hover-bg: var(--scroll-up-hover-bg); --arrow-hover-text: var(--scroll-up-hover-text); --arrow-hover-border: var(--scroll-up-hover-border); }
a.hero-scroll:is(:link, :visited), button.scroll-top {
    background: var(--arrow-bg, #8b2d2f); color: var(--arrow-text, #fff);
    border: var(--arrow-width, 1px) solid var(--arrow-border, #fff);
}
a.hero-scroll:is(:hover, :focus-visible), button.scroll-top:is(:hover, :focus-visible) {
    background: var(--arrow-hover-bg, #591e20); color: var(--arrow-hover-text, #fff); border-color: var(--arrow-hover-border, #fff);
}

/* Flex Post buttons follow the Customizer body typography explicitly. */
.fpc-button, a.fpc-button {
    font-family: var(--font-body);
    font-size: var(--body-size);
}

/* Visibility only: stored widget titles stay intact. */
.sidebar-titles-hidden .sidebar .widget-title { display: none; }

/* Spread the navigation widget and menu across the full navigation row. */
@media (min-width: 769px) {
    .nav > .menu-panel { flex: 1; min-width: 0; }
    .nav > .menu-panel > .menu { margin-left: auto; }
}

/* Optional footer artwork overlap, with an equal safe area below the content. */
.footer-image-overlap { --footer-overlap-target: var(--footer-overlap-desktop, 120px); --footer-overlap-effective: min(var(--footer-overlap-target), var(--footer-image-height, 0px)); }
.footer-image-overlap .container { border-bottom: 0; padding-bottom: var(--footer-overlap-effective); }
.footer-image-overlap .footer { padding-top: 0; display: flow-root; }
.footer-image-overlap .footer > .footer-image { position: relative; top: calc(-1 * var(--footer-overlap-effective)); margin-bottom: calc(16px - var(--footer-overlap-effective)); }
@media (max-width: 768px) {
    .footer-image-overlap { --footer-overlap-target: var(--footer-overlap-mobile, 40px); }
}
