/*
Theme Name:  Roam
Description: A clean personal travel blog theme for long-form travelogues and photo galleries, with a full-width header image, centred menu bar and single-column post layout inspired by the Ashe theme.
Version:     2.0.0
License:     GPL-2.0-or-later
Text Domain: roam
Tags:        blog, photography, travel, custom-header, custom-logo, custom-menu, featured-images, threaded-comments, right-sidebar
*/

/* ─── Variables ──────────────────────────────────────────────── */
:root {
  --bg:            #ffffff;
  --surface:       #ffffff;
  --text:          #464646;
  --text-title:    #030303;
  --text-muted:    #6f6f6f;
  --text-light:    #a1a1a1;
  --accent:        #ca9b52;          /* overridden by Customizer */
  --border:        #e8e8e8;

  --font-body:     'Open Sans', Arial, sans-serif;
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-ui:       'Open Sans', Arial, sans-serif;

  --site-w:    1160px;
  --sidebar-w: 270px;
  --gutter:    70px;
  --wide-w:    100%;

  --header-h:  500px;                /* overridden by Customizer */
  --nav-h:     60px;
  --radius:    0;
  --ease:      0.2s ease;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html  { font-size: 15px; }
body  {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
img   { max-width: 100%; height: auto; display: block; }
iframe, embed, video { max-width: 100%; }
a     { color: var(--accent); text-decoration: none; transition: color var(--ease), opacity var(--ease); }
a:hover { opacity: 0.8; }
ul, ol { list-style: none; }
button { cursor: pointer; border: 0; background: none; font: inherit; color: inherit; padding: 0; }
input, textarea, select { font: inherit; outline: 0; border-radius: 0; }
table { border-collapse: collapse; border-spacing: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: normal;
  color: var(--text-title);
  clear: both;
}

.clear-fix::after, .clearfix::after { content: ''; display: table; clear: both; }
.boxed-wrapper { max-width: var(--site-w); margin: 0 auto; }

.skip-link:focus {
  position: fixed; top: 10px; left: 10px; z-index: 99999;
  width: auto; height: auto; clip: auto; overflow: visible;
  padding: 10px 16px; background: #fff; color: #000; box-shadow: 0 0 6px rgba(0,0,0,.3);
}

/* ─── 1. Header image + logo ─────────────────────────────────── */
.site-hero {
  position: relative;
  overflow: hidden;
  height: var(--header-h);
  background-color: #f3efe9;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.hero-outer { display: table; width: 100%; height: 100%; }
.hero-inner { display: table-cell; vertical-align: middle; padding: 0 30px; }

.header-logo { text-align: center; }
.header-logo .site-title { margin: 0; font-family: var(--font-heading); font-weight: 400; }
.header-logo .site-title a {
  display: block;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-size: 100px;
  line-height: 1;
  text-transform: uppercase;
  color: #111;
}
.header-logo .site-title a:hover { opacity: 1; }
.header-logo .custom-logo-link { display: inline-block; }
.header-logo .custom-logo { margin: 0 auto; width: 100%; height: auto; }
.header-logo .site-description {
  display: inline-block;
  margin-top: 15px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.1;
  color: #111;
}

/* ─── 2. Menu bar ────────────────────────────────────────────── */
#main-nav {
  position: relative;
  z-index: 1100;
  min-height: var(--nav-h);
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.nav-inner {
  position: relative;
  max-width: var(--site-w);
  margin: 0 auto;
  padding: 0 40px;
}

#main-menu, #mobile-menu { margin: 0; padding: 0; }
#main-menu li { position: relative; }
#main-menu > li { display: inline-block; list-style: none; }

#main-menu li a {
  display: block;
  position: relative;
  padding: 0 16px;
  margin-left: 5px;
  font-size: 15px;
  line-height: var(--nav-h);
  letter-spacing: 1px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
}
#main-menu li:first-child > a { margin-left: 0; }
#main-menu li a:hover,
#main-menu li.current-menu-item > a,
#main-menu li.current_page_item > a,
#main-menu li.current-menu-ancestor > a,
#main-menu li.current-page-ancestor > a { color: var(--accent); opacity: 1; }

/* Drop-down arrow */
#main-menu li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin: 0 0 3px 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
#main-menu .sub-menu li.menu-item-has-children > a::after {
  float: right; margin: 12px 0 0 0;
  transform: rotate(-45deg);
}

/* Drop-downs */
#main-menu .sub-menu {
  display: none;
  position: absolute;
  z-index: 130;
  top: 100%;
  left: 0;
  width: 200px;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
#main-menu .sub-menu .sub-menu { top: -1px; left: 100%; }
#main-menu li:hover > .sub-menu,
#main-menu li:focus-within > .sub-menu { display: block; }
#main-menu .sub-menu > li { display: block; }
#main-menu .sub-menu > li > a {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 15px;
  font-size: 13px;
  line-height: 26px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
#main-menu .sub-menu > li:last-child > a { border-bottom: 0; }

/* Search icon + overlay */
.main-nav-icons {
  position: absolute;
  top: 0; right: 40px;
  z-index: 2;
  height: var(--nav-h);
}
.nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--nav-h);
  padding: 0 4px;
  color: #000;
}
.nav-icon-btn:hover { color: var(--accent); }

.nav-search {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  align-items: center;
  background: #fff;
  padding: 0 40px;
}
#main-nav.search-open .nav-search { display: flex; }
.nav-search form { flex: 1; }
.nav-search input[type="search"] {
  width: 100%;
  padding: 0 40px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: var(--nav-h);
  color: #000;
  -webkit-appearance: none;
}
.nav-search input::placeholder { color: rgba(0, 0, 0, 0.55); }
.nav-search .nav-icon-btn { position: absolute; right: 40px; top: 0; }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  padding: 0 15px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: var(--nav-h);
  height: var(--nav-h);
  color: #000;
}
.mobile-menu-btn svg { margin-left: 6px; vertical-align: middle; transition: transform var(--ease); }
#main-nav.menu-open .mobile-menu-btn svg { transform: rotate(180deg); }
.mobile-menu-btn:hover { color: var(--accent); }

.mobile-menu-container { display: none; clear: both; padding-bottom: 15px; }
#main-nav.menu-open .mobile-menu-container { display: block; }
#mobile-menu li { position: relative; width: 100%; text-align: center; }
#mobile-menu li a {
  display: inline-block;
  position: relative;
  font-size: 15px;
  line-height: 38px;
  letter-spacing: 1px;
  font-weight: 600;
  color: #000;
}
#mobile-menu li a:hover,
#mobile-menu li.current-menu-item > a,
#mobile-menu li.current_page_item > a { color: var(--accent); opacity: 1; }
#mobile-menu .sub-menu { display: none; }
#mobile-menu li.sub-open > .sub-menu { display: block; }
#mobile-menu .sub-menu li a { font-size: 13px; line-height: 32px; letter-spacing: 0.5px; }
.sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 38px; color: #000; vertical-align: top; }
.sub-toggle svg { transition: transform var(--ease); }
li.sub-open > .sub-toggle svg { transform: rotate(180deg); }

/* ─── 3. Content layout ──────────────────────────────────────── */
.page-content { background: #fff; }
.main-content {
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
  padding: 40px;
}
.main-container { flex: 1 1 auto; min-width: 0; }

/* No sidebar → one centred column */
body:not(.has-sidebar) .main-content { justify-content: center; }
body:not(.has-sidebar) .main-container { max-width: 820px; margin: 0 auto; }

.sidebar-right { flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); }

/* ─── 4. Blog list (index / archive / search) ────────────────── */
.blog-grid { list-style: none; }
.blog-post {
  margin-bottom: 50px;
  padding-bottom: 45px;
  border-bottom: 1px solid var(--border);
}

.post-media { position: relative; margin-bottom: 18px; }
.post-media > a { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; }
.post-media img { width: 100%; }

.post-header { text-align: center; }

.post-categories a {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.post-title, .page-title {
  font-size: 40px;
  line-height: 44px;
  letter-spacing: 0.5px;
  color: var(--text-title);
}
.post-title { margin-bottom: 13px; }
.post-title a { color: var(--text-title); }
.post-title a:hover { color: rgba(3, 3, 3, 0.75); opacity: 1; }
.page-title { margin-bottom: 24px; }

.post-meta {
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--text-light);
}
.post-meta a, .post-meta time { color: var(--text-light); }
.post-meta .meta-sep { display: inline; margin: 0 4px; }

.post-excerpt {
  max-width: 560px;
  margin: 0 auto 24px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}

.post-content { overflow: hidden; }
.post-content > p { text-align: justify; margin-bottom: 15px; }
.post-content > p:last-child { margin-bottom: 0; }

.read-more { margin: 25px 0 5px; text-align: center; }
.read-more a {
  display: inline-block;
  padding: 0 25px;
  border: 1px solid var(--text-title);
  font-size: 13px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-title);
  transition: all var(--ease);
}
.read-more a:hover { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 1; }

.no-result-found { text-align: center; margin: 50px auto 100px; }
.no-result-found h3 { font-family: var(--font-body); font-size: 30px; letter-spacing: 2px; margin-bottom: 20px; }
.no-result-found p { color: var(--text-muted); margin-bottom: 25px; }

/* Pagination — Older / Newer */
.blog-pagination { position: relative; overflow: hidden; padding: 0 0 50px; }
.blog-pagination .previous-page { float: left; }
.blog-pagination .next-page { float: right; }
.blog-pagination a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-title);
}
.blog-pagination a:hover { color: var(--accent); opacity: 1; }

/* ─── 5. Archive / search heading ────────────────────────────── */
.archive-header {
  overflow: hidden;
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.archive-label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 6px;
}
.archive-title { font-size: 34px; line-height: 1.2; }
.archive-description { display: block; max-width: 700px; margin: 12px auto 0; color: var(--text-muted); }
.archive-header .search-form { margin-top: 20px; }

/* ─── 6. Single post ─────────────────────────────────────────── */
.single-post .post-media,
.page-article .post-media { margin-bottom: 25px; }

.entry-content {
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.entry-content > * + * { margin-top: 1.4rem; }
.entry-content::after { content: ''; display: table; clear: both; }

.entry-content h2 { font-size: 30px; line-height: 1.25; margin-top: 2.5rem; }
.entry-content h3 { font-size: 24px; line-height: 1.3; margin-top: 2.1rem; }
.entry-content h4 { font-size: 19px; line-height: 1.35; margin-top: 1.7rem; }

.entry-content a              { border-bottom: 1px solid transparent; }
.entry-content a:hover        { border-bottom-color: var(--accent); opacity: 1; }
.entry-content ul             { list-style: disc;    padding-left: 1.5rem; }
.entry-content ol             { list-style: decimal; padding-left: 1.5rem; }
.entry-content li + li        { margin-top: 0.35rem; }

.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 15px;
  color: var(--text-title);
}
.entry-content blockquote p {
  font-family: var(--font-heading);
  font-size: 19px;
  line-height: 30.7px;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.entry-content blockquote cite {
  display: block; font-style: normal;
  font-size: 13px; color: var(--text-light); margin-top: 0.5rem;
}

.entry-content hr   { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.entry-content code { background: #f6f3ee; padding: 0.1em 0.4em; font-size: 0.9em; }
.entry-content pre  { background: #1e1e1e; color: #eee; padding: 1.25rem 1.5rem; overflow-x: auto; font-size: 0.85em; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content table { width: 100%; font-size: 14px; }
.entry-content th, .entry-content td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; }

.entry-content figure       { margin: 2rem 0; }
.entry-content .wp-caption  { max-width: 100%; }

/* Image captions */
.entry-content figcaption,
.entry-content .wp-caption-text,
.entry-content .wp-element-caption,
.entry-content .gallery-caption {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Alignment classes */
.entry-content .alignleft   { float: left;  margin: 0.5rem 1.5rem 1rem 0; max-width: 45%; }
.entry-content .alignright  { float: right; margin: 0.5rem 0 1rem 1.5rem; max-width: 45%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content .alignwide,
.entry-content .alignfull   { max-width: 100%; margin-left: auto; margin-right: auto; }

.page-links { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }

/* ─── Gallery & Lightbox (unchanged from previous version) ────── */
/* ─── Gallery: Block Editor ──────────────────────────────────── */
/*
  Note: Images link to Media File → the lightbox JS uses link.href
  which will be the Cloudflare CDN URL after the offloader plugin runs.
*/

.entry-content .wp-block-gallery {
  max-width: 100%;
  margin-left:  auto !important;
  margin-right: auto !important;
}

.entry-content .wp-block-gallery.is-layout-flex {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
}

.entry-content .wp-block-gallery .wp-block-image {
  flex: 1 1 180px;
  margin: 0 !important;
  min-width: 0;
}

.entry-content .wp-block-gallery .wp-block-image a {
  display: block;
  border: none;
  line-height: 0;
}

.entry-content .wp-block-gallery .wp-block-image img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: opacity var(--ease);
}
.entry-content .wp-block-gallery .wp-block-image img:hover { opacity: 0.88; }

/* ─── Gallery: Classic shortcode [gallery] ───────────────────── */
/*
  Use [gallery link="file"] or set link="file" in gallery settings.
  WordPress will output the full-size URL as the href.
*/

.entry-content .gallery {
  display: grid;
  gap: 5px;
  max-width: 100%;
  margin-left:  auto !important;
  margin-right: auto !important;
  clear: both;
}
.entry-content .gallery-columns-1 { grid-template-columns: 1fr; }
.entry-content .gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.entry-content .gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.entry-content .gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.entry-content .gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.entry-content .gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.entry-content .gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.entry-content .gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.entry-content .gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }

.entry-content .gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
  margin: 0;
}
.entry-content .gallery-item a    { display: block; width: 100%; height: 100%; border: none; line-height: 0; }
.entry-content .gallery-item img  {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}
.entry-content .gallery-item:hover img { transform: scale(1.06); }

/* ─── Lightbox ───────────────────────────────────────────────── */
.lb-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lb-overlay.open { opacity: 1; visibility: visible; }

.lb-img-wrap {
  max-width: 92vw;
  max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.75rem;
  position: relative;
}

.lb-img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius);
  user-select: none;
  display: block;
}

.lb-caption {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  text-align: center;
  max-width: 600px;
  padding: 0 1rem;
}

.lb-close {
  position: fixed; top: 1rem; right: 1.25rem;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--ease);
}
.lb-close:hover { background: rgba(255,255,255,0.22); }

.lb-btn {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--ease);
  user-select: none;
}
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }

.lb-count {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-ui); font-size: 0.72rem;
  color: rgba(255,255,255,0.4); letter-spacing: 1px;
}


/* ─── 7. Post footer (tags + navigation) ─────────────────────── */
.post-footer {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.post-tags { margin-bottom: 22px; }
.post-tags-label {
  display: inline-block; margin-right: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-title);
}
.tag-pill {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 0 12px;
  font-size: 12px;
  line-height: 24px;
  color: var(--text-light);
  border: 1px solid var(--border);
}
.tag-pill:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }

/* Previous / next */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.post-nav-item a { display: block; color: inherit; }
.post-nav-item.right { text-align: right; }
.post-nav-label {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-light); margin-bottom: 4px;
}
.post-nav-title { font-family: var(--font-heading); font-size: 18px; line-height: 1.3; color: var(--text-title); }
.post-nav-item a:hover { opacity: 1; }
.post-nav-item a:hover .post-nav-title { color: var(--accent); }

/* ─── 8. Comments ────────────────────────────────────────────── */
.comments-area { margin-top: 40px; padding-bottom: 20px; }

.comments-title {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; text-align: center;
  margin-bottom: 30px;
}

.comment-list, .comment-list .children { list-style: none; display: flex; flex-direction: column; gap: 25px; }
.comment-list .children { margin-top: 25px; padding-left: 40px; }

.comment-wrap          { display: flex; gap: 15px; }
.comment-avatar        { flex-shrink: 0; }
.comment-avatar img    { border-radius: 50%; width: 40px; height: 40px; }
.comment-author-name   { font-size: 14px; font-weight: 600; color: var(--text-title); margin-right: 8px; }
.comment-time          { font-size: 12px; font-style: italic; color: var(--text-light); }
.comment-time a        { color: inherit; }
.comment-meta          { margin-bottom: 6px; }
.comment-body p        { font-size: 14px; line-height: 1.7; }
.comment-reply-link    { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; display: inline-block; margin-top: 6px; }

/* Comment form */
.comment-respond { margin-top: 45px; padding-top: 30px; border-top: 1px solid var(--border); }
.comment-reply-title {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; text-align: center; margin-bottom: 20px;
}
.comment-notes, .comment-awaiting-moderation { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }

.comment-form label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-title); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 14px; color: var(--text);
  background: #fff; transition: border-color var(--ease);
  margin-bottom: 16px;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.submit {
  display: inline-block;
  padding: 0 25px; line-height: 40px;
  background: transparent; color: var(--text-title);
  border: 1px solid var(--text-title);
  font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  transition: all var(--ease);
}
.submit:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── 9. Sidebar widgets ─────────────────────────────────────── */
.roam-widget { margin-bottom: 45px; font-size: 14px; }
.widget-title {
  position: relative;
  margin: 0 0 25px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600; line-height: 1;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-title);
}
.widget-title::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--border);
}
.widget-title span { position: relative; padding: 0 15px; background: #fff; }
.roam-widget ul li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.roam-widget ul li:last-child { border-bottom: 0; }
.roam-widget ul ul { padding-left: 15px; }
.roam-widget a { color: var(--text); }
.roam-widget a:hover { color: var(--accent); opacity: 1; }
.roam-widget img { max-width: 100%; }
.roam-widget .tagcloud a { display: inline-block; margin: 0 5px 5px 0; padding: 0 12px; font-size: 12px !important; line-height: 24px; border: 1px solid var(--border); color: var(--text-light); }

/* ─── 10. Static page / 404 ──────────────────────────────────── */
.page-article .page-title { text-align: center; margin-bottom: 30px; }
.not-found { text-align: center; padding: 40px 0 60px; }
.not-found-num   { font-family: var(--font-heading); font-size: 110px; line-height: 1; color: var(--border); }
.not-found-title { font-size: 34px; margin: 10px 0; }
.not-found-text  { color: var(--text-muted); margin-bottom: 25px; }
.not-found-back  { margin-top: 25px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }

/* ─── 11. Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.site-footer .footer-inner { padding: 25px 40px; text-align: center; }
.site-footer .copyright-info { font-size: 13px; color: var(--text-light); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); opacity: 1; }

/* ─── 12. Search form (in content) ───────────────────────────── */
.search-form   { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.search-field  {
  flex: 1; min-width: 0; padding: 0 14px; line-height: 38px;
  border: 1px solid var(--border);
  font-size: 14px; background: #fff; color: var(--text);
  transition: border-color var(--ease);
}
.search-field:focus { border-color: var(--accent); }
.search-submit {
  padding: 0 20px; line-height: 38px; background: transparent; color: var(--text-title);
  border: 1px solid var(--text-title);
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  transition: all var(--ease);
}
.search-submit:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── 13. Back to top ────────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 25px; right: 25px;
  width: 38px; height: 38px;
  background: #fff; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.1); z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(5px);
  transition: all var(--ease);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover   { border-color: var(--accent); color: var(--accent); }

/* ─── Utilities / WordPress core ─────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.sticky {}
.bypostauthor {}
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .main-content { gap: 45px; }
  :root { --sidebar-w: 240px; }
}

@media (max-width: 979px) {
  .header-logo .site-title a { font-size: 80px; }
  .header-logo .site-description { font-size: 13px; }

  .nav-inner, .nav-search { padding-left: 30px; padding-right: 30px; }
  .main-nav-icons { right: 30px; }
  .nav-search .nav-icon-btn { right: 30px; }
  .main-content { padding: 30px; flex-direction: column; align-items: stretch; gap: 20px; }
  body:not(.has-sidebar) .main-container { max-width: none; }
  .sidebar-right { flex-basis: auto; width: 100%; max-width: 480px; margin: 20px auto 0; }

  .main-menu-container { display: none; }
  .mobile-menu-btn { display: inline-block; }
}

@media (max-width: 767px) {
  .site-hero { height: min(var(--header-h), 320px); }
  .header-logo .site-title a { font-size: 52px; }
  .post-title, .page-title { font-size: 30px; line-height: 36px; }
  .archive-title { font-size: 28px; }
  .entry-content h2 { font-size: 26px; }

  .post-nav { grid-template-columns: 1fr; gap: 18px; }
  .post-nav-item.right { text-align: left; }
  .comment-form .form-row { grid-template-columns: 1fr; }
  .post-content > p { text-align: left; }
  .entry-content .alignleft, .entry-content .alignright { float: none; margin: 1rem auto; max-width: 100%; }

  .entry-content .gallery-columns-4,
  .entry-content .gallery-columns-5,
  .entry-content .gallery-columns-6 { grid-template-columns: repeat(3, 1fr); }
  .entry-content .wp-block-gallery .wp-block-image img { height: 160px; }

  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}

@media (max-width: 479px) {
  .nav-inner, .nav-search { padding-left: 20px; padding-right: 20px; }
  .main-nav-icons { right: 20px; }
  .nav-search .nav-icon-btn { right: 20px; }
  .main-content { padding: 25px 20px; }
  .site-hero { height: min(var(--header-h), 260px); }
  .header-logo .site-title a { font-size: 38px; }
  .nav-search input[type="search"] { padding: 0 36px; font-size: 14px; }

  .entry-content .gallery-columns-3,
  .entry-content .gallery-columns-4,
  .entry-content .gallery-columns-5,
  .entry-content .gallery-columns-6 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
  .site-hero, #main-nav, .site-footer, .post-nav, .sidebar-right,
  .comments-area, .back-to-top { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .main-content { display: block; padding: 0; }
}
