/* ==========================================================================
   Heliolisk — blog, sidebar & utility styles
   Everything outside the one-page front page: page banner, post cards,
   sidebars / widgets, search, single post, comments, 404.
   Builds on the tokens defined at the top of style.css.
   ========================================================================== */

/* ============ ACCESSIBILITY UTILITIES ============ */
.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; word-wrap:normal !important;
}
.skip-link:focus{
  clip:auto; clip-path:none; width:auto; height:auto; margin:0; z-index:200;
  top:12px; left:12px; padding:12px 18px; background:var(--red); color:#fff;
  border-radius:var(--r); font-size:.8rem; text-transform:uppercase; letter-spacing:.08em;
}

/* ============ SHARED PIECES ============ */
.hl-icon{ width:1em; height:1em; flex-shrink:0; }
.section-subhead{
  font-family:'Barlow Condensed',sans-serif; font-weight:600; text-transform:uppercase;
  letter-spacing:.12em; font-size:.95rem; color:var(--text);
  padding-bottom:12px; margin-bottom:24px; border-bottom:1px solid var(--border);
}
.post-kicker,
.page-banner-kicker{
  display:inline-flex; align-items:center; gap:9px;
  font-family:'Barlow Condensed',sans-serif; font-weight:600; text-transform:uppercase;
  letter-spacing:.12em; font-size:.8rem; color:var(--red-bright); text-decoration:none;
}
.post-kicker .bar,
.page-banner-kicker .bar,
.search-overlay-kicker .bar{ width:20px; height:2px; background:var(--red); flex-shrink:0; }
a.post-kicker:hover{ color:var(--text); }
.post-badge{
  font-family:'Barlow Condensed',sans-serif; font-size:.68rem; font-weight:600; text-transform:uppercase;
  letter-spacing:.1em; color:var(--red-bright); border:1px solid rgba(139,92,246,.45);
  padding:3px 10px; border-radius:999px;
}

/* ============ PAGE BANNER + BREADCRUMB ============ */
.page-banner{
  position:relative; overflow:hidden; padding-block:88px 56px;
  background:linear-gradient(160deg, #0a0d1c 0%, #12152e 55%, #0a0d1c 100%);
  border-bottom:1px solid rgba(139,92,246,.18);
}
.page-banner::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(circle at 85% 0%, rgba(139,92,246,.22), transparent 50%);
}
.page-banner .container{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; text-align:center; }
.page-banner-title{
  font-size:clamp(2rem,4.6vw,3.4rem); text-transform:uppercase; font-weight:700;
  color:var(--text); max-width:22ch; margin:16px 0 0;
}
.page-banner-desc{ max-width:62ch; margin-top:16px; color:#9aa3c7; }
.heliolisk-breadcrumb ol{ justify-content:center; }
.page-banner-desc p:last-child{ margin-bottom:0; }
.page-banner--compact{ padding-block:26px; }
.page-banner--compact .heliolisk-breadcrumb{ margin-top:0; }
/* Single posts: the banner is the post header, so it keeps the article's scale and alignment. */
.page-banner--single{ padding-block:64px 40px; }
.page-banner--single .container{ align-items:flex-start; text-align:left; }
.page-banner--single .page-banner-title{ font-size:clamp(1.9rem,4vw,3rem); max-width:24ch; }
.page-banner--single .heliolisk-breadcrumb{ margin-top:22px; }
.page-banner--single .heliolisk-breadcrumb ol{ justify-content:flex-start; }

.heliolisk-breadcrumb{ margin-top:28px; }
.heliolisk-breadcrumb ol{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px 0;
  list-style:none; margin:0; padding:0;
  font-family:'Barlow Condensed',sans-serif; font-size:.82rem; letter-spacing:.08em; text-transform:uppercase;
}
.heliolisk-breadcrumb li{ display:inline-flex; align-items:center; color:#8992b8; }
.heliolisk-breadcrumb li + li::before{ content:"/"; margin:0 10px; color:var(--border); }
.heliolisk-breadcrumb a{ color:#8992b8; text-decoration:none; transition:color .2s ease; }
.heliolisk-breadcrumb a:hover{ color:var(--red-bright); }
.heliolisk-breadcrumb [aria-current]{ color:var(--text); overflow-wrap:anywhere; }

/* ============ CONTENT + SIDEBAR LAYOUT ============ */
.content-area{ padding-block:80px 110px; }
.content-area .row{ --bs-gutter-x:48px; --bs-gutter-y:48px; }
@media (max-width:992px){ .content-area{ padding-block:56px 80px; } }

/* ============ BLOG TOKENS ============
   Accent used by the blog UI (widget title underline, count / tag / page
   hovers). Same in both color schemes. */
:root{
  --blog-accent:#ffc72c; --blog-accent-ink:#030303;
  --blog-soft:rgba(255,255,255,.06);
  --blog-field-border:var(--border);
  --blog-radius:5px;
  --blog-ease:cubic-bezier(.30,.50,.05,.95);
}

/* ============ BLOG BANNER (blog index, archives, search) ============ */
.page-banner--blog{ isolation:isolate; padding-block:110px 100px; }
.page-banner--blog .container{ display:block; text-align:left; }
.page-banner-info{ position:relative; display:flex; align-items:center; justify-content:space-between; column-gap:40px; }
.page-banner-eyebrow{
  display:inline-block; margin:0 0 20px; font-size:16px; font-weight:500; color:var(--text-mut);
}
.page-banner--blog .page-banner-title{
  margin:0 0 0 -2px; max-width:none; font-size:62px; line-height:66px; font-weight:600;
  text-transform:none; letter-spacing:-.02em; color:var(--text);
}
.page-banner--blog .page-banner-desc{ max-width:420px; margin:0; }
.page-banner--blog .page-banner-desc p{ margin:0; font-size:20px; line-height:30px; font-weight:500; color:var(--text-mut); }
.page-banner--blog .heliolisk-breadcrumb{ margin-top:24px; }
.page-banner--blog .heliolisk-breadcrumb ol{ justify-content:flex-start; }
.page-banner-arrow{ position:absolute; left:45%; top:50%; width:150px; transform:translateY(-50%); pointer-events:none; filter:invert(1); opacity:.8; }
@media (max-width:992px){
  .page-banner--blog{ padding-block:80px 70px; }
  .page-banner-info{ flex-direction:column; align-items:flex-start; }
  .page-banner--blog .page-banner-desc{ margin-top:20px; }
}
@media (max-width:767px){
  .page-banner--blog .page-banner-title{ font-size:32px; line-height:42px; }
  .page-banner--blog .page-banner-desc p{ font-size:17px; }
  .page-banner--blog .animated-dots{ display:none; }
}

/* Floating dots behind the blog banner */
.animated-dots{ position:absolute; inset:0; z-index:-1; pointer-events:none; }
.animated-dots span{ position:absolute; left:15%; top:25%; width:8px; height:8px; border-radius:50%; background:#ff4c4c; }
.animated-dots span:nth-child(2){ background:#0099e5; left:5%; top:70%; }
.animated-dots span:nth-child(3){ background:#ff9933; width:11px; height:11px; left:65%; top:60%; }
.animated-dots span:nth-child(4){ background:#85c446; width:14px; height:14px; border-radius:0; transform:rotate(20deg); left:auto; right:5%; top:30%; }
.animated-dots span:nth-child(5){ background:#ff4f81; width:12px; height:12px; left:auto; right:10%; top:auto; bottom:20%; }
.animated-dots span:nth-child(6){ background:#8e43e7; width:10px; height:10px; border-radius:0; transform:rotate(20deg); left:35%; top:auto; bottom:15%; }
.dot-up-down{ animation:hlDotUpDown 4s forwards infinite alternate; }
.dot-left-right{ animation:hlDotLeftRight 4s forwards infinite alternate; }
.dot-rotate-center{ animation:hlDotRotate 10s forwards infinite alternate; }
@keyframes hlDotUpDown{ from{ transform:translateY(-15px); } to{ transform:translateY(10px); } }
@keyframes hlDotLeftRight{ from{ transform:translateX(-10px); } to{ transform:translateX(5px); } }
@keyframes hlDotRotate{ from{ transform:rotate(0); } to{ transform:rotate(360deg); } }

/* ============ POST LIST + CARDS ============ */
.post-grid{ display:grid; gap:50px; grid-template-columns:1fr; }
@media (min-width:768px){
  .post-grid--cols-2, .post-grid--cols-3{ grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:30px; }
}
@media (min-width:1200px){
  .post-grid--cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.post-card{ position:relative; display:flex; flex-direction:column; min-width:0; }
/* Text-only cards in a single column: a rule between them instead of the image gap. */
.post-grid--cols-1 > .post-card:not(.has-post-thumbnail):not(:last-child){ padding-bottom:50px; border-bottom:1px solid var(--border); }

.post-card .post-thumb{ position:relative; overflow:hidden; border-radius:var(--blog-radius); aspect-ratio:16/10; }
.post-card .post-thumb > a:not(.post-category){ display:block; height:100%; }
.post-card .post-thumb img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; transition:transform .8s var(--blog-ease); }
.post-card:hover .post-thumb img{ transform:scale(1.05); }

.post-category{
  position:absolute; right:15px; top:15px; z-index:1;
  padding:10px 20px; border-radius:30px; background:#fff; color:#030303;
  font-family:'Inter',sans-serif; font-size:14px; font-weight:500; line-height:1; text-transform:capitalize; text-decoration:none;
  transition:background-color .3s ease, color .3s ease;
}
.post-category:hover{ background:var(--blog-accent); color:var(--blog-accent-ink); }
.post-category--inline{ position:static; display:inline-flex; padding:7px 14px; background:var(--blog-soft); color:var(--text); }

.post-content-wrap{ padding:30px 0 0; }
.post-card:not(.has-post-thumbnail) .post-content-wrap{ padding-top:0; }

.post-card-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 15px; padding:0; list-style:none; }
.post-card-meta li{ display:inline-flex; align-items:center; line-height:1; font-size:14px; font-weight:600; color:var(--text-mut); }
.post-card-meta li.sep{ width:20px; height:1px; background:var(--text); opacity:.5; }
.post-card-meta a{ color:var(--text); text-decoration:none; text-transform:capitalize; transition:color .3s ease; }
.post-card-meta li.date,
.post-card-meta li.date a{ color:var(--text-mut); }
.post-card-meta a:hover{ color:var(--text-mut); }
.post-card-meta .post-category--inline:hover{ color:var(--blog-accent-ink); }

.post-card-title{ margin:0 0 12px; font-size:28px; line-height:36px; font-weight:600; letter-spacing:-.5px; text-transform:none; }
.post-card-title a{
  color:var(--text); text-decoration:none;
  background-image:linear-gradient(transparent calc(100% - 2px), currentColor 2px);
  background-repeat:no-repeat; background-size:0 calc(100% - 2px);
  transition:background-size .5s var(--blog-ease);
}
.post-card-title:hover a{ background-size:100% calc(100% - 2px); }
.post-card-excerpt{ margin:0 0 22px; font-size:16px; color:var(--text-mut); }
.post-grid--cols-2 .post-card-title,
.post-grid--cols-3 .post-card-title{ font-size:22px; line-height:30px; }
@media (max-width:992px){ .post-card-title{ font-size:24px; line-height:32px; } }
@media (max-width:767px){ .post-card-title{ font-size:22px; line-height:30px; } }

/* Quote format card: the quote alone, in the same box as a single post's blockquote. */
.post-grid--cols-1 > .post-card--quote:not(:last-child){ padding-bottom:0; border-bottom:0; }
.post-quote{ position:relative; }
.post-quote blockquote{ margin:0 !important; border-radius:var(--blog-radius); }
.post-quote blockquote p{ font-size:22px; line-height:1.36; letter-spacing:-.02em; color:var(--text); margin-bottom:0; }
.post-grid--cols-2 .post-quote blockquote,
.post-grid--cols-3 .post-quote blockquote{ padding:28px 30px 30px; }
.post-grid--cols-2 .post-quote blockquote p,
.post-grid--cols-3 .post-quote blockquote p{ font-size:18px; }
@media (max-width:767px){
  .post-quote blockquote{ padding:28px 24px 30px; }
  .post-quote blockquote p{ font-size:18px; }
}
/* Overlay link so the whole box opens the post; the cite link stays on top of it. */
.post-quote-link{ position:absolute; inset:0; }
.post-quote blockquote a{ position:relative; z-index:1; color:inherit; }

/* "Continue Reading": text with a line under it that retracts on hover */
.underline-btn{
  position:relative; display:inline-flex; align-items:center; column-gap:5px; padding-bottom:5px;
  font-size:15px; font-weight:500; line-height:1; white-space:nowrap; color:var(--text); text-decoration:none;
  transition:color .3s ease;
}
.underline-btn::before{ content:""; position:absolute; inset-inline-start:0; bottom:0; width:100%; height:1.5px; background:currentColor; transition:width .3s ease; }
.underline-btn:hover{ color:var(--text); }
.underline-btn:hover::before{ width:0; }

/* ============ POST META (single post) ============ */
.post-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; list-style:none; margin:0; padding:0;
  font-family:'Barlow Condensed',sans-serif; font-size:.82rem; letter-spacing:.06em; text-transform:uppercase; color:var(--text-faint);
}
.post-meta li{ display:inline-flex; align-items:center; gap:7px; }
.post-meta .hl-icon{ width:14px; height:14px; color:var(--red); }
.post-meta a{ color:inherit; text-decoration:none; transition:color .2s ease; }
.post-meta a:hover{ color:var(--red-bright); }

/* ============ PAGINATION ============ */
.heliolisk-pagination{ margin-top:50px; }
.heliolisk-pagination ul{ display:flex; flex-wrap:wrap; align-items:center; gap:15px; list-style:none; margin:0; padding:0; }
.heliolisk-pagination .page-numbers{
  width:45px; height:45px; display:flex; align-items:center; justify-content:center;
  border-radius:var(--blog-radius); background:var(--blog-soft); color:var(--text); text-decoration:none;
  font-size:15px; font-weight:600; transition:background-color .3s ease, color .3s ease;
}
.heliolisk-pagination a.page-numbers:hover,
.heliolisk-pagination .page-numbers.current{ background:var(--blog-accent); color:var(--blog-accent-ink); }
.heliolisk-pagination .page-numbers.dots{ background:none; }
.heliolisk-pagination .hl-icon{ width:20px; height:20px; }

/* ============ SIDEBAR WIDGETS ============ */
.widget-area{ display:flex; flex-direction:column; gap:50px; }
.sidebar-widget{ font-size:16px; color:var(--text-mut); }
.sidebar-widget ul,
.sidebar-widget ol{ list-style:none; margin:0; padding:0; }
.sidebar-widget a{ color:var(--text); text-decoration:none; transition:color .3s ease; }
.sidebar-widget .wp-block-group__inner-container > * + *{ margin-top:0; }

/* Title with the accent underline */
.widget-title{ position:relative; display:block; overflow:hidden; margin-bottom:20px; }
.widget-title h3,
.sidebar-widget h2.wp-block-heading,
.sidebar-widget .wp-block-group > h2{
  position:relative; display:inline-block; margin:0 0 20px; padding-bottom:10px;
  font-size:20px; font-weight:700; line-height:1; letter-spacing:0; text-transform:none; color:var(--text);
}
.widget-title h3{ margin:0; }
.widget-title h3::before,
.sidebar-widget h2.wp-block-heading::before,
.sidebar-widget .wp-block-group > h2::before{
  content:""; position:absolute; left:0; bottom:3px; width:80%; height:3px; background:var(--blog-accent);
}

/* Categories (theme widget + Categories / Archives blocks) */
.category-list li,
.sidebar-widget .cat-item,
.sidebar-widget .wp-block-archives li,
.sidebar-widget.widget_archive li{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; }
.category-list li:not(:last-of-type),
.sidebar-widget .cat-item:not(:last-of-type),
.sidebar-widget .wp-block-archives li:not(:last-of-type),
.sidebar-widget.widget_archive li:not(:last-of-type){ margin-bottom:10px; }
.category-list li a,
.sidebar-widget .cat-item > a,
.sidebar-widget .wp-block-archives a,
.sidebar-widget.widget_archive a{ position:relative; font-weight:500; line-height:1.4; color:var(--text-mut); }
.sidebar-widget .cat-item > a,
.sidebar-widget .wp-block-archives a,
.sidebar-widget.widget_archive a{ flex:1; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.category-list li a::before{
  content:""; position:absolute; right:0; bottom:0; width:0; height:2px; background:var(--blog-accent); transition:width .5s var(--blog-ease);
}
.category-list li a:hover,
.sidebar-widget .cat-item > a:hover,
.sidebar-widget .wp-block-archives a:hover,
.sidebar-widget.widget_archive a:hover{ color:var(--text); }
.category-list li a:hover::before{ left:0; width:100%; }
.category-list li span,
.sidebar-widget .count{
  flex-shrink:0; width:30px; height:30px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--blog-field-border); border-radius:50%;
  font-size:14px; font-weight:600; color:var(--text); transition:all .3s ease;
}
.category-list li:hover span,
.sidebar-widget .cat-item:hover > a > .count,
.sidebar-widget li:hover > a > .count{ background:var(--blog-accent); border-color:var(--blog-accent); color:var(--blog-accent-ink); }
.sidebar-widget .cat-item .children{ flex-basis:100%; margin-top:10px; padding-left:14px; }

/* Top Stories (theme widget) */
.widget-post-item{ display:grid; grid-template-columns:100px 1fr; align-items:center; gap:15px; }
.widget-post-item--no-thumb{ grid-template-columns:1fr; }
.widget-post-item:not(:last-of-type){ margin-bottom:30px; }
.widget-post-thumb a{ display:block; width:100px; height:90px; overflow:hidden; border-radius:3px; }
.widget-post-thumb img{ width:100%; height:100%; object-fit:cover; object-position:center; transition:transform .6s var(--blog-ease); }
.widget-post-item:hover .widget-post-thumb img{ transform:scale(1.08); }
.widget-post-content h4{ margin:0 0 10px; font-size:18px; font-weight:600; line-height:24px; letter-spacing:-.2px; text-transform:none; }
.widget-post-content h4 a,
.sidebar-widget .wp-block-latest-posts__post-title{
  color:var(--text);
  background-image:linear-gradient(transparent calc(100% - 1px), currentColor 1px);
  background-repeat:no-repeat; background-size:0 calc(100% - 1.5px); transition:background-size .3s;
}
.widget-post-content h4:hover a,
.sidebar-widget .wp-block-latest-posts__post-title:hover{ background-size:100% calc(100% - 1.5px); }
.widget-post-date,
.sidebar-widget .wp-block-latest-posts__post-date,
.sidebar-widget .wp-block-latest-comments__comment-date{ display:block; font-size:14px; font-weight:600; line-height:1; color:var(--text-mut); }

/* Latest Posts / Latest Comments blocks */
.sidebar-widget .wp-block-latest-posts li{ margin:0; }
.sidebar-widget .wp-block-latest-posts li:not(:last-child){ margin-bottom:20px; }
.sidebar-widget .wp-block-latest-posts__post-title{ font-size:.92rem; font-weight:400; line-height:1.6; }
.sidebar-widget .wp-block-latest-posts__post-date{ margin-top:8px; }
.sidebar-widget .wp-block-latest-posts__featured-image img{ border-radius:3px; }
.sidebar-widget .wp-block-latest-comments{ padding-left:0; }
.sidebar-widget .wp-block-latest-comments__comment{ margin-bottom:0; line-height:1.5; }
.sidebar-widget .wp-block-latest-comments__comment:not(:last-child){ margin-bottom:14px; }
.sidebar-widget .wp-block-latest-comments__comment-meta{ color:var(--text-mut); }
.sidebar-widget .wp-block-latest-comments__comment-meta a:hover{ color:var(--text-mut); }

/* Tags (theme widget + Tag Cloud widget / block) */
.widget-tags,
.sidebar-widget .tagcloud,
.sidebar-widget .wp-block-tag-cloud{ display:flex; flex-wrap:wrap; gap:10px; }
.widget-tags li a,
.sidebar-widget .tag-cloud-link{
  display:inline-flex; padding:10px 15px; border-radius:var(--blog-radius); background:var(--blog-soft);
  font-size:14px !important; font-weight:500; line-height:1; text-transform:capitalize; color:var(--text);
  transition:all .5s var(--blog-ease);
}
.widget-tags li a:hover,
.sidebar-widget .tag-cloud-link:hover{ background:var(--blog-accent); color:var(--blog-accent-ink); transform:translateY(-3px); }

/* Banner */
.sidebar-banner a{ display:block; overflow:hidden; border-radius:var(--blog-radius); }
.sidebar-banner img{ width:100%; height:auto; display:block; }

/* Calendar */
.sidebar-widget table{ width:100%; text-align:center; font-size:.82rem; }
.sidebar-widget caption{ caption-side:top; color:var(--text); text-align:left; padding-bottom:10px; }

/* Dark scheme: point the classic / block widget links at the scheme tokens. */
body.heliolisk-scheme-dark .hl-sidebar-widget a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_recent_comments ul li > a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_recent_comments .comment-author-link a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_recent_entries ul li a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_rss ul li > a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_block ul.wp-block-latest-posts li a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_block .wp-block-latest-comments article a,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_block .wp-block-latest-comments article a.wp-block-latest-comments__comment-author,
body.heliolisk-scheme-dark .hl-sidebar-widget .wp-calendar-table a,
body.heliolisk-scheme-dark .hl-sidebar-widget .wp-block-tag-cloud a{ color:var(--text); }
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_recent_comments ul li > a:hover,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_recent_entries ul li a:hover,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_rss ul li > a:hover,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_block ul.wp-block-latest-posts li a:hover,
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_block .wp-block-latest-comments article a:hover,
body.heliolisk-scheme-dark .hl-sidebar-widget .wp-calendar-nav a:hover{ color:var(--blog-accent); }
body.heliolisk-scheme-dark .hl-sidebar-widget.widget_block .wp-block-latest-comments article .wp-block-latest-comments__comment-meta,
body.heliolisk-scheme-dark .hl-sidebar-widget .wp-calendar-nav a{ color:var(--text-mut); }
body.heliolisk-scheme-dark .hl-sidebar-widget .wp-block-group__inner-container h2{ color:var(--text); }
body.heliolisk-scheme-dark .hl-sidebar-widget .wp-block-tag-cloud a{ background-color:var(--blog-soft); }
.sidebar-widget th, .sidebar-widget td{ padding:6px 2px; border-color:var(--border); }

/* ============ SEARCH FORM (sidebar, block, overlay, 404, no-results) ============ */
.search-form{ position:relative; display:block; }
.search-form .search-field{
  width:100%; height:60px; margin:0; padding:0 56px 0 20px;
  border:1px solid var(--blog-field-border); border-radius:var(--blog-radius); outline:0; box-shadow:none;
  background:var(--surface); color:var(--text); font-size:16px;
  transition:border-color .3s ease;
}
.search-form .search-field:focus{ border-color:var(--text); }
.search-form .search-field::placeholder{ color:var(--text-faint); }
.search-form .search-field::-webkit-search-cancel-button{ display:none; }
.search-form .search-btn{
  position:absolute; right:0; top:0; width:56px; height:100%; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  background:none; border:0; color:var(--text-mut); transition:color .3s ease;
}
.search-form .search-btn:hover,
.search-form .search-btn:focus-visible{ color:var(--text); }
.search-form .search-btn .hl-icon{ width:22px; height:22px; }

/* ============ HEADER SEARCH BUTTON + OVERLAY ============ */
.header-search-toggle{
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  padding:0; background:none; border:1px solid var(--border); border-radius:50%; color:var(--text-mut);
  transition:color .2s ease, border-color .2s ease;
}
.header-search-toggle:hover,
.header-search-toggle[aria-expanded="true"]{ color:var(--red-bright); border-color:var(--red); }
.header-search-toggle .hl-icon{ width:17px; height:17px; }

.search-overlay{ position:fixed; inset:0; z-index:90; display:flex; align-items:flex-start; justify-content:center; }
.search-overlay[hidden]{ display:none; }
.search-overlay-backdrop{
  position:absolute; inset:0; background:rgba(8,8,12,.82);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  animation:hlFade .3s ease both;
}
.search-overlay-panel{
  position:relative; z-index:1; width:100%; max-width:860px; margin-top:min(18vh,160px);
  animation:hlRise .45s cubic-bezier(.16,1,.3,1) both;
}
.search-overlay-top{ margin-bottom:22px; }
.search-overlay-kicker{
  display:inline-flex; align-items:center; gap:9px; font-family:'Barlow Condensed',sans-serif; font-weight:600;
  text-transform:uppercase; letter-spacing:.14em; font-size:.85rem; color:var(--red-bright);
}
.search-overlay-close{
  width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; padding:0;
  background:none; border:1px solid var(--border); border-radius:50%; color:var(--text-mut);
  transition:color .2s ease, border-color .2s ease, transform .3s ease;
}
.search-overlay-close:hover{ color:var(--red-bright); border-color:var(--red); transform:rotate(90deg); }
.search-overlay-close .hl-icon{ width:18px; height:18px; }
/* Overlay: the same search box, just bigger */
.search-form--overlay .search-field{ height:84px; padding:0 84px 0 28px; font-size:clamp(1.2rem,3vw,1.9rem); box-shadow:0 30px 60px -30px rgba(0,0,0,.35); }
.search-form--overlay .search-btn{ width:84px; }
.search-form--overlay .search-btn .hl-icon{ width:28px; height:28px; }
.search-overlay-hint{
  margin-top:16px; font-family:'Barlow Condensed',sans-serif; font-size:.8rem;
  letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint);
}
body.search-open{ overflow:hidden; }
@keyframes hlFade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes hlRise{ from{ opacity:0; transform:translateY(-18px); } to{ opacity:1; transform:none; } }
@media (max-width:576px){
  .header-search-toggle{ width:34px; height:34px; }
  .search-overlay-panel{ margin-top:90px; }
}

/* ============ SINGLE POST / PAGE ENTRY ============ */
.entry-header{ margin-bottom:36px; }
.entry-title{ font-size:clamp(1.9rem,4vw,3rem); text-transform:uppercase; color:var(--text); margin:16px 0 22px; max-width:24ch; }
.heliolisk-layout-both .entry-title{ font-size:clamp(1.7rem,3vw,2.3rem); }
.entry-media{ margin:0 0 44px; border-radius:14px; overflow:hidden; border:1px solid var(--border); }
.entry-media img{ width:100%; height:auto; display:block; }
.entry-media figcaption{ padding:12px 16px; font-size:.78rem; color:var(--text-faint); border-top:1px solid var(--border); }

/* Typography for editor content (posts, pages, comments) */
.entry-content{ font-size:1.02rem; color:var(--text-mut); line-height:1.85; }
.heliolisk-layout-none .entry-content{ max-width:78ch; }
.entry-content > *:first-child{ margin-top:0; }
/* Wide / full alignment: fills the column beside a sidebar, breaks out of it on full-width layouts. */
.entry-content .alignwide,
.entry-content .alignfull{ clear:both; max-width:100%; }
.heliolisk-layout-none .entry-content .alignwide{ width:min(1140px,calc(100vw - 40px)); max-width:none; margin-inline:calc(50% - min(570px,50vw - 20px)); }
.heliolisk-layout-none .entry-content .alignfull{ width:100vw; max-width:none; margin-inline:calc(50% - 50vw); }
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6{ color:var(--text); text-transform:uppercase; line-height:1.2; }
.entry-content h2{ font-size:1.55rem; margin:36px 0 14px; }
.entry-content h3{ font-size:1.2rem; margin:30px 0 12px; }
.entry-content h4{ font-size:1.02rem; margin:26px 0 10px; }
/* Stacked headings (e.g. a size scale) sit close together instead of each opening a new section. */
.entry-content :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6){ margin-top:10px; }
.entry-content p{ margin:0 0 22px; }
.entry-content ul, .entry-content ol{ margin:0 0 22px; padding-left:22px; }
.entry-content li{ margin-bottom:8px; }
.entry-content li::marker{ color:var(--red); }
.entry-content a{ color:var(--red-bright); text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }
.entry-content a:hover{ color:var(--text); }
/* Button blocks are links too: keep their own colors, not the inline-link color and underline. */
.entry-content .wp-block-button__link{ text-decoration:none; }
.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color){ color:#fff; }
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color){ color:var(--text); }
.entry-content strong{ color:var(--text); }
.entry-content img{ max-width:100%; height:auto; border-radius:10px; }
.entry-content figure{ margin:36px 0; }
.entry-content figcaption,
.entry-content .wp-caption-text{ margin-top:10px; font-size:.8rem; color:var(--text-faint); text-align:center; }
.entry-content blockquote,
.entry-content .wp-block-quote{
  margin:36px 0; padding:22px 26px; border-left:3px solid var(--red); border-radius:0 12px 12px 0;
  background:rgba(139,92,246,.06); font-style:italic; color:var(--text); font-size:1.08rem;
}
.entry-content blockquote p:last-child{ margin-bottom:0; }
.entry-content blockquote cite{ display:block; margin-top:10px; font-size:.8rem; font-style:normal; text-transform:uppercase; letter-spacing:.08em; color:var(--text-faint); }
.entry-content code{ font-size:.88em; padding:2px 6px; border-radius:4px; background:rgba(255,255,255,.06); color:#e9d5ff; }
.entry-content pre{ padding:20px; border:1px solid var(--border); border-radius:10px; background:#0a0a0a; overflow-x:auto; font-size:.85rem; }
.entry-content pre code{ padding:0; background:none; color:#d6d6d6; }
.entry-content table{ width:100%; margin:0 0 24px; border-collapse:collapse; font-size:.9rem; }
.entry-content th, .entry-content td{ padding:10px 12px; border:1px solid var(--border); }
.entry-content th{ color:var(--text); background:rgba(255,255,255,.03); }
.entry-content hr{ margin:44px 0; border-color:var(--border); opacity:1; }
.entry-content .alignleft{ float:left; margin:6px 24px 16px 0; }
.entry-content .alignright{ float:right; margin:6px 0 16px 24px; }
.entry-content .aligncenter{ display:block; margin-inline:auto; }
/* Aligned image blocks are a table in core, so the caption (table-caption) spans the image's width. */
.entry-content .wp-block-image :is(.aligncenter, .alignleft, .alignright){ display:table; }
.entry-content::after{ content:""; display:table; clear:both; }
.page-links{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:32px; font-size:.85rem; }
.page-links-title{ font-family:'Barlow Condensed',sans-serif; text-transform:uppercase; letter-spacing:.1em; color:var(--text); margin-right:6px; }
.page-links a, .page-links > span:not(.page-links-title){ padding:4px 12px; border:1px solid var(--border); border-radius:var(--r); text-decoration:none; }
.page-links > span.current, .page-links > .post-page-numbers.current{ border-color:var(--text); color:var(--text); font-weight:600; }

/* Entry footer: tags + share */
.entry-footer{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:20px; margin-top:44px; padding-top:26px; border-top:1px solid var(--border); }
.entry-tags-label{ font-family:'Barlow Condensed',sans-serif; font-weight:600; text-transform:uppercase; letter-spacing:.12em; font-size:.8rem; color:var(--text); margin-right:6px; }
.entry-tags .tag{ text-decoration:none; }
.share-btn{
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; padding:0;
  border:1px solid var(--border); border-radius:50%; background:none; color:var(--text-mut);
  transition:color .2s ease, border-color .2s ease, transform .2s ease;
}
.share-btn:hover{ color:var(--red-bright); border-color:var(--red); transform:translateY(-2px); }
.share-btn .hl-icon{ width:16px; height:16px; }
.share-btn.copied{ color:#fff; background:var(--red); border-color:var(--red); }

/* Author box */
.author-box{ margin-top:48px; padding:28px; border:1px solid var(--border); border-radius:14px; background:linear-gradient(160deg, rgba(139,92,246,.08), rgba(255,255,255,.01)); }
.author-box-avatar img{ border-radius:50%; border:1px solid var(--red); }
.author-box-name{ font-size:1.15rem; text-transform:uppercase; margin-bottom:8px; }
.author-box-bio{ font-size:.9rem; margin-bottom:14px; }
@media (max-width:576px){ .author-box{ flex-direction:column; } }

/* Previous / next */
.post-nav{ margin-top:48px; }
.post-nav-link{
  display:flex; flex-direction:column; gap:8px; height:100%; min-width:0; padding:20px 22px;
  border:1px solid var(--border); border-radius:14px; text-decoration:none; transition:border-color .2s ease, background .2s ease;
}
.post-nav-link:hover{ border-color:rgba(139,92,246,.5); background:rgba(139,92,246,.06); }
.post-nav-link--next{ text-align:right; align-items:flex-end; }
.post-nav-dir{ display:inline-flex; align-items:center; gap:8px; font-family:'Barlow Condensed',sans-serif; font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; color:var(--red-bright); }
.post-nav-dir .hl-icon{ width:14px; height:14px; }
/* Titles can be one unbroken word (the Taumata… test post), so break them instead of letting them spill over the other link. */
.post-nav-title{
  font-family:'Space Grotesk',sans-serif; font-weight:700; color:var(--text); text-transform:uppercase; font-size:.95rem; line-height:1.3;
  max-width:100%; overflow-wrap:anywhere;
}

/* Related posts */
.related-posts{ margin-top:56px; }
.related-card{ text-decoration:none; padding:12px; border:1px solid var(--border); border-radius:12px; transition:border-color .2s ease, transform .2s ease; }
.related-card:hover{ border-color:rgba(139,92,246,.5); transform:translateY(-3px); }
.related-card-media{ aspect-ratio:16/11; overflow:hidden; border-radius:8px; margin-bottom:12px; }
.related-card-media img{ width:100%; height:100%; object-fit:cover; }
.related-card-date{ font-family:'Barlow Condensed',sans-serif; font-size:.74rem; letter-spacing:.08em; text-transform:uppercase; color:var(--text-faint); }
.related-card-title{ margin-top:6px; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:.9rem; line-height:1.3; text-transform:uppercase; color:var(--text); }

/* ============ COMMENTS ============ */
.comments-area{ margin-top:64px; }
.comment-list, .comment-list .children{ list-style:none; margin:0; padding:0; }
.comment-list{ margin-bottom:48px; }
.comment-list .children{ padding-left:clamp(20px,5vw,64px); }
.comment-card{ padding:22px 0; border-bottom:1px solid var(--border); }
/* Flex items default to min-width:auto, so wide comment content (pre, tables, long URLs) stretches the column over the sidebar. */
.comment-body-wrap{ min-width:0; }
.comment-avatar img{ border-radius:50%; }
.comment-author-name{ font-family:'Space Grotesk',sans-serif; font-weight:700; color:var(--text); text-transform:uppercase; font-size:.92rem; }
.comment-author-name a{ color:inherit; text-decoration:none; }
.comment-date{ font-family:'Barlow Condensed',sans-serif; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; color:var(--text-faint); }
.comment-text{ margin-top:8px; font-size:.93rem; overflow-wrap:break-word; }
.comment-text p:last-child{ margin-bottom:0; }
.comment-text :is(img, iframe, video, table){ max-width:100%; }
.comment-text img{ height:auto; }
.comment-text pre{ overflow-x:auto; }
.comment-awaiting{ margin:6px 0 0; font-size:.8rem; color:var(--red-bright); }
.comment-actions{ margin-top:10px; }
.comment-actions a{ font-family:'Barlow Condensed',sans-serif; font-size:.78rem; letter-spacing:.1em; text-transform:uppercase; color:var(--red-bright); text-decoration:none; }
.comment-actions a:hover{ color:var(--text); }
.comment-ping{ padding:12px 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.comments-closed{ font-size:.85rem; color:var(--text-faint); }
.comment-respond{ margin-top:12px; }
.comment-reply-title small{ margin-left:12px; font-size:.75rem; letter-spacing:.08em; }
.comment-reply-title small a{ color:var(--red-bright); }
.comment-form p{ margin-bottom:16px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
  width:100%; padding:14px 18px; color:var(--text); font-size:.92rem;
  background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:10px; outline:0;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus{ border-color:var(--red); box-shadow:0 0 0 4px rgba(139,92,246,.15); }
.comment-form ::placeholder{ color:var(--text-faint); }
.comment-form .comment-form-cookies-consent{ display:flex; gap:10px; align-items:flex-start; font-size:.82rem; }
.comment-form .comment-form-cookies-consent input{ margin-top:5px; accent-color:var(--red); }
.comment-form .logged-in-as{ font-size:.85rem; }
.comment-form .logged-in-as a{ color:var(--red-bright); }

/* ============ NO RESULTS + 404 ============ */
.no-results{ padding:44px; border:1px dashed var(--border); border-radius:14px; }
.no-results-title{ font-size:1.6rem; text-transform:uppercase; margin:14px 0 12px; }
.no-results .search-form{ max-width:460px; margin-top:24px; }
.error-404{ padding-block:120px; }
.error-404-code{
  margin:0; font-family:'Space Grotesk',sans-serif; font-weight:700; line-height:.9;
  font-size:clamp(7rem,22vw,15rem); letter-spacing:-.04em;
  background:linear-gradient(180deg, var(--red-bright) 0%, rgba(139,92,246,.05) 95%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.error-404-title{ font-size:clamp(1.6rem,3.4vw,2.4rem); text-transform:uppercase; margin:18px auto 14px; max-width:22ch; }
.error-404-text{ max-width:50ch; margin:0 auto 32px; }
.error-404-search{ max-width:480px; margin:0 auto 28px; }

/* ============ BACK TO TOP ============ */
.back-to-top{
  position:fixed; right:22px; bottom:22px; z-index:80; width:46px; height:46px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(139,92,246,.45); border-radius:50%; color:#fff;
  background:linear-gradient(135deg, #8b5cf6, #6d5cf6); box-shadow:0 10px 26px rgba(139,92,246,.35);
  opacity:0; visibility:hidden; transform:translateY(12px);
  transition:opacity .3s ease, transform .3s ease, visibility .3s;
}
.back-to-top.show{ opacity:1; visibility:visible; transform:none; }
.back-to-top:hover{ transform:translateY(-3px); }
.back-to-top .hl-icon{ width:18px; height:18px; }

@media (prefers-reduced-motion: reduce){
  .post-card, .post-thumb img, .widget-post-thumb img, .widget-tags a, .tag-cloud-link, .animated-dots span,
  .search-overlay-backdrop, .search-overlay-panel, .back-to-top, .search-overlay-close{
    transition:none !important; animation:none !important; transform:none !important;
  }
}
@media (max-width:576px){
  .page-banner{ padding-block:64px 40px; }
  .no-results{ padding:28px 20px; }
  .error-404{ padding-block:80px; }
  .back-to-top{ right:16px; bottom:16px; }
}

/* ============ NICE SELECT (Categories / Archives dropdowns) ============
   Base layout comes from assets/vendor/nice-select/css/nice-select.css;
   everything below re-points it at the theme tokens so it follows the
   dark and light schemes. */
.nice-select{
  display:block; float:none; width:100%; height:auto; clear:none;
  font-family:inherit; font-size:.95rem; line-height:1.4;
  padding:13px 42px 13px 16px;
  color:var(--text); background-color:var(--surface);
  border:1px solid var(--border); border-radius:var(--r);
  white-space:normal;
  transition:border-color .2s ease, background-color .2s ease;
}
.nice-select:hover{ border-color:var(--red); }
.nice-select:focus-visible{ outline:2px solid var(--red); outline-offset:2px; }
.nice-select:active,
.nice-select.open,
.nice-select:focus{ border-color:var(--red); }

.nice-select .current{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Chevron */
.nice-select::after{
  width:7px; height:7px; right:18px; margin-top:-5px;
  border-bottom:2px solid var(--text-mut); border-right:2px solid var(--text-mut);
}
.nice-select:hover::after,
.nice-select.open::after{ border-color:var(--red-bright); }

/* Panel */
.nice-select .list{
  width:100%; left:0; right:0; margin-top:6px; padding:6px 0;
  max-height:280px; overflow-y:auto; overscroll-behavior:contain;
  background-color:var(--bg-2);
  border:1px solid var(--border); border-radius:var(--r);
  box-shadow:0 18px 36px rgba(0,0,0,.35);
  z-index:40;
}
.nice-select .option{
  min-height:0; line-height:1.5; margin:0;
  padding:9px 16px;
  color:var(--text-mut); font-weight:400; white-space:normal;
}
.nice-select .option:hover,
.nice-select .option.focus,
.nice-select .option.selected.focus{ background-color:rgba(139,92,246,.12); color:var(--text); }
.nice-select .option.selected{ font-weight:600; color:var(--text); }
.nice-select .option.disabled{ color:var(--text-faint); background-color:transparent; }

/* Scrollbar inside the panel */
.nice-select .list{ scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.nice-select .list::-webkit-scrollbar{ width:8px; }
.nice-select .list::-webkit-scrollbar-thumb{ background:var(--border); border-radius:8px; }
.nice-select .list::-webkit-scrollbar-track{ background:transparent; }

/* Spacing inside widgets; the original <select> is hidden by the plugin. */
.widget-area .nice-select,
.hl-blog-sidebar .nice-select,
.hl-footer-widget .nice-select{ margin-bottom:0; }
.widget select,
.entry-content select{ max-width:100%; }

@media (prefers-reduced-motion: reduce){
  .nice-select, .nice-select::after, .nice-select .list, .nice-select .option{ transition:none !important; }
}
