.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-soft);
  padding-top: env(safe-area-inset-top);
}

.theme-dark .site-header,
html[data-scheme="dark"] .site-header {
  background: rgba(11, 17, 32, 0.88);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.nav > .brand { flex: 0 1 auto; }

.nav > .nav-links {
  margin-left: auto;
}

.nav > .nav-actions {
  margin-left: 0.35rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  min-width: 0;
  flex: 1;
}

.brand span { flex-shrink: 0; }

.brand:not(:has(img)) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-logo { height: 34px; width: auto; flex-shrink: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-cta {
  margin-left: 0.35rem;
  background: var(--primary) !important;
  color: #fff !important;
}

.nav-cta:hover { background: var(--primary-dark) !important; }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(124, 58, 237, 0.12), transparent 28%),
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.5), transparent 60%);
  pointer-events: none;
}

html[data-scheme="dark"] .hero-bg,
.theme-dark .hero-bg {
  background:
    radial-gradient(circle at 85% 15%, rgba(124, 58, 237, 0.18), transparent 28%),
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.35), transparent 60%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  margin: 1rem 0;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-actions .btn {
  min-height: 44px;
}

.hero-visual img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.hero-card {
  margin-top: 1.5rem;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

html[data-scheme="dark"] .hero-card,
.theme-dark .hero-card {
  background: rgba(17, 24, 39, 0.78);
}

.hero-card h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.hero-card ul { margin: 0; padding-left: 1.1rem; color: var(--text-soft); }
.hero-card li + li { margin-top: 0.35rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.badge.outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.trust-bar {
  padding: 1.25rem 0 0;
  margin-top: -1rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.trust-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.trust-item strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.trust-item span { color: var(--muted); font-size: 0.88rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.cards article,
.panel,
.auth-card,
.stats article,
.card-modern {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cards article:hover,
.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

html[data-scheme="dark"] .cards article:hover,
html[data-scheme="dark"] .card-modern:hover,
.theme-dark .cards article:hover,
.theme-dark .card-modern:hover {
  border-color: #334155;
}

.service-card .service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
}

.service-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.service-card p { margin: 0; color: var(--muted); }

.card-thumb-wrap { overflow: hidden; border-radius: var(--radius-md); margin-bottom: 1rem; }
.card-thumb {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 0;
  transition: transform 0.35s ease;
}

.cards article:hover .card-thumb { transform: scale(1.04); }

.cards article h3 { margin: 0 0 0.5rem; font-size: 1.12rem; line-height: 1.3; }
.cards article h3 a { text-decoration: none; color: var(--text); }
.cards article h3 a:hover { color: var(--primary); }
.cards article p { margin: 0 0 0.75rem; color: var(--muted); }
.cards article small { color: var(--muted); font-size: 0.82rem; }
.cards a.link-arrow {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.cards-blog article { display: flex; flex-direction: column; }
.card-thumb-link { display: block; overflow: hidden; border-radius: var(--radius-md); }

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 35%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg));
  border-bottom: 1px solid var(--border-soft);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36rem;
}

.page-hero-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.page-title { padding: 4rem 0 2rem; }
.page-title h1 { margin: 0 0 0.5rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.page-title p { margin: 0; color: var(--muted); }

.cta-banner {
  margin: 1rem 0 0;
  padding: 0 0 5rem;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-inner h2 { margin: 0 0 0.35rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.cta-inner p { margin: 0; opacity: 0.92; }
.cta-inner .btn.outline {
  border-color: rgba(255,255,255,0.65);
  color: #fff !important;
  background: transparent;
}

.content { max-width: 760px; }
.page-custom-html {
  line-height: 1.75;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.page-custom-html img,
.page-custom-html video,
.page-custom-html iframe {
  max-width: 100%;
  height: auto;
}

.page-custom-body.page-custom-html {
  width: 100%;
}

.rich-content { line-height: 1.8; color: var(--text-soft); overflow-wrap: anywhere; }
.rich-content h2, .rich-content h3 { color: var(--text); margin-top: 2rem; }
.rich-content img { border-radius: var(--radius-md); margin: 1.25rem 0; max-width: 100%; height: auto; }
.rich-content pre, .rich-content table { max-width: 100%; overflow-x: auto; display: block; }

.featured-image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.breadcrumb {
  padding: 14px 0;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; }

.contact-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.contact-info {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-info img {
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.contact-info ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }

.contact-form-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-form { max-width: none; margin: 0; }

.page-hero-centered,
.blog-hero-inner {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.page-hero-centered-copy {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.page-hero-centered .badge,
.page-hero-centered-copy .badge,
.blog-hero-inner .badge {
  margin-bottom: 0.85rem;
}

.page-hero-centered p,
.page-hero-centered-copy p,
.blog-hero-inner p {
  margin-inline: auto;
}

.static-page-wrap {
  padding-bottom: 1rem;
}

.static-hero.page-hero {
  padding: 3.25rem 0 2.25rem;
}

.static-hero-inner h1 {
  margin-bottom: 0.65rem;
}

.static-lead {
  max-width: 42rem;
  margin-inline: auto;
  font-size: 1.12rem;
  line-height: 1.65;
}

.static-body {
  padding: 2.75rem 0 4.5rem;
  border-top: 1px solid var(--border-soft);
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 42%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg));
}

.static-article {
  max-width: 720px;
  margin-inline: auto;
}

.static-article.rich-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-soft);
}

.static-article.rich-content p {
  margin: 0 0 1.15rem;
}

.static-article.rich-content p:first-of-type {
  font-size: 1.12rem;
  color: var(--text);
}

.static-featured-image {
  margin: 0 0 1.75rem;
}

.blog-page {
  padding-top: 2rem;
}

.blog-toolbar {
  display: grid;
  gap: 1.15rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.75rem;
}

.blog-search {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.blog-search-field {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
  margin: 0;
}

.blog-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.blog-search-field input {
  width: 100%;
  min-height: 46px;
  padding-left: 2.65rem;
}

.blog-filters {
  display: grid;
  gap: 0.65rem;
}

.blog-filters-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.blog-filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.blog-filter-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary);
  background: var(--primary-soft);
}

.blog-filter-pill.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.blog-card-media {
  margin: 0;
}

.blog-card .card-thumb {
  height: 200px;
  border-radius: 0;
  margin: 0;
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.25rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.blog-card p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-link {
  margin-top: auto;
  padding-top: 0.35rem;
}

.blog-empty {
  max-width: 520px;
  margin-inline: auto;
  padding: 2.5rem 1.5rem;
}

.blog-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  color: var(--primary);
  opacity: 0.85;
}

.blog-empty-icon svg {
  width: 100%;
  height: 100%;
}

.blog-empty h2 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  color: var(--text);
}

.blog-empty p {
  margin: 0 0 1.1rem;
}

.blog-pagination {
  justify-content: center;
  margin-top: 2rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.blog-sidebar .panel { padding: 1.1rem; position: sticky; top: calc(var(--header-h) + 16px); }
.blog-sidebar h3 { margin-top: 0; font-size: 1rem; }

.taxonomy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.taxonomy-list a { text-decoration: none; color: var(--text-soft); font-weight: 600; padding: 8px 10px; border-radius: 10px; display: block; }
.taxonomy-list a:hover { background: var(--primary-soft); color: var(--primary); }

.taxonomy-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

.search-row { display: flex; gap: 10px; margin-bottom: 1rem; flex-wrap: wrap; }
.search-row input { flex: 1 1 180px; min-width: 0; }
.search-row .btn { flex-shrink: 0; }

body.nav-open { overflow: hidden; }

.article-header { max-width: 760px; margin-bottom: 1.5rem; }
.article-header h1 { margin: 0.5rem 0 0; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.12; }

.site-footer {
  margin-top: 2rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-brand p { color: var(--muted); max-width: 28rem; margin: 0.75rem 0 0; }

.footer-col h4 { margin: 0 0 0.75rem; font-size: 0.92rem; }
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  font-weight: 600;
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 1rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer { padding: 30px 0; border-top: 1px solid var(--border); color: var(--muted); }


@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .nav > .brand { flex: 1; }

  .nav > .nav-links {
    margin-left: 0;
  }

  .nav-actions { margin-left: auto; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-h) - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    z-index: 120;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    width: 100%;
    border-radius: 12px;
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .nav-cta {
    margin-left: 0 !important;
    text-align: center;
    justify-content: center;
  }

  .hero-grid,
  .page-hero-grid,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .hero-grid,
  .page-hero-grid {
    display: flex;
    flex-direction: column;
  }

  .page-hero-visual {
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }

  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar .panel { position: static; }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-toolbar {
    padding: 1rem;
  }

  .contact-info img { display: none; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }

  .container { width: min(1140px, 94%); }

  .section { padding: 3rem 0; }
  .hero { padding: 2.5rem 0 2rem; }
  .page-hero { padding: 2.5rem 0 2rem; }
  .cta-banner { padding-bottom: 3rem; }

  .hero-content h1 { font-size: clamp(2rem, 9vw, 2.75rem); }
  .hero-content p { font-size: 1rem; }
  .section-head p { font-size: 0.98rem; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .cta-inner .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-card { margin-top: 1rem; }

  .card-thumb { height: 180px; }

  .featured-image { max-height: 280px; }

  .grid-2,
  .form-grid,
  .contact-form.form-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
  }

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

  .footer-grid { padding: 2rem 0 1.5rem; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .breadcrumb { font-size: 0.85rem; padding: 10px 0; }

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

  .blog-search .btn {
    width: 100%;
    justify-content: center;
  }

  .blog-search .btn.outline {
    width: 100%;
  }

  .static-body {
    padding: 2rem 0 3.5rem;
  }

  .static-article.rich-content {
    font-size: 1rem;
  }

  .pagination .btn { min-width: 44px; min-height: 44px; }

  .contact-form-panel,
  .contact-info,
  .cards article,
  .card-modern {
    padding: 1.15rem;
  }

  .error-page { min-height: 40vh; padding: 1rem 0; }
  .error-page img { max-width: 240px; }
}

@media (max-width: 380px) {
  .brand { font-size: 0.95rem; }
  .trust-item strong { font-size: 1.15rem; }
}
