/*
Theme Name: Energy Device
Theme URI: https://example.com/energy-device
Author: Energy Device Team
Author URI: https://example.com
Description: Сучасна тема для компаній, що займаються продажем обладнання резервного живлення, інверторів та акумуляторних батарей. Адаптивний дизайн, карусель товарів, форма консультації.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: energy-device
Tags: business, one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* =========================
   VARIABLES & RESET
   ========================= */
:root {
  --bg-dark: #1a1a1a;
  --bg-darker: #141414;
  --bg-card: #2a2a2a;
  --bg-input: #3a3a3a;
  --accent: #f5b719;
  --accent-hover: #e0a60d;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --border: #333;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #1a1a1a;
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--full {
  width: 100%;
  padding: 14px 24px;
}

/* =========================
   HEADER
   ========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header__container {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo__icon {
  width: 36px;
  height: 36px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__text span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo__text span:last-child {
  color: var(--accent);
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a,
.nav .menu-item a {
  font-size: 14px;
  transition: color 0.2s;
}

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

.nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.burger span {
  display: block;
  height: 2px;
  background: white;
  transition: 0.3s;
}

.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-darker);
  padding: 24px 20px;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.mobile-menu.active { display: flex; }

.mobile-menu nav,
.mobile-menu nav ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.mobile-menu nav a {
  font-size: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: block;
}

.mobile-menu__phone {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

/* =========================
   HERO
   ========================= */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 800px 400px at 30% 40%, rgba(245, 183, 25, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 1000px 300px at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
    linear-gradient(135deg, #1a1a1c 0%, #252528 50%, #1c1c1e 100%);
  min-height: 560px;
  overflow: hidden;
  padding: 40px 0 60px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 183, 25, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 183, 25, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

.hero__glow--yellow {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 183, 25, 0.15) 0%, transparent 70%);
  top: -150px;
  left: 20%;
}

.hero__glow--blue {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.08) 0%, transparent 70%);
  bottom: -100px;
  right: 10%;
}

.hero__inverter {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 110px;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
}

.hero__inverter--left { left: 0; }
.hero__inverter--right { right: 0; }

.hero__container {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: center;
}

.hero__content { padding-left: 40px; }

.hero__title {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero__title .accent { color: var(--accent); }

.hero__subtitle {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero__features {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 180px;
}

.feature__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature__icon svg { width: 100%; height: 100%; }

.feature__text h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature__text p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.consult-form {
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.consult-form__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.consult-form__input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.consult-form__input:focus { outline: none; border-color: var(--accent); }
.consult-form__input::placeholder { color: #888; }

.consult-form__note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.consult-form__message {
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
}

.consult-form__message--success {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.consult-form__message--error {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* =========================
   SECTIONS COMMON
   ========================= */
.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

/* =========================
   SOLUTIONS CAROUSEL
   ========================= */
.solutions {
  padding: 60px 0 40px;
  background: var(--bg-dark);
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.carousel__viewport {
  overflow: hidden;
  flex: 1;
}

.carousel__track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 calc((100% - 48px) / 4);
  background: #f2f2f2;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.carousel__slide-image {
  background: #f2f2f2;
  padding: 24px 20px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.carousel__slide-image img {
  max-height: 150px;
  width: auto;
}

.carousel__slide-body {
  background: var(--bg-dark);
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
  align-self: flex-start;
}

.carousel__slide h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.carousel__slide ul {
  list-style: none;
  margin-bottom: 16px;
  flex: 1;
}

.carousel__slide li {
  font-size: 12px;
  color: #cfcfcf;
  padding: 4px 0;
  position: relative;
  padding-left: 18px;
}

.carousel__slide li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.carousel__slide-price {
  font-size: 13px;
  color: var(--text-muted);
}

.carousel__slide-price strong {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.carousel__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.carousel__arrow:hover { background: var(--accent); }
.carousel__arrow:hover svg path { fill: #1a1a1a; }
.carousel__arrow svg { width: 20px; height: 20px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}

.carousel__dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* =========================
   HOW WORKS
   ========================= */
.how-works { padding: 60px 0; background: var(--bg-darker); }

.how-works__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
}

.how-works__image {
  width: 100%;
  margin: 30px 0 20px;
  border-radius: 8px;
}

.how-works__legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 400px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-dot { width: 16px; height: 4px; border-radius: 2px; }
.legend-dot--blue { background: #4a9eff; }
.legend-dot--red { background: #e84545; }
.legend-dot--gray { background: #888; width: 12px; height: 12px; border-radius: 50%; }

.how-works__text p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.how-works__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.stat {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.stat__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.stat__icon svg { width: 24px; height: 24px; }

.stat__value { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.stat__label { font-size: 12px; color: var(--text-muted); }

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
}

.benefit { display: flex; align-items: center; gap: 12px; }

.benefit__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(245, 183, 25, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit__icon svg { width: 22px; height: 22px; }

.benefit h4 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.benefit p { font-size: 11px; color: var(--text-muted); }

/* =========================
   CTA
   ========================= */
.cta { padding: 50px 0; background: linear-gradient(135deg, #3a2f0f 0%, #2a2a2a 100%); }

.cta__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.cta__title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.cta__text { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.cta__btn { padding: 14px 32px; }

/* =========================
   FOOTER
   ========================= */
.footer {
  background: var(--bg-darker);
  padding: 40px 0 30px;
  border-top: 1px solid var(--border);
}

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

.footer__col { display: flex; flex-direction: column; gap: 16px; }

.footer__copyright { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

.footer__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.footer__socials { display: flex; gap: 12px; }

.footer__socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 183, 25, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.footer__socials a:hover { background: rgba(245, 183, 25, 0.2); }
.footer__socials svg { width: 18px; height: 18px; }

.footer__heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer__nav,
.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.footer__nav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

/* =========================
   WORDPRESS GENERIC PAGES
   ========================= */
.page-content {
  padding: 60px 0;
  min-height: 50vh;
}

.page-content h1, .page-content h2, .page-content h3 {
  margin-bottom: 16px;
  margin-top: 24px;
}

.page-content p { margin-bottom: 16px; line-height: 1.7; color: var(--text-muted); }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1024px) {
  .carousel__slide { flex: 0 0 calc((100% - 32px) / 3); }
  .hero__inverter { width: 90px; }
  .hero__content { padding-left: 20px; }
  .nav { gap: 20px; }
  .header__cta { font-size: 13px; padding: 10px 16px; }
}

@media (max-width: 900px) {
  .header__phone, .nav, .header__cta { display: none; }
  .burger { display: flex; }
  .hero__container { grid-template-columns: 1fr; gap: 30px; }
  .hero__inverter { display: none; }
  .hero__content { padding-left: 0; }
  .how-works__grid { grid-template-columns: 1fr; gap: 30px; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .carousel__slide { flex: 0 0 calc((100% - 16px) / 2); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 30px 0 40px; min-height: auto; }
  .hero__title { font-size: 22px; }
  .hero__features { flex-direction: column; gap: 16px; }
  .feature { max-width: 100%; }
  .consult-form { padding: 20px; }
  .solutions { padding: 40px 0 30px; }
  .section-title { font-size: 20px; }
  .carousel { gap: 0; }
  .carousel__arrow {
    position: absolute;
    z-index: 5;
    top: 35%;
    width: 36px;
    height: 36px;
  }
  .carousel__arrow--prev { left: 4px; }
  .carousel__arrow--next { right: 4px; }
  .carousel__slide { flex: 0 0 100%; }
  .how-works { padding: 40px 0; }
  .how-works__stats { grid-template-columns: 1fr 1fr; }
  .benefits { grid-template-columns: 1fr; padding: 20px; }
  .cta { padding: 40px 0; }
  .cta__container { flex-direction: column; text-align: center; }
  .cta__title { font-size: 20px; }
  .footer__container { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 400px) {
  .hero__title { font-size: 20px; }
  .consult-form__title { font-size: 16px; }
}
