/*
Theme Name: CVEG Premium
Theme URI: https://cveg.ru/
Author: CVEG
Author URI: https://cveg.ru/
Description: Premium minimal WordPress theme for ventilation inspection & microclimate. Fast, clean, SEO-ready.
Version: 1.0.36
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cveg-premium
Tags: one-column, custom-logo, custom-menu, featured-images, accessibility-ready
*/

:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:#e2e8f0;
  --card:#ffffff;
  --shadow: 0 10px 30px rgba(15,23,42,.06);
  --blue:#3b82f6;        /* light blue accent */
  --red:#ef4444;         /* light red accent */
  --wa:#22c55e;          /* WhatsApp green */
  --radius:16px;
  --radius-sm:12px;
  --max:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height:1.55;
  font-size:15px;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{color:inherit; text-decoration:none}
a:focus-visible, button:focus-visible{outline:2px solid rgba(59,130,246,.45); outline-offset:3px; border-radius:12px;}
img{max-width:100%; height:auto}

.container{max-width:var(--max); margin:0 auto; padding:0 20px;}
.content{max-width:980px; margin-left:auto; margin-right:auto;}
.main article > .h1,
.main article > .lead,
.main .container > .h1,
.main .container > .lead{max-width:980px; margin-left:auto; margin-right:auto;}
.header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:14px 0;
}
.brand{display:flex; align-items:center; gap:12px; min-width:160px;}
.brand-mark{
  width:34px; height:34px;
  border:1px solid var(--line);
  border-radius:10px;
  display:grid; place-items:center;
  background:#fff;
}
.brand-text{display:flex; flex-direction:column;}
.brand-name{font-weight:650; letter-spacing:.08em; font-size:12px; color:var(--muted); text-transform:uppercase;}
.brand-title{font-weight:700; font-size:15px; margin-top:2px; color:var(--text)}
/* IMPORTANT: no long site title in header */
.brand-title{display:none;}

.nav{display:flex; align-items:center; gap:18px;}
.nav-menu, .nav-menu ul{list-style:none; padding:0; margin:0;}
.nav-menu{display:flex; gap:18px; flex-wrap:wrap; align-items:center;}
.nav-menu > li{position:relative;}
.menu-link{font-size:14px; color:var(--muted); padding:8px 10px; border-radius:12px; display:inline-flex; align-items:center;}
.menu-link:hover{background:rgba(59,130,246,.06); color:var(--text);}
.menu-item.is-active .menu-link{color:var(--text); background:rgba(59,130,246,.06);}

.menu-row{display:flex; align-items:center; gap:8px;}

.submenu-toggle{
  display:none;
  width:34px; height:34px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  place-items:center;
  cursor:pointer;
}
.submenu-toggle:hover{background:rgba(59,130,246,.06); color:var(--text);}
.submenu-chev{width:14px; height:14px; opacity:.75; transition:transform .16s ease;}
.menu-item.submenu-open .submenu-chev{transform:rotate(180deg);}

/* Dropdown submenu (desktop)
   Fix: hover gap (flicker) + stable click target (Aquaverde принцип)
*/
.nav-menu > li{position:relative;}

/* Hover bridge: keeps submenu open while cursor moves from parent to submenu */
.nav-menu > li.has-submenu::after{
  content:"";
  position:absolute;
  left:-10px;
  right:-10px;
  top:calc(100% - 6px);
  height:28px;
  pointer-events:auto;
}

.submenu{
  position:absolute;
  top:calc(100% - 6px);
  left:-10px;
  min-width:260px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 40px rgba(15,23,42,.12);
  display:flex;
  flex-direction:column;
  gap:6px;
  z-index:1200;

  opacity:0;
  visibility:hidden;
  transform: translateY(8px);
  pointer-events:none;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.has-submenu:hover > .submenu{opacity:1; visibility:visible; transform: translateY(0); pointer-events:auto;}

/* Caret for parents (desktop) */
.has-submenu > .menu-row > .menu-link{
  position:relative;
  padding-right:18px;
}
.has-submenu > .menu-row > .menu-link::after{
  content:"";
  position:absolute;
  right:6px;
  top:50%;
  width:6px;
  height:6px;
  border-right:2px solid rgba(15,23,42,.42);
  border-bottom:2px solid rgba(15,23,42,.42);
  transform: translateY(-60%) rotate(45deg);
}

.submenu a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  color:var(--muted);
}
.submenu a:hover{background:rgba(59,130,246,.06); color:var(--text);}
.submenu li.is-active > a{background:rgba(59,130,246,.06); color:var(--text);}

.nav-toggle{
  display:none;
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color:var(--text);
  place-items:center;
}
.nav-toggle:hover{background:rgba(255,255,255,.85); transform:translateY(-1px)}

.nav-mobile-head{display:none;}
.nav-close{
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  display:grid; place-items:center;
}

.header-actions{display:flex; align-items:center; gap:10px;}
.icon-btn{
  width:40px; height:40px;
  display:grid; place-items:center;
  border-radius:12px;
  background: rgba(255,255,255,.72);
  border:1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.icon-btn:hover{ background: rgba(255,255,255,.85); }
.icon-btn svg, .icon-btn img{ width:22px; height:22px; display:block; }
.icon-btn:hover{transform:translateY(-1px)}
.icon-btn--phone{
  border-color: rgba(59,130,246,.75);
  color: rgb(37,99,235);
}
.icon-btn--phone svg, .icon-btn--phone img{ width:18px; height:18px; }

.icon-btn--wa{
  border-color: rgba(34,197,94,.65);
  color: rgb(22,163,74);
}
.icon-btn--wa svg, .icon-btn--wa img{ width:22px; height:22px; }

.contact-btns{display:flex; align-items:center; gap:18px; flex-wrap:wrap;}
.contact-btn{display:flex; align-items:center; gap:10px;}
.contact-btn__label{font-size:13px; color:var(--muted); font-weight:600;}
.contact-actions{display:flex; align-items:center; gap:12px; justify-content:flex-start; flex-wrap:wrap;}
.contact-cta{align-items:center; gap:16px; flex-wrap:wrap;}
.icon{width:18px; height:18px; display:block}
.icon.phone{color:var(--blue);}
.icon.whatsapp{color:var(--wa);}

.lang-dd{position:relative;}
.lang-dd__summary{
  display:flex; align-items:center; gap:6px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
  font-size:12px; color:var(--muted);
  cursor:pointer;
  user-select:none;
}
.lang-dd__summary::-webkit-details-marker{display:none;}
.lang-dd[open] .lang-dd__summary{box-shadow:0 12px 28px rgba(15,23,42,.10);}
.lang-dd__code{font-weight:700; letter-spacing:.04em;}
.lang-dd__chev{width:14px; height:14px; opacity:.7;}
.lang-dd__menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:170px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 18px 40px rgba(15,23,42,.12);
  padding:6px;
  display:grid;
  gap:2px;
  z-index:60;
}
.lang-dd__menu a{
  display:flex; align-items:center; gap:10px;
  padding:9px 10px;
  border-radius:12px;
  color:var(--text);
  font-size:13px;
}
.lang-dd__menu a:hover{background:rgba(15,23,42,.03);}
.lang-dd__menu a.active{background:rgba(59,130,246,.10);}
.lang-dd__menu .code{font-weight:800; color:var(--muted); min-width:28px;}
.lang-dd__menu .name{color:var(--text); opacity:.85;}


.main{padding:26px 0 60px;}
.hero{
  padding:40px 0 18px;
}

.intro-cta{
  margin-top:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(239,68,68,.05), rgba(59,130,246,.04));
  padding:22px;
  display:grid;
  grid-template-columns: 1fr 260px;
  gap:18px;
  align-items:start;
}
.intro-cta .hero{padding:0}
.intro-cta > div .grid{margin-top:18px}
.intro-cta .grid--services--intro{
  grid-column: 1 / -1;
  margin-top: 0;
}
.intro-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
  text-align:right;
}
.intro-actions .icon-row{display:flex; gap:10px; justify-content:flex-end;}
.intro-actions .btn-row{display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap;}
.btn--ghost{
  border:1px solid rgba(15,23,42,.12);
  background:rgba(255,255,255,.72);
}
.btn--ghost:hover{background:#fff;}

.kicker{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top:14px;
}
.pill{
  border:1px solid var(--line);
  background:rgba(59,130,246,.03);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}
.h1{
  font-size:38px;
  line-height:1.1;
  letter-spacing:-.02em;
  margin:0;
}
.lead{
  margin-top:14px;
  font-size:16px;
  color:var(--muted);
  max-width:840px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:16px;
  margin-top:26px;
}
.card{
  grid-column: span 4;
  border:1px solid var(--line);
  background:var(--card);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.card{min-width:0;}
.card--animated{transition:transform .18s ease, box-shadow .18s ease;}
.card--animated:hover{transform:translateY(-2px); box-shadow:0 16px 40px rgba(15,23,42,.10);}


/* Services grid on home pages: 4 cards in one row on desktop (no wrapping). */
.grid--services .card{ grid-column: span 3; }
.card h3{margin:10px 0 6px; font-size:16px}
.card p{margin:0; color:var(--muted); font-size:13px}
.card .mini-ico{
  width:34px; height:34px;
  border:1px solid var(--line);
  border-radius:12px;
  display:grid; place-items:center;
  background:#fff;
}

.section{
  margin-top:34px;
  padding-top:6px;
}
.section h2{
  font-size:22px;
  margin:0 0 12px;
  letter-spacing:-.01em;
}
.cols{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:20px;
}
.list{
  margin:0; padding-left:18px;
  color:var(--muted);
}
.list li{margin:8px 0}

.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}
.step{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#fff;
  padding:16px;
}
.step .n{
  width:30px; height:30px; border-radius:999px;
  display:grid; place-items:center;
  border:1px solid rgba(59,130,246,.35);
  color:var(--blue);
  font-weight:700; font-size:13px;
  background:rgba(59,130,246,.06);
}
.step b{display:block; margin-top:10px}
.step span{display:block; margin-top:6px; color:var(--muted); font-size:13px}

.cta{
  margin-top:28px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(239,68,68,.05), rgba(59,130,246,.04));
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.cta .txt{max-width:720px}
.cta h3{margin:0; font-size:16px}
.cta p{margin:6px 0 0; color:var(--muted); font-size:13px}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid rgba(59,130,246,.35);
  background:rgba(59,130,246,.10);
  color:var(--text);
  font-weight:650;
  font-size:13px;
  white-space:nowrap;
}
.btn:hover{background:rgba(59,130,246,.14)}

.footer{
  border-top:1px solid var(--line);
  padding:26px 0;
}
.footer-inner{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:16px; flex-wrap:wrap;
}
.footer small{color:var(--muted)}
.footer-actions{display:flex; gap:10px; align-items:center;}

.footer-right{ text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.footer-online{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); }
.footer-online .label{color:var(--muted)}
.footer-online .count{font-weight:800; color:var(--text); padding:3px 8px; border-radius:999px; border:1px solid rgba(59,130,246,.25); background:rgba(59,130,246,.06);}



/* About page timeline */
.timeline{
  position:relative;
  margin-top:18px;
}
.timeline:before{
  content:"";
  position:absolute;
  left:14px;
  top:6px;
  bottom:6px;
  width:2px;
  background: rgba(59,130,246,.28);
  border-radius:2px;
}
.timeline-item{
  position:relative;
  padding-left:44px;
  margin:0 0 16px;
}
.timeline-dot{
  position:absolute;
  left:7px;
  top:22px;
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid rgba(59,130,246,.55);
  background: rgba(59,130,246,.10);
  box-shadow:0 10px 20px rgba(59,130,246,.10);
}
.timeline-card{
  border:1px solid var(--line);
  background: rgba(255,255,255,.85);
  border-radius:var(--radius);
  padding:16px 18px;
  box-shadow:var(--shadow);
}
.timeline-year{
  display:inline-block;
  font-weight:700;
  font-size:12px;
  letter-spacing:.08em;
  color: rgba(59,130,246,.95);
  background: rgba(59,130,246,.06);
  border:1px solid rgba(59,130,246,.25);
  padding:5px 10px;
  border-radius:999px;
  margin-bottom:10px;
}
.timeline-card h3{margin:0 0 6px; font-size:16px;}
.timeline-card p{margin:0; color:var(--muted); font-size:13px;}

@media (max-width: 520px){
  .timeline:before{left:12px;}
  .timeline-item{padding-left:38px;}
  .timeline-dot{left:5px;}
}

@media (max-width: 640px){
  .footer-right{ text-align:left; align-items:flex-start; width:100%; }
}

.legal{margin-top:10px}

@media (max-width: 980px){
  /* Force single-column cards on tablet/mobile even if some cards have inline grid-column styles */
  .grid .card{grid-column: span 12 !important;}
  .grid--services .card{grid-column: span 12 !important;}
  .grid--extras .card{grid-column: span 12 !important;}
  .steps{grid-template-columns:1fr;}
  .cols{grid-template-columns:1fr;}
  .h1{font-size:32px;}
  .intro-cta{ grid-template-columns:1fr; }
  .intro-actions{ align-items:flex-start; text-align:left; }
  .intro-actions .icon-row, .intro-actions .btn-row{ justify-content:flex-start; }
}
@media (max-width: 980px){
  /* Drawer menu on tablet + mobile (Aquaverde принцип) */
  body.nav-open{overflow:hidden;}
  body.nav-open::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.42);
    z-index:49; /* below sticky header */
  }

  /* Burger visible on tablet/mobile */
  .nav-toggle{display:grid; position:relative; z-index:56;}

  /* Hide desktop nav; show only when opened */
  .nav{display:none;}
  .nav.is-open{
    display:block;
    position:fixed;
    left:0; right:0;
    top:var(--cveg-header-h, 68px);
    padding:12px 16px 16px;
    background:transparent;
    z-index:55;
  }

  .nav.is-open .nav-mobile-head{display:flex; justify-content:flex-end; padding:6px 4px 10px;}

  .nav.is-open .nav-menu{
    width:100%;
    max-width:720px;
    margin:0 auto;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:0 18px 40px rgba(15,23,42,.12);
    padding:10px;
    flex-direction:column;
    align-items:stretch;
    gap:4px;
  }

  /* Each row: link + toggle */
  .nav.is-open .nav-menu > li{
    width:100%;
    display:block;
    border-radius:14px;
  }

  .nav.is-open .menu-row{width:100%; justify-content:space-between; gap:10px;}

  .nav.is-open .menu-link{
    flex:1;
    padding:12px 12px;
    font-size:15px;
    font-weight:650;
    border:0;
    background:transparent;
    color:var(--text);
    border-radius:14px;
  }
  .nav.is-open .menu-link:hover{background:rgba(15,23,42,.04);}

  .nav.is-open .submenu-toggle{
    display:grid;
    width:44px;
    height:44px;
    border-radius:14px;
    background:#fff;
  }

  /* Hide desktop caret + hover bridge on touch layouts */
  .has-submenu > .menu-row > .menu-link::after{display:none;}
  .nav-menu > li.has-submenu::after{display:none;}

  /* Submenu inside drawer */
  .nav.is-open .submenu{
    position:static;
    top:auto; left:auto;
    width:100%;
    min-width:0;
    border:0;
    box-shadow:none;
    padding:10px 0 6px 0;
    margin:0 0 8px 0;
    border-top:1px solid var(--line);
    display:none;
    gap:4px;
    background:transparent;

    opacity:1;
    visibility:visible;
    transform:none;
    pointer-events:auto;
    transition:none;
  }
  .nav.is-open .menu-item.submenu-open > .submenu{display:flex;}

  .nav.is-open .submenu a{
    padding:10px 12px;
    border-radius:12px;
    font-size:13px;
    font-weight:600;
    color:var(--muted);
    border:0;
    background:transparent;
    margin-top:0;
  }
  .nav.is-open .submenu a:hover{background:rgba(15,23,42,.04); color:var(--text);}
}



/* Responsive safety: prevent text overflow */
.content,.card,.step,.cta,.intro-cta,.hero,.section{overflow-wrap:anywhere; word-break:break-word;}
.grid > *, .cols > *, .steps > *{min-width:0;}


.calc-entry-section{margin-top:24px;}
.calc-entry-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  max-width:920px;
}
.calc-entry-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:192px;
  border:1px solid rgba(236, 185, 46, .72);
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  box-shadow:0 12px 30px rgba(250, 214, 97, .16);
  padding:20px;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.calc-entry-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 42px rgba(250, 214, 97, .22);
  border-color:rgba(236, 185, 46, .94);
}
.calc-entry-card__eyebrow{
  font-size:12px;
  color:var(--muted);
}
.calc-entry-card h3{
  margin:0;
  font-size:22px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.calc-entry-card p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}
.calc-entry-card__btn{margin-top:auto; width:max-content;}

.calc-page-hero{
  padding:14px 0 8px;
}
.calc-page-hero__note{
  margin:12px 0 0;
  color:var(--muted);
  font-size:13px;
}
.calc-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:22px;
}
.calc-card{
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  box-shadow:var(--shadow);
  padding:18px;
}
.calc-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.calc-card__head h2{
  margin:0;
  font-size:22px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.calc-card__head span{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.calc-form{display:flex; flex-direction:column; gap:14px;}
.calc-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.calc-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.calc-field span{
  font-size:12px;
  color:var(--muted);
}
.calc-field input,
.calc-field select{
  width:100%;
  height:44px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 12px;
  background:#fff;
  color:var(--text);
  font:inherit;
  box-shadow:0 2px 10px rgba(15,23,42,.02);
}
.calc-field input:focus,
.calc-field select:focus{
  border-color:rgba(59,130,246,.45);
  outline:none;
  box-shadow:0 0 0 4px rgba(59,130,246,.08);
}
.calc-result{
  border:1px solid rgba(59,130,246,.16);
  background:rgba(59,130,246,.05);
  border-radius:18px;
  padding:16px;
}
.calc-result__label{
  font-size:12px;
  color:var(--muted);
}
.calc-result__sum{
  margin-top:4px;
  font-size:28px;
  line-height:1.1;
  letter-spacing:-.03em;
  font-weight:700;
}
.calc-result__note{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

.calc-entry-grid{
  margin:0 auto;
}
.calc-privacy{
  margin:22px 0 6px;
}
.calc-privacy__inner{
  max-width:980px;
  margin:0 auto;
  padding:22px 24px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
  box-shadow:var(--shadow);
}
.calc-privacy__inner h2{
  margin:0;
  font-size:24px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.calc-privacy__inner p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
}

@media (max-width: 1200px){
  .calc-fields{grid-template-columns:1fr;}
  .calc-card__head{flex-direction:column; align-items:flex-start;}
}

@media (max-width: 980px){
  .calc-entry-grid,
  .calc-grid,
  .calc-fields{grid-template-columns:1fr;}
  .calc-entry-grid{max-width:100%;}
}

@media (max-width: 640px){
  .calc-entry-card{min-height:auto; padding:18px; border-radius:20px;}
  .calc-entry-card h3{font-size:20px;}
  .calc-card{padding:16px; border-radius:20px;}
  .calc-card__head h2{font-size:20px;}
  .calc-result__sum{font-size:24px;}
  .calc-page-hero{padding:8px 0 6px;}
  .calc-privacy__inner{padding:18px 18px 20px; border-radius:20px;}
  .calc-privacy__inner h2{font-size:21px;}
  .calc-privacy__inner p{font-size:14px; line-height:1.6;}
}
