:root {
  --primary-red: #e53935;
  --primary-red-hover: #cf2c28;
  --bg-dark: #0f1115;
  --text-white: #ffffff;
}

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

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

html {
  scroll-behavior: smooth;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(15, 17, 21, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-logo {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-logo span {
  color: var(--primary-red);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: #a0a6b5;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-phone {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease;
}

.header-phone:hover {
  color: var(--primary-red);
}

.btn-header {
  display: inline-block;
  padding: 8px 20px;
  background-color: var(--primary-red);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

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

/* Адаптив для планшетов и мобилок */
@media (max-width: 768px) {
  .header-nav {
    display: none; /* Скрываем текстовые пункты меню на мобилках */
  }

  .header-phone {
    display: none; /* Оставляем компактную кнопку действия */
  }

  .header-container {
    height: 60px;
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Slider Section */
.slider-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, 0.72);
}

.slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.slide-badge {
  display: inline-block;
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.slide-title {
  font-size: clamp(32px, 5.5vw, 68px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  max-width: 1000px;
}

.btn-primary {
  display: inline-block;
  padding: 15px 42px;
  background-color: var(--primary-red);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 18px rgba(229, 57, 53, 0.45);
}

.btn-primary:hover {
  background-color: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(229, 57, 53, 0.6);
}

/* Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
}

.slider-arrow:hover {
  background: rgba(229, 57, 53, 0.8);
  color: #fff;
  border-color: transparent;
}

.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}

.dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
}

.dot.active {
  background: var(--primary-red);
  width: 48px;
}

/* About Section */
.about-section {
  padding: 80px 0;
  background-color: var(--bg-dark);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px; /* Фиксированная ровная высота для всех ячеек ряда */
  gap: 24px;
}

.about-card {
  background: #181b22;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.about-card:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 57, 53, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

/* Карточка 1: Описание */
.text-card {
  padding: 32px 28px;
  gap: 14px;
  overflow-y: auto;
}

.about-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.about-desc {
  color: #9ea5b3;
  font-size: 14px;
  line-height: 1.6;
}

.about-desc strong {
  color: #fff;
}

/* Карточки с фото */
.media-card {
  padding: 0;
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Карточка 3: Индивидуальный подход */
.highlight-card {
  padding: 32px;
  background: #181b22;
}

.highlight-card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
}

/* Карточка 4: Продажи (занимает ровно 2 колонки слева во втором ряду) */
.action-card {
  grid-column: span 2;
  padding: 40px;
}

.accent-line {
  width: 40px;
  height: 4px;
  background: var(--primary-red);
  margin-bottom: 16px;
  border-radius: 2px;
}

.action-card h3 {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 900;
  line-height: 1.2;
  color: #ffffff;
}

/* Адаптив для экранов меньше 992px */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .action-card {
    grid-column: span 1;
  }

  .media-card {
    height: 240px;
  }

  .text-card, 
  .highlight-card, 
  .action-card {
    padding: 28px;
  }
}

/* Portfolio Section */
.portfolio-section {
  padding: 80px 0;
  background-color: #0d0f14;
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 900;
  margin-bottom: 50px;
  letter-spacing: -0.5px;
}

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

.portfolio-card {
  display: flex;
  flex-direction: column;
  background: #181b22;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 57, 53, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

/* Область превью сайта — вертикальный прямоугольник */
.portfolio-thumb {
  width: 100%;
  aspect-ratio: 9 / 16; /* Строгие мобильные пропорции */
  height: auto;
  overflow: hidden;
  background: #000;
  position: relative;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Показывать весь скриншот целиком без обрезки */
  object-position: top center;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-thumb img {
  transform: scale(1.03);
}

/* Нижняя плашка с названием */
.portfolio-footer {
  padding: 18px 20px;
  text-align: center;
  background: #14171d;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-name {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.portfolio-card:hover .portfolio-name {
  color: var(--primary-red);
}

/* Адаптив для планшетов */
@media (max-width: 992px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* Адаптив для смартфонов */
@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }
}

/* Steps Section */
.steps-section {
  padding: 90px 0;
  background-color: var(--bg-dark);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  background: #181b22;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
  border-color: rgba(229, 57, 53, 0.5);
}

/* Левая колонка с номером и названием шага */
.timeline-marker {
  width: 38%;
  background: #151820;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.marker-num {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  background: var(--primary-red);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.marker-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

/* Правая колонка с подробным текстом */
.timeline-content {
  width: 62%;
  padding: 28px 32px;
  display: flex;
  align-items: center;
}

.timeline-content p {
  color: #a0a6b5;
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

/* Адаптив для планшетов и смартфонов */
@media (max-width: 768px) {
  .timeline-item {
    flex-direction: column;
  }

  .timeline-marker {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 24px;
  }

  .timeline-content {
    width: 100%;
    padding: 24px;
  }
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background-color: var(--bg-dark);
}

.cta-card {
  position: relative;
  background: linear-gradient(135deg, #181b22 0%, #12141a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 60px 40px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Декоративный фоновый акцент */
.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-title {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.25;
  color: #ffffff;
}

.cta-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #a0a6b5;
}

.phone-link, .social-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

.phone-link:hover, .social-link:hover {
  color: var(--primary-red);
}

/* Footer */
.footer {
  background-color: #090a0d;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
}

@media (max-width: 768px) {
  .cta-card {
    padding: 40px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Footer Legal & Links */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-legal {
  font-size: 12px;
  color: #555d6e;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.footer-link {
  color: #8b92a2;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  max-width: 420px;
  width: calc(100% - 48px);
  display: none; /* Контролируется через JS */
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-card {
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.cookie-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.cookie-text {
  font-size: 13px;
  color: #9ea5b3;
  line-height: 1.5;
  margin-bottom: 18px;
}

.cookie-text a {
  color: #fff;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cookie-primary {
  flex: 1 1 auto;
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-cookie-primary:hover {
  background: #1d4ed8;
}

.btn-cookie-outline {
  flex: 1 1 auto;
  padding: 8px 14px;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cookie-outline:hover {
  border-color: #fff;
  color: #fff;
}

@media (max-width: 768px) {
  .footer-links {
    align-items: center;
  }
  .cookie-banner {
    left: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

/* Полная мобильная адаптация */
@media (max-width: 768px) {
  /* Шапка */
  .site-header {
    height: 60px;
  }

  .header-container {
    height: 60px;
    padding: 0 16px;
  }

  /* Скрываем длинное текстовое меню и номер на смартфонах */
  .header-nav,
  .header-phone {
    display: none;
  }

  .btn-header {
    padding: 6px 14px;
    font-size: 13px;
  }

  /* Слайдер */
  .slider-section {
    height: 85vh; /* Чтобы снизу был виден намек на продолжение страницы */
    min-height: 520px;
  }

  .slide-title {
    font-size: 26px;
    line-height: 1.25;
  }

  .slide-badge {
    font-size: 12px;
    padding: 6px 14px;
  }

  /* Стрелки делаем компактнее и ближе к краям */
  .slider-arrow {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .slider-arrow.prev { left: 8px; }
  .slider-arrow.next { right: 8px; }

  /* Сетка 'Обо мне' — в одну аккуратную колонку */
  .about-section {
    padding: 50px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }

  .text-card, 
  .highlight-card, 
  .action-card {
    grid-column: span 1;
    padding: 24px 20px;
  }

  .media-card {
    height: 200px;
  }

  /* Портфолио */
  .portfolio-section {
    padding: 50px 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
  }

  /* Этапы работы */
  .steps-section {
    padding: 50px 0;
  }

  .timeline-item {
    flex-direction: column;
  }

  .timeline-marker {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 20px;
  }

  .timeline-content {
    width: 100%;
    padding: 20px;
  }

  /* Cookie баннер на всю ширину снизу */
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: 100%;
  }

  .cookie-card {
    padding: 16px;
  }

  .cookie-buttons {
    flex-direction: column;
  }

  .btn-cookie-primary,
  .btn-cookie-outline {
    width: 100%;
    padding: 10px;
    text-align: center;
  }
}

#about,
#portfolio,
#process {
  scroll-margin-top: 80px;
}