/* ══════════════════════════════════════════════
   Elektrogrupp Электрик | Общие стили
══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Тёмная тема (по умолчанию) */
  --yellow:   #FFD100;
  --yellow2:  #e6bc00;
  --bg:       #0d0d0d;
  --bg2:      #141414;
  --bg3:      #1c1c1c;
  --bg4:      #252525;
  --text:     #e5e5e5;
  --text2:    #cccccc;
  --muted:    #888888;
  --muted2:   #555555;
  --border:   rgba(255,209,0,.13);
  --border2:  rgba(255,255,255,.07);
  --shadow:   0 4px 24px rgba(0,0,0,.5);
  --overlay:  rgba(0,0,0,.05);

  /* Новые переменные */
  --dark:     #111111;
  --dark2:    #141414;
  --dark3:    #1c1c1c;
  --radius:   16px;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.5);
  --nav-bg:   rgba(13,13,13,.96);
  --body-overlay: transparent;
  --btn-border: rgba(255,255,255,.18);
}

[data-theme="light"] {
  /* Светлая тема - корпоративный стиль */
  --yellow:   #0066CC;
  --yellow2:  #0052A3;
  --bg:       #FFFFFF;
  --bg2:      #F8F9FA;
  --bg3:      #E9ECEF;
  --bg4:      #DEE2E6;
  --text:     #212529;
  --text2:    #495057;
  --muted:    #6C757D;
  --muted2:   #ADB5BD;
  --border:   rgba(0,0,0,.08);
  --border2:  rgba(0,0,0,.12);
  --shadow:   0 2px 12px rgba(0,0,0,.08);
  --overlay:  transparent;
  --dark:     #FFFFFF;
  --dark2:    #FFFFFF;
  --dark3:    #F8F9FA;
  --nav-bg:   rgba(255,255,255,.96);
  --body-overlay: #FFFFFF;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.08);
  --btn-border: rgba(0,0,0,.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: transparent url('../images/fon.jpg') center/cover no-repeat fixed;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background: var(--body-overlay);
  z-index: -1;
  pointer-events: none;
  transition: background-color .3s ease;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,209,0,.3); border-radius: 3px; }

/* ══ TOP BAR ══ */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 8px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: var(--muted);
}
.topbar a { color: var(--muted); text-decoration: none; transition: color .2s; }
.topbar a:hover { color: var(--yellow); }
.topbar-left { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar .dot { width: 6px; height: 6px; background: #2ecc71; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* ══ NAV ══ */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 4px;
  color: var(--yellow);
  text-decoration: none;
  line-height: 1;
}
.nav-logo em { color: rgba(255,255,255,.3); font-style: normal; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: flex; align-items: center; gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-links > li > a:hover,
.nav-links > li > a.active { color: var(--yellow); background: rgba(255,209,0,.07); }
.nav-links > li > a .arrow { font-size: .7rem; transition: transform .2s; }
.nav-links > li:hover > a .arrow { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 220px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  z-index: 200;
  box-shadow: var(--shadow);
}
.nav-links > li:hover .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 9px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: .85rem;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.dropdown a:hover { color: var(--yellow); background: rgba(255,209,0,.07); }

.nav-cta {
  background: var(--yellow);
  color: var(--bg);
  padding: 10px 22px;
  border-radius: 7px;
  font-weight: 800;
  font-size: .82rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--yellow2); transform: translateY(-1px); }

/* hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 999;
  flex-direction: column;
  padding: 24px 5%;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.mobile-nav-close { font-size: 1.8rem; cursor: pointer; color: var(--muted); }
.mobile-nav a { display: block; padding: 14px 0; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.1rem; border-bottom: 1px solid var(--border2); }
.mobile-nav a:hover { color: var(--yellow); }

/* ══ PAGE HERO (inner pages) ══ */
.page-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 52px 5% 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 100% at 80% 50%, rgba(255,209,0,.05) 0%, transparent 70%);
}
.page-hero-inner { position: relative; max-width: 700px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb span { opacity: .4; }
.page-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 12px;
}
.page-hero p { color: var(--muted); font-size: 1rem; }

/* ══ SECTIONS ══ */
.section { padding: 72px 5%; }
.section--alt { background: var(--bg2); }
.section-label {
  font-size: .72rem; font-weight: 700; color: var(--yellow);
  text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px;
}
h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: 2px;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 12px;
}
h2 .accent { color: var(--yellow); }
.section-desc { color: var(--muted); font-size: .97rem; max-width: 540px; margin-bottom: 48px; }

/* ══ BUTTONS ══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--bg);
  padding: 13px 28px; border-radius: 8px;
  font-weight: 800; font-size: .92rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: all .2s;
}
.btn-primary:hover { background: var(--yellow2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,209,0,.22); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  padding: 13px 28px; border-radius: 8px;
  font-weight: 700; font-size: .92rem;
  text-decoration: none;
  border: 1px solid var(--btn-border);
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }

.btn-sm {
  padding: 9px 18px;
  font-size: .82rem;
}

/* ══ CARDS ══ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(255,209,0,.3); transform: translateY(-3px); }

/* ══ FORM ELEMENTS ══ */
.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: .93rem;
  font-family: 'Manrope', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus { border-color: rgba(255,209,0,.5); }
.form-input::placeholder { color: var(--muted2); }

/* ══ STATS ROW ══ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-item {
  padding: 28px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: var(--yellow);
  line-height: 1;
  display: block;
}
.stat-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ══ FOOTER ══ */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 5% 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 4px;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 14px;
}
.footer-logo em { color: rgba(255,255,255,.25); font-style: normal; }
.footer-about { color: var(--muted); font-size: .88rem; line-height: 1.7; }
.footer-col h4 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--yellow);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--yellow); }
.footer-col p { color: var(--muted); font-size: .88rem; line-height: 1.7; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-copy { color: var(--muted2); font-size: .8rem; }

/* ══ TOAST ══ */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--bg3);
  border: 1px solid rgba(255,209,0,.35);
  border-radius: 10px;
  padding: 14px 22px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  z-index: 9999;
  transform: translateY(90px);
  opacity: 0;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ══ REVEAL ══ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ══ MODAL ══ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 500;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px;
  max-width: 480px; width: 100%;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none; color: var(--muted);
  font-size: 1.4rem; cursor: pointer; transition: color .2s;
}
.modal-close:hover { color: var(--yellow); }
.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem; letter-spacing: 2px;
  color: var(--text); margin-bottom: 6px;
}
.modal-sub { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.modal-form { display: flex; flex-direction: column; gap: 12px; }

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .topbar { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat-item { border-bottom: 1px solid var(--border); }
}
