/* ============================================= */
/* ⚡️ Triogen Electrika — неоновый редизайн 2025 */
/* ============================================= */

:root {
  --bg-main: #0b0c10;
  --bg-secondary: #12131a;
  --text-main: #e0e0e0;
  --accent1: #00ffe0;
  --accent2: #5d5bff;
  --accent3: #ff007a;
  --card-bg: rgba(255, 255, 255, 0.03);
  --border-light: rgba(255, 255, 255, 0.08);
  --blur: blur(12px);
  --radius: 16px;
  --shadow-glow: 0 0 20px rgba(93, 91, 255, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  caret-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background: radial-gradient(circle at top left, #0b0c10 0%, #12131a 70%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  user-select: none;
}

/* ============================================= */
/* Header */
/* ============================================= */

header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70vh;
  min-height: 400px;
  background: linear-gradient(135deg, #090a10 0%, #13152a 100%);
  overflow: hidden;
  color: white;
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 224, 0.1), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(93, 91, 255, 0.1), transparent 60%);
  z-index: 0;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  gap: 30px;
}

.intro .text {
  text-align: center;
}

.intro .text h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(0, 255, 224, 0.4);
  transition: all 0.3s ease;
}

.intro .text h1:hover {
  text-shadow: 0 0 25px var(--accent1), 0 0 35px var(--accent2);
  transform: scale(1.03);
}

.intro p {
  width: 95vw;
  font-size: 1.2rem;
  color: #bbb;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

/* .intro .ava img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 3px solid var(--accent2);
  box-shadow: 0 0 25px var(--accent2);
} */

/* Canvas Particles */
#magneticCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.5;
}

/* ============================================= */
/* Общие секции */
/* ============================================= */

[class^="section-"] {
  padding: 70px 20px;
  position: relative;
  background: linear-gradient(180deg, var(--bg-main), var(--bg-secondary));
  border-top: 1px solid var(--border-light);
}

[class^="section-"] h2 {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 40px;
  color: var(--accent1);
  text-shadow: 0 0 15px rgba(0, 255, 224, 0.5);
}

.service-card,
.portfolio-item,
.benefit-card {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-header:focus,
.btn-more:focus,
footer a:focus {
    outline: 2px solid var(--accent1);
    outline-offset: 2px;
}


/* ============================================= */
/* Section: About */
/* ============================================= */

.section-about {
  padding: 80px 20px;
  margin: 0 auto;
  text-align: center;
  color: #ddd;
}


.section-about h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--accent1);
  margin-bottom: 25px;
  text-shadow: 0 0 20px rgba(0, 255, 224, 0.5);
}

.section-about p {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #aaa;
}

.section-about strong {
  color: var(--accent1);
}


.about-image img {
  width: 70vw;
  object-fit: cover;
  filter: brightness(0.8);
  transition: transform 0.5s;
}

/* .about-image:hover img {
  transform: scale(1.05);
} */

.about-text {
  font-size: 1.2rem;
  max-width: 70vw;
  margin: 0 auto;              /* <-- центрирует блок */
  color: #ccc;
  text-align: center;
}

@media (min-width: 992px) {
  .about-container {
    flex-direction: row;
    align-items: center;
  }
  .about-text {
    flex: 1;
    padding-left: 40px;
  }
  .about-image {
    flex: 1;
  }
}

/* ============================================= */
/* Section: Services */
/* ============================================= */

/* ============================================= */
/* 🛠 FIX: Центрирование карточек "Основные направления работ" */
/* ============================================= */

.section-services::before, 
.section-benefits::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle at center, rgba(9, 120, 224, 0.882) 0%, transparent 50%);
  transform: translate(-50%, -50%);
  z-index: 0;
}

.section-services .service-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  justify-content: center;       /* <-- центрирует карточки по горизонтали */
  align-content: start;
  max-width: 1200px;             /* чтобы сетка не растягивалась на весь экран */
  margin: 0 auto;
  width: 100%;
}

/* Для чуть более плотной компоновки на широких экранах */
@media (min-width: 1200px) {
  .section-services .service-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Для планшетов и телефонов */
@media (max-width: 800px) {
  .section-services .service-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border-light);
  box-shadow: 0 0 20px rgba(93, 91, 255, 0.1);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px var(--accent2);
}

.service-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(90deg, var(--accent2), var(--accent1));
  color: #000;
  font-size: 1.2rem;
  cursor: pointer;
  font-weight: 600;
}

.service-content {
  padding: 18px 24px;
  color: #ccc;
}

.service-content li {
  margin-bottom: 10px;
  list-style: none;
}

.service-content i {
  color: var(--accent1);
  margin-right: 8px;
}

/* ============================================= */
/* Section: Portfolio */
/* ============================================= */

/* ============================================= */
/* 🛠 FIX: Выравнивание карточек в "Мои работы" */
/* ============================================= */
.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 20px rgba(93, 91, 255, 0.1);
  aspect-ratio: 4 / 3; /* одинаковое соотношение сторон у всех карточек */
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* обрезаем лишнее, но не деформируем */
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.75));
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--accent1);
  text-shadow: 0 0 10px var(--accent1);
}

.portfolio-overlay p {
  font-size: 0.95rem;
  color: #ccc;
}

.btn-more {
  display: block;
  margin: 40px auto 0;
  padding: 12px 36px;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 0 20px var(--accent1);
}

.btn-more:hover {
  box-shadow: 0 0 35px var(--accent2);
}

/* ============================================= */
/* Section: Benefits */
/* ============================================= */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 карточки в ряд */
  gap: 25px;
  max-width: 900px;
  margin: 0 auto;
  justify-items: stretch; /* растягивает карточки по ширине */
  align-items: stretch;   /* растягивает карточки по высоте */
}

.benefit-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  backdrop-filter: var(--blur);
  padding: 25px;
  text-align: center;
  border: 1px solid var(--border-light);
  transition: all 0.3s;
  display: flex;             /* карточка становится флексом */
  flex-direction: column;    /* элементы внутри идут сверху вниз */
  justify-content: space-between; /* равномерное распределение */
}

@media (max-width: 700px) {
  .benefits-grid {
    grid-template-columns: 1fr; /* по одной карточке в ряд */
  }
}

.benefit-card h3 {
  color: var(--accent2);
  font-size: 1.4rem;
}

.benefit-card p {
  font-size: 1.2rem;
}


.benefit-card:hover {
  box-shadow: 0 0 25px var(--accent2);
  transform: translateY(-5px);
}

.benefit-img {
  height: 280px;
  border-radius: var(--radius);
  background-size: cover;
  margin-bottom: 20px;
}

/* ============================================= */
/* Reviews + Stats + Footer */
/* ============================================= */
/* ============================================= */
/* 🌀 Эффект глубины: центральный слайд увеличен, боковые уменьшены */
/* ============================================= */

.section-portfolio,
.section-about,
.section-reviews {
  position: relative;
  overflow: hidden;
  min-height: 100px;
  isolation: isolate;
}

.section-portfolio::before,
.section-portfolio::after,
.section-about::before,
.section-about::after,
.section-reviews::before,
.section-reviews::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  pointer-events: none;
  z-index: 1;
}

/* Левый край */
.section-portfolio::before,
.section-about::before,
.section-reviews::before {
  left: 0;
  background: linear-gradient(to right, rgba(8, 8, 181, 0.4) 0%, transparent 100%);
}

/* Правый край */
.section-portfolio::after,
.section-about::after,
.section-reviews::after {
  right: 0;
  background: linear-gradient(to left, rgba(8, 8, 181, 0.4) 0%, transparent 100%);
}

/* Десктоп - вертикальная карусель */
.reviews-swiper {
  perspective: 100px;
  overflow: hidden;
  height: 80vh;
}

.reviews-swiper .swiper-slide {
  transition: transform 0.6s ease, opacity 0.6s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Карточка-рамка */
.review-card {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40vw;
  height: 20vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s ease;
  opacity: 0.9;
  box-shadow:
    0 0 25px rgba(0, 255, 224, 0.3),
    inset 0 0 15px rgba(93, 91, 255, 0.25);
}

/* Неоновая рамка */
.review-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 3px solid rgba(0, 255, 224, 0.6);
  box-shadow:
    0 0 25px rgba(0, 255, 224, 0.5),
    0 0 50px rgba(0, 255, 224, 0.3),
    inset 0 0 20px rgba(93, 91, 255, 0.4);
  pointer-events: none;
  transition: all 0.4s ease;
}

/* Изображение */
.review-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: inherit;
  transition: transform 0.4s ease;
  z-index: 1;
}

/* Десктоп - вертикальные стили */
.reviews-swiper .swiper-slide-active .review-card {
  transform: scale(1.1);
  opacity: 1;
  box-shadow:
    0 0 40px rgba(0, 255, 224, 0.6),
    inset 0 0 25px rgba(93, 91, 255, 0.4);
}

.reviews-swiper .swiper-slide-active .review-card::after {
  border: 3px solid rgba(0, 255, 224, 0.9);
  box-shadow:
    0 0 40px rgba(0, 255, 224, 0.8),
    0 0 70px rgba(0, 255, 224, 0.4),
    inset 0 0 25px rgba(93, 91, 255, 0.5);
}

/* Боковые карточки (вертикальные) */
.reviews-swiper .swiper-slide-prev .review-card,
.reviews-swiper .swiper-slide-next .review-card {
  transform: translateZ(-150px) rotateY(8deg);
  opacity: 0.7;
}

.reviews-swiper .swiper-slide-prev .review-card {
  transform: translateZ(-150px) rotateY(-8deg);
}

.reviews-swiper .swiper-slide-active .review-card {
  transform: scale(1.3);
}

/* Мобильная адаптация - горизонтальный слайдер */
@media (max-width: 1023px) {
  .reviews-swiper {
    height: 300px; /* Фиксированная высота для горизонтального слайдера */
    perspective: none; /* Убираем 3D-эффекты */
  }
  
  .review-card {
    width: 80vw; /* Шире для мобилок */
    height: 200px; /* Фиксированная высота */
    margin: 0 auto; /* Центрируем */
  }
  
  /* Горизонтальные трансформации */
  .reviews-swiper .swiper-slide-active .review-card {
    transform: scale(1.1);
    opacity: 1;
  }
  
  .reviews-swiper .swiper-slide-prev .review-card,
  .reviews-swiper .swiper-slide-next .review-card {
    transform: scale(0.85);
    opacity: 0.6;
  }
  
  /* Скрываем стрелки на маленьких экранах */
  /* .swiper-button-prev,
  .swiper-button-next {
    display: none;
  } */
  
  /* Убираем градиенты по бокам на мобилках */
  .section-reviews::before,
  .section-reviews::after {
    display: none;
  }
}

/* Дополнительные стили для планшетов */
@media (max-width: 767px) {
  .review-card {
    width: 85vw;
    height: 180px;
  }
  
  .reviews-swiper {
    height: 250px;
  }
  
  .reviews-swiper .swiper-slide-active .review-card {
    transform: scale(1.05);
  }
  
  .reviews-swiper .swiper-slide-prev .review-card,
  .reviews-swiper .swiper-slide-next .review-card {
    transform: scale(0.8);
    opacity: 0.5;
  }
}


.section-stats {
  background: linear-gradient(180deg, #10111a, #0b0c10);
}

.stat-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: 0 0 15px rgba(93, 91, 255, 0.1);
  transition: 0.3s;
}

.stat-box:hover {
  box-shadow: 0 0 25px var(--accent1);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  color: var(--accent1);
  text-shadow: 0 0 10px var(--accent1);
}

.stat-label {
  color: #aaa;
  font-size: 1.2rem;
}

footer {
  background: #05060b;
  text-align: center;
  padding: 30px 10px;
  border-top: 1px solid var(--border-light);
  color: #bbb;
}

footer p {
  font-size: 1.2rem;
}

/* Контейнер с иконками */
footer .icon-container {
  display: flex;               /* ← выстраиваем в ряд */
  justify-content: center;     /* ← по центру горизонтали */
  align-items: center;         /* ← по вертикали */
  gap: 25px;                   /* ← расстояние между иконками */
  flex-wrap: wrap;             /* ← если мало места — перенос строк */
  margin-top: 15px;
  margin-bottom: 15px ;
}

/* Сами иконки */
footer .icon-container i {
  font-size: 3.8rem;
  cursor: pointer;
  color: #bbb;
  transition: all 0.3s ease;
}

footer .icon-container i:hover {
  color: var(--accent1);
  text-shadow: 0 0 15px var(--accent1);
  transform: scale(1.1);
}

/* ============================================= */
/* 📱 Адаптивный дизайн Triogen Electrika */
/* ============================================= */

/* ----------- Ноутбуки (до 1200px) ----------- */
@media (max-width: 1200px) {
  .intro .ava img {
    width: 280px;
    height: 280px;
  }

  .intro p {
    font-size: 1.2rem;
  }

  .service-card,
  .benefit-card {
    padding: 20px;
  }

  .portfolio-gallery {
    gap: 20px;
  }
}

/* ----------- Планшеты (до 992px) ----------- */
@media (max-width: 992px) {
  header {
    height: 60vh;
  }

  .intro .text h1 {
    font-size: 2.5rem;
  }

  .intro .ava img {
    width: 220px;
    height: 220px;
  }

  .section-about {
    padding: 60px 15px;
  }

  .about-image img {
    width: 85vw;
  }

  .about-text {
    max-width: 85vw;
    font-size: 1.1rem;
  }

  .section-services .service-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* ----------- Смартфоны (до 768px) ----------- */
@media (max-width: 768px) {
  .intro {
    gap: 20px;
  }

  .intro .ava img {
    width: 180px;
    height: 180px;
  }

  .intro p {
    font-size: 1rem;
  }

  .section-about p {
    font-size: 1rem;
  }

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

  .benefits-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .portfolio-gallery {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .btn-more {
    padding: 10px 28px;
    font-size: 0.9rem;
  }

  footer p {
    font-size: 1rem;
  }

  footer .icon-container i {
    font-size: 2.8rem;
  }
}

/* ----------- Маленькие телефоны (до 480px) ----------- */
@media (max-width: 480px) {
  header {
    height: 50vh;
  }

  .intro .text h1 {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .intro .ava img {
    width: 140px;
    height: 140px;
  }

  .section-about h2 {
    font-size: 1.6rem;
  }

  .section-about p {
    font-size: 0.95rem;
  }

  .section-services h2,
  .section-benefits h2 {
    font-size: 1.5rem;
  }

  .service-header {
    font-size: 1rem;
  }

  .benefit-card h3 {
    font-size: 1.1rem;
  }

  .benefit-card p {
    font-size: 0.95rem;
  }

  .btn-more {
    font-size: 0.85rem;
    padding: 8px 20px;
  }

  footer .icon-container i {
    font-size: 2.4rem;
  }
}

