/* ENERGETIK.UZ — энергетическая тема (жёлтый предупреждающий + тёмный индустриальный) */

:root {
  --hz-yellow: #ffd100;
  --hz-yellow-dark: #e6bc00;
  --hz-black: #0f1419;
  --hz-slate: #1e293b;
  --hz-blue: #0c4a6e;
  --hz-bg: #f1f5f9;
  --hz-card: #ffffff;
  --hz-border: #e2e8f0;
  --hz-muted: #64748b;
  --hz-radius: 0.75rem;
  --hz-shadow: 0 4px 24px rgba(15, 20, 25, 0.08);
  --hz-shadow-hover: 0 12px 40px rgba(15, 20, 25, 0.12);
}

/* Диагональные полосы «опасность» */
.hazard-stripe {
  background: repeating-linear-gradient(
    -45deg,
    var(--hz-yellow),
    var(--hz-yellow) 8px,
    var(--hz-black) 8px,
    var(--hz-black) 16px
  );
  height: 4px;
}

.hazard-stripe-thick {
  background: repeating-linear-gradient(
    -45deg,
    var(--hz-yellow),
    var(--hz-yellow) 10px,
    var(--hz-black) 10px,
    var(--hz-black) 20px
  );
}

/* Логотип — молния */
@keyframes bolt-flash {
  0%, 88%, 100% { opacity: 0; left: -100%; }
  92% { opacity: 1; left: 0; }
  96% { opacity: 1; left: 70%; }
}

.logo-bolt {
  position: relative;
  overflow: hidden;
}

.logo-bolt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 209, 0, 0.4) 45%,
    #fff 50%,
    rgba(255, 209, 0, 0.4) 55%,
    transparent 100%
  );
  transform: skewX(-15deg);
  animation: bolt-flash 6s ease-in-out infinite;
  pointer-events: none;
}

/* Карточки контента */
.post-card,
.card-article,
.e-card {
  background: var(--hz-card);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  border-left: 4px solid var(--hz-yellow);
  box-shadow: var(--hz-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover,
.card-article:hover,
.e-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hz-shadow-hover);
}

.badge-cat {
  display: inline-block;
  background: var(--hz-black);
  color: var(--hz-yellow);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.post-meta {
  color: var(--hz-muted);
  font-size: 0.8rem;
}

.post-title {
  font-weight: 700;
  color: var(--hz-slate);
}

/* Карточка статьи в списке */
.article-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  min-height: 1.5rem;
}

.article-card__badge--empty {
  display: block;
  width: 0;
  overflow: hidden;
}

.article-card__section-link {
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.article-card__section-link:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Главная — блоки разделов */
.home-section__head {
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--hz-border);
}

.home-section__title-link {
  color: var(--hz-black);
}

.home-section__title-link:hover {
  color: var(--hz-blue);
}

.article-card__date {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hz-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.article-card__title {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.article-card__title-link {
  color: var(--hz-slate);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-card__title-link:hover {
  color: var(--hz-blue);
}

.article-card__excerpt {
  flex-grow: 1;
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--hz-muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.article-card__footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hz-border);
  text-align: center;
}

.article-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--hz-blue);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.article-card__more:hover {
  color: var(--hz-yellow-dark);
  gap: 0.35rem;
}

.article-card__more .bi {
  font-size: 1.25rem;
  line-height: 1;
}

/* Страница статьи */
.article-view__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hz-border);
}

.article-view__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.article-view__section {
  text-decoration: none;
}

.article-view__section:hover {
  filter: brightness(1.08);
}

.article-view__date {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hz-muted);
  white-space: nowrap;
}

.article-view__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.article-view__actions a {
  opacity: 0.75;
  transition: opacity 0.2s;
}

.article-view__actions a:hover {
  opacity: 1;
}

.article-view__title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--hz-black);
}

.article-view__related {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--hz-border);
}

.article-view__related .card {
  background: #f8fafc;
  border: 1px solid var(--hz-border) !important;
  border-radius: var(--hz-radius);
}

/* Услуги — каталог */
.uslugi-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--hz-radius);
  background: linear-gradient(135deg, var(--hz-black) 0%, #1a2332 100%);
  color: #fff;
  border: 1px solid rgba(255, 209, 0, 0.25);
  box-shadow: 0 8px 24px rgba(15, 20, 25, 0.12);
}

.uslugi-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--hz-yellow);
  color: var(--hz-black);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.uslugi-banner__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.uslugi-banner__text strong {
  color: var(--hz-yellow);
}

.uslugi-banner--center {
  justify-content: center;
}

.uslugi-banner--center .uslugi-banner__text {
  text-align: center;
}

/* Сетка 1/2/3 колонки; неполный последний ряд по центру (lg: 3 в ряд) */
.uslugi-grid--balanced {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) and (max-width: 1023.98px) {
  .uslugi-grid--balanced {
    grid-template-columns: repeat(6, 1fr);
  }

  .uslugi-grid--balanced > .service-card {
    grid-column: span 3;
  }

  /* Одна карточка в последнем ряду (2 колонки), не при полных 2 в ряд */
  .uslugi-grid--balanced > .service-card:last-child:nth-child(2n + 1):not(:nth-child(2)) {
    grid-column: 2 / span 3;
  }
}

@media (min-width: 1024px) {
  .uslugi-grid--balanced {
    grid-template-columns: repeat(12, 1fr);
  }

  .uslugi-grid--balanced > .service-card {
    grid-column: span 4;
  }

  /* Одна карточка в последнем ряду (3 колонки): 4, 7, 10… */
  .uslugi-grid--balanced > .service-card:last-child:nth-child(3n + 1) {
    grid-column: 5 / span 4;
  }

  /* Две карточки в последнем ряду: 5, 8, 11… */
  .uslugi-grid--balanced > .service-card:nth-last-child(2):nth-child(3n + 1) {
    grid-column: 3 / span 4;
  }

  .uslugi-grid--balanced > .service-card:last-child:nth-child(3n + 2) {
    grid-column: 7 / span 4;
  }
}

.service-card {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hz-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 20, 25, 0.12);
  border-color: rgba(255, 209, 0, 0.45);
}

.service-card__stripe {
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    var(--hz-yellow) 0,
    var(--hz-yellow) 8px,
    var(--hz-black) 8px,
    var(--hz-black) 16px
  );
}

.service-card__head,
.service-card__cities,
.service-card__title,
.service-card__excerpt,
.service-card__footer {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.service-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  margin-bottom: 0.5rem;
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(145deg, var(--hz-yellow), var(--hz-yellow-dark));
  color: var(--hz-black);
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(255, 209, 0, 0.35);
}

.service-card__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hz-muted);
  white-space: nowrap;
}

.service-card__cities {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hz-blue);
}

.service-card__title {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  padding-bottom: 0;
}

.service-card__title-link {
  color: var(--hz-black);
  text-decoration: none;
  transition: color 0.2s;
}

.service-card__title-link:hover {
  color: var(--hz-blue);
}

.service-card__excerpt {
  flex-grow: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--hz-muted);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.service-card__footer {
  padding-top: 0.85rem;
  padding-bottom: 1.25rem;
  margin-top: auto;
  text-align: center;
}

.service-card__cta {
  width: 100%;
  max-width: 14rem;
  font-weight: 700;
}

/* Услуги — страница */
.service-view {
  border-radius: var(--hz-radius);
  overflow: hidden;
  border: 1px solid var(--hz-border);
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 20, 25, 0.08);
}

.service-view__hero {
  position: relative;
  padding: 2rem 1.5rem 1.75rem;
  background: linear-gradient(160deg, var(--hz-black) 0%, #1e293b 55%, #0c4a6e 100%);
  color: #fff;
  text-align: center;
}

.service-view__hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 209, 0, 0.2), transparent 55%);
  pointer-events: none;
}

.service-view__meta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.service-view__back {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.service-view__back:hover {
  color: var(--hz-yellow);
}

.service-view__date {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  white-space: nowrap;
}

.service-view__actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.service-view__cities {
  position: relative;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hz-yellow);
}

.service-view__title {
  position: relative;
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
}

.service-view__body {
  padding: 1.75rem 1.5rem;
}

.service-view__related {
  padding: 1.5rem;
  background: #f8fafc;
  border-top: 1px dashed var(--hz-border);
  text-align: center;
}

.service-view__related-title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--hz-slate);
}

/* Личный кабинет */
.cab-dashboard__hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.cab-dashboard__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--hz-yellow), var(--hz-yellow-dark));
  color: var(--hz-black);
  font-size: 1.75rem;
  flex-shrink: 0;
}

.cab-dashboard__greet {
  margin: 0;
  font-size: 0.8rem;
  color: var(--hz-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cab-dashboard__name {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hz-black);
}

.cab-dashboard__balance {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px solid var(--hz-yellow);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hz-slate);
}

.cab-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cab-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--hz-radius);
  border: 1px solid var(--hz-border);
  background: #fff;
  text-decoration: none;
  color: var(--hz-slate);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cab-tile:hover {
  transform: translateX(4px);
  border-color: var(--hz-yellow);
  box-shadow: 0 4px 16px rgba(15, 20, 25, 0.08);
  color: var(--hz-black);
}

.cab-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: var(--hz-blue);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.cab-tile--bonus .cab-tile__icon { background: #fffbeb; color: #b45309; }
.cab-tile--danger .cab-tile__icon { background: #fef2f2; color: #dc2626; }
.cab-tile--muted .cab-tile__icon { background: #f8fafc; color: var(--hz-muted); }

.cab-tile__body {
  flex: 1;
  min-width: 0;
}

.cab-tile__label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.cab-tile__hint {
  display: block;
  font-size: 0.75rem;
  color: var(--hz-muted);
  margin-top: 0.1rem;
}

.cab-tile__arrow {
  color: var(--hz-muted);
  font-size: 1.1rem;
}

.cab-tile:hover .cab-tile__arrow {
  color: var(--hz-yellow-dark);
}

/* Админ-панель */
.admin-panel__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .admin-panel__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.admin-panel__card {
  height: 100%;
  border-radius: var(--hz-radius);
  border: 1px solid var(--hz-border);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 20, 25, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-panel__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 20, 25, 0.1);
}

.admin-panel__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 3px solid var(--hz-yellow);
}

.admin-panel__card--yellow .admin-panel__head {
  background: var(--hz-yellow);
  color: var(--hz-black);
}

.admin-panel__card--slate .admin-panel__head {
  background: var(--hz-slate);
  color: #fff;
}

.admin-panel__card--dark .admin-panel__head {
  background: var(--hz-black);
  color: var(--hz-yellow);
}

.admin-panel__head h2 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.admin-panel__nav {
  display: flex;
  flex-direction: column;
}

.admin-panel__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--hz-slate);
  border-bottom: 1px solid var(--hz-border);
  transition: background 0.15s, padding-left 0.15s;
}

.admin-panel__link:last-child {
  border-bottom: none;
}

.admin-panel__link:hover {
  background: #fffbeb;
  padding-left: 1.2rem;
  color: var(--hz-black);
}

.admin-panel__link-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-panel__link-main .bi {
  font-size: 1.1rem;
  color: var(--hz-blue);
}

.admin-panel__badge {
  min-width: 1.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.admin-panel__badge--blue { background: var(--hz-blue); color: #fff; }
.admin-panel__badge--green { background: #16a34a; color: #fff; }
.admin-panel__badge--yellow { background: var(--hz-yellow); color: var(--hz-black); }
.admin-panel__badge--red { background: #dc2626; color: #fff; }
.admin-panel__badge--slate { background: var(--hz-slate); color: #fff; }

/* Плавное появление */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.anim-fade-up {
  animation: fade-up 0.45s ease forwards;
}

/* Модальное окно изображений */
#imgModal.open {
  display: flex !important;
}

/* Prose в статьях и текстовых блоках */
.article-body,
.service-view__body,
.agreement-text,
.legal-text {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
  line-height: 1.75;
}

.article-body p,
.article-body li,
.article-body dd,
.article-body blockquote,
.article-body td,
.service-view__body p,
.service-view__body li,
.agreement-text p,
.agreement-text li,
.legal-text p,
.legal-text li {
  text-align: justify;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.service-view__body h1,
.service-view__body h2,
.service-view__body h3 {
  text-align: center;
}

.article-body img,
.service-view__body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--hz-radius);
  cursor: pointer;
}

/* Ссылка вокруг картинки — тоже по центру */
.article-body a:has(> img),
.service-view__body a:has(> img) {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Абзац только с картинкой */
.article-body p:has(> img:only-child),
.article-body p:has(> a:only-child > img),
.service-view__body p:has(> img:only-child),
.service-view__body p:has(> a:only-child > img) {
  text-align: center;
}

.article-body a {
  color: var(--hz-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--hz-yellow-dark);
}

/* Hero: выключатель и лампочка */
.hero-electric {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--hz-black);
  color: #fff;
  margin-bottom: 2.5rem;
}

.hero-electric__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
  .hero-electric__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 2.5rem;
  }
}

.hero-electric__glow {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: radial-gradient(circle at 75% 40%, var(--hz-yellow) 0%, transparent 45%);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.hero-electric:has(#hero-power:checked) .hero-electric__glow {
  opacity: 0.35;
}

.hero-electric__content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.hero-electric__title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero-electric__title span {
  color: var(--hz-yellow);
}

.hero-electric__lead {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0 0 1.25rem;
  max-width: 28rem;
  line-height: 1.5;
  transition: color 0.4s ease;
}

.hero-electric:has(#hero-power:checked) .hero-electric__lead--off {
  display: none;
}

.hero-electric__lead--on {
  display: none;
  color: #e2e8f0;
}

.hero-electric:has(#hero-power:checked) .hero-electric__lead--on {
  display: block;
}

.hero-electric__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-electric__visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.hero-power-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Рубильник */
.hero-switch {
  display: block;
  cursor: pointer;
  user-select: none;
}

.hero-switch__plate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(180deg, #334155, #1e293b);
  border: 2px solid #475569;
  border-radius: 0.5rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-switch__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.hero-switch__rocker {
  position: relative;
  width: 2.5rem;
  height: 3.25rem;
  background: #0f1419;
  border-radius: 0.35rem;
  border: 2px solid #64748b;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.hero-switch__rocker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  width: 1.75rem;
  height: 1.25rem;
  margin-left: -0.875rem;
  margin-top: -0.625rem;
  background: linear-gradient(180deg, #64748b, #475569);
  border-radius: 0.2rem;
  transform: rotate(-18deg);
  transform-origin: center bottom;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-electric:has(#hero-power:checked) .hero-switch__rocker::before {
  transform: rotate(18deg);
  background: linear-gradient(180deg, var(--hz-yellow), var(--hz-yellow-dark));
  box-shadow: 0 0 12px rgba(255, 209, 0, 0.6);
}

.hero-electric:has(#hero-power:checked) .hero-switch__label {
  color: var(--hz-yellow);
}

.hero-switch__label::after {
  content: "Выкл";
}

.hero-electric:has(#hero-power:checked) .hero-switch__label::after {
  content: "Вкл";
}

/* Лампочка */
.hero-bulb {
  position: relative;
  width: 5.5rem;
  height: 7.5rem;
  transition: filter 0.5s ease;
  filter: brightness(0.45) saturate(0.3);
}

.hero-electric:has(#hero-power:checked) .hero-bulb {
  filter: brightness(1) saturate(1);
}

.hero-bulb__glass {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4.5rem;
  height: 4.5rem;
  margin-left: -2.25rem;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05) 40%, rgba(0, 0, 0, 0.2) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.5s ease, background 0.5s ease;
}

.hero-electric:has(#hero-power:checked) .hero-bulb__glass {
  background: radial-gradient(circle at 35% 28%, #fff9c4 0%, #ffd100 35%, #e6bc00 70%, #b8860b 100%);
  border-color: rgba(255, 235, 120, 0.6);
  box-shadow:
    0 0 30px rgba(255, 209, 0, 0.7),
    0 0 80px rgba(255, 209, 0, 0.35),
    inset 0 -4px 12px rgba(180, 140, 0, 0.4);
}

.hero-bulb__filament {
  position: absolute;
  left: 50%;
  top: 1.35rem;
  width: 1.5rem;
  height: 1.75rem;
  margin-left: -0.75rem;
  opacity: 0.35;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.hero-bulb__filament::before,
.hero-bulb__filament::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 100%;
  background: #64748b;
  border-radius: 1px;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.hero-bulb__filament::before {
  left: 20%;
  transform: rotate(-12deg);
}

.hero-bulb__filament::after {
  right: 20%;
  transform: rotate(12deg);
}

.hero-electric:has(#hero-power:checked) .hero-bulb__filament {
  opacity: 1;
}

.hero-electric:has(#hero-power:checked) .hero-bulb__filament::before,
.hero-electric:has(#hero-power:checked) .hero-bulb__filament::after {
  background: #fff8dc;
  box-shadow: 0 0 8px #ffd100;
}

.hero-bulb__base {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2.75rem;
  height: 2.25rem;
  margin-left: -1.375rem;
  background: linear-gradient(180deg, #64748b, #334155);
  border-radius: 0 0 0.35rem 0.35rem;
  border: 2px solid #475569;
}

.hero-bulb__base::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  top: 0.35rem;
  height: 3px;
  background: repeating-linear-gradient(90deg, #475569, #475569 3px, #334155 3px, #334155 6px);
  border-radius: 1px;
}

.hero-bulb__hint {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  text-align: center;
}

.hero-electric:has(#hero-power:checked) .hero-bulb__hint {
  color: var(--hz-yellow);
}

.hero-bulb__hint::before {
  content: "Нажми рубильник";
}

.hero-electric:has(#hero-power:checked) .hero-bulb__hint::before {
  content: "Лампочка горит!";
}

@media (prefers-reduced-motion: reduce) {
  .hero-bulb,
  .hero-bulb__glass,
  .hero-switch__rocker::before {
    transition: none;
  }
}
