/*
Theme Name: Theme2 Container 960
Theme URI: https://example.com/theme2
Author: Local
Author URI: https://example.com
Description: Motyw blokowy WordPress z kontenerem 1140px dla header/footer i layoutem Gutenberg 1140/1440/full.
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Version: 1.0.25
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme2
Tags: block-theme, full-site-editing, gutenberg
*/

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/onest/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/onest/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/onest/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.site-container {
  box-sizing: border-box;
  width: min(100% - 2rem, 1140px);
  margin-inline: auto;
}

:root {
  --theme2-font-sans: "Onest", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --theme2-text-gutter: clamp(0px, calc((1172px - 100vw) / 2), 1rem);
  --theme2-font-size-body: 0.9375rem;
  --theme2-font-size-ui: 0.875rem;
  --theme2-font-size-note: 0.875rem;
  --theme2-font-size-small: 0.875rem;
  --theme2-font-size-meta: 0.8125rem;
  --theme2-font-size-micro: 0.75rem;
  --theme2-font-size-eyebrow: 0.75rem;
  --theme2-font-size-ui-large: 0.9375rem;
  --theme2-font-size-icon: 0.91rem;
  --theme2-font-size-h1: clamp(1.85rem, 3vw, 2.125rem);
  --theme2-font-size-h2: clamp(1.5rem, 2.3vw, 1.7rem);
  --theme2-font-size-h3: clamp(1.25rem, 1.7vw, 1.375rem);
  --theme2-font-size-h4: 1.125rem;
  --theme2-font-size-h5: 1rem;
  --theme2-font-size-h6: 0.9375rem;
  --theme2-line-height-body: 1.6;
  --theme2-font-weight-normal: 400;
  --theme2-font-weight-semibold: 700;
  --theme2-font-weight-bold: 700;
  --theme2-font-weight-heading: 300;
  --theme2-text-color: #41658a;
  --theme2-accent-color: #90be6d;
  --theme2-accent-text-color: #527a35;
  --theme2-accent-hover-text-color: #334155;
  --theme2-hero-subtitle-color: #41658a;
  --theme2-button-base-bg: #ffffff;
  --theme2-button-base-text: var(--theme2-accent-text-color);
  --theme2-button-hover-fill: var(--theme2-accent-color);
  --theme2-button-hover-text: var(--theme2-accent-hover-text-color);
  --theme2-button-border: var(--theme2-accent-color);
}

body,
button,
input,
select,
textarea {
  font-family: var(--theme2-font-sans);
}

body {
  color: var(--theme2-text-color);
  font-size: var(--theme2-font-size-body);
  line-height: var(--theme2-line-height-body);
  font-weight: var(--theme2-font-weight-normal);
}

button,
input,
select,
textarea {
  font-size: var(--theme2-font-size-body);
  line-height: var(--theme2-line-height-body);
}

:where(h1, h1.wp-block-heading) {
  font-size: var(--theme2-font-size-h1);
  line-height: 1.08;
  font-weight: var(--theme2-font-weight-heading);
}

:where(h2, h2.wp-block-heading) {
  font-size: var(--theme2-font-size-h2);
  line-height: 1.12;
  font-weight: var(--theme2-font-weight-heading);
}

:where(h3, h3.wp-block-heading) {
  font-size: var(--theme2-font-size-h3);
  line-height: 1.2;
  font-weight: var(--theme2-font-weight-heading);
}

:where(h4, h4.wp-block-heading) {
  font-size: var(--theme2-font-size-h4);
  line-height: 1.24;
  font-weight: var(--theme2-font-weight-heading);
}

:where(h5, h5.wp-block-heading) {
  font-size: var(--theme2-font-size-h5);
  line-height: 1.3;
  font-weight: var(--theme2-font-weight-heading);
}

:where(h6, h6.wp-block-heading) {
  font-size: var(--theme2-font-size-h6);
  line-height: 1.35;
  font-weight: var(--theme2-font-weight-heading);
}

:is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title, .wp-block-query-title, .wp-block-site-title) {
  font-weight: var(--theme2-font-weight-heading) !important;
  font-variation-settings: "wght" var(--theme2-font-weight-heading);
}

:is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title, .wp-block-query-title, .wp-block-site-title) :is(strong, b) {
  font-weight: inherit !important;
}

/* Marketing blocks: inherit theme layout widths instead of plugin-fixed 960px. */
body :is(
  .wp-block-theme2-marketing-hero .theme2-marketing-hero__inner,
  .wp-block-theme2-marketing-cta .theme2-marketing-cta__inner,
  .wp-block-theme2-marketing-split .theme2-marketing-split__inner,
  .wp-block-theme2-marketing-timeline .theme2-marketing-timeline__inner,
  .wp-block-theme2-marketing-testimonials > *,
  .wp-block-theme2-marketing-feature-grid > *,
  .wp-block-theme2-marketing-process > *,
  .wp-block-theme2-marketing-services > *,
  .wp-block-theme2-marketing-stats > *,
  .wp-block-theme2-marketing-faq > *,
  .wp-block-theme2-marketing-portfolio-latest > *
) {
  max-width: var(--wp--style--global--content-size, 1140px);
}

.single-portfolio .entry-content .theme2-portfolio-project-thumbnail-wrap {
  margin-top: 1.3rem;
  margin-bottom: 0;
}

.single-portfolio .entry-content .theme2-portfolio-project-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d7deea;
  border-radius: 14px;
}

.post-type-archive-portfolio .theme2-portfolio-archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: center;
}

.post-type-archive-portfolio .theme2-portfolio-archive-item__content {
  min-width: 0;
}

.post-type-archive-portfolio .theme2-portfolio-archive-item__media {
  width: 100%;
}

.post-type-archive-portfolio .theme2-portfolio-archive-item__media .wp-block-post-featured-image {
  margin: 0;
}

.post-type-archive-portfolio .theme2-portfolio-archive-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: left top;
  border: 1px solid #d7deea;
  border-radius: 14px;
}

@media (max-width: 900px) {
  .post-type-archive-portfolio .theme2-portfolio-archive-item {
    grid-template-columns: 1fr;
  }

  .post-type-archive-portfolio .theme2-portfolio-archive-item__media {
    order: 2;
  }
}

/* Homepage form (Contact Form 7): centered card layout aligned with marketing sections. */
body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 {
  box-sizing: border-box;
  width: min(100%, var(--wp--style--global--content-size, 1140px));
  margin-inline: auto;
  margin-top: clamp(1.6rem, 3.6vw, 2.4rem);
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 form {
  max-width: 760px;
  margin: clamp(1rem, 2vw, 1.3rem) auto 0;
  border: 1px solid #d7deea;
  border-radius: var(--theme2-marketing-card-radius, 16px);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
  padding: var(--theme2-marketing-box-padding-y, clamp(1.15rem, 2vw, 1.35rem)) var(--theme2-marketing-box-padding-x, clamp(1.2rem, 2.4vw, 1.5rem));
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 form p {
  margin: 0;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 form p + p {
  margin-top: 0.92rem;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 form label {
  display: block;
  color: var(--theme2-text-color);
  font-weight: var(--theme2-font-weight-semibold);
  line-height: 1.35;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 .wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.42rem;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 :is(
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select
) {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 0.62rem 0.78rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--theme2-text-color);
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 textarea {
  min-height: 155px;
  resize: vertical;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 :is(
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select
):focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22);
  outline: none;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 p.has-spinner {
  text-align: center;
}

/* CF7 submit: force exact Hero/CTA button visuals and motion. */
body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 button.wpcf7-submit.theme2-marketing-button {
  --theme2-button-fill: var(--theme2-button-hover-fill) !important;
  --theme2-button-fill-text: var(--theme2-button-hover-text) !important;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  font-weight: var(--theme2-font-weight-semibold);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 40px;
  padding-top: 0.42em;
  padding-right: 40px;
  padding-bottom: 0.42em;
  padding-left: 40px;
  border: 1px solid var(--theme2-button-border) !important;
  border-radius: 10px !important;
  background-color: var(--theme2-button-base-bg) !important;
  background-image:
    linear-gradient(var(--theme2-button-fill), var(--theme2-button-fill)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%);
  background-repeat: no-repeat;
  background-size: 100% 0, 100% 100%;
  background-position: 0 100%, 0 0;
  color: var(--theme2-button-base-text) !important;
  box-shadow: 0 7px 16px rgba(17, 17, 17, 0.16), 0 2px 5px rgba(17, 17, 17, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: color 0.3s ease, background-size 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 button.wpcf7-submit.theme2-marketing-button:is(:hover, :focus-visible) {
  border-color: var(--theme2-button-fill) !important;
  color: var(--theme2-button-fill-text) !important;
  background-size: 100% 100%, 100% 100%;
  box-shadow: 0 10px 22px rgba(144, 190, 109, 0.2), 0 3px 8px rgba(144, 190, 109, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 button.wpcf7-submit.theme2-marketing-button:active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px rgba(17, 17, 17, 0.16), 0 2px 5px rgba(17, 17, 17, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 button.wpcf7-submit.theme2-marketing-button {
    transition: none;
  }

  body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 button.wpcf7-submit.theme2-marketing-button:active {
    transform: none;
  }
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 .wpcf7-spinner {
  margin-left: 0.55rem;
}

body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 form .wpcf7-response-output {
  margin: 0.9rem 0 0;
  border-radius: 10px;
  font-size: var(--theme2-font-size-ui);
}

@media (max-width: 860px) {
  body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 {
    margin-top: clamp(1.1rem, 5vw, 1.8rem);
    padding-top: var(--theme2-marketing-section-padding-y, clamp(2.6rem, 5.8vw, 4.4rem));
    padding-right: var(--theme2-home-mobile-gutter, 2em);
    padding-bottom: var(--theme2-marketing-section-padding-y, clamp(2.6rem, 5.8vw, 4.4rem));
    padding-left: var(--theme2-home-mobile-gutter, 2em);
  }

  body:is(.home, .front-page):not(.block-editor-iframe__body):not(.editor-styles-wrapper) .wpcf7 form {
    margin-top: 0;
  }
}

/* Let user-selected block background color win over pricing default gradients. */
body :is(.wp-block-theme2-marketing-pricing.theme2-marketing-pricing.has-background, .theme2-marketing-pricing-editor.has-background) {
  background-image: none;
}

/* Keep Hero side gutters consistent with CTA while viewport shrinks (frontend only). */
@media (max-width: 1280px) and (min-width: 861px) {
  body:not(.block-editor-iframe__body):not(.editor-styles-wrapper) .theme2-marketing-hero {
    padding-right: min(var(--theme2-hero-padding-right, clamp(1rem, 3vw, 2rem)), clamp(1rem, 3vw, 2rem)) !important;
    padding-left: min(var(--theme2-hero-padding-left, clamp(1rem, 3vw, 2rem)), clamp(1rem, 3vw, 2rem)) !important;
  }
}

body:not(.block-editor-iframe__body) .wp-site-blocks {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

body:not(.block-editor-iframe__body) .wp-site-blocks > main {
  flex: 1;
}

html.has-modal-open,
body.has-modal-open {
  overflow: auto !important;
}

footer.wp-block-template-part,
footer.wp-block-template-part :is(p, a, span, .has-text-color, .theme2-footer-copyright, .theme2-footer-privacy-link) {
  color: var(--theme2-text-color) !important;
}

/* Keep site header pinned on scroll only on frontend (not editor iframe). */
body:not(.block-editor-iframe__body) header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
}

/* Header nav links need horizontal breathing room */
header .wp-block-navigation .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.625rem;
}

/* Strong, consistent keyboard focus indicator (WCAG 2.2 focus appearance) */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Keep plain links neutral (no browser default blue/purple states). */
:where(a:not(.wp-element-button):not(.wp-block-button__link):not(.theme2-marketing-button)) {
  color: currentColor;
}

:where(a:not(.wp-element-button):not(.wp-block-button__link):not(.theme2-marketing-button)):visited {
  color: currentColor;
}

:where(a:not(.wp-element-button):not(.wp-block-button__link):not(.theme2-marketing-button)):is(:hover, :focus-visible) {
  color: currentColor;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Better hover affordance for nav links */
header .wp-block-navigation .wp-block-navigation-item__content:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Multi-level navigation: keep submenu toggles and dropdowns readable. */
header .wp-block-navigation .wp-block-navigation-item.has-child {
  align-items: center;
}

header .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation-item__content {
  padding-right: 0.2rem;
}

header .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation-submenu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 1.25rem;
  margin-left: 0.12rem;
  padding: 0;
  border-radius: 6px;
}

header .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-icon {
  margin-left: 0;
}

header .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-icon svg {
  width: 0.68em;
  height: 0.68em;
}

@media (min-width: 1001px) {
  header .wp-block-navigation .wp-block-navigation__submenu-container {
    min-width: 220px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    padding: 0.35rem;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  }

  header .wp-block-navigation .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content,
  header .wp-block-navigation .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-submenu__toggle {
    min-height: 40px;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
  }

  header .wp-block-navigation .wp-block-navigation__submenu-container > .wp-block-navigation-item:is(:hover, :focus-within) > .wp-block-navigation-item__content,
  header .wp-block-navigation .wp-block-navigation__submenu-container > .wp-block-navigation-item:is(:hover, :focus-within) > .wp-block-navigation-submenu__toggle {
    background: #f3f6fa;
    text-decoration: none;
  }
}

/* Header search toggle and collapsible panel */
header .theme2-header-brand {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

header .theme2-header-brand .wp-block-site-title {
  margin: 0;
  min-width: 0;
  color: #41658a;
  font-size: 1.55rem;
  font-weight: var(--theme2-font-weight-heading);
  line-height: 1.1;
}

header .theme2-header-brand .wp-block-site-title a {
  color: #41658a;
  font-weight: inherit;
  overflow-wrap: anywhere;
  text-decoration: none;
}

header .theme2-header-brand .wp-block-site-title a:visited {
  color: #41658a;
}

header .theme2-header-brand .wp-block-site-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: #64748b;
  font-size: var(--theme2-font-size-body);
  line-height: 1.25;
}

header .theme2-header-brand .wp-block-site-tagline::before {
  content: "-";
  color: #94a3b8;
}

header .theme2-language-switcher {
  flex-shrink: 0;
}

header .theme2-language-switcher__list {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

header .theme2-language-switcher__item {
  margin: 0;
  padding: 0;
}

header .theme2-language-switcher :is(.theme2-language-switcher__link, .theme2-language-switcher__current) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0.18rem;
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1;
  text-decoration: none;
}

header .theme2-language-switcher__link:is(:hover, :focus-visible) {
  border-color: #cbd5e1;
  background: #f8fafc;
  text-decoration: none;
}

header .theme2-language-switcher__current {
  border-color: #d0d7e2;
  background: #f8fafc;
}

header .theme2-language-switcher :is(img, .theme2-language-switcher__code) {
  display: block;
}

header .theme2-language-switcher img {
  width: 20px;
  height: auto;
  border-radius: 2px;
}

header .theme2-language-switcher__code {
  min-width: 20px;
  font-size: var(--theme2-font-size-eyebrow);
  font-weight: var(--theme2-font-weight-bold);
  letter-spacing: 0.08em;
}

header .theme2-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

header .theme2-header-search-toggle {
  --theme2-button-fill: transparent;
  --theme2-button-fill-text: var(--theme2-text-color);
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2341658a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cline x1='16' y1='16' x2='21' y2='21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  color: var(--theme2-text-color);
  box-shadow: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

header .theme2-header-search-toggle::after {
  content: none;
}

header .theme2-header-search-toggle:is(:hover, :focus-visible) {
  background-color: transparent;
  border-color: #94a3b8;
  color: var(--theme2-text-color);
  box-shadow: none;
  transform: none;
}

header .theme2-header-search-toggle:active {
  transform: none;
  box-shadow: none;
}

header .theme2-header-search-wrap {
  margin-top: 0;
}

header.theme2-search-open .theme2-header-search-wrap {
  margin-top: 0.75rem;
}

header .theme2-header-menu-wrap {
  display: none;
  margin-top: 0;
}

header.theme2-menu-open .theme2-header-menu-wrap {
  display: block;
  margin-top: 0.25rem;
}

header .theme2-header-search-panel {
  display: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

header.theme2-search-open .theme2-header-search-panel {
  display: block;
}

header .theme2-header-search-panel[hidden] {
  display: none !important;
}

header .theme2-header-search-panel .wp-block-search__inside-wrapper,
.search .theme2-search-page-form .wp-block-search__inside-wrapper,
.error404 .theme2-404-search .wp-block-search__inside-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding-left: 0.8rem;
  padding-right: 0.3rem;
  min-height: 46px;
  background: #ffffff;
  overflow: hidden;
}

header .theme2-header-search-panel .wp-block-search__inside-wrapper:focus-within,
.search .theme2-search-page-form .wp-block-search__inside-wrapper:focus-within,
.error404 .theme2-404-search .wp-block-search__inside-wrapper:focus-within {
  border-color: #94a3b8;
}

header .theme2-header-search-panel .wp-block-search__input,
.search .theme2-search-page-form .wp-block-search__input,
.error404 .theme2-404-search .wp-block-search__input {
  border: 0;
  margin: 0;
  padding: 0;
  min-height: 44px;
  line-height: 1.35;
}

header .theme2-header-search-panel .wp-block-search__button,
.search .theme2-search-page-form .wp-block-search__button,
.error404 .theme2-404-search .wp-block-search__button {
  margin: 0;
  min-height: 36px;
  padding-inline: 0.85rem;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  background-size: auto;
  background-position: center;
  box-shadow: none;
  color: var(--theme2-text-color);
  width: auto;
  white-space: nowrap;
}

header .theme2-header-search-panel .wp-block-search__button::after,
.search .theme2-search-page-form .wp-block-search__button::after,
.error404 .theme2-404-search .wp-block-search__button::after {
  content: none;
}

header .theme2-header-search-panel .wp-block-search__button:is(:hover, :focus-visible),
.search .theme2-search-page-form .wp-block-search__button:is(:hover, :focus-visible),
.error404 .theme2-404-search .wp-block-search__button:is(:hover, :focus-visible) {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: none;
  color: var(--theme2-text-color) !important;
  opacity: 1;
  transform: none;
}

header .theme2-header-search-panel .wp-block-search__button:active,
.search .theme2-search-page-form .wp-block-search__button:active,
.error404 .theme2-404-search .wp-block-search__button:active {
  transform: none;
  box-shadow: none;
}

/* Keep back-home button visually aligned with Hero/CTA button variant. */
.theme2-back-home-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

/* Never underline links in the back-home buttons above footer. */
.theme2-back-home-actions a,
.theme2-back-home-actions a:is(:visited, :hover, :focus-visible, :active) {
  text-decoration: none !important;
}

/* Keep floating scroll-top arrow free from link underline on every template. */
a.theme2-scroll-top-button,
a.theme2-scroll-top-button:is(:visited, :hover, :focus, :focus-visible, :active) {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

/* Use the exact Hero button visuals for back-home/scroll-top controls. */
.theme2-back-home-button,
.theme2-back-home-main-button,
.theme2-scroll-top-button {
  --theme2-button-fill: var(--theme2-button-hover-fill) !important;
  --theme2-button-fill-text: var(--theme2-button-hover-text) !important;
  background-color: var(--theme2-button-base-bg) !important;
  border-color: var(--theme2-button-border) !important;
  color: var(--theme2-button-base-text) !important;
  border-radius: 10px !important;
}

.theme2-scroll-top-button {
  --theme2-button-fill: #41658a !important;
  --theme2-button-fill-text: #ffffff !important;
  position: fixed;
  left: clamp(0.85rem, 2vw, 1.35rem);
  bottom: 60px;
  z-index: 1100;
  min-width: 48px;
  width: 48px;
  min-height: 48px;
  height: 48px;
  padding: 0;
  border-color: #41658a !important;
  background-color: var(--theme2-button-base-bg);
  color: #41658a !important;
  font-size: var(--theme2-font-size-icon);
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.theme2-scroll-top-button:is(:hover, :focus-visible) {
  border-color: #41658a !important;
  color: #ffffff !important;
}

.theme2-scroll-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.theme2-scroll-top-button > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
}

/* Hide homepage H1 visually, keep it for SEO/accessibility */
.seo-hidden-h1 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Global default button styling */
:where(
  .wp-element-button,
  .wp-block-button__link,
  .theme2-back-home-button,
  .theme2-back-home-main-button,
  .theme2-scroll-top-button,
  button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close):not(.wp-block-navigation-item__content):not(.wp-block-navigation-submenu__toggle):not(.theme2-marketing-button):not(.theme2-home-form-submit):not(.wpcf7-submit),
  input[type="submit"]:not(.wpcf7-submit),
  input[type="button"],
  input[type="reset"]
) {
  --theme2-button-fill: var(--theme2-button-hover-fill);
  --theme2-button-fill-text: var(--theme2-button-hover-text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  border: 1px solid var(--theme2-button-border);
  border-radius: 10px;
  background-color: var(--theme2-button-base-bg);
  color: var(--theme2-button-base-text);
  font-size: var(--theme2-font-size-ui);
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-weight: var(--theme2-font-weight-semibold);
  isolation: isolate;
  overflow: hidden;
  background-image:
    linear-gradient(var(--theme2-button-fill), var(--theme2-button-fill)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%);
  background-repeat: no-repeat;
  background-size: 100% 0, 100% 100%;
  background-position: 0 100%, 0 0;
  min-height: 40px;
  padding-top: 0.42em;
  padding-right: 40px;
  padding-bottom: 0.42em;
  padding-left: 40px;
  box-shadow: 0 7px 16px rgba(17, 17, 17, 0.16), 0 2px 5px rgba(17, 17, 17, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: color 0.3s ease, background-size 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

:where(
  .wp-element-button,
  .wp-block-button__link,
  .theme2-back-home-button,
  .theme2-back-home-main-button,
  .theme2-scroll-top-button,
  button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close):not(.wp-block-navigation-item__content):not(.wp-block-navigation-submenu__toggle):not(.theme2-marketing-button):not(.theme2-home-form-submit):not(.wpcf7-submit),
  input[type="submit"]:not(.wpcf7-submit),
  input[type="button"],
  input[type="reset"]
):is(:hover, :focus-visible) {
  border-color: var(--theme2-button-fill);
  color: var(--theme2-button-fill-text) !important;
  background-size: 100% 100%, 100% 100%;
  box-shadow: 0 10px 22px rgba(144, 190, 109, 0.2), 0 3px 8px rgba(144, 190, 109, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

/* Keep plugin block buttons aligned with theme button sizing. */
body:not(.block-editor-iframe__body):not(.editor-styles-wrapper) .theme2-marketing-button {
  background-origin: border-box;
  background-clip: border-box;
  backface-visibility: hidden;
}

body:not(.block-editor-iframe__body):not(.editor-styles-wrapper) .theme2-marketing-button:is(:hover, :focus-visible) {
  background-size: 100% 101%, 100% 100%;
}

:where(
  .wp-element-button,
  .wp-block-button__link,
  .theme2-back-home-button,
  .theme2-back-home-main-button,
  .theme2-scroll-top-button,
  button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close):not(.wp-block-navigation-item__content):not(.wp-block-navigation-submenu__toggle):not(.theme2-marketing-button):not(.theme2-home-form-submit):not(.wpcf7-submit),
  input[type="submit"]:not(.wpcf7-submit),
  input[type="button"],
  input[type="reset"]
):active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px rgba(17, 17, 17, 0.16), 0 2px 5px rgba(17, 17, 17, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  :where(
    .wp-element-button,
    .wp-block-button__link,
    .theme2-back-home-button,
    .theme2-back-home-main-button,
    .theme2-scroll-top-button,
    button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close):not(.wp-block-navigation-item__content):not(.wp-block-navigation-submenu__toggle):not(.theme2-marketing-button):not(.theme2-home-form-submit):not(.wpcf7-submit),
    input[type="submit"]:not(.wpcf7-submit),
    input[type="button"],
    input[type="reset"]
  ) {
    transition: none;
  }

  :where(
    .wp-element-button,
    .wp-block-button__link,
    .theme2-back-home-button,
    .theme2-back-home-main-button,
    .theme2-scroll-top-button,
    button:not(.wp-block-navigation__responsive-container-open):not(.wp-block-navigation__responsive-container-close):not(.wp-block-navigation-item__content):not(.wp-block-navigation-submenu__toggle):not(.theme2-marketing-button):not(.theme2-home-form-submit):not(.wpcf7-submit),
    input[type="submit"]:not(.wpcf7-submit),
    input[type="button"],
    input[type="reset"]
  ):active {
    transform: none;
  }
}

/* Responsive nav controls should not look like CTA buttons. */
header .wp-block-navigation__responsive-container-open,
header .wp-block-navigation__responsive-container-close {
  position: relative;
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme2-text-color);
  box-shadow: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

header .wp-block-navigation__responsive-container-open:hover,
header .wp-block-navigation__responsive-container-close:hover {
  background: transparent;
  color: var(--theme2-text-color);
  opacity: 0.8;
}

header .wp-block-navigation__responsive-container-open svg,
header .wp-block-navigation__responsive-container-close svg {
  width: 22px;
  height: 22px;
}

header .wp-block-navigation__responsive-container-open svg {
  display: none;
}

header .wp-block-navigation__responsive-container-open::before,
header .wp-block-navigation__responsive-container-open::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

header .wp-block-navigation__responsive-container-open::before {
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

header .wp-block-navigation__responsive-container-open::after {
  display: none;
}

.theme2-front-hero {
  margin-top: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.theme2-front-hero__inner {
  padding-top: 3.25rem;
  padding-bottom: 3.25rem;
}

.theme2-front-hero__eyebrow {
  margin: 0 0 0.25rem;
  color: var(--theme2-hero-subtitle-color);
  font-size: 1rem;
  font-weight: var(--theme2-font-weight-normal);
  font-variation-settings: "wght" var(--theme2-font-weight-normal);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
}

.theme2-front-hero__title {
  max-width: 760px;
  margin: 0;
  color: #41658a;
  font-size: 3.5rem;
  line-height: 1.02;
}

.theme2-front-hero__lead {
  max-width: 690px;
  margin: 1rem 0 0;
  color: #41658a;
  font-size: 1.125rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .theme2-front-hero__inner {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .theme2-front-hero__title {
    font-size: 2.65rem;
  }
}

@media (max-width: 640px) {
  .theme2-front-hero__inner {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .theme2-front-hero__title {
    font-size: 2.15rem;
    line-height: 1.08;
  }

  .theme2-front-hero__lead {
    font-size: 1rem;
  }
}

/* Keep readable text slightly inset from the content edge while leaving block layouts untouched. */
:is(.page, .single:not(.single-post)) main > .wp-block-group.is-layout-constrained > .wp-block-post-title,
.error404 main > .wp-block-group.is-layout-constrained > :is(h1, p, .theme2-404-search),
:is(.blog, .archive, .search) main > .wp-block-group.is-layout-constrained > .wp-block-query-title,
:is(.blog, .archive, .search) .wp-block-query-no-results > p,
.post-type-archive-portfolio main > .wp-block-group.is-layout-constrained > .wp-block-query-title,
.post-type-archive-portfolio .wp-block-query-no-results > p,
.post-type-archive-portfolio .theme2-portfolio-archive-item__content > :is(.wp-block-post-title, .wp-block-post-excerpt) {
  box-sizing: border-box;
  padding-right: var(--theme2-text-gutter);
  padding-left: var(--theme2-text-gutter);
}

main .wp-block-query > .wp-block-query-pagination {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-right: 0;
  padding-left: 0;
  color: #41658a;
  font-size: var(--theme2-font-size-ui);
  line-height: 1.4;
}

main .wp-block-query > .wp-block-query-pagination .wp-block-query-pagination-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

main .wp-block-query > .wp-block-query-pagination :is(
  .wp-block-query-pagination-previous,
  .wp-block-query-pagination-next,
  .page-numbers
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid #41658a;
  border-radius: 6px;
  background: #ffffff;
  color: #41658a;
  text-decoration: none;
}

main .wp-block-query > .wp-block-query-pagination a:is(
  .wp-block-query-pagination-previous,
  .wp-block-query-pagination-next,
  .page-numbers
):is(:hover, :focus-visible) {
  border-color: #41658a;
  background: #41658a;
  color: #ffffff;
}

main .wp-block-query > .wp-block-query-pagination .page-numbers.current {
  border-color: #41658a;
  background: #41658a;
  color: #ffffff;
}

main .wp-block-query > .wp-block-query-pagination .page-numbers.dots {
  min-width: auto;
  padding-right: 0.25rem;
  padding-left: 0.25rem;
  border-color: transparent;
  background: transparent;
}

:is(.page, .single:not(.single-post)) .entry-content.alignfull.wp-block-post-content.is-layout-constrained > :is(
  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  blockquote,
  pre
) {
  box-sizing: border-box;
  padding-right: var(--theme2-text-gutter);
  padding-left: var(--theme2-text-gutter);
}

:is(.page, .single:not(.single-post)) .entry-content.alignfull.wp-block-post-content.is-layout-constrained > :is(ul, ol) {
  box-sizing: border-box;
  padding-right: var(--theme2-text-gutter);
  padding-left: calc(1.25rem + var(--theme2-text-gutter));
}

@media (max-width: 1000px) {
  :root {
    --theme2-mobile-text-gutter: 1rem;
  }

  header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: inline-flex;
  }

  header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }

  header .site-container {
    gap: 0.75rem;
  }

  header .theme2-header-main {
    position: static;
  }

  header .theme2-header-actions .wp-block-navigation {
    position: static;
  }

  header.theme2-menu-open .wp-block-navigation__responsive-container-open::before {
    box-shadow: none;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  header.theme2-menu-open .wp-block-navigation__responsive-container-open::after {
    display: block;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  header .wp-block-navigation__responsive-container.is-menu-open {
    position: static !important;
    inset: auto !important;
    order: 5;
    flex: 0 0 100%;
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    transform: none;
    border: 0;
    border-radius: 0;
    background: #ffffff !important;
    color: var(--theme2-text-color) !important;
    padding: 0;
    box-shadow: none;
  }

  header .wp-block-navigation__responsive-close {
    position: static;
    width: 100%;
    margin: 0;
  }

  header .wp-block-navigation__responsive-dialog {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: visible;
  }

  header .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    box-sizing: border-box;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    padding-top: 0 !important;
    gap: 0.35rem;
    width: 100%;
    align-items: stretch;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list {
    width: 100%;
    gap: 0.35rem;
    align-items: stretch;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    width: 100%;
    align-items: stretch;
    border-radius: 8px;
    transition: background-color 0.2s ease;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0.5rem 0 !important;
    border-radius: 8px;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:is(:hover, :focus-within),
  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.current-menu-item,
  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.current_page_item {
    background: #f3f6fa;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
    text-decoration: none;
    background: transparent;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 0.2rem;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation-item__content {
    grid-column: 1;
    min-width: 0;
    padding-right: 0 !important;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation-submenu__toggle {
    grid-column: 2;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    width: 2rem;
    margin: 0;
    padding: 0 !important;
    border-radius: 8px;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-icon svg {
    width: 0.7em;
    height: 0.7em;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container {
    grid-column: 1 / -1;
    position: static;
    width: 100%;
    min-width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    margin: 0.1rem 0 0.2rem;
    padding: 0 0 0 0.85rem !important;
    border-left: 1px solid #dbe3ec;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
    height: auto;
    opacity: 1;
    overflow: visible;
    visibility: visible;
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
  }

  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
  header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-submenu__toggle {
    min-height: 38px;
    padding: 0.35rem 0.5rem !important;
  }

  header .theme2-header-main {
    row-gap: 0.6rem;
    column-gap: 1.25rem;
    flex-wrap: nowrap;
  }

  header .theme2-header-brand {
    gap: 0.55rem;
  }

  header .theme2-header-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-shrink: 0;
  }

  header .theme2-header-actions .wp-block-navigation {
    order: 3;
  }

  header .theme2-header-actions .theme2-language-switcher {
    order: 1;
  }

  header .theme2-header-actions .theme2-header-search-toggle {
    order: 2;
  }

  header .theme2-header-search-wrap {
    margin-top: 0;
  }

  header.theme2-search-open .theme2-header-search-wrap {
    margin-top: 0.5rem;
  }

  header .theme2-header-search-panel .wp-block-search {
    margin: 0;
  }

  :is(.page, .single:not(.single-post)) main > .wp-block-group.is-layout-constrained > .wp-block-post-title {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: var(--theme2-mobile-text-gutter);
  }

  :is(.page, .single:not(.single-post)) .entry-content.alignfull.wp-block-post-content.is-layout-constrained > :is(
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    blockquote,
    pre
  ) {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: var(--theme2-mobile-text-gutter);
  }

  :is(.page, .single:not(.single-post)) .entry-content.alignfull.wp-block-post-content.is-layout-constrained > :is(ul, ol) {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: calc(1.25rem + var(--theme2-mobile-text-gutter));
  }

  .error404 main > .wp-block-group.is-layout-constrained > :is(h1, p, .theme2-404-search) {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: var(--theme2-mobile-text-gutter);
  }

  :is(.blog, .archive, .search) main > .wp-block-group.is-layout-constrained > .wp-block-query-title,
  :is(.blog, .archive, .search) .wp-block-query-no-results > p {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: var(--theme2-mobile-text-gutter);
  }

  .post-type-archive-portfolio main > .wp-block-group.is-layout-constrained > .wp-block-query-title,
  .post-type-archive-portfolio .wp-block-query-no-results > p {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: var(--theme2-mobile-text-gutter);
  }

  .post-type-archive-portfolio .theme2-portfolio-archive-item__content > :is(.wp-block-post-title, .wp-block-post-excerpt) {
    box-sizing: border-box;
    padding-right: var(--theme2-mobile-text-gutter);
    padding-left: var(--theme2-mobile-text-gutter);
  }
}

@media (max-width: 520px) {
  header .theme2-header-main {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  header .theme2-header-brand {
    flex: 1 0 100%;
    width: 100%;
    gap: 0.45rem;
  }

  header .theme2-header-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  header .theme2-header-actions .theme2-language-switcher {
    order: 1;
  }

  header .theme2-header-actions .theme2-header-search-toggle {
    order: 2;
  }

  header .theme2-header-actions .wp-block-navigation {
    order: 3;
    margin-left: auto;
  }

  header .theme2-header-search-wrap {
    width: min(100% - 2rem, 1140px);
    margin-right: auto;
    margin-left: auto;
    margin-top: 0;
  }

  header.theme2-search-open .theme2-header-search-wrap {
    margin-top: 0.65rem;
  }

  header .theme2-language-switcher :is(.theme2-language-switcher__link, .theme2-language-switcher__current) {
    min-width: 32px;
    min-height: 32px;
    padding: 0.14rem;
  }

  header .theme2-language-switcher img {
    width: 18px;
  }
}

@media (max-width: 319px) {
  header .theme2-header-actions {
    gap: 0.35rem;
  }

  header .theme2-language-switcher__list {
    gap: 0.12rem;
  }

  header .theme2-language-switcher :is(.theme2-language-switcher__link, .theme2-language-switcher__current) {
    min-width: 28px;
    min-height: 30px;
    padding: 0.1rem;
  }

  header .theme2-language-switcher img {
    width: 17px;
  }
}

@media (max-width: 640px) {
  .theme2-marketing-hero__actions,
  .theme2-marketing-cta__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.95rem;
    width: 100%;
  }

  .theme2-marketing-hero__actions .theme2-marketing-button,
  .theme2-marketing-cta__actions .theme2-marketing-button {
    width: 100%;
    min-height: 56px;
    padding-top: 0.58em;
    padding-right: 1rem;
    padding-bottom: 0.58em;
    padding-left: 1rem;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
    line-height: 1.15;
  }
}

.theme2-post-meta,
.theme2-post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  color: #5f6b7a;
  font-size: var(--theme2-font-size-note);
  line-height: 1.35;
}

.theme2-post-meta {
  width: 100%;
}

.theme2-post-list-item {
  display: grid !important;
  grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  column-gap: 1rem;
  row-gap: 0.45rem;
  align-items: start;
  justify-items: stretch;
  text-align: left;
}

.theme2-post-list-item:not(:has(.theme2-post-list-item__thumbnail)) {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
}

.theme2-post-list-item:not(:has(.theme2-post-list-item__thumbnail)) > :not(.theme2-post-list-item__thumbnail) {
  grid-column: 1;
  grid-row: auto;
}

.theme2-post-list-item > :not(.theme2-post-list-item__thumbnail) {
  grid-column: 2;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  text-align: left;
}

.theme2-post-list-item > .theme2-post-labeled-meta {
  color: #5f6b7a;
  font-size: var(--theme2-font-size-note);
  line-height: 1.35;
  margin: 0 !important;
  text-align: left;
}

.theme2-post-list-item > .theme2-post-labeled-meta--category {
  grid-row: 1;
  align-self: end;
}

.theme2-post-list-item > .theme2-post-labeled-meta--place {
  grid-row: 4;
  align-self: end;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.theme2-post-list-item > .theme2-post-labeled-meta--place .theme2-post-labeled-meta__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.theme2-post-list-item > .theme2-post-labeled-meta a {
  text-decoration: none;
}

.theme2-post-list-item > .theme2-post-labeled-meta a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.theme2-post-list-item .wp-block-post-title {
  grid-row: 2;
  align-self: start;
  text-align: left;
}

.theme2-post-list-item > .wp-block-post-excerpt {
  grid-row: 3;
  align-self: start;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.theme2-post-list-item :is(.wp-block-post-excerpt, .wp-block-post-excerpt__excerpt) {
  text-align: left;
}

.theme2-post-list-item :is(.theme2-post-meta, .theme2-post-card-meta) {
  grid-row: 3;
  align-self: end;
  margin-top: 0.65rem !important;
  margin-bottom: 0 !important;
  justify-content: flex-start !important;
  text-align: left;
}

.theme2-post-list-item__thumbnail {
  grid-column: 1;
  grid-row: 1 / span 4;
  justify-self: start;
  width: 100%;
  max-width: 240px;
  margin: 0 0 0.2rem !important;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f5f9;
}

.theme2-post-list-item__thumbnail a,
.theme2-post-list-item__thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
}

.theme2-post-list-item__thumbnail img {
  object-fit: cover;
}

.theme2-post-meta > *,
.theme2-post-card-meta > * {
  margin: 0;
}

.theme2-post-meta > * {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.theme2-post-labeled-meta,
.theme2-post-updated-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
}

.theme2-post-labeled-meta :is(.theme2-post-labeled-meta__label, .theme2-post-labeled-meta__value, time),
.theme2-post-updated-meta :is(.theme2-post-updated-meta__label, time) {
  margin: 0;
  padding: 0;
}

.theme2-post-labeled-meta__label,
.theme2-post-updated-meta__label,
.theme2-post-updated-meta time {
  flex-shrink: 0;
  white-space: nowrap;
}

.theme2-post-labeled-meta__value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.theme2-post-meta > * + * {
  padding-left: 0.9rem;
}

.theme2-post-meta > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 0.95em;
  transform: translateY(-50%);
  background: #d5dde7;
}

.theme2-post-meta .theme2-post-updated-meta,
.theme2-post-card-meta .theme2-post-updated-meta {
  white-space: nowrap;
}

.theme2-post-meta a,
.theme2-post-card-meta a {
  text-decoration: none;
}

.theme2-post-meta a:hover,
.theme2-post-card-meta a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 640px) {
  .theme2-post-list-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 0.85rem;
  }

  .theme2-post-list-item > :not(.theme2-post-list-item__thumbnail) {
    grid-column: 1;
    grid-row: auto;
    text-align: left;
  }

  .theme2-post-list-item .wp-block-post-title,
  .theme2-post-list-item :is(.wp-block-post-excerpt, .wp-block-post-excerpt__excerpt) {
    text-align: left;
  }

  .theme2-post-list-item :is(.theme2-post-meta, .theme2-post-card-meta) {
    justify-content: flex-start !important;
    text-align: left;
  }

  .theme2-post-list-item__thumbnail {
    grid-row: auto;
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    margin: 0 0 0.2rem !important;
  }

  .theme2-post-list-item__thumbnail a,
  .theme2-post-list-item__thumbnail img {
    height: auto;
  }

  .theme2-post-list-item__thumbnail img {
    object-fit: contain;
  }

  .theme2-post-meta,
  .theme2-post-card-meta {
    gap: 0.35rem 0.65rem;
  }

  .theme2-post-meta {
    font-size: var(--theme2-font-size-small);
  }

  .theme2-post-card-meta {
    font-size: var(--theme2-font-size-small);
  }

  .theme2-post-meta > * + * {
    padding-left: 0;
  }

  .theme2-post-meta > * + *::before {
    content: none;
  }

  .blog .wp-block-post-template > li > .wp-block-group,
  .archive .wp-block-post-template > li > .wp-block-group,
  .search .wp-block-post-template > li > .wp-block-group {
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
    margin-bottom: 0.8rem !important;
  }

  .blog .wp-block-query-title,
  .archive .wp-block-query-title,
  .search .wp-block-query-title {
    margin: 0 0 0.2rem;
  }
}

.error404 .theme2-404-lead {
  color: var(--theme2-text-color);
  font-size: var(--theme2-font-size-ui-large);
  line-height: 1.45;
}

.error404 .theme2-404-page > p:last-of-type {
  color: var(--theme2-text-color);
}

.error404 .theme2-404-search {
  margin-top: 1rem;
}

.error404 .theme2-404-search .wp-block-search {
  margin: 0;
}

.search .theme2-search-page-form {
  box-sizing: border-box;
  margin-top: 0.9rem;
  padding-right: var(--theme2-text-gutter);
  padding-left: var(--theme2-text-gutter);
}

.search .theme2-search-page-form .wp-block-search {
  margin: 0;
}

.search .theme2-search-results {
  box-sizing: border-box;
  margin-top: 1.15rem;
  padding-top: 1.2rem;
  border-top: 1px solid #d7dfea;
}

.search .theme2-search-results .wp-block-query-pagination {
  box-sizing: border-box;
  padding-right: 0;
  padding-left: 0;
}

/* Keep list markers inside content flow for post/page content. */
.wp-block-post-content :is(ul, ol) {
  margin-left: 0;
  padding-left: 1.25rem;
}

.wp-block-post-content :is(ul, ol) :is(ul, ol) {
  margin-top: 0.35rem;
}

.wp-block-post-content li + li {
  margin-top: 0.25rem;
}

/* Soften separators inside post content (avoid thick, dark HR lines). */
.single-post .wp-block-post-content hr:not(.wp-block-separator),
.single-post .wp-block-post-content .wp-block-separator:not(.is-style-dots) {
  border: 0;
  border-top: 1px solid #d7dfea !important;
  background: transparent !important;
  color: #d7dfea !important;
  height: 0;
  margin: 1.25rem auto;
}

.single-post .wp-block-post-content .wp-block-separator:not(.is-style-dots) {
  max-width: 100%;
}

.single-post .theme2-post-meta {
  font-size: 0.875rem;
  line-height: 1.45;
}

.theme2-post-address-box {
  overflow: visible;
  margin: 0 0 1.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme2-text-color);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.theme2-post-address-paragraph {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.theme2-post-address-box__map {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 190px;
  border: 0;
  background: transparent;
}

.theme2-post-address-box__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.theme2-post-address-box__map img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.theme2-post-address-box__map--interactive {
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.theme2-post-address-box__map--interactive.is-dragging {
  cursor: grabbing;
}

.theme2-post-address-map__layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
}

.theme2-post-address-box__map--interactive .theme2-post-address-map__tile {
  position: absolute;
  display: block;
  width: 256px;
  height: 256px;
  max-width: none;
  border: 0;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.theme2-post-address-map__marker {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.28));
}

.theme2-post-address-map__marker::before,
.theme2-post-address-map__marker::after {
  position: absolute;
  content: "";
}

.theme2-post-address-map__marker::before {
  inset: 0;
  box-sizing: border-box;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: var(--theme2-accent-color);
  transform: rotate(-45deg);
}

.theme2-post-address-map__marker::after {
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
}

.theme2-post-address-map__controls {
  position: absolute;
  z-index: 4;
  top: 0.4rem;
  right: 0.4rem;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(65, 101, 138, 0.22);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

.theme2-post-address-map__button {
  display: grid;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  place-items: center;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(65, 101, 138, 0.18);
  border-radius: 0;
  background: #ffffff;
  background-image: none;
  color: #41658a;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.theme2-post-address-map__button:last-child {
  border-bottom: 0;
}

.theme2-post-address-map__button:is(:hover, :focus-visible) {
  background: rgba(144, 190, 109, 0.14);
  color: var(--theme2-accent-text-color);
}

.theme2-post-address-map__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.theme2-post-address-box__actions,
.theme2-post-address-box__footer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem 1rem;
}

.theme2-post-address-box__actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 0.7rem 0;
}

.theme2-post-address-box__actions-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--theme2-text-color);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 34px;
}

.theme2-post-address-box__footer {
  justify-content: space-between;
  padding: 0.7rem 0 0.85rem;
}

.theme2-post-address-box__links,
.theme2-post-address-box__actions-label,
.theme2-post-address-box__attribution {
  margin: 0;
  font-size: 0.9375rem;
}

.theme2-post-address-box__footer .theme2-post-address-paragraph {
  flex: 1 1 auto;
  padding: 0;
}

.theme2-post-address-box__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.theme2-post-address-box__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0.35rem 0.72rem;
  border: 1px solid rgba(82, 122, 53, 0.42);
  border-radius: 6px;
  background: #ffffff;
  color: var(--theme2-accent-text-color);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.theme2-post-address-box__link:is(:hover, :focus-visible) {
  border-color: var(--theme2-accent-color);
  background: rgba(144, 190, 109, 0.12);
  color: #41658a;
  text-decoration: none;
}

.theme2-post-address-box__attribution {
  flex: 0 0 auto;
  margin-top: -0.18rem;
  font-size: 0.8125rem;
  line-height: 1.25;
}

.theme2-post-address-box__attribution a {
  color: inherit;
  opacity: 0.78;
  text-decoration: none;
}

.theme2-post-address-box__attribution a:is(:hover, :focus-visible) {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.theme2-post-address-box__separator {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(65, 101, 138, 0.18);
}

@media (max-width: 640px) {
  .theme2-post-address-box__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme2-post-address-box__actions .theme2-post-address-box__links {
    width: 100%;
  }

  .theme2-post-address-box__actions .theme2-post-address-box__link {
    flex: 1 1 auto;
  }
}

.theme2-post-vote-anchor {
  min-height: 1px;
}

.theme2-post-vote {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem 0.55rem;
  color: #64748b;
  font-size: var(--theme2-font-size-ui);
  line-height: 1;
}

.theme2-post-vote.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.theme2-post-vote__label {
  margin-right: 0.2rem;
  color: var(--theme2-text-color);
}

.theme2-post-vote__button {
  color: #64748b;
  text-decoration: none;
  font-size: var(--theme2-font-size-ui-large);
  line-height: 1;
}

.theme2-post-vote__button:is(:hover, :focus-visible) {
  color: var(--theme2-text-color);
  text-decoration: none;
}

.theme2-post-vote__button.is-selected {
  color: var(--theme2-text-color);
}

.theme2-post-vote__count {
  min-width: 1ch;
  text-align: center;
  font-size: var(--theme2-font-size-meta);
  color: #64748b;
}

.single-post .theme2-post-vote {
  gap: 0.4rem 0.65rem;
  font-size: 0.875rem;
}

.single-post .theme2-post-vote__button {
  font-size: 0.95rem;
}

.single-post .theme2-post-vote__count {
  font-size: 0.8125rem;
}

.theme2-most-liked-widget {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid #e5e5e5;
}

.theme2-most-liked-widget__title {
  margin: 0 0 0.5rem;
}

.theme2-most-liked-widget__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.theme2-most-liked-widget__item {
  margin: 0;
}

.theme2-most-liked-widget__link {
  color: var(--theme2-text-color);
  display: inline-block;
  font-weight: var(--theme2-font-weight-semibold);
  text-decoration: none;
}

.theme2-most-liked-widget__link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.theme2-most-liked-widget__meta {
  margin: 0.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  color: #64748b;
  font-size: var(--theme2-font-size-meta);
}

.theme2-most-liked-widget__likes,
.theme2-most-liked-widget__dislikes {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.theme2-most-liked-widget__empty {
  margin: 0;
  color: #64748b;
  font-size: var(--theme2-font-size-small);
}

.theme2-most-liked-comments-widget {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid #e5e5e5;
}

.theme2-most-liked-comments-widget__title {
  margin: 0 0 0.5rem;
}

.theme2-most-liked-comments-widget__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.theme2-most-liked-comments-widget__item {
  margin: 0;
}

.theme2-most-liked-comments-widget__comment-link {
  color: var(--theme2-text-color);
  display: inline;
  font-size: var(--theme2-font-size-small);
  font-weight: var(--theme2-font-weight-normal);
  line-height: 1.45;
  text-decoration: none;
}

.theme2-most-liked-comments-widget__comment-link:hover,
.theme2-most-liked-comments-widget__post-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.theme2-most-liked-comments-widget__context {
  margin: 0.28rem 0 0;
  color: #64748b;
  font-size: var(--theme2-font-size-meta);
}

.theme2-most-liked-comments-widget__context-label {
  color: #64748b;
}

.theme2-most-liked-comments-widget__post-link {
  color: var(--theme2-text-color);
  text-decoration: none;
}

.theme2-most-liked-comments-widget__meta {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  color: #64748b;
  font-size: var(--theme2-font-size-meta);
}

.theme2-most-liked-comments-widget__likes,
.theme2-most-liked-comments-widget__dislikes {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.theme2-most-liked-comments-widget__empty {
  margin: 0;
  color: #64748b;
  font-size: var(--theme2-font-size-small);
}

.theme2-single-post-sidebar {
  border-left: 1px solid #e5e5e5;
  padding-left: 1.5rem;
  font-size: var(--theme2-font-size-body);
  font-weight: var(--theme2-font-weight-normal);
  line-height: 1.6;
}

.theme2-single-post-sidebar :is(a, button, input, label, li, p, span, td, th, time, .wp-block-search__button, .theme2-sidebar-search-form__button) {
  font-weight: var(--theme2-font-weight-normal);
  font-variation-settings: "wght" var(--theme2-font-weight-normal);
}

.theme2-single-post-sidebar :is(strong, b) {
  font-weight: inherit;
}

.theme2-single-post-sidebar .theme2-sidebar-widget {
  margin: 0;
  padding: 0 0 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.theme2-single-post-sidebar .theme2-sidebar-widget + .theme2-sidebar-widget {
  margin-top: 1rem;
}

.theme2-single-post-sidebar .theme2-sidebar-widget .wp-block-heading {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.3;
}

/* Sidebar wrappers own separators; avoid duplicate top line inside custom shortcodes. */
.theme2-single-post-sidebar .theme2-most-liked-widget,
.theme2-single-post-sidebar .theme2-most-liked-comments-widget {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.theme2-single-post-sidebar :is(
  .wp-block-search__input,
  .wp-block-search__button,
  .wp-block-latest-posts,
  .wp-block-categories-list,
  .theme2-most-liked-widget,
  .theme2-most-liked-comments-widget
) {
  font-size: var(--theme2-font-size-body);
}

.theme2-single-post-sidebar .wp-block-latest-posts,
.theme2-single-post-sidebar .wp-block-categories-list {
  margin-top: 0.6rem;
}

.theme2-single-post-sidebar :is(
  .theme2-sidebar-widget > ul,
  .widget_recent_entries ul,
  .widget_recent_comments ul,
  .widget_archive ul,
  .widget_categories ul,
  .widget_meta ul,
  .widget_pages ul,
  .widget_nav_menu ul
) {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.theme2-single-post-sidebar .wp-block-latest-posts li,
.theme2-single-post-sidebar .wp-block-categories-list li,
.theme2-single-post-sidebar .theme2-sidebar-widget > ul li {
  margin-bottom: 0.45rem;
  line-height: 1.55;
}

.theme2-single-post-sidebar .wp-block-latest-posts a,
.theme2-single-post-sidebar .wp-block-categories-list a,
.theme2-single-post-sidebar .theme2-sidebar-widget > ul a {
  line-height: 1.55;
}

.theme2-single-post-sidebar .wp-block-latest-posts__post-date,
.theme2-single-post-sidebar .widget_recent_entries .post-date {
  display: block;
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.8125rem;
}

.theme2-single-post-sidebar .widget_custom_html img {
  max-width: 100%;
  height: auto;
}

.theme2-single-post-sidebar :is(.widget_calendar, .wp-block-calendar) table.wp-calendar-table td {
  text-align: center;
}

.theme2-single-post-sidebar :is(.widget_calendar, .wp-block-calendar) table.wp-calendar-table td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 5px;
}

.theme2-single-post-sidebar :is(.widget_calendar, .wp-block-calendar) :is(td#today, table.wp-calendar-table td#today) {
  border-radius: 6px;
  background: var(--theme2-text-color);
  color: #ffffff;
  font-weight: var(--theme2-font-weight-normal);
}

.theme2-single-post-sidebar :is(.widget_calendar, .wp-block-calendar) :is(td#today a, table.wp-calendar-table td#today a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8em;
  min-height: 1.8em;
  color: #ffffff;
  text-decoration: none;
}

.theme2-single-post-sidebar :is(.widget_calendar, .wp-block-calendar) :is(td#today a:hover, table.wp-calendar-table td#today a:hover) {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.theme2-single-post-sidebar .theme2-sidebar-search-form {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.theme2-single-post-sidebar .theme2-sidebar-search-form__input {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  margin: 0 !important;
  padding: 0.45rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--theme2-text-color);
  line-height: 1.35;
}

.theme2-single-post-sidebar .theme2-sidebar-search-form__button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff !important;
  background-image: none !important;
  background-size: auto;
  background-position: center;
  box-shadow: none;
  color: var(--theme2-text-color) !important;
  line-height: 1;
  opacity: 1;
  transform: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.theme2-single-post-sidebar .theme2-sidebar-search-form__button::after {
  content: none;
}

.theme2-single-post-sidebar .theme2-sidebar-search-form__button svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 !important;
  color: currentColor;
  opacity: 1;
  visibility: visible;
}

.theme2-single-post-sidebar .theme2-sidebar-search-form__button:is(:hover, :focus-visible) {
  border-color: #94a3b8;
  background: #f8fafc !important;
  background-image: none !important;
  box-shadow: none;
  color: var(--theme2-text-color) !important;
  opacity: 1;
  transform: none;
}

.theme2-single-post-sidebar .wp-block-search {
  margin: 0;
}

.theme2-single-post-sidebar .wp-block-search__inside-wrapper {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.theme2-single-post-sidebar .wp-block-search__input {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--theme2-text-color);
  line-height: 1.35;
}

.theme2-single-post-sidebar .wp-block-search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  margin: 0 !important;
  padding: 0.45rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  background-size: auto;
  background-position: center;
  box-shadow: none;
  color: var(--theme2-text-color);
  font-size: var(--theme2-font-size-ui);
  letter-spacing: 0;
  line-height: 1;
  opacity: 1;
  transform: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.theme2-single-post-sidebar .wp-block-search__button.has-icon {
  width: 42px;
  padding: 0;
}

.theme2-single-post-sidebar .wp-block-search__button::after {
  content: none;
}

.theme2-single-post-sidebar .wp-block-search__button :is(svg, .search-icon) {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0 !important;
}

.theme2-single-post-sidebar .wp-block-search__button:is(:hover, :focus-visible) {
  border-color: #94a3b8;
  background: #f8fafc;
  background-image: none;
  background-size: auto;
  box-shadow: none;
  color: var(--theme2-text-color) !important;
  transform: none;
}

.theme2-single-post-sidebar .wp-block-search__button:active {
  box-shadow: none;
  transform: none;
}

.theme2-single-post-sidebar .widget_search .search-form {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
}

.theme2-single-post-sidebar .widget_search .search-form label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.theme2-single-post-sidebar .widget_search .search-field {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--theme2-text-color);
  line-height: 1.35;
}

.theme2-single-post-sidebar .widget_search .search-submit {
  flex: 0 0 auto;
  appearance: none;
  height: 42px;
  min-height: 42px;
  margin: 0 !important;
  padding: 0.45rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  background-size: auto;
  background-position: center;
  box-shadow: none;
  color: var(--theme2-text-color);
  cursor: pointer;
  font-size: var(--theme2-font-size-ui);
  font-weight: var(--theme2-font-weight-normal);
  letter-spacing: 0;
  line-height: 1.35;
  transform: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.theme2-single-post-sidebar .widget_search .search-submit:is(:hover, :focus-visible) {
  border-color: #94a3b8;
  background: #f8fafc;
  background-image: none;
  background-size: auto;
  box-shadow: none;
  color: var(--theme2-text-color);
  transform: none;
}

.theme2-single-post-sidebar .theme2-sidebar-terms-widget__empty {
  margin: 0;
  color: #64748b;
  font-size: var(--theme2-font-size-small);
}

.theme2-single-post-sidebar .theme2-most-liked-widget__link,
.theme2-single-post-sidebar .theme2-most-liked-comments-widget__comment-link {
  font-size: var(--theme2-font-size-body);
  line-height: 1.55;
}

.theme2-single-post-sidebar .theme2-most-liked-widget__meta,
.theme2-single-post-sidebar .theme2-most-liked-comments-widget__context,
.theme2-single-post-sidebar .theme2-most-liked-comments-widget__meta {
  font-size: 0.8125rem;
  line-height: 1.45;
}

.theme2-single-post-sidebar .theme2-most-liked-widget__empty,
.theme2-single-post-sidebar .theme2-most-liked-comments-widget__empty {
  font-size: 0.875rem;
}

/* Single post comments: cards + readable threaded replies */
.theme2-single-post-comments .wp-block-comments {
  margin-top: 0.5rem;
}

.theme2-single-post-comments .wp-block-comments-title {
  margin-bottom: 1rem;
}

.theme2-single-post-comments .wp-block-comment-template,
.theme2-single-post-comments .wp-block-comment-template .children {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.theme2-single-post-comments .wp-block-comment-template > li {
  margin-bottom: 1rem;
}

.theme2-single-post-comments .wp-block-comment-template .children {
  margin-top: 0.85rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid #d8dee8;
}

.theme2-single-post-comments .theme2-comment-card {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding-bottom: 1rem !important;
}

.theme2-single-post-comments .theme2-comment-seq {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin-left: auto !important;
  font-size: 0.8125rem;
  font-weight: var(--theme2-font-weight-normal);
  line-height: 1.2;
  color: var(--theme2-text-color);
  background: transparent;
  border: 0;
  border-radius: 0;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding: 0;
  pointer-events: none;
}

.theme2-single-post-comments .depth-2 > .theme2-comment-card {
  background: #ffffff;
  border-color: #dbe4ee;
}

.theme2-single-post-comments .depth-3 > .theme2-comment-card {
  background: #ffffff;
  border-color: #d5dfeb;
}

.theme2-single-post-comments .depth-4 > .theme2-comment-card {
  background: #ffffff;
  border-color: #cfd9e6;
}

.theme2-single-post-comments .theme2-comment-header {
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  align-items: flex-start;
}

.theme2-single-post-comments .theme2-comment-header :is(.wp-block-avatar, .wp-block-comment-author-avatar) {
  flex-shrink: 0;
}

.theme2-single-post-comments .theme2-comment-header > .wp-block-group {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
}

.theme2-single-post-comments .theme2-comment-header .wp-block-comment-author-name {
  margin: 0;
  font-size: var(--theme2-font-size-body);
  line-height: 1.25;
  font-weight: var(--theme2-font-weight-semibold);
}

.theme2-single-post-comments .theme2-comment-header .wp-block-comment-date {
  margin: 0;
  margin-left: auto;
  padding-left: 0.75rem;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.theme2-single-post-comments .wp-block-comment-content {
  margin-top: 0;
  font-size: var(--theme2-font-size-body);
  line-height: 1.7;
}

.theme2-single-post-comments .wp-block-comment-content > :first-child {
  margin-top: 0;
}

.theme2-single-post-comments .wp-block-comment-content > :last-child {
  margin-bottom: 0;
}

.theme2-single-post-comments .theme2-comment-actions {
  gap: 0.45rem 0.9rem;
  margin-top: 0.85rem;
  font-size: 0.875rem;
  line-height: 1.45;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
}

.theme2-single-post-comments .theme2-comment-actions > * {
  margin: 0;
}

.theme2-single-post-comments .theme2-comment-votes {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #64748b;
  line-height: 1;
}

.theme2-single-post-comments .theme2-comment-votes.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.theme2-single-post-comments .theme2-comment-actions a.theme2-comment-vote-button {
  color: #64748b;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1;
}

.theme2-single-post-comments .theme2-comment-actions a.theme2-comment-vote-button:is(:hover, :focus-visible) {
  color: var(--theme2-text-color);
  text-decoration: none;
}

.theme2-single-post-comments .theme2-comment-vote-button[aria-disabled="true"] {
  pointer-events: none;
}

.theme2-single-post-comments .theme2-comment-vote-button.is-selected {
  color: var(--theme2-text-color);
  font-weight: var(--theme2-font-weight-semibold);
}

.theme2-single-post-comments .theme2-comment-vote-count {
  min-width: 1ch;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}

.theme2-single-post-comments .theme2-comment-actions > .theme2-comment-seq {
  order: 99;
  text-align: right;
}

.theme2-single-post-comments .theme2-comment-actions a {
  color: var(--theme2-text-color);
  text-decoration: none;
}

.theme2-single-post-comments .theme2-comment-actions a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.theme2-single-post-comments .wp-block-comments-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.8rem 0 1.4rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.theme2-single-post-comments .wp-block-comments-pagination a {
  text-decoration: none;
}

.theme2-single-post-comments .wp-block-comments-pagination a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.theme2-single-post-comments .wp-block-post-comments-form {
  margin-top: 1rem;
}

.theme2-single-post-comments .comment-respond {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  background: transparent;
}

.theme2-single-post-comments .comment-reply-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.theme2-single-post-comments :is(.comment-notes, .logged-in-as) {
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.theme2-single-post-comments .theme2-comment-culture-note {
  margin: -0.2rem 0 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.theme2-single-post-comments :is(.comment-form-author, .comment-form-email, .comment-form-url, .comment-form-comment) {
  margin-bottom: 0.7rem;
}

.theme2-single-post-comments :is(label) {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.theme2-single-post-comments :is(input[type="text"], input[type="email"], input[type="url"], textarea) {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.62rem 0.75rem;
  box-sizing: border-box;
  background: #ffffff;
  color: inherit;
  font-size: var(--theme2-font-size-body);
  line-height: 1.5;
}

.theme2-single-post-comments textarea {
  min-height: 140px;
  resize: vertical;
}

.theme2-single-post-comments :is(input[type="text"], input[type="email"], input[type="url"], textarea):focus {
  border-color: #3b82f6;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.theme2-single-post-comments .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #64748b;
}

.theme2-single-post-comments .comment-form-cookies-consent input[type="checkbox"] {
  margin-top: 0.22rem;
}

.theme2-single-post-comments .comment-form-cookies-consent label {
  margin: 0;
}

/* Single post action buttons: force one Hero-like effect only */
.single-post .wp-block-post-comments-form .form-submit .wp-element-button {
  --theme2-button-fill: var(--theme2-button-hover-fill);
  --theme2-button-fill-text: var(--theme2-button-hover-text);
  appearance: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  box-sizing: border-box;
  text-decoration: none;
  border: 1px solid var(--theme2-button-border);
  border-radius: 6px;
  color: var(--theme2-button-base-text);
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-weight: var(--theme2-font-weight-semibold);
  isolation: isolate;
  overflow: hidden;
  padding-top: 0.42em;
  padding-right: 40px;
  padding-bottom: 0.42em;
  padding-left: 40px;
  background-color: var(--theme2-button-base-bg);
  background-image:
    linear-gradient(var(--theme2-button-fill), var(--theme2-button-fill)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 48%);
  background-repeat: no-repeat;
  background-size: 100% 0, 100% 100%;
  background-position: 0 100%, 0 0;
  box-shadow: 0 4px 10px rgba(17, 17, 17, 0.1), 0 1px 3px rgba(17, 17, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: color 0.3s ease, background-size 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.single-post .wp-block-post-comments-form .form-submit .wp-element-button::after {
  content: none !important;
}

.single-post .wp-block-post-comments-form .form-submit .wp-element-button:is(:hover, :focus-visible) {
  border-color: var(--theme2-button-fill);
  color: var(--theme2-button-fill-text) !important;
  background-size: 100% 100%, 100% 100%;
  box-shadow: 0 10px 22px rgba(144, 190, 109, 0.2), 0 3px 8px rgba(144, 190, 109, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-decoration: none;
}

.single-post .wp-block-post-comments-form .form-submit .wp-element-button:active {
  transform: scale(0.97);
  box-shadow: 0 4px 10px rgba(17, 17, 17, 0.16), 0 2px 5px rgba(17, 17, 17, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

@media (max-width: 900px) {
  .theme2-single-post-layout {
    --wp--style--block-gap: 1.35rem;
  }

  .single-post .theme2-post-meta {
    margin-bottom: 1.1rem !important;
  }

  .theme2-single-post-sidebar {
    border-left: 0;
    border-top: 1px solid #e5e5e5;
    padding-left: 0;
    padding-top: 1.25rem;
    margin-top: 0.75rem;
  }

  .theme2-single-post-comments .wp-block-comment-template .children {
    margin-left: 0.55rem;
    padding-left: 0.65rem;
  }

  .theme2-single-post-comments .comment-respond {
    padding: 0.85rem;
  }
}

@media (max-width: 640px) {
  .theme2-single-post-layout {
    --wp--style--block-gap: 1rem;
  }

  .single-post .theme2-post-meta {
    font-size: 0.8125rem;
  }

  .theme2-single-post-sidebar {
    margin-top: 0.5rem;
    padding-top: 1rem;
  }

  .theme2-single-post-sidebar .wp-block-heading {
    margin-bottom: 0.45rem;
  }

  .theme2-single-post-comments .theme2-comment-header > .wp-block-group {
    flex-wrap: wrap;
    gap: 0.3rem 0.55rem;
  }

  .theme2-single-post-comments .theme2-comment-header .wp-block-comment-date {
    margin-left: 0;
    padding-left: 0;
    width: 100%;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .single-post .wp-block-post-comments-form .form-submit .wp-element-button {
    transition: none;
  }

  .single-post .wp-block-post-comments-form .form-submit .wp-element-button:active {
    transform: none;
  }
}
