/* =========================================================
   HEADER
   ========================================================= */
.header{
  position: sticky;
  top: 0;
  z-index: 9999;
  backdrop-filter: blur(12px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 8px 24px rgba(11,18,32,.06);
  will-change: transform;
}
[data-theme="dark"] .header{
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:72px;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* logo */
.logo{
  display:flex;
  align-items:center;
  gap:10px;
}
.logo-img{width:28px;height:28px}
.logo-text{
  font-weight:700;
  letter-spacing:-.01em;
  color: var(--text);
}

/* desktop nav */
.nav{
  display:flex;
  gap:18px;
  align-items:center;
}
.nav-link{ color: var(--muted); }
.nav-link:hover{ color: var(--text); }

/* burger */
.burger{
  display:none;
  background:transparent;
  border:0;
  padding:10px;
  border-radius:12px;
  color: var(--text);
}
.burger span{
  display:block;
  width:26px;
  height:2px;
  background: currentColor;
  opacity:.75;
  border-radius:2px;
}
.burger span+span{margin-top:6px}

/* mobile nav */
.mobile-nav{ display:none; }
.mobile-nav:not([hidden]){ display:grid; }
.mobile-nav{
  border-top:1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  padding:12px 20px 18px;
  gap:10px;
}
.mobile-nav a{ color: var(--muted); }
.mobile-nav a:hover{ color: var(--text); }

/* theme toggle */
.theme-toggle{
  border:1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.theme-toggle:hover{
  background: var(--panel2);
  transform: translateY(-1px);
}

/* header scroll states */
.header.is-hidden{ transform: translateY(-110%); }
.header.is-scrolled{
  box-shadow: 0 10px 28px rgba(11,18,32,.10);
}
[data-theme="dark"] .header.is-scrolled{
  box-shadow: 0 14px 34px rgba(0,0,0,.32);
}
.header.is-revealing{
  transform: translateY(0);
  animation: headerPop .22s var(--ease);
}
@keyframes headerPop{
  from{ transform: translateY(-8px); }
  to{ transform: translateY(0); }
}

/* responsive header */
@media (max-width: 920px){
  .nav{display:none}
  .burger{display:inline-flex}
}


/* =========================================================
   BUTTONS / BADGES
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 18px;
  border-radius:14px;
  border:1px solid var(--line);
  background: transparent;
  color: var(--text);
  transition: transform .15s var(--ease), background .2s var(--ease);
}
.btn:hover{
  transform: translateY(-1px);
  background: var(--panel2);
}
.btn:active{transform: translateY(0)}
.btn-primary{
  background: var(--accent);
  border-color: transparent;
  color:#06101b;
}
.btn-primary:hover{ background: rgba(44,168,225,.92); }
.btn-sm{ padding:10px 14px; border-radius:12px; }

.badge{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
}


/* =========================================================
   CARDS / GRIDS
   ========================================================= */
.cards{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cards-4{
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r);
  padding:18px;
  box-shadow: var(--shadow-soft);
}
.card p{
  color: var(--muted);
  margin:8px 0 0;
}

.hero-card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r-lg);
  padding:18px;
  box-shadow: var(--shadow);
  min-height:260px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.hero-card-title{font-weight:700; font-size:18px}
.hero-card-text{color:var(--muted); margin-top:6px}

/* steps */
.steps{display:grid; gap:12px}
.step{
  border:1px solid var(--line);
  background: var(--panel2);
  border-radius: var(--r);
  padding:16px;
  display:flex;
  gap:14px;
  align-items:flex-start;
}
.step-num{
  font-weight:800;
  color: rgba(44,168,225,.95);
  min-width:44px;
}


/* =========================================================
   DOCUMENTS
   ========================================================= */
.docs-grid{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.doc-card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r);
  padding:16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.doc-card:hover{
  transform: translateY(-2px);
  background: var(--panel2);
}
.doc-title{font-weight:600}
.doc-meta{color:var(--muted)}

/* two columns docs: физ/юр + common */
.docs-columns{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top: 14px;
}
.docs-col-title{
  font-weight:700;
  color: var(--text);
  margin: 0 0 10px;
}
.docs-list{
  display:grid;
  gap:12px;
}
.docs-common{
  display:block;        /* ⬅ убираем grid */
  margin-top:24px;
}

.docs-common .docs-list{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top:12px;
}
.doc-card-wide{
  min-height: 72px;
}

/* Tariff file button under desc */
.tariff-file{
  width: 100%;
  margin: 12px 0 18px;
}


/* =========================================================
   TARIFFS (TABLES)
   ========================================================= */
.tariffs-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap:14px;
  margin-top:14px;
  align-items:start;
}

.tariffs-grid > .card{
  min-width: 0; /* критично для grid + overflow внутри */
}


.tariff-table-wrap{
  margin-top:10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden; /* без горизонтального скролла */
}

.tariff-table{
  width:100%;
  border-collapse: collapse;
  font-size:14px;
  table-layout: fixed; /* ключ для переноса и равномерной ширины */
}

.tariff-table th,
.tariff-table td{
  border-top: 1px solid var(--line);
  padding:10px 10px;
  vertical-align: top;
  text-align:left;
  white-space: normal;          /* разрешаем перенос */
  overflow-wrap: anywhere;      /* переносим длинные фразы */
  word-break: break-word;
}

.tariff-table thead th{
  color: var(--muted);
  font-weight:600;
  background: var(--panel2);
  position: sticky;
  top: 0;
}

.tariff-table td{ color: var(--text); }

.tariff-table tr:first-child th,
.tariff-table tr:first-child td{
  border-top: 0;
}

.tariff-table tbody tr:hover td{
  background: rgba(0,0,0,.02);
}
[data-theme="dark"] .tariff-table tbody tr:hover td{
  background: rgba(255,255,255,.03);
}


/* =========================================================
   FAQ
   ========================================================= */
.faq{display:grid; gap:10px}
.faq-item{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background: var(--panel2);
  border-radius: var(--r);
  padding:14px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px 12px;
  cursor:pointer;
}
.faq-q{font-weight:600}
.faq-ico{color:var(--muted)}
.faq-a{
  grid-column:1 / -1;
  color:var(--muted);
  display:none;
}
.faq-item.is-open .faq-a{display:block}


/* =========================================================
   SERVICE SCOPE / ACCORDION / LISTS
   ========================================================= */
.service-scope{ margin-top:14px; }

.accordion-grid{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(2, 1fr);
}

/* accordion blocks */
.accordion{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.acc-item{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background: var(--panel2);
  border-radius: var(--r);
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}

.acc-q{font-weight:600; color: var(--text)}
.acc-ico{color: var(--muted)}

.acc-a{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r);
  padding:14px;
}

/* infra list */
.infra-lead{
  margin: 0 0 14px;
  color: var(--muted);
}

.infra-list{
  list-style:none;
  padding:0;
  margin:0;
}

.infra-list li{
  position:relative;
  padding-left:16px;
  margin-bottom:6px;
  color: var(--muted);
}
.infra-list li strong{ color: var(--text); }
.infra-list li::before{
  content:"•";
  position:absolute;
  left:0;
  color: var(--accent);
}

/* compact list */
.compact-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:6px;
}
.compact-list li{
  position:relative;
  padding-left:16px;
  color: var(--muted);
}
.compact-list li::before{
  content:"•";
  position:absolute;
  left:0;
  color: var(--accent);
}


/* =========================================================
   CONTACT (если у тебя ещё где-то используется старая сетка)
   ========================================================= */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:22px;
  align-items:start;
}


/* =========================================================
   FORMS
   ========================================================= */
.form{max-width:560px}
.form-row{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:14px;
}
input,textarea{
  border:1px solid var(--line);
  background: var(--panel2);
  border-radius:14px;
  padding:12px;
  color: var(--text);
  outline:none;
}
input:focus,textarea:focus{
  border-color: rgba(44,168,225,.55);
}
.form-note{color:var(--muted); font-size:13px; margin:10px 0 0}


/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  padding:28px 0;
  border-top:1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.footer-inner{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:22px;
}

.footer-col{ display:grid; gap:10px; }

.footer-title{
  font-weight:700;
  color: var(--text);
}

.footer-text{
  color:var(--muted);
  font-size:14px;
}

.footer-contact{
  display:grid;
  gap:2px;
  font-size:14px;
}
.footer-contact span{
  color:var(--muted);
  font-size:12px;
}
.footer-contact a{
  color:var(--text);
}
.footer-contact a:hover{
  color:var(--accent);
}

.tariff-table thead th:first-child,
.tariff-table tbody td:first-child{
  width: 40%;
}
.tariff-table thead th:nth-child(2),
.tariff-table tbody td:nth-child(2){
  width: 30%;
}
.tariff-table thead th:nth-child(3),
.tariff-table tbody td:nth-child(3){
  width: 30%;
}
/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 920px){
  .docs-columns{ grid-template-columns:1fr; }
  .docs-common{ grid-template-columns:1fr; }
  .tariffs-grid{ grid-template-columns:1fr; }
  .accordion-grid{ grid-template-columns:1fr; }
  .contact-grid{ grid-template-columns:1fr; }
  .footer-inner{ grid-template-columns:1fr; }
  .tariff-table{ min-width: 560px; }
}

.header-social{
  display:flex;
  align-items:center;
  gap:10px;
}

.header-social a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid var(--line);
  background: var(--panel);
  transition: transform .15s var(--ease), background .2s var(--ease);
}

.header-social a:hover{
  transform: translateY(-2px);
  background: var(--panel2);
}

.header-social img{
  width:30px;
  height:30px;
  display:block;
}

/* =========================
   Cookie banner + settings (Electro style)
   ========================= */
.cookie{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  pointer-events: none;
}
.cookie-card{
  width: min(420px, calc(100vw - 36px));
  pointer-events: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.cookie-title{
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.cookie-text{
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.cookie-actions{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.cookie-actions .btn{
  width: 100%;
  justify-content: center;
}

/* Mobile: centered */
@media (max-width: 640px){
  .cookie{
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 14px;
  }
}

/* =========================
   Cookie modal
   ========================= */
.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
}
.cookie-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
}

.cookie-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 28px));
  max-height: min(80vh, 720px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cookie-modal__header{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.cookie-back{
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s var(--ease);
}
.cookie-back:hover{ transform: translateY(-1px); background: var(--panel); }

.cookie-modal__kicker{
  color: var(--muted);
  font-size: 12px;
}
.cookie-modal__title{
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.cookie-modal__desc{
  margin: 0;
  padding: 14px 14px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-modal__body{
  overflow: auto;
  padding: 12px 14px 14px;
}

.cookie-modal__footer{
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.cookie-groups{ margin-top: 12px; display: grid; gap: 10px; }

.cookie-group{
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 16px;
  overflow: hidden;
}
.cookie-group__sum{
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
}
.cookie-group__sum::-webkit-details-marker{ display:none; }

.cookie-group__name{
  font-weight: 700;
  color: var(--text);
}
.cookie-group__status,
.cookie-group__hint{
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.cookie-group__status--on{
  color: rgba(44,168,225,.95);
}

.cookie-group__right{
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.cookie-group__content{
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* Switch */
.cookie-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cookie-switch input{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.cookie-switch__ui{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.cookie-switch__ui::after{
  content:"";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--muted);
  opacity: .55;
  transition: transform .2s var(--ease), background .2s var(--ease), opacity .2s var(--ease);
}
.cookie-switch input:checked + .cookie-switch__ui{
  background: rgba(44,168,225,.18);
  border-color: rgba(44,168,225,.35);
}
.cookie-switch input:checked + .cookie-switch__ui::after{
  transform: translate(18px, -50%);
  background: rgba(44,168,225,.95);
  opacity: 1;
}

/* Better modal on mobile (bottom sheet style) */
@media (max-width: 640px){
  .cookie-modal__panel{
    left: 50%;
    top: auto;
    bottom: 12px;
    transform: translateX(-50%);
    width: calc(100vw - 16px);
    max-height: 85vh;
    border-radius: 18px;
  }
}
