/* ==========================================
   АРСББ — Exact Wix Recreation
   Colors: black bg, orange #FF8400 accent
   Font: Jura (Google Fonts)
   ========================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Jura', Arial, Helvetica, sans-serif;
  background-color: var(--bg, #000);
  color: var(--text, #fff);
  line-height: 1.4;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .4s ease, color .4s ease;
}

/* --- CSS Custom Properties: Dark (default) --- */
:root {
  --bg: #000;
  --bg-card: rgba(255,255,255,0.03);
  --bg-header: #000;
  --bg-header-scrolled: rgba(0,0,0,0.92);
  --bg-dropdown: #111;
  --bg-mobile-nav: rgba(0,0,0,0.97);
  --bg-backdrop: rgba(0,0,0,0.5);
  --bg-input: rgba(255,255,255,0.05);
  --bg-input-focus: rgba(255,132,0,0.05);
  --text: #fff;
  --text-muted: rgba(255,255,255,0.85);
  --text-dim: rgba(255,255,255,0.8);
  --text-faint: rgba(255,255,255,0.5);
  --accent: #FF8400;
  --accent-hover: #e07600;
  --border: rgba(255,132,0,0.15);
  --border-strong: rgba(255,132,0,0.4);
  --border-input: rgba(255,132,0,0.3);
  --shadow-card: rgba(255,132,0,0.15);
  --shadow-glow: rgba(255,132,0,0.05);
  --hero-overlay: rgba(0,0,0,0.72);
  --hero-overlay-mid: rgba(0,0,0,0.55);
  --hero-overlay-bot: rgba(0,0,0,0.75);
  --btt-label-bg: rgba(0,0,0,0.9);
  --logo-hover: #fff;
  --nav-active-text: #fff;
}

/* --- CSS Custom Properties: Light --- */
body.light-theme {
  --bg: #f5f5f5;
  --bg-card: rgba(0,0,0,0.03);
  --bg-header: #fff;
  --bg-header-scrolled: rgba(255,255,255,0.95);
  --bg-dropdown: #fff;
  --bg-mobile-nav: rgba(255,255,255,0.98);
  --bg-backdrop: rgba(0,0,0,0.3);
  --bg-input: rgba(0,0,0,0.04);
  --bg-input-focus: rgba(255,132,0,0.06);
  --text: #1a1a1a;
  --text-muted: #333;
  --text-dim: #444;
  --text-faint: #888;
  --accent: #e07600;
  --accent-hover: #c56800;
  --border: rgba(255,132,0,0.12);
  --border-strong: rgba(255,132,0,0.35);
  --border-input: rgba(255,132,0,0.25);
  --shadow-card: rgba(0,0,0,0.08);
  --shadow-glow: rgba(255,132,0,0.08);
  --hero-overlay: rgba(0,0,0,0.55);
  --hero-overlay-mid: rgba(0,0,0,0.4);
  --hero-overlay-bot: rgba(0,0,0,0.6);
  --btt-label-bg: rgba(255,255,255,0.95);
  --logo-hover: #333;
  --nav-active-text: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color .4s ease;
}

a:hover {
  color: #FF8400;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ---------- Container ---------- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- HEADER ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, border-color .3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  gap: 30px;
}

.logo {
  font-size: 17px;
  font-weight: 700;
  color: #FF8400;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.logo a {
  color: var(--accent);
}

.logo a:hover {
  color: var(--logo-hover);
}

/* ---------- NAV ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav > a,
.nav-dropdown-toggle {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
  border: 2px solid var(--border-strong);
  border-radius: 3px;
  background: transparent;
  transition: color .4s ease, background-color .4s ease, border-color .4s ease, transform .15s ease;
}

.nav > a:hover,
.nav-dropdown-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255,132,0,0.08);
}

.nav > a.active,
.nav-dropdown-toggle.active {
  color: var(--nav-active-text);
  background: var(--accent);
  border-color: var(--accent);
}

.nav > a.active:hover,
.nav-dropdown-toggle.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--nav-active-text);
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  white-space: nowrap;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dropdown);
  border: 1px solid var(--border-input);
  border-radius: 4px;
  min-width: 260px;
  padding: 6px 0;
  z-index: 2000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

/* Invisible bridge to cover the gap between toggle and menu */
.nav-dropdown-menu::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 14px;
}

/* Decorative arrow */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(255,132,0,0.3);
  z-index: 1;
}

.nav-dropdown.dd-open .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border: none;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  transition: background-color .3s ease, color .3s ease;
}

.nav-dropdown-menu a:hover {
  background: rgba(255,132,0,0.12);
  color: var(--accent);
  border: none;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1100;
}

.burger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #FF8400;
  transition: transform .3s ease, opacity .3s ease;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO SECTION ---------- */
.hero {
  padding: 120px 0 60px;
  text-align: center;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: url('../images/bezopasnost.jpg') center/cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--hero-overlay) 0%,
    var(--hero-overlay-mid) 50%,
    var(--hero-overlay-bot) 100%
  );
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2em;
  color: var(--accent);
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.hero .subtitle {
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3em;
  color: #fff;
  margin-bottom: 25px;
}

.hero .description {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5em;
  color: rgba(255,255,255,0.85);
  max-width: 700px;
  margin: 0 auto;
}

/* ---------- PAGE HEADER ---------- */
.page-header {
  padding: 120px 0 40px;
  text-align: center;
}

/* When breadcrumbs precede page-header, reduce top padding */
.breadcrumbs + .page-header {
  padding-top: 30px;
}

.page-header h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2em;
  margin-bottom: 15px;
  display: inline-block;
  position: relative;
}

.page-header .page-subtitle {
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1.3em;
  max-width: 750px;
  margin: 0 auto;
}

/* ---------- CARDS SECTION (3 columns) ---------- */
.cards-section {
  padding: 40px 0 60px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px var(--shadow-card), 0 0 30px var(--shadow-glow);
  border-color: var(--border-strong);
}

.card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1), filter .6s ease;
}

.card:hover .card-image img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h5 {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.1em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-body p {
  font-size: 14px;
  line-height: 1.5em;
  color: var(--text-dim);
  margin-bottom: 20px;
  flex: 1;
}

/* ---------- BUTTON ---------- */
.btn {
  display: inline-block;
  padding: 10px 28px;
  font-family: 'Jura', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background-color: #FF8400;
  border: 2px solid #FF8400;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .4s ease, border-color .4s ease, color .4s ease, transform .2s ease, box-shadow .4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background-color: transparent;
  color: #FF8400;
  border-color: #FF8400;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,132,0,0.35);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline {
  background-color: transparent;
  color: #FF8400;
  border: 2px solid #FF8400;
}

.btn-outline:hover {
  background-color: #FF8400;
  color: #fff;
}

/* ---------- DETAIL PAGE (krupny-biznes, maly-biznes) ---------- */
.detail-section {
  padding: 30px 0 50px;
}

.detail-intro {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 50px;
}

.detail-intro-image {
  flex: 0 0 45%;
  max-width: 45%;
  border-radius: 4px;
  overflow: hidden;
}

.detail-intro-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.detail-intro-text {
  flex: 1;
}

.detail-intro-text p {
  font-size: 15px;
  line-height: 1.6em;
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* ---------- SERVICE BLOCKS ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.service-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 30px;
  transition: border-color .4s ease, box-shadow .4s ease, transform .4s ease;
}

.service-block:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px var(--shadow-card);
  transform: translateY(-4px);
}

.service-block h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 15px;
  line-height: 1.2em;
}

.service-block p {
  font-size: 14px;
  line-height: 1.6em;
  color: var(--text-dim);
}

/* ---------- MALY-BIZNES cards ---------- */
.maly-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.maly-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  transition: transform .4s ease, border-color .4s ease, box-shadow .4s ease;
}

.maly-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px var(--shadow-card);
}

.maly-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.maly-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1), filter .6s ease;
}

.maly-card:hover .maly-card-image img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.maly-card-body {
  padding: 20px;
}

.maly-card-body h5 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.2em;
}

.maly-card-body p {
  font-size: 13px;
  line-height: 1.5em;
  color: var(--text-dim);
  margin-bottom: 18px;
}

/* ---------- ARTICLES SECTION ---------- */
.articles-section {
  padding: 30px 0 60px;
}

.articles-intro {
  text-align: center;
  margin-bottom: 40px;
  font-size: 16px;
  color: var(--text-faint);
}

.article-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 30px;
  margin-bottom: 25px;
  transition: border-color .4s ease, box-shadow .4s ease, transform .4s ease;
}

.article-block:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px var(--shadow-card);
  transform: translateY(-3px);
}

.article-block h5 {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 15px;
  line-height: 1.2em;
}

.article-block p {
  font-size: 14px;
  line-height: 1.6em;
  color: var(--text-dim);
}

/* ---------- PARTNERS ---------- */
.partners-section {
  padding: 30px 0 60px;
  text-align: center;
}

.partners-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.partner-item {
  text-align: center;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}

.partner-item:hover {
  transform: scale(1.1) translateY(-5px);
}

.partner-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: 4px;
}

.partner-item span {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ---------- CONTACTS ---------- */
.contacts-section {
  padding: 30px 0 60px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: flex-start;
}

.contact-info h5 {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 25px;
  line-height: 1.2em;
}

.contact-info h6 {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.contact-info p {
  font-size: 15px;
  line-height: 1.8em;
  color: var(--text-muted);
}

.contact-info a {
  color: var(--accent);
  transition: color .4s ease;
}

.contact-info a:hover {
  color: var(--logo-hover);
}

.contact-social {
  margin-top: 25px;
  display: flex;
  gap: 15px;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,132,0,0.4);
  border-radius: 50%;
  color: #FF8400;
  font-size: 16px;
  transition: background-color .4s ease, color .4s ease;
}

.contact-social a:hover {
  background-color: #FF8400;
  color: #fff;
}

/* ---------- FORM ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ---------- MAP SECTION ---------- */
.map-section {
  padding: 40px 0 50px;
}

.map-section iframe {
  display: block;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Jura', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 2px;
  outline: none;
  transition: border-color .4s ease, background-color .4s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 15px rgba(255,132,0,0.15), 0 0 3px rgba(255,132,0,0.3);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-faint);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form .btn {
  align-self: flex-start;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 25px 0;
  text-align: center;
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer p {
  font-size: 12px;
  color: var(--text-faint);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,132,0,0.3);
  color: #FF8400;
  font-size: 13px;
  transition: background-color .4s ease, color .4s ease;
}

.footer-social a:hover {
  background-color: #FF8400;
  color: #fff;
}

/* ---------- SECTION DIVIDER ---------- */
.section-divider {
  width: 60px;
  height: 3px;
  background: #FF8400;
  margin: 30px auto;
}

/* ---------- Solar Gallery ---------- */
.solar-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 20px 0 30px;
}

.solar-gallery img {
  width: 100%;
  max-width: 898px;
  height: auto;
  border: 1px solid rgba(255,132,0,0.2);
  border-radius: 6px;
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity .7s ease, transform .7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }
.fade-in-delay-4 { transition-delay: .4s; }

/* Instant reveal for elements already in viewport on page load */
.fade-in.instant {
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

/* ---------- PAGE TRANSITION ---------- */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

.page-transition .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FF8400;
  transform: translateX(-100%);
}

.page-transition.active .slide {
  animation: slideIn .45s cubic-bezier(.77,0,.175,1) forwards;
}

@keyframes slideIn {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* body leave animation */
body.leaving main,
body.leaving .hero,
body.leaving .cards-section,
body.leaving .page-header,
body.leaving .detail-section,
body.leaving .articles-section,
body.leaving .partners-section,
body.leaving .contacts-section {
  animation: contentSlideLeft .35s ease forwards;
}

@keyframes contentSlideLeft {
  to {
    opacity: 0;
    transform: translateX(-60px);
  }
}

/* page load entrance */
body.page-enter main,
body.page-enter .hero,
body.page-enter .cards-section,
body.page-enter .page-header,
body.page-enter .detail-section,
body.page-enter .articles-section,
body.page-enter .partners-section,
body.page-enter .contacts-section {
  animation: contentEnter .4s ease forwards;
}

@keyframes contentEnter {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Hero Staggered Entrance --- */
.hero-content.fade-in {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-content h1,
.hero-content .subtitle,
.hero-content .description {
  opacity: 0;
  transform: translateY(25px);
}

body:not(.leaving) .hero-content h1 {
  animation: heroReveal .8s cubic-bezier(.4,0,.2,1) .15s both;
}

body:not(.leaving) .hero-content .subtitle {
  animation: heroReveal .8s cubic-bezier(.4,0,.2,1) .4s both;
}

body:not(.leaving) .hero-content .description {
  animation: heroReveal .8s cubic-bezier(.4,0,.2,1) .65s both;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* --- Hero Subtle Glow --- */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,132,0,0.07) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: heroGlow 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroGlow {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  to   { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* --- Header Scroll Transitions --- */
.header {
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.header-inner {
  transition: padding .3s ease;
}

.header.scrolled {
  background: var(--bg-header-scrolled);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-strong);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header.scrolled .header-inner {
  padding-top: 8px;
  padding-bottom: 8px;
}

.header.scrolled .logo {
  font-size: 15px;
  transition: font-size .3s ease;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #FF8400;
  z-index: 10001;
  width: 0%;
  pointer-events: none;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: #FF8400;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 20px rgba(255,132,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .35s ease, visibility .35s ease, transform .35s ease, background-color .3s ease, box-shadow .3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #e07600;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255,132,0,0.5);
}

.back-to-top:active {
  transform: translateY(0);
}

/* Back-to-top: floating label "Наверх" */
.back-to-top .btt-label {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--btt-label-bg);
  color: var(--accent);
  font-family: 'Jura', Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.back-to-top .btt-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--btt-label-bg);
}

/* Show label on first appearance */
.back-to-top.show-label .btt-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Show label on hover */
.back-to-top:hover .btt-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Page Header Underline Animation --- */
.page-header h2::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: #FF8400;
  margin: 12px auto 0;
  border-radius: 2px;
  transition: width 1s cubic-bezier(.4,0,.2,1) .2s;
}

.page-header.visible h2::after {
  width: 80px;
}

/* --- Button Ripple Effect --- */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .5s ease, height .5s ease, opacity .5s ease;
  opacity: 0;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
  opacity: 1;
}

/* --- Contact Link Underline Sweep --- */
.contact-info a {
  position: relative;
  display: inline;
}

.contact-info a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width .3s ease;
}

.contact-info a:hover::after {
  width: 100%;
}

/* --- Heading Glow --- */
.page-header h2,
.hero h1 {
  text-shadow: 0 0 40px rgba(255,132,0,0.15);
}

/* --- Header Actions (theme toggle + burger wrapper) --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* --- Theme Toggle Button (in header) --- */
.theme-toggle {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
  padding: 0;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 16px rgba(255,132,0,0.3);
  border-color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity .3s ease, transform .3s ease;
  position: absolute;
}

/* Dark theme: show sun icon (to switch to light) */
.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

/* Light theme: show moon icon (to switch to dark) */
body.light-theme .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

body.light-theme .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Light theme additional fixes */
body.light-theme .header.scrolled {
  background: var(--bg-header-scrolled);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

body.light-theme .burger span {
  background: var(--accent);
}

body.light-theme .solar-gallery img {
  border-color: var(--border);
}

body.light-theme .logo,
body.light-theme .logo a {
  color: var(--accent);
}

/* Hide .uslugi-go-btn on desktop (shown only in mobile menu) */
.uslugi-go-btn {
  display: none;
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs {
  padding: 80px 0 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 12px 0;
  margin: 0;
  font-size: 13px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  color: var(--text-faint);
}

.breadcrumbs li + li::before {
  content: '›';
  margin: 0 10px;
  font-size: 16px;
  color: var(--text-faint);
  line-height: 1;
}

.breadcrumbs a {
  color: var(--accent);
  font-weight: 500;
  transition: color .3s ease;
}

.breadcrumbs a:hover {
  color: var(--accent-hover);
}

.breadcrumbs li:last-child {
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- 404 ERROR PAGE ---------- */
.error-page {
  padding: 120px 0 80px;
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  max-width: 500px;
  margin: 0 auto;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -3px;
  animation: errorPulse 3s ease-in-out infinite;
}

@keyframes errorPulse {
  0%, 100% { text-shadow: 0 0 40px rgba(255,132,0,0.15); }
  50% { text-shadow: 0 0 80px rgba(255,132,0,0.4), 0 0 120px rgba(255,132,0,0.15); }
}

.error-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 15px;
}

.error-content p {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 35px;
  line-height: 1.5;
}

.error-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- FOOTER PRIVACY LINK ---------- */
.footer-privacy {
  font-size: 12px;
  color: var(--text-faint);
  transition: color .3s ease;
}

.footer-privacy:hover {
  color: var(--accent);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .header-inner {
    gap: 10px;
  }

  .nav {
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: calc(100vw - 300px);
    flex-shrink: 1;
    flex-wrap: nowrap;
    padding-bottom: 0;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav > a,
  .nav-dropdown-toggle {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .logo {
    font-size: 14px;
    min-width: 0;
    white-space: normal;
    max-width: 240px;
    line-height: 1.2;
    flex-shrink: 0;
  }

  /* Fix dropdown visibility on tablet */
  .nav:has(.nav-dropdown.dd-open),
  .nav:has(.nav-dropdown.open) {
    overflow: visible;
  }

  /* Chevron arrow on tablet dropdown toggle */
  .nav-dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 5px;
    transition: transform .3s ease;
    vertical-align: middle;
    position: relative;
    top: -1px;
  }

  .nav-dropdown.dd-open .nav-dropdown-toggle::after,
  .nav-dropdown.open .nav-dropdown-toggle::after {
    transform: rotate(-135deg);
    top: 1px;
  }

  /* One-time scroll hint animation */
  .nav.scroll-hint {
    animation: navScrollHint 1.2s ease-in-out;
  }

  @keyframes navScrollHint {
    0%   { transform: translateX(0); }
    30%  { transform: translateX(-30px); }
    60%  { transform: translateX(10px); }
    100% { transform: translateX(0); }
  }
}

@media (max-width: 1024px) {
  .nav > a,
  .nav-dropdown-toggle {
    padding: 6px 10px;
    font-size: 12px;
  }

  .nav {
    gap: 3px;
    max-width: calc(100vw - 290px);
    overflow-y: hidden;
  }

  .header-inner {
    gap: 8px;
  }

  .logo {
    font-size: 13px;
    max-width: 200px;
  }
}

@media (max-width: 900px) {
  .cards-grid,
  .maly-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .detail-intro {
    flex-direction: column;
  }

  .detail-intro-image {
    flex: none;
    max-width: 100%;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .partners-grid {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  /* --- Mobile Nav: slide from right --- */
  .nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 92vw;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-mobile-nav);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    z-index: 1050;
    padding: 80px 20px 30px;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .38s cubic-bezier(.4,0,.2,1),
                visibility .38s ease;
    border-left: 1px solid var(--border);
  }

  .nav.active {
    transform: translateX(0);
    visibility: visible;
  }

  /* Backdrop overlay */
  .nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-backdrop);
    z-index: -1;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
  }

  .nav.active::before {
    opacity: 1;
    pointer-events: auto;
  }

  .nav > a,
  .nav-dropdown-toggle {
    font-size: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(255,132,0,0.35);
    border-radius: 10px;
    margin-bottom: 8px;
    min-width: 0;
    width: 100%;
    text-align: center;
    white-space: normal;
    word-break: break-word;
  }

  /* --- Dropdown: inline, pushes items down --- */
  .nav-dropdown {
    position: static;
    width: 100%;
  }

  .nav-dropdown-toggle {
    position: relative;
  }

  /* Arrow chevron for dropdown toggle */
  .nav-dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 8px;
    transition: transform .3s ease;
    vertical-align: middle;
    position: relative;
    top: -2px;
  }

  .nav-dropdown.open .nav-dropdown-toggle::after {
    transform: rotate(-135deg);
    top: 2px;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: max-height .35s cubic-bezier(.4,0,.2,1),
                padding .35s ease;
  }

  .nav-dropdown-menu::before,
  .nav-dropdown-menu::after {
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 500px;
    padding: 4px 0 0;
  }

  .nav-dropdown-menu a {
    font-size: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(255,132,0,0.2);
    border-radius: 8px;
    margin-bottom: 5px;
    text-align: center;
    background: rgba(255,132,0,0.04);
    white-space: normal;
    word-break: break-word;
  }

  /* "Перейти в Услуги" link at bottom of dropdown */
  .uslugi-go-btn {
    display: block;
    font-size: 12px;
    color: #FF8400;
    text-align: center;
    padding: 6px 10px;
    margin-bottom: 5px;
    opacity: 0.7;
    transition: opacity .3s ease;
  }

  .uslugi-go-btn:hover {
    opacity: 1;
  }

  .burger {
    display: flex;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero .subtitle {
    font-size: 18px;
  }

  .page-header h2 {
    font-size: 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
  }

  .header-inner {
    padding: 10px 15px;
  }

  /* --- Logo: allow wrapping so it doesn't overlap burger --- */
  .logo {
    font-size: 14px;
    white-space: normal;
    max-width: calc(100vw - 130px);
    line-height: 1.3;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .header-actions {
    gap: 10px;
  }
}


