/*
Theme Name: Технагляд
Theme URI: https://technaglyad.com.ua
Author: Custom Development
Description: Тема для сайту інженера технічного нагляду. Без page builders, без сторонніх плагінів. Чистий код на нативному WordPress API.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: technaglyad
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --navy:       #0d2d52;   /* Deep authority navy */
  --navy-mid:   #1a4a7a;   /* Mid navy */
  --blue:       #1e6abf;   /* Action blue */
  --blue-light: #e8f1fb;   /* Light blue tint */
  --gold:       #c8922a;   /* Certification gold accent */
  --gold-light: #fdf4e3;   /* Gold tint */
  --concrete:   #f4f3f0;   /* Blueprint concrete background */
  --stone:      #e8e6e1;   /* Border stone */
  --ink:        #1a1a1a;   /* Primary text */
  --ink-mid:    #4a4a4a;   /* Secondary text */
  --ink-light:  #7a7a7a;   /* Muted text */
  --white:      #ffffff;

  /* Signature: blueprint grid on hero */
  --grid-line:  rgba(30, 106, 191, 0.08);

  /* Spacing scale */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2.5rem;
  --sp-xl:  4rem;
  --sp-2xl: 6rem;

  /* Typography */
  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;

  /* Shadow */
  --shadow-sm: 0 1px 4px rgba(13,45,82,0.08);
  --shadow-md: 0 4px 20px rgba(13,45,82,0.12);
  --shadow-lg: 0 12px 40px rgba(13,45,82,0.16);

  /* Transition */
  --tr: 0.2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--navy); }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: 0.04em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}
.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1400px; }

.section { padding: var(--sp-xl) 0; }
.section--large { padding: var(--sp-2xl) 0; }
.section--gray  { background: var(--concrete); }
.section--navy  { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-md); }

.flex-center { display: flex; align-items: center; }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }

/* Section title block */
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  margin-bottom: var(--sp-sm);
}
.section-title { margin-bottom: var(--sp-md); }
.section-intro {
  font-size: 1.05rem;
  color: var(--ink-mid);
  max-width: 600px;
  margin-bottom: var(--sp-lg);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--tr);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: #a37320;
  border-color: #a37320;
  color: var(--white);
}
.btn-white-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-white-outline:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--stone);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--sp-md);
}
.site-logo { flex-shrink: 0; }
.site-logo svg { height: 42px; width: auto; }
.site-logo a { display: flex; align-items: center; }

/* Nav */
.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}
.site-nav a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: all var(--tr);
}
.site-nav a:hover,
.site-nav .current-menu-item a,
.site-nav .current-page-ancestor a {
  color: var(--blue);
  background: var(--blue-light);
}

/* Header contacts */
.header-contacts {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}
.header-phone {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--navy);
  transition: color var(--tr);
}
.header-phone:hover { color: var(--blue); }
.btn-call {
  font-size: 0.75rem;
  padding: 10px 18px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}
.menu-toggle svg { width: 24px; height: 24px; }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  padding: var(--sp-2xl) 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

/* Signature: blueprint grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 1;
}
/* Blueprint accent lines */
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(30,106,191,0.12) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}
.hero-content { color: var(--white); }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-sm);
}
.hero-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--gold);
}
.hero h1 { color: var(--white); margin-bottom: var(--sp-md); }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--sp-lg);
  max-width: 480px;
}
.hero-actions { display: flex; gap: var(--sp-sm); flex-wrap: wrap; }

/* Certificate badge */
.cert-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  backdrop-filter: blur(8px);
}
.cert-badge-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.cert-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.06em;
}
.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
  transition: color var(--tr);
}
.cert-link:hover { color: var(--gold); }
.cert-link svg { width: 14px; height: 14px; }

/* Hero stats row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: var(--sp-lg);
}
.hero-stat {
  background: rgba(13,45,82,0.5);
  padding: var(--sp-md);
  text-align: center;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

/* =============================================
   SERVICES SECTION
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}
.service-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  text-decoration: none;
  display: block;
  transition: all var(--tr);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--stone);
  transition: background var(--tr);
}
.service-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service-card:hover::before { background: var(--blue); }
.service-card-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-light);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-sm);
}
.service-card-icon svg { width: 24px; height: 24px; color: var(--blue); }
.service-card h3 {
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--ink-mid);
  margin-bottom: var(--sp-sm);
}
.service-card-price {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-transform: uppercase;
}
.service-card-arrow {
  position: absolute;
  right: var(--sp-md);
  top: var(--sp-md);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-light);
  transition: all var(--tr);
}
.service-card:hover .service-card-arrow {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.service-card-arrow svg { width: 14px; height: 14px; }

/* =============================================
   WHY US / ADVANTAGES
   ============================================= */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}
.advantage-item {
  padding: var(--sp-lg);
  border-top: 2px solid var(--stone);
  transition: border-color var(--tr);
}
.advantage-item:hover { border-color: var(--gold); }
.advantage-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  color: var(--stone);
  line-height: 1;
  margin-bottom: 8px;
  transition: color var(--tr);
}
.advantage-item:hover .advantage-num { color: var(--gold); }
.advantage-item h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.advantage-item p { font-size: 0.9rem; color: var(--ink-mid); }

/* =============================================
   CALCULATOR
   ============================================= */
.calculator-wrap {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  margin: 0 auto;
}
.calc-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-lg);
}
.calc-field { margin-bottom: var(--sp-md); }
.calc-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 8px;
}
.calc-select,
.calc-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--stone);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--tr);
  appearance: none;
}
.calc-select:focus,
.calc-input:focus {
  outline: none;
  border-color: var(--blue);
}
.calc-select-wrap { position: relative; }
.calc-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--ink-mid);
  pointer-events: none;
}
.calc-result {
  background: var(--navy);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-lg);
}
.calc-result-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.calc-result-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--white);
}
.calc-result-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}
.calc-cta { margin-top: var(--sp-md); width: 100%; justify-content: center; }

/* =============================================
   PORTFOLIO
   ============================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}
.portfolio-card {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--stone);
  transition: all var(--tr);
  text-decoration: none;
  display: block;
  background: var(--white);
}
.portfolio-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.portfolio-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--concrete);
  position: relative;
}
.portfolio-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.portfolio-card:hover .portfolio-card-img img { transform: scale(1.05); }
.portfolio-card-body { padding: var(--sp-md); }
.portfolio-card-tag {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.portfolio-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.portfolio-card p { font-size: 0.85rem; color: var(--ink-mid); }
.portfolio-card-saving {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--stone);
}
.portfolio-card-saving-label {
  font-size: 0.78rem;
  color: var(--ink-light);
}
.portfolio-card-saving-amount {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: #166534;
}

/* =============================================
   FORMS
   ============================================= */
.tn-form { }
.tn-form-field { margin-bottom: var(--sp-sm); }
.tn-form label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 6px;
}
.tn-form input[type="text"],
.tn-form input[type="tel"],
.tn-form input[type="email"],
.tn-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--stone);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color var(--tr);
}
.tn-form input:focus,
.tn-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.tn-form textarea { resize: vertical; min-height: 120px; }
/* Honeypot hidden */
.tn-hp { display: none !important; visibility: hidden !important; }
/* File upload */
.tn-file-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1.5px dashed var(--stone);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-mid);
  transition: all var(--tr);
}
.tn-file-label:hover { border-color: var(--blue); color: var(--blue); }
.tn-file-label svg { width: 20px; height: 20px; flex-shrink: 0; }
.tn-file-input { display: none; }
.tn-file-name { font-size: 0.85rem; color: var(--ink-mid); margin-top: 6px; }
/* Form messages */
.tn-form-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--r-sm);
  padding: var(--sp-sm) var(--sp-md);
  color: #166534;
  font-size: 0.9rem;
  display: none;
  margin-top: var(--sp-sm);
}
.tn-form-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--r-sm);
  padding: var(--sp-sm) var(--sp-md);
  color: #991b1b;
  font-size: 0.9rem;
  display: none;
  margin-top: var(--sp-sm);
}
.tn-field-error {
  font-size: 0.8rem;
  color: #991b1b;
  margin-top: 4px;
  display: none;
}
.tn-form-field.has-error input,
.tn-form-field.has-error textarea {
  border-color: #ef4444;
}

/* CTA section forms */
.cta-section {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,106,191,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,106,191,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}
.cta-text h2 { color: var(--white); }
.cta-text p { color: rgba(255,255,255,0.7); font-size: 1.05rem; }
.cta-form-wrap {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
.cta-form-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: var(--sp-md);
}
.cta-section .tn-form input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--white);
}
.cta-section .tn-form input::placeholder { color: rgba(255,255,255,0.4); }
.cta-section .tn-form input:focus { border-color: var(--gold); }
.cta-section .tn-form label { color: rgba(255,255,255,0.6); }

/* =============================================
   TRUST STRIP (сертифікат)
   ============================================= */
.trust-strip {
  background: var(--gold-light);
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  padding: var(--sp-md) 0;
}
.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trust-item-icon {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trust-item-icon svg { width: 22px; height: 22px; color: var(--white); }
.trust-item-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}
.trust-item-text span { font-size: 0.82rem; color: var(--ink-mid); }

/* =============================================
   POPUP / MODAL
   ============================================= */
.tn-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,45,82,0.7);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--tr);
  backdrop-filter: blur(4px);
}
.tn-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.tn-modal {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--tr);
  box-shadow: var(--shadow-lg);
}
.tn-overlay.is-open .tn-modal { transform: translateY(0); }
.tn-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-light);
  padding: 6px;
  border-radius: var(--r-sm);
  transition: all var(--tr);
}
.tn-modal-close:hover { background: var(--concrete); color: var(--ink); }
.tn-modal-close svg { width: 20px; height: 20px; }
.tn-modal h3 { margin-bottom: 6px; }
.tn-modal-sub { font-size: 0.9rem; color: var(--ink-mid); margin-bottom: var(--sp-lg); }

/* =============================================
   MESSENGER WIDGET
   ============================================= */
.messenger-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.messenger-toggle {
  width: 56px;
  height: 56px;
  background: var(--blue);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(30,106,191,0.4);
  transition: all var(--tr);
  color: var(--white);
}
.messenger-toggle:hover { background: var(--navy); transform: scale(1.05); }
.messenger-toggle svg { width: 26px; height: 26px; }
.messenger-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--tr);
}
.messenger-links.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.messenger-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: 28px;
  padding: 10px 16px 10px 12px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: all var(--tr);
}
.messenger-link:hover { transform: translateX(-4px); box-shadow: var(--shadow-lg); }
.messenger-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.messenger-link-icon svg { width: 20px; height: 20px; }
.messenger-link-tg .messenger-link-icon { background: #e0f2fe; }
.messenger-link-tg .messenger-link-icon svg { color: #0284c7; }
.messenger-link-vb .messenger-link-icon { background: #ede9fe; }
.messenger-link-vb .messenger-link-icon svg { color: #7c3aed; }
.messenger-link-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
}
.footer-top {
  padding: var(--sp-xl) 0;
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr;
  gap: var(--sp-xl);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .site-logo svg { height: 36px; }
.footer-about {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: var(--sp-sm);
}
.footer-phone {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  margin-top: var(--sp-sm);
  letter-spacing: 0.02em;
}
.footer-phone:hover { color: var(--gold); }
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--sp-sm);
}
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 10px; }
.footer-menu a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--tr);
}
.footer-menu a:hover { color: var(--white); }
.footer-bottom {
  padding: var(--sp-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}
.footer-policy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  transition: color var(--tr);
}
.footer-policy:hover { color: rgba(255,255,255,0.7); }

/* =============================================
   BLOG / POSTS
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}
.post-card {
  border: 1px solid var(--stone);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  display: block;
  background: var(--white);
  transition: all var(--tr);
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-card-img {
  aspect-ratio: 16/9;
  background: var(--concrete);
  overflow: hidden;
}
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: var(--sp-md); }
.post-card-meta {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-bottom: 8px;
}
.post-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.post-card p { font-size: 0.85rem; color: var(--ink-mid); }

/* =============================================
   SINGLE SERVICE PAGE
   ============================================= */
.page-hero {
  background: var(--navy);
  padding: var(--sp-xl) 0;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero-inner { position: relative; z-index: 1; color: var(--white); }
.page-hero h1 { color: var(--white); margin-bottom: var(--sp-sm); }
.page-hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.7); max-width: 600px; }
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--sp-sm);
}
.page-breadcrumb a { color: rgba(255,255,255,0.45); }
.page-breadcrumb a:hover { color: var(--gold); }
.page-breadcrumb svg { width: 14px; height: 14px; }

.service-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-xl);
  align-items: start;
}
.service-sidebar {
  position: sticky;
  top: 90px;
}
.sidebar-cta-box {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  color: var(--white);
}
.sidebar-cta-box h3 { color: var(--white); font-size: 1rem; margin-bottom: 8px; }
.sidebar-cta-box p { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin-bottom: var(--sp-md); }
.sidebar-price {
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-md);
}
.sidebar-price-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar-price-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--white);
}
.sidebar-phone-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.7);
  margin-top: var(--sp-sm);
  transition: color var(--tr);
}
.sidebar-phone-link:hover { color: var(--gold); }
.sidebar-phone-link svg { width: 18px; height: 18px; }

/* Advantages list in service */
.service-pros {
  list-style: none;
  margin-top: var(--sp-md);
}
.service-pros li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--stone);
  font-size: 0.95rem;
  color: var(--ink-mid);
}
.service-pros li:last-child { border-bottom: none; }
.service-pros li::before {
  content: '';
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231e6abf'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
  margin-top: 2px;
}

/* =============================================
   AUDIT SECTION
   ============================================= */
.audit-steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}
.audit-step {
  padding: var(--sp-lg);
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--r-md);
  position: relative;
}
.audit-step-num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.audit-step h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.audit-step p { font-size: 0.9rem; color: var(--ink-mid); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
  .hero-inner { gap: var(--sp-lg); }
  .service-content { grid-template-columns: 1fr; }
  .service-sidebar { position: static; }
}

@media (max-width: 768px) {
  :root { --sp-xl: 2.5rem; --sp-2xl: 3.5rem; }

  .site-nav { display: none; }
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--stone);
    padding: var(--sp-sm) var(--sp-md);
  }
  .site-nav.is-open ul { flex-direction: column; gap: 2px; }
  .menu-toggle { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .audit-steps { grid-template-columns: 1fr; }
  .header-contacts .btn-call { display: none; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .messenger-widget { right: 16px; bottom: 16px; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  .site-header,
  .messenger-widget,
  .tn-overlay,
  .site-footer { display: none; }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 12px 24px;
  background: var(--navy);
  color: var(--white);
  z-index: 99999;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

/* Gutenberg alignment */
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide { width: calc(100% + var(--sp-xl)); margin-left: calc(-1 * var(--sp-xl) / 2); }

/* =============================================
   HERO RIGHT PANEL — always visible
   ============================================= */
.hero-right-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

/* Blueprint schematic */
.hero-blueprint {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  padding: var(--sp-sm);
  overflow: hidden;
}
.hero-blueprint svg { display: block; }

/* Quick contact strip below cert */
.hero-contact-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  transition: all var(--tr);
  text-decoration: none;
}
.hero-contact-item:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}
.hero-contact-item svg { flex-shrink: 0; opacity: .75; }

/* Cert num placeholder style */
.cert-num--placeholder {
  letter-spacing: 0.06em;
  opacity: 0.4;
  font-size: 1.6rem !important;
}

@media (max-width: 768px) {
  .hero-right-panel { display: none; }
}

/* =============================================
   PAGINATION
   ============================================= */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  margin: 0 3px;
  border: 1.5px solid var(--stone);
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  transition: all var(--tr);
}
.page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.page-numbers.current {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.page-numbers.dots { border-color: transparent; }

/* =============================================
   ENTRY CONTENT (Gutenberg / editor styles)
   ============================================= */
.entry-content h2 { font-size: 1.4rem; margin: var(--sp-lg) 0 var(--sp-sm); }
.entry-content h3 { font-size: 1.1rem; margin: var(--sp-md) 0 8px; }
.entry-content p  { margin-bottom: var(--sp-sm); color: var(--ink-mid); }
.entry-content ul,
.entry-content ol {
  padding-left: var(--sp-md);
  margin-bottom: var(--sp-sm);
  color: var(--ink-mid);
}
.entry-content li { margin-bottom: 6px; }
.entry-content a  { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--navy); }
.entry-content img {
  border-radius: var(--r-md);
  margin: var(--sp-md) 0;
}
.entry-content blockquote {
  border-left: 4px solid var(--gold);
  padding: var(--sp-sm) var(--sp-md);
  margin: var(--sp-md) 0;
  background: var(--gold-light);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--ink-mid);
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-md) 0;
  font-size: 0.9rem;
}
.entry-content th,
.entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--stone);
  text-align: left;
}
.entry-content th {
  background: var(--concrete);
  font-weight: 600;
  color: var(--navy);
}
.entry-content code {
  background: var(--concrete);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: monospace;
}
.entry-content pre {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: var(--sp-md);
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: var(--sp-md) 0;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content hr {
  border: none;
  border-top: 1px solid var(--stone);
  margin: var(--sp-lg) 0;
}

/* =============================================
   SEARCH FORM (header)
   ============================================= */
.search-form {
  display: flex;
  align-items: center;
  gap: 0;
}
.search-field {
  padding: 8px 14px;
  border: 1.5px solid var(--stone);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  width: 220px;
}
.search-field:focus { border-color: var(--blue); }
.search-submit {
  padding: 8px 16px;
  background: var(--blue);
  color: var(--white);
  border: 1.5px solid var(--blue);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: background var(--tr);
}
.search-submit:hover { background: var(--navy); border-color: var(--navy); }

/* =============================================
   PRIVACY POLICY PAGE
   ============================================= */
.wp-block-group { margin-bottom: var(--sp-md); }

/* =============================================
   SIDEBAR CTA FORM (dark background inputs)
   ============================================= */
.cta-section .tn-form .tn-file-label {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.05);
}
.cta-section .tn-form .tn-file-label:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* =============================================
   TRUST STRIP responsive
   ============================================= */
@media (max-width: 900px) {
  .trust-strip-inner {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    gap: var(--sp-sm);
  }
}
@media (max-width: 560px) {
  .trust-strip-inner {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   FOOTER responsive fix
   ============================================= */
@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* =============================================
   ADMIN BAR adjustment
   ============================================= */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
