/*
Theme Name: Blog Thema
Theme URI: https://example.com/blog-thema
Author: Figma to WP
Description: WordPress theme based on the Blog Thema design.
Version: 1.0.84
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blog-thema
Tags: blog, custom-menu, two-columns
*/

/* WordPress helpers */

.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;
}

.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: #fff;
  color: #000;
  border: 1px solid #e5e5e5;
  z-index: 1000;
}

:root {
  --blog-thema-container-width: 1280px;
  --blog-thema-content-width: 760px;
  --blog-thema-header-height: 80px;
  --blog-thema-mobile-header-height: 64px;
  --color-background: #fafafa;
  --color-text-primary: #111;
  --color-text-secondary: #666;
  --spacing-container: 1.5rem;
  --blog-thema-surface: #fff;
  --blog-thema-surface-soft: #f8f8f8;
  --blog-thema-surface-strong: #111;
  --blog-thema-border: #e8e8e8;
  --blog-thema-border-strong: #d7d7d7;
  --blog-thema-border-contrast: #d4d4d4;
  --blog-thema-muted: #666;
  --blog-thema-muted-strong: #9ca3af;
  --blog-thema-search-close: #222;
  --blog-thema-search-input-bg: #fff;
  --blog-thema-search-input-border: #d7d7d7;
  --blog-thema-search-input-color: #111;
  --blog-thema-search-input-focus-border: #000;
  --blog-thema-search-input-focus-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
  --blog-thema-toc-active-bg: #f8f8f8;
  --blog-thema-toc-active-color: #000;
  --blog-thema-toc-active-border: #000;
  --blog-thema-back-to-top-bg: #fff;
  --blog-thema-back-to-top-border: #d4d4d4;
  --blog-thema-back-to-top-color: #111;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

:is(body, html).theme-dark {
  --color-background: #0f0f0f;
  --color-text-primary: #f5f5f5;
  --color-text-secondary: #c7c7c7;
  --blog-thema-surface: #121212;
  --blog-thema-surface-soft: #1a1a1a;
  --blog-thema-surface-strong: #f5f5f5;
  --blog-thema-border: #2b2b2b;
  --blog-thema-border-strong: #2b2b2b;
  --blog-thema-border-contrast: #2b2b2b;
  --blog-thema-muted: #bdbdbd;
  --blog-thema-muted-strong: #bdbdbd;
  --blog-thema-search-close: #d8d8d8;
  --blog-thema-search-input-bg: #111;
  --blog-thema-search-input-border: #3a3a3a;
  --blog-thema-search-input-color: #f3f3f3;
  --blog-thema-search-input-focus-border: #f5f5f5;
  --blog-thema-search-input-focus-shadow: 0 0 0 3px rgba(245, 245, 245, 0.12);
  --blog-thema-toc-active-bg: #1a1a1a;
  --blog-thema-toc-active-color: #f5f5f5;
  --blog-thema-toc-active-border: #f5f5f5;
  --blog-thema-back-to-top-bg: #121212;
  --blog-thema-back-to-top-border: #2b2b2b;
  --blog-thema-back-to-top-color: #f5f5f5;
}

:is(body, html).theme-dark {
  background-color: var(--color-background);
  color: var(--color-text-primary);
}

:is(body, html).theme-dark .border-gray-200,
:is(body, html).theme-dark .border-gray-300 {
  border-color: #2b2b2b !important;
}

:is(body, html).theme-dark .text-gray-500,
:is(body, html).theme-dark .text-gray-600,
:is(body, html).theme-dark .text-gray-700,
:is(body, html).theme-dark .text-gray-400 {
  color: #bdbdbd !important;
}

:is(body, html).theme-dark .bg-white {
  background-color: #121212 !important;
}

:is(body, html).theme-dark .bg-black {
  background-color: #f5f5f5 !important;
  color: #0f0f0f !important;
}

:is(body, html).theme-dark .hover\\:bg-black:hover {
  background-color: #f5f5f5 !important;
  color: #0f0f0f !important;
}

:is(body, html).theme-dark .hover\\:bg-red-500:hover {
  background-color: #ff6b6b !important;
}

:is(body, html).theme-dark .text-black {
  color: #f5f5f5 !important;
}

:is(body, html).theme-dark .reading-progress {
  background: #2b2b2b;
}

:is(body, html).theme-dark .reading-progress-bar {
  background: #f5f5f5;
}

.container {
  max-width: var(--blog-thema-container-width, 1280px);
}

.blog-thema-site-header {
  height: var(--blog-thema-header-height, 80px);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.blog-thema-site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.blog-thema-site-header.is-compact {
  height: calc(var(--blog-thema-header-height, 80px) - 12px);
}

.blog-thema-header-inner {
  min-height: var(--blog-thema-header-height, 80px);
  min-width: 0;
  transition: min-height 0.2s ease;
}

.blog-thema-site-header.is-compact .blog-thema-header-inner {
  min-height: calc(var(--blog-thema-header-height, 80px) - 12px);
}

.blog-thema-brand-link {
  min-width: 0;
  max-width: min(62vw, 20rem);
  gap: 0.75rem;
}

.blog-thema-brand-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-thema-brand-name {
  display: none;
  max-width: 13rem;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-thema-logo {
  max-height: calc(var(--blog-thema-header-height, 80px) - 32px);
  width: auto;
  display: block;
}

.blog-thema-logo--dark {
  display: none;
}

:is(body, html).theme-dark .blog-thema-logo--light {
  display: none !important;
}

:is(body, html).theme-dark .blog-thema-logo--dark {
  display: block !important;
}

.blog-thema-header-actions {
  flex-shrink: 0;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .blog-thema-header-actions {
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  .blog-thema-brand-link {
    max-width: none;
  }

  .blog-thema-brand-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .blog-thema-brand-name {
    display: block;
  }
}

.blog-thema-theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) {
    --color-background: #0f0f0f;
    --color-text-primary: #f5f5f5;
    --color-text-secondary: #c7c7c7;
    --blog-thema-surface: #121212;
    --blog-thema-surface-soft: #1a1a1a;
    --blog-thema-surface-strong: #f5f5f5;
    --blog-thema-border: #2b2b2b;
    --blog-thema-border-strong: #2b2b2b;
    --blog-thema-border-contrast: #2b2b2b;
    --blog-thema-muted: #bdbdbd;
    --blog-thema-muted-strong: #bdbdbd;
    --blog-thema-search-close: #d8d8d8;
    --blog-thema-search-input-bg: #111;
    --blog-thema-search-input-border: #3a3a3a;
    --blog-thema-search-input-color: #f3f3f3;
    --blog-thema-search-input-focus-border: #f5f5f5;
    --blog-thema-search-input-focus-shadow: 0 0 0 3px rgba(245, 245, 245, 0.12);
    --blog-thema-toc-active-bg: #1a1a1a;
    --blog-thema-toc-active-color: #f5f5f5;
    --blog-thema-toc-active-border: #f5f5f5;
    --blog-thema-back-to-top-bg: #121212;
    --blog-thema-back-to-top-border: #2b2b2b;
    --blog-thema-back-to-top-color: #f5f5f5;
    background-color: var(--color-background);
    color: var(--color-text-primary);
  }

  html:not(.theme-light) .border-gray-200,
  html:not(.theme-light) .border-gray-300 {
    border-color: #2b2b2b !important;
  }

  html:not(.theme-light) .text-gray-500,
  html:not(.theme-light) .text-gray-600,
  html:not(.theme-light) .text-gray-700,
  html:not(.theme-light) .text-gray-400 {
    color: #bdbdbd !important;
  }

  html:not(.theme-light) .bg-white {
    background-color: #121212 !important;
  }

  html:not(.theme-light) .bg-black {
    background-color: #f5f5f5 !important;
    color: #0f0f0f !important;
  }

  html:not(.theme-light) .hover\\:bg-black:hover {
    background-color: #f5f5f5 !important;
    color: #0f0f0f !important;
  }

  html:not(.theme-light) .hover\\:bg-red-500:hover {
    background-color: #ff6b6b !important;
  }

  html:not(.theme-light) .text-black {
    color: #f5f5f5 !important;
  }

  html:not(.theme-light) .reading-progress {
    background: #2b2b2b;
  }

  html:not(.theme-light) .reading-progress-bar {
    background: #f5f5f5;
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  border-radius: 4px;
}

.screen-reader-text:focus {
  display: inline-block;
}

.blog-thema-search-field {
  position: relative;
}

.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  z-index: 50;
  padding: 0.5rem 0;
}

.search-suggestions.hidden {
  display: none;
}

.search-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  background: transparent;
  font-size: 0.95rem;
}

.search-suggestion-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 1rem 0.45rem;
}

.search-suggestion-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
}

.search-suggestion-clear {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  border: 1px solid #d9d9d9;
  padding: 0.2rem 0.5rem;
}

.search-suggestion-clear:hover,
.search-suggestion-clear:focus {
  border-color: #000;
  color: #000;
}

.search-suggestion mark {
  background: transparent;
  color: inherit;
  font-weight: 700;
}

.search-suggestion:hover,
.search-suggestion:focus {
  background: #f5f5f5;
}

.search-suggestion.is-active {
  background: #f5f5f5;
}

.theme-dark .search-suggestions,
:is(body, html).theme-dark .search-suggestions {
  background: #121212;
  border-color: #2b2b2b;
}

.theme-dark .search-suggestion:hover,
.theme-dark .search-suggestion:focus,
:is(body, html).theme-dark .search-suggestion:hover,
:is(body, html).theme-dark .search-suggestion:focus {
  background: #1c1c1c;
}

.theme-dark .search-suggestion.is-active,
:is(body, html).theme-dark .search-suggestion.is-active {
  background: #1c1c1c;
}

.theme-dark .search-suggestion-label,
:is(body, html).theme-dark .search-suggestion-label,
.theme-dark .search-suggestion-clear,
:is(body, html).theme-dark .search-suggestion-clear {
  color: #bdbdbd;
}

.theme-dark .search-suggestion-clear,
:is(body, html).theme-dark .search-suggestion-clear {
  border-color: #3a3a3a;
}

.theme-dark .search-suggestion-clear:hover,
.theme-dark .search-suggestion-clear:focus,
:is(body, html).theme-dark .search-suggestion-clear:hover,
:is(body, html).theme-dark .search-suggestion-clear:focus {
  border-color: #f5f5f5;
  color: #f5f5f5;
}

.wp-block-image img {
  height: auto;
}

.alignwide {
  width: 100%;
}

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

.site-header-offset,
main#main-content {
  padding-top: var(--blog-thema-header-height, 80px);
}

body.blog-thema-no-sticky-header .site-header-offset,
body.blog-thema-no-sticky-header main#main-content {
  padding-top: 0;
}

body.blog-thema-page-header-disabled .site-header-offset,
body.blog-thema-page-header-disabled main#main-content {
  padding-top: 0;
}

main#main-content {
  scroll-margin-top: calc(var(--blog-thema-header-height, 80px) + 16px);
}

body.blog-thema-page-header-disabled main#main-content {
  scroll-margin-top: 16px;
}

.blog-thema-layout {
  display: block;
}

.blog-thema-layout-shell {
  max-width: var(--blog-thema-container-width, 1280px);
  margin: 0 auto;
  padding: 0 var(--spacing-container);
}

.blog-thema-layout__content {
  min-width: 0;
}

.blog-thema-layout__sidebar {
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .blog-thema-layout--right,
  .blog-thema-layout--left {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
    align-items: start;
  }

  .blog-thema-layout--left {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .blog-thema-layout--left .blog-thema-layout__content {
    order: 2;
  }

  .blog-thema-layout--left .blog-thema-layout__sidebar {
    order: 1;
  }

  .blog-thema-layout__sidebar {
    margin-top: 0;
    position: sticky;
    top: calc(var(--blog-thema-header-height, 80px) + 24px);
  }

  body.blog-thema-no-sticky-header .blog-thema-layout__sidebar {
    top: 24px;
  }

  body.blog-thema-page-header-disabled .blog-thema-layout__sidebar {
    top: 24px;
  }
}

.blog-thema-sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-thema-sidebar-area .widget {
  border: 1px solid var(--blog-thema-border);
  padding: 1.25rem;
  background: var(--blog-thema-surface);
}

.blog-thema-sidebar-area .widget-title {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blog-thema-muted);
  margin-bottom: 0.85rem;
}

.blog-thema-sidebar-area ul li + li {
  margin-top: 0.4rem;
}

.blog-thema-sidebar-area a:hover {
  color: #000;
}

.primary-nav a {
  position: relative;
}

.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #000;
  transition: width 0.3s ease;
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after,
.primary-nav a.is-active::after,
.primary-nav a[aria-current="page"]::after {
  width: 100%;
}

.primary-nav a.is-active,
.primary-nav a[aria-current="page"] {
  color: #000;
}

.prose {
  max-width: 70ch;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.mobile-nav a {
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--blog-thema-muted-strong);
}

.mobile-nav a:hover,
.mobile-nav .current-menu-item > a,
.mobile-nav .current_page_item > a,
.mobile-nav a.is-active,
.mobile-nav a[aria-current="page"] {
  color: #000;
}

.blog-thema-mobile-panel {
  width: 100%;
  background: var(--blog-thema-surface);
  border-top: 1px solid var(--blog-thema-border);
}

.blog-thema-mobile-panel__header {
  display: none;
}

.blog-thema-mobile-panel__close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--blog-thema-border-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.blog-thema-mobile-overlay {
  display: none;
}

body.blog-thema-mobile-menu-open {
  overflow: hidden;
}

body.blog-thema-mobile-menu-open .google-auto-placed,
body.blog-thema-mobile-menu-open ins.adsbygoogle,
body.blog-thema-mobile-menu-open iframe[id^="aswift_"],
body.blog-thema-mobile-menu-open iframe[id^="google_ads_iframe_"],
body.blog-thema-mobile-menu-open iframe[title="Advertisement"],
body.blog-thema-mobile-safe-active .google-auto-placed,
body.blog-thema-mobile-safe-active ins.adsbygoogle,
body.blog-thema-mobile-safe-active iframe[id^="aswift_"],
body.blog-thema-mobile-safe-active iframe[id^="google_ads_iframe_"],
body.blog-thema-mobile-safe-active iframe[title="Advertisement"] {
  pointer-events: none !important;
}

body.blog-thema-mobile-safe-active .blog-thema-back-to-top,
.blog-thema-back-to-top.is-safe-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px);
}

@media (max-width: 767.98px) {
  body.blog-thema-mobile-header .blog-thema-site-header {
    height: var(--blog-thema-mobile-header-height, 64px);
  }

  body.blog-thema-mobile-header .blog-thema-header-inner {
    min-height: var(--blog-thema-mobile-header-height, 64px);
  }

  body.blog-thema-mobile-header main#main-content,
  body.blog-thema-mobile-header .site-header-offset {
    padding-top: var(--blog-thema-mobile-header-height, 64px);
  }

  body.blog-thema-mobile-header main#main-content {
    scroll-margin-top: calc(var(--blog-thema-mobile-header-height, 64px) + 16px);
  }

  body.blog-thema-mobile-header.blog-thema-no-sticky-header main#main-content,
  body.blog-thema-mobile-header.blog-thema-no-sticky-header .site-header-offset {
    padding-top: 0;
  }
}

body.blog-thema-offcanvas-enabled .blog-thema-mobile-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(86vw, 360px);
  border-top: 0;
  border-left: 1px solid var(--blog-thema-border);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 80;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.25rem;
  visibility: hidden;
}

body.blog-thema-offcanvas-enabled.blog-thema-offcanvas-left .blog-thema-mobile-panel {
  left: 0;
  right: auto;
  border-left: 0;
  border-right: 1px solid var(--blog-thema-border);
  transform: translateX(-100%);
}

body.blog-thema-offcanvas-enabled .blog-thema-mobile-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

body.blog-thema-offcanvas-enabled .blog-thema-mobile-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--blog-thema-border);
}

body.blog-thema-offcanvas-enabled .blog-thema-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 70;
  pointer-events: none;
}

body.blog-thema-offcanvas-enabled .blog-thema-mobile-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body:not(.blog-thema-offcanvas-enabled) .blog-thema-mobile-panel {
  position: static;
  transform: none;
  visibility: visible;
  padding-top: 1rem;
}

body:not(.blog-thema-offcanvas-enabled) .blog-thema-mobile-panel__close {
  display: none;
}

.blog-thema-search-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: clamp(3.5rem, 8vh, 5.5rem) 1rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 95;
}

.blog-thema-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.blog-thema-search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
  border: 0;
  padding: 0;
}

.blog-thema-search-modal__panel {
  position: relative;
  width: min(760px, 100%);
  background: var(--blog-thema-surface);
  border: 1px solid var(--blog-thema-border);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 1.2rem 1.2rem 1.4rem;
  z-index: 1;
}

.blog-thema-search-modal__close {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--blog-thema-border-strong);
  color: var(--blog-thema-search-close);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.blog-thema-search-modal__form {
  margin-top: 0.6rem;
}

.blog-thema-search-modal__input {
  width: 100%;
  border: 1px solid var(--blog-thema-search-input-border);
  border-radius: 10px;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  background: var(--blog-thema-search-input-bg);
  color: var(--blog-thema-search-input-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-thema-search-modal__input:focus {
  border-color: var(--blog-thema-search-input-focus-border);
  box-shadow: var(--blog-thema-search-input-focus-shadow);
}

body.blog-thema-search-open {
  overflow: hidden;
}

mark {
  background: #ffefc7;
  color: #000;
  padding: 0 0.1em;
}

.cta-primary {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #000;
}

.cta-primary svg,
.cta-primary .cta-label {
  color: #fff !important;
}

.cta-label {
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

a:hover .cta-label {
  opacity: 1;
}

a.cta-primary .cta-label {
  opacity: 0.95;
}

a.cta-primary:hover {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444;
}

a.cta-primary:hover .cta-label {
  opacity: 1;
}

.reading-progress {
  position: fixed;
  top: calc(var(--blog-thema-header-height, 80px) + 16px);
  right: 14px;
  bottom: 20px;
  width: 3px;
  background: #e8e8e8;
  z-index: 49;
  pointer-events: none;
}

.reading-progress-bar {
  width: 100%;
  height: 0%;
  background: #000;
  transition: height 0.1s linear;
}

body.blog-thema-no-sticky-header .reading-progress {
  top: 20px;
}

body.blog-thema-page-header-disabled .reading-progress {
  top: 20px;
}

.single-post-content {
  max-width: min(70ch, var(--blog-thema-content-width, 760px));
  margin-left: auto;
  margin-right: auto;
}

.toc {
  border: 1px solid #e8e8e8;
  padding: 1.5rem;
}

.toc h3 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc li.toc-sub-item {
  margin-left: 1rem;
}

.toc a {
  display: block;
  color: #666;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.65rem;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.toc a:hover {
  color: #000;
  border-left-color: #bbb;
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #e8e8e8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sort-pill:hover {
  border-color: #000;
  color: #000;
}

.sort-pill.is-active {
  border-color: #000;
  color: #000;
}

.toc a.is-active {
  color: var(--blog-thema-toc-active-color);
  border-left-color: var(--blog-thema-toc-active-border);
  background: var(--blog-thema-toc-active-bg);
  font-weight: 600;
}

.post-media-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.single-post-article {
  display: flow-root;
}

.single-post-article > .max-w-3xl {
  max-width: var(--blog-thema-content-width, 760px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.blog-thema-hook {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--blog-thema-border);
  background: var(--blog-thema-surface);
  color: var(--color-text-primary);
}

.blog-thema-hook p:last-child {
  margin-bottom: 0;
}

.blog-thema-element-block {
  margin: 1.5rem 0;
}

.blog-thema-element-block:first-child {
  margin-top: 0;
}

.blog-thema-element-block:last-child {
  margin-bottom: 0;
}

.blog-thema-back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--blog-thema-back-to-top-border);
  background: var(--blog-thema-back-to-top-bg);
  color: var(--blog-thema-back-to-top-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  z-index: 60;
}

.blog-thema-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.blog-thema-back-to-top:hover {
  border-color: var(--blog-thema-surface-strong);
}

.home-hero-media {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.home-category-card {
  overflow: hidden;
}

.home-category-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--blog-thema-border);
}

.home-category-card__media--placeholder {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #eef2f7 0%, #dce4ee 100%);
}

.home-category-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.9rem;
  padding: 2rem;
  color: #26364a;
}

.home-category-card__placeholder span {
  max-width: 15ch;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}

.blog-thema-footer__heading {
  color: #d1d5db;
}

.blog-thema-footer a {
  text-underline-offset: 0.2em;
}

.blog-thema-footer a:hover {
  text-decoration: underline;
}

.home-spotlights {
  display: grid;
  gap: 5rem;
}

.home-spotlight {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--spotlight-border, var(--blog-thema-border));
  background: linear-gradient(180deg, var(--spotlight-tint, #f6f6f6) 0%, var(--blog-thema-surface) 22rem);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.05);
}

.home-spotlight + .home-spotlight {
  padding-top: 0;
  border-top: 1px solid var(--spotlight-border, var(--blog-thema-border));
}

.blog-thema-tone--neutral,
.home-spotlight--tone-neutral {
  --spotlight-accent: #111111;
  --spotlight-tint: #f6f6f6;
  --spotlight-border: #d9d9d9;
}

.blog-thema-tone--cobalt,
.home-spotlight--tone-cobalt {
  --spotlight-accent: #274c8a;
  --spotlight-tint: #eef4ff;
  --spotlight-border: #b5c7ea;
}

.blog-thema-tone--sage,
.home-spotlight--tone-sage {
  --spotlight-accent: #486451;
  --spotlight-tint: #edf5ef;
  --spotlight-border: #b9cdbd;
}

.blog-thema-tone--rose,
.home-spotlight--tone-rose {
  --spotlight-accent: #9d4654;
  --spotlight-tint: #fbf0f3;
  --spotlight-border: #e0bac3;
}

.blog-thema-tone--sand,
.home-spotlight--tone-sand {
  --spotlight-accent: #8c643b;
  --spotlight-tint: #faf3e8;
  --spotlight-border: #dfc7a6;
}

.category-archive-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 4rem;
  border: 1px solid var(--spotlight-border, var(--blog-thema-border));
  background:
    linear-gradient(180deg, var(--spotlight-tint, #f6f6f6) 0%, var(--blog-thema-surface) 22rem);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
}

.category-archive-hero__media {
  position: relative;
  min-height: 280px;
  border-bottom: 1px solid var(--spotlight-border, var(--blog-thema-border));
  background: var(--spotlight-tint, #f6f6f6);
}

.category-archive-hero__media img {
  position: absolute;
  inset: 0;
}

.category-archive-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.35) 100%);
}

.category-archive-hero__body {
  position: relative;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.category-archive-hero__kicker {
  margin-bottom: 1rem;
  color: var(--spotlight-accent, var(--blog-thema-surface-strong));
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.category-archive-hero__title {
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.category-archive-hero__description {
  max-width: 52rem;
  color: var(--blog-thema-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.category-archive-hero__description > *:last-child {
  margin-bottom: 0;
}

.category-archive-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.75rem;
  color: var(--spotlight-accent, var(--blog-thema-surface-strong));
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-spotlight__banner {
  position: relative;
  min-height: 220px;
  border-bottom: 1px solid var(--spotlight-border, var(--blog-thema-border));
  background: var(--spotlight-tint, #f6f6f6);
}

.home-spotlight__banner img {
  position: absolute;
  inset: 0;
}

.home-spotlight__banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.48) 100%);
}

.home-spotlight__banner-label {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 1;
}

.home-spotlight__banner-label span {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-spotlight__inner {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.home-spotlight__action {
  color: var(--spotlight-accent, var(--blog-thema-surface-strong));
}

.home-spotlight__action:hover {
  gap: 0.8rem;
}

.home-spotlight__cta {
  border: 1px solid var(--spotlight-accent, var(--blog-thema-surface-strong));
  color: var(--spotlight-accent, var(--blog-thema-surface-strong));
  transition: background-color 0.2s ease, color 0.2s ease, gap 0.2s ease;
}

.home-spotlight__cta:hover {
  gap: 0.9rem;
  background: var(--spotlight-accent, var(--blog-thema-surface-strong));
  color: #fff;
}

.home-spotlight__intro {
  max-width: 46rem;
  margin: -1.5rem 0 2.5rem;
  color: var(--blog-thema-muted);
}

.home-spotlight__feature {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.home-spotlight__stack {
  display: grid;
  gap: 1rem;
}

.home-spotlight-card {
  background: var(--blog-thema-surface);
  border: 1px solid var(--blog-thema-border);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-spotlight-card:hover {
  border-color: var(--blog-thema-surface-strong);
  transform: translateY(-2px);
}

.home-spotlight-card__link {
  display: grid;
  gap: 1rem;
  height: 100%;
  padding: 1rem;
}

.home-spotlight-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.home-spotlight-card__content {
  min-width: 0;
}

.home-spotlight-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid var(--spotlight-accent, var(--blog-thema-surface-strong));
  color: var(--spotlight-accent, var(--blog-thema-surface-strong));
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-spotlight-card__title {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 0.85rem;
  transition: color 0.2s ease;
}

.home-spotlight-card:hover .home-spotlight-card__title {
  color: var(--spotlight-accent, #ef4444);
}

.home-spotlight-card__excerpt {
  color: var(--blog-thema-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-spotlight-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blog-thema-muted);
}

@media (max-width: 767px) {
  .home-page-shell .home-section {
    padding-bottom: 5rem !important;
  }

  .home-page-shell .home-hero-section {
    padding-top: 5rem !important;
    padding-bottom: 5.5rem !important;
  }

  .home-hero__kicker {
    margin-bottom: 2rem !important;
  }

  .home-hero__title {
    margin-bottom: 2rem !important;
    font-size: clamp(2.85rem, 13vw, 4.25rem) !important;
    line-height: 1.02 !important;
  }

  .home-hero__subtitle {
    margin-bottom: 2.25rem !important;
    font-size: 1.05rem !important;
  }

  .home-hero__actions a {
    min-height: 44px;
    padding: 0.75rem 1.1rem !important;
  }

  .blog-thema-section-heading {
    margin-bottom: 2.75rem !important;
  }

  .blog-thema-section-heading h2 {
    margin-bottom: 0 !important;
    font-size: 2rem !important;
  }

  .post-card:not(.post-card--featured) .post-card__media {
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin-bottom: 1.1rem !important;
  }

  .post-card--featured .post-card__media {
    aspect-ratio: 16 / 9;
  }

  .post-card--featured h2 {
    margin-bottom: 1.25rem !important;
    font-size: 2rem !important;
  }

  .post-card--featured .post-card__content > p {
    display: -webkit-box;
    margin-bottom: 1.25rem !important;
    overflow: hidden;
    font-size: 1rem !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .post-card:not(.post-card--featured) h3 {
    margin-bottom: 0.85rem !important;
    font-size: 1.4rem !important;
  }

  .home-categories-section {
    padding-top: 5rem !important;
  }

  .home-category-card__media {
    aspect-ratio: 16 / 9;
  }

  .home-category-card__body {
    padding: 1.5rem !important;
  }

  .home-category-card__body h3 {
    margin-bottom: 0.8rem !important;
    font-size: 1.65rem !important;
  }

  .home-category-card__body p {
    margin-bottom: 1rem !important;
  }

  .blog-thema-footer__inner {
    padding-top: 3.5rem !important;
    padding-bottom: 2rem !important;
  }

  .blog-thema-footer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 1.5rem !important;
    margin-bottom: 2.5rem !important;
  }

  .blog-thema-footer__brand,
  .blog-thema-footer__connect {
    grid-column: 1 / -1;
  }

  .blog-thema-footer__heading {
    margin-bottom: 1.25rem !important;
    color: #e5e7eb;
  }

  .blog-thema-footer__bottom {
    padding-top: 1.25rem !important;
  }

  .home-hero-media {
    min-height: 320px;
  }

  .category-archive-hero {
    margin-bottom: 3rem;
  }

  .category-archive-hero__media {
    min-height: 200px;
  }

  .home-spotlights {
    gap: 3.5rem;
  }

  .home-spotlight + .home-spotlight {
    padding-top: 0;
  }

  .home-spotlight__intro {
    margin-top: -1rem;
  }
}

@media (min-width: 768px) {
  .home-spotlight-card__link {
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    align-items: stretch;
  }
}

@media (min-width: 1024px) {
  .home-spotlight__feature {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within,
  body {
    scroll-behavior: auto;
  }

  .blog-thema-site-header,
  .blog-thema-header-inner,
  .primary-nav a::after,
  .blog-thema-mobile-panel,
  .blog-thema-mobile-overlay,
  .blog-thema-search-modal,
  .blog-thema-search-modal__input,
  .cta-label,
  .reading-progress-bar,
  .toc a,
  .sort-pill,
  .blog-thema-back-to-top {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* Prevent Jetpack helper overlay from affecting frontend media layout */
body .jetpack-boost-guide,
body .jetpack-boost-guide * {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Dynamic Accent Colors */
.text-accent { color: var(--blog-thema-accent, #ef4444); }
.bg-accent { background-color: var(--blog-thema-accent, #ef4444); }
.border-accent { border-color: var(--blog-thema-accent, #ef4444); }
.hover\:text-accent:hover { color: var(--blog-thema-accent, #ef4444) !important; }
.hover\:bg-accent:hover { background-color: var(--blog-thema-accent, #ef4444) !important; }
.hover\:border-accent:hover { border-color: var(--blog-thema-accent, #ef4444) !important; }
.group:hover .group-hover\:text-accent { color: var(--blog-thema-accent, #ef4444) !important; }

/* Font Family Reset */
body { font-family: var(--blog-thema-font, var(--font-sans)); }

/* Floating TOC */
.toc-floating {
  border: none;
  padding: 0;
  border-left: 2px solid var(--blog-thema-border);
  padding-left: 1.25rem;
  font-size: 0.875rem;
  max-height: calc(100vh - var(--blog-thema-header-height, 80px) - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.toc-floating::-webkit-scrollbar {
  width: 4px;
}

.toc-floating::-webkit-scrollbar-track {
  background: transparent;
}

.toc-floating::-webkit-scrollbar-thumb {
  background-color: var(--blog-thema-border-strong);
  border-radius: 4px;
}

.toc-floating a {
  padding: 0.25rem 0;
  border-left: none;
  padding-left: 0;
  transition: color 0.2s ease;
}

.toc-floating a:hover {
  border-left: none;
}

.toc-floating a.is-active {
  background: transparent;
  color: var(--blog-thema-accent, #ef4444);
  border-left: none;
}

/* Masonry Layout */
.columns-1 { column-count: 1; column-gap: 2rem; }
@media (min-width: 768px) { .md\:columns-2 { column-count: 2; } }
@media (min-width: 1024px) { .lg\:columns-3 { column-count: 3; } }
.break-inside-avoid { break-inside: avoid; page-break-inside: avoid; }
