/*
Theme Name: Strefa Dobrostanu
Theme URI: https://strefa-dobrostanu.pl
Author: Strefa Dobrostanu
Author URI: https://strefa-dobrostanu.pl
Description: Elegancki motyw WordPress dla bloga o dobrostanie, snie, mindfulness i zdrowych nawykach. Zaprojektowany zgodnie z makietą wizualna strony glownej.
Version: 1.2.2
Requires at least: 6.0
Tested up to: 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: strefa-dobrostanu
Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  --sage: #3E6B52;
  --sage-dark: #2E5339;
  --sage-light: #E9F0E6;
  --terracotta: #C97B4A;
  --terracotta-light: #F6E3D2;
  --cream: #FBF8F2;
  --ink: #26301F;
  --gray: #6B7364;
  --border: #E4E0D4;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Georgia, serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
}

/* Main content pushes footer to the bottom */
.site-content,
.front-page-content,
.single-content,
.error-404 {
  flex: 1;
}

/* Top spacing on non-front-page content */
.site-content .wrap:first-child,
.site-content > .wrap {
  padding-top: 48px;
  padding-bottom: 48px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ==========================================================================
   Layout
   ========================================================================== */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--sage-dark);
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sage-dark);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage) 0%, var(--terracotta) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.custom-logo-wrap {
  display: flex;
  align-items: center;
  line-height: 0;
}

.custom-logo-wrap .custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo-wrap img.custom-logo {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Fallback for older WP versions without .custom-logo-wrap */
.custom-logo {
  height: auto;
  max-width: 100%;
}

/* Main Navigation */
.main-navigation {
  position: relative;
}

.main-navigation > ul {
  list-style: none;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}

.main-navigation > ul > li {
  position: relative;
}

.main-navigation a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--sage);
}

/* Submenu (dropdown) */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(46, 83, 57, 0.1);
  padding: 8px 0;
  z-index: 60;
  list-style: none;
  flex-direction: column;
  gap: 0;
}

.main-navigation > ul > li:hover > ul {
  display: flex;
}

.main-navigation ul ul li {
  width: 100%;
}

.main-navigation ul ul a {
  display: block;
  padding: 8px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.main-navigation ul ul a:hover {
  background: var(--sage-light);
  color: var(--sage-dark);
}

/* Dropdown arrow indicator */
.main-navigation > ul > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--gray);
  transition: transform 0.2s;
}

.main-navigation > ul > li:hover > a::after {
  transform: rotate(180deg);
  border-top-color: var(--sage);
}

/* Submenu toggle button (only visible on mobile) */
.submenu-toggle {
  display: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 22px;
  color: var(--sage-dark);
}

/* Search */
.search-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--sage-dark);
  cursor: pointer;
  border: none;
}

.search-ico:hover {
  background: var(--sage);
  color: #fff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: linear-gradient(180deg, var(--sage-light) 0%, var(--cream) 100%);
  padding: 70px 0 60px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 14px;
  font-family: -apple-system, sans-serif;
}

.hero h1 {
  font-family: Georgia, serif;
  font-size: 44px;
  color: var(--sage-dark);
  max-width: 720px;
  margin: 0 auto 18px;
  line-height: 1.2;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--gray);
  font-size: 17px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  background: var(--sage-dark);
  color: #fff;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14.5px;
  font-family: -apple-system, sans-serif;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--sage);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--sage-dark);
  color: var(--sage-dark);
}

.btn-outline:hover {
  background: var(--sage-dark);
  color: #fff;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head .eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  font-family: -apple-system, sans-serif;
  margin-bottom: 8px;
}

.section-head h2 {
  font-family: Georgia, serif;
  font-size: 30px;
  color: var(--sage-dark);
}

/* ==========================================================================
   Category Cards
   ========================================================================== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cat-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 18px;
  text-align: center;
  transition: 0.15s;
  color: var(--ink);
  text-decoration: none;
}

a.cat-card:hover,
a.cat-card:focus {
  border-color: var(--sage);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 83, 57, 0.08);
  color: var(--ink);
  text-decoration: none;
}

.cat-ico {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}

.cat-card h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

a.cat-card:hover h3 {
  color: var(--sage);
}

.cat-card p {
  font-size: 12.5px;
  color: var(--gray);
}

/* ==========================================================================
   Article Cards
   ========================================================================== */
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.art-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.art-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(46, 83, 57, 0.1);
}

.art-img {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--sage) 0%, #7BA88C 100%);
}

.art-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-body {
  padding: 20px;
}

.art-cat {
  display: inline-block;
  background: var(--terracotta-light);
  color: var(--terracotta);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  font-family: -apple-system, sans-serif;
}

.art-cat a {
  color: var(--terracotta);
}

.art-body h3 {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.art-body h3 a {
  color: var(--ink);
}

.art-body h3 a:hover {
  color: var(--sage);
}

.art-body p {
  font-size: 13.5px;
  color: var(--gray);
  margin-bottom: 14px;
}

.art-meta {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  justify-content: space-between;
  font-family: -apple-system, sans-serif;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ==========================================================================
   Affiliate Strip
   ========================================================================== */
.affiliate-strip {
  background: var(--terracotta-light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  text-align: center;
  font-size: 12.5px;
  color: #7A4C28;
  font-family: -apple-system, sans-serif;
}

.affiliate-strip strong {
  color: var(--terracotta);
}

/* ==========================================================================
   Trust Section
   ========================================================================== */
.trust {
  background: var(--sage-dark);
  color: #fff;
}

.trust .section-head h2 {
  color: #fff;
}

.trust .section-head .eyebrow {
  color: #E8C8A8;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-card {
  text-align: center;
  padding: 10px 14px;
}

.trust-card .ico {
  font-size: 30px;
  margin-bottom: 14px;
}

.trust-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-family: Georgia, serif;
}

.trust-card p {
  font-size: 13.5px;
  color: #CFE0D5;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 44px 0 26px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.foot-logo {
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--sage-dark);
  margin-bottom: 10px;
}

footer p.desc,
.site-footer p.desc {
  font-size: 13px;
  color: var(--gray);
  max-width: 260px;
}

footer h4,
.site-footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-dark);
  margin-bottom: 14px;
  font-family: -apple-system, sans-serif;
}

footer ul,
.site-footer ul {
  list-style: none;
}

footer li,
.site-footer li {
  margin-bottom: 9px;
  font-size: 13.5px;
  color: var(--gray);
}

footer li a:hover,
.site-footer li a:hover {
  color: var(--sage);
}

.foot-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--gray);
  font-family: -apple-system, sans-serif;
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */
.single-header {
  background: linear-gradient(180deg, var(--sage-light) 0%, var(--cream) 100%);
  padding: 50px 0 40px;
  text-align: center;
}

.single-header .art-cat {
  margin-bottom: 16px;
}

.single-header h1 {
  font-family: Georgia, serif;
  font-size: 36px;
  color: var(--sage-dark);
  max-width: 720px;
  margin: 0 auto 14px;
  line-height: 1.25;
}

.single-meta {
  font-size: 13px;
  color: var(--gray);
  font-family: -apple-system, sans-serif;
}

.single-content {
  padding: 48px 0;
}

.single-content .wrap {
  max-width: 760px;
}

.single-content .entry-content {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

.single-content .entry-content p {
  margin-bottom: 20px;
}

.single-content .entry-content h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  color: var(--sage-dark);
  margin: 36px 0 16px;
}

.single-content .entry-content h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--sage-dark);
  margin: 28px 0 12px;
}

.single-content .entry-content ul,
.single-content .entry-content ol {
  margin: 0 0 20px 24px;
}

.single-content .entry-content li {
  margin-bottom: 8px;
}

.single-content .entry-content blockquote {
  border-left: 4px solid var(--sage);
  background: var(--sage-light);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--sage-dark);
}

.single-content .entry-content a {
  color: var(--sage);
  border-bottom: 1px solid var(--sage-light);
}

.single-content .entry-content a:hover {
  border-bottom-color: var(--sage);
}

/* Affiliate disclosure in posts */
.affiliate-note {
  background: var(--terracotta-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 13px;
  color: #7A4C28;
}

.affiliate-note strong {
  color: var(--terracotta);
}

/* Post navigation */
.post-navigation {
  border-top: 1px solid var(--border);
  padding-top: 30px;
  margin-top: 40px;
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.post-navigation .nav-link {
  flex: 1;
}

.post-navigation .nav-link-next {
  text-align: right;
}

.post-navigation .nav-link-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 6px;
  font-family: -apple-system, sans-serif;
}

.post-navigation .nav-link-title {
  font-family: Georgia, serif;
  font-size: 16px;
  color: var(--sage-dark);
}

.post-navigation .nav-link-title:hover {
  color: var(--sage);
}

/* ==========================================================================
   Archive / Search Results
   ========================================================================== */
.archive-header {
  background: linear-gradient(180deg, var(--sage-light) 0%, var(--cream) 100%);
  padding: 60px 0 50px;
  text-align: center;
  margin-bottom: 10px;
}

.archive-header .eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  font-family: -apple-system, sans-serif;
  margin-bottom: 8px;
}

.archive-header h1 {
  font-family: Georgia, serif;
  font-size: 34px;
  color: var(--sage-dark);
}

.archive-header p {
  color: var(--gray);
  margin-top: 8px;
  font-size: 16px;
}

.archive-grid {
  padding: 40px 0 56px;
}

/* Blog page header (index.php) */
.blog-header {
  background: linear-gradient(180deg, var(--sage-light) 0%, var(--cream) 100%);
  padding: 60px 0 50px;
  text-align: center;
  margin-bottom: 10px;
}

.blog-header .eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  font-family: -apple-system, sans-serif;
  margin-bottom: 8px;
}

.blog-header h1 {
  font-family: Georgia, serif;
  font-size: 34px;
  color: var(--sage-dark);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  text-align: center;
  padding: 30px 0;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: -apple-system, sans-serif;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  transition: 0.15s;
}

.pagination a:hover {
  border-color: var(--sage);
  color: var(--sage);
}

.pagination .current {
  background: var(--sage-dark);
  color: #fff;
  border-color: var(--sage-dark);
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.error-404 {
  text-align: center;
  padding: 80px 0;
}

.error-404 h1 {
  font-family: Georgia, serif;
  font-size: 72px;
  color: var(--sage-dark);
  margin-bottom: 12px;
}

.error-404 p {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 30px;
}

/* ==========================================================================
   Search Form
   ========================================================================== */
.search-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0;
}

.search-form .search-field {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 30px 0 0 30px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  border-right: none;
}

.search-form .search-field:focus {
  border-color: var(--sage);
}

.search-form .search-submit {
  padding: 14px 24px;
  background: var(--sage-dark);
  color: #fff;
  border: none;
  border-radius: 0 30px 30px 0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: -apple-system, sans-serif;
}

.search-form .search-submit:hover {
  background: var(--sage);
}

/* ==========================================================================
   Sidebar (if used)
   ========================================================================== */
.sidebar-widgets {
  padding: 40px 0;
}

.sidebar-widgets .widget {
  margin-bottom: 30px;
}

.sidebar-widgets .widget-title {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--sage-dark);
  margin-bottom: 14px;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.comments-area .comments-title {
  font-family: Georgia, serif;
  font-size: 24px;
  color: var(--sage-dark);
  margin-bottom: 24px;
}

.comment-list {
  list-style: none;
}

.comment-list .comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment-list .comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comment-list .comment-author {
  font-weight: 700;
  color: var(--ink);
}

.comment-list .comment-date {
  font-size: 12px;
  color: var(--gray);
}

.comment-list .comment-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.comment-respond {
  margin-top: 30px;
}

.comment-respond h3 {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--sage-dark);
  margin-bottom: 16px;
}

.comment-respond .comment-form textarea,
.comment-respond .comment-form input[type="text"],
.comment-respond .comment-form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  background: #fff;
}

.comment-respond .comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .art-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Mobile menu */
  .main-navigation > ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    gap: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 60;
  }

  .main-navigation.toggled > ul {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation > ul > li {
    border-bottom: 1px solid var(--border);
  }

  .main-navigation > ul > li:last-child {
    border-bottom: none;
  }

  .main-navigation > ul > li > a {
    display: block;
    padding: 12px 28px;
    font-size: 15px;
  }

  /* Submenu — accordion style on mobile */
  .main-navigation ul ul {
    position: static;
    transform: none;
    min-width: 0;
    background: var(--sage-light);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0 20px;
    display: none;
    max-height: 0;
    overflow: hidden;
  }

  .main-navigation > ul > li.submenu-open > ul {
    display: flex;
    max-height: 600px;
  }

  .main-navigation ul ul a {
    padding: 10px 20px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(62, 107, 82, 0.1);
  }

  /* Mobile dropdown toggle button */
  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 28px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
  }

  .submenu-toggle .arrow {
    font-size: 11px;
    color: var(--gray);
    transition: transform 0.2s;
  }

  .submenu-toggle.open .arrow {
    transform: rotate(180deg);
  }

  .hero h1 {
    font-size: 32px;
  }

  .single-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .section {
    padding: 40px 0;
  }

  .post-navigation .nav-links {
    flex-direction: column;
  }

  .post-navigation .nav-link-next {
    text-align: left;
  }

  .foot-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   WordPress Core Alignment
   ========================================================================== */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 13px;
  color: var(--gray);
  text-align: center;
  padding: 8px 0;
}

.alignwide {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================================================
   Search Modal
   ========================================================================== */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-modal.is-active {
  display: flex;
}

.search-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(38, 48, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: sdFadeIn 0.2s ease;
}

.search-modal-content {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(38, 48, 31, 0.2);
  animation: sdSlideDown 0.25s ease;
  max-height: 75vh;
  overflow-y: auto;
}

.search-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}

.search-modal-close:hover {
  background: var(--sage);
  color: #fff;
}

.search-modal-inner {
  padding: 36px 32px 28px;
}

.search-modal-title {
  font-family: Georgia, serif;
  font-size: 24px;
  color: var(--sage-dark);
  margin-bottom: 20px;
}

.search-modal-form {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}

.search-modal-field {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 30px 0 0 30px;
  font-size: 16px;
  font-family: inherit;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  border-right: none;
  transition: border-color 0.15s;
}

.search-modal-field:focus {
  border-color: var(--sage);
}

.search-modal-submit {
  padding: 14px 28px;
  background: var(--sage-dark);
  color: #fff;
  border: 2px solid var(--sage-dark);
  border-radius: 0 30px 30px 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: -apple-system, sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
}

.search-modal-submit:hover {
  background: var(--sage);
  border-color: var(--sage);
}

/* Live search results */
.search-modal-results {
  margin-top: 8px;
}

.search-modal-results .search-result-item {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  border-radius: 8px;
}

.search-modal-results .search-result-item:hover {
  background: var(--sage-light);
}

.search-modal-results .search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-family: Georgia, serif;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.3;
}

.search-result-excerpt {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.45;
}

.search-result-excerpt mark {
  background: var(--terracotta-light);
  color: var(--terracotta);
  padding: 0 2px;
  border-radius: 2px;
}

.search-result-meta {
  font-size: 11.5px;
  color: var(--gray);
  margin-top: 4px;
  font-family: -apple-system, sans-serif;
}

.search-no-results {
  padding: 24px 16px;
  text-align: center;
  color: var(--gray);
  font-size: 15px;
}

.search-loading {
  padding: 20px 16px;
  text-align: center;
  color: var(--gray);
  font-size: 14px;
}

.search-loading::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: sdSpin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* Keyboard hint */
.search-modal-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray);
  font-family: -apple-system, sans-serif;
  text-align: center;
}

.search-modal-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--cream);
  font-size: 11px;
  font-family: inherit;
  color: var(--ink);
}

@keyframes sdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes sdSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sdSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .search-modal {
    padding-top: 8vh;
  }
  .search-modal-inner {
    padding: 28px 20px 20px;
  }
  .search-modal-title {
    font-size: 20px;
  }
}
