/* БАЗОВЫЕ НАСТРОЙКИ И ЦВЕТА */
:root {
  --primary-red: #cc0000; /* Твой красный */
  --bg-light: #fdfdfd;
  --bg-dark: #121212;
  --text-dark: #111111;
  --text-light: #ffffff;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.red-text { color: var(--primary-red); }

/* НАВИГАЦИЯ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 30px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100; /* ВАЖНО: должно быть 100 или больше */
  mix-blend-mode: difference;
  color: white;
  pointer-events: auto; /* Добавим на всякий случай */
}

.nav-logo {
  font-size: 22px;
  letter-spacing: -0.5px;
}

.nav-logo strong { font-weight: 700; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* КНОПКИ */
.btn-outline {
  position: relative; /* Добавить */
  z-index: 10;        /* Добавить */
  border: 1px solid currentColor;
  background: transparent;
  color: currentColor;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-outline.light { border-color: rgba(255,255,255,0.3); color: white; }
.btn-outline.light:hover { border-color: white; }

.btn-solid {
  border: 1px solid var(--text-dark);
  background: transparent;
  color: var(--text-dark);
  padding: 15px 35px;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-solid:hover {
  background: var(--text-dark);
  color: var(--bg-light);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 30px;
  height: 2px;
  background-color: currentColor;
}

/* ГЛАВНЫЙ ЭКРАН (HERO) */
.hero-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
}

.scroll-down {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
}

.hero-subtitle {
  color: var(--primary-red);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-bottom: -10px; /* Эффект наложения как на макете */
}

.hero-logo {
  height: 80px; /* Размер розы. Можешь сделать 100px или 120px, если хочешь крупнее */
  width: auto;
  margin-bottom: 5px; /* Отступ между розой и текстом GERMYOKSARD */
  display: inline-block;
  user-select: none; /* Чтобы картинку случайно не выделяли мышкой */
}

.hero-title {
  font-size: clamp(40px, 8vw, 100px); /* Адаптивный огромный шрифт */
  font-weight: 600;
  letter-spacing: -3px;
  margin-bottom: 30px;
  line-height: 1;
}

.hero-description {
  max-width: 600px;
  margin: 0 auto 40px auto;
  font-size: 18px;
  line-height: 1.6;
  color: #444;
}

/* ПЛАВАЮЩАЯ КНОПКА СВЯЗАТЬСЯ */
.floating-contact {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 100px;
  height: 100px;
  background-color: var(--primary-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(204, 0, 0, 0.4);
  transition: transform 0.3s;
}

.floating-contact:hover {
  transform: scale(1.1);
}

/* СЕКЦИЯ ПОРТФОЛИО (ТЕМНАЯ) */
.portfolio-section {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 120px 50px;
}

.portfolio-container {
  max-width: 1400px;
  margin: 0 auto;
}

.red-dot-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

.red-dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary-red);
  border-radius: 50%;
}

.section-title {
  font-size: 50px;
  font-weight: 600;
  letter-spacing: -2px;
  max-width: 600px;
  line-height: 1.1;
  margin-bottom: 100px;
}

/* РЯДЫ ПРОЕКТОВ (ШАХМАТКА) */
.project-row {
  display: flex;
  align-items: center;
  gap: 100px;
  margin-bottom: 150px;
}

.project-row.reverse {
  flex-direction: row-reverse;
}

.project-text {
  flex: 1;
}

.project-text h3 {
  font-size: 40px;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.project-text p {
  font-size: 18px;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: 30px;
}

.badges {
  display: flex;
  gap: 15px;
}

.badge {
  padding: 8px 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  font-size: 12px;
  color: #ccc;
}

.project-image {
  flex: 1.5; /* Картинка занимает больше места, чем текст */
}

/* ОБЛОЖКИ ПОРТФОЛИО НА ГЛАВНОЙ */
.portfolio-link {
  display: block;
  width: 100%;
  height: 600px;
  overflow: hidden; /* Чтобы картинка не вылезала за скругления при увеличении */
  border-radius: 30px;
  cursor: pointer;
  background-color: #222; /* Фон-заглушка, пока картинка грузится */
}

.portfolio-cover {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Картинка заполнит блок, не растягиваясь криво */
  transition: transform 0.5s ease;
}

.portfolio-link:hover .portfolio-cover {
  transform: scale(1.05); /* Плавный зум самой картинки при наведении */
}

.portfolio-footer {
  text-align: center;
  margin-top: 50px;
}

/* === ЭФФЕКТ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ (ИСПРАВЛЕННЫЙ) === */

/* Анимируем только текст (он появляется первым) */
.reveal-on-scroll .project-text {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Анимируем картинку (она появляется с небольшой задержкой) */
.reveal-on-scroll .project-image {
  opacity: 0;
  transform: translateY(120px) scale(0.98);
  transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.15s, 
              transform 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.15s;
}

/* --- СОСТОЯНИЕ КОГДА ДОСКРОЛЛИЛИ (.active) --- */

.reveal-on-scroll.active .project-text {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.active .project-image {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Анимация для заголовка секции (What We Do Best) */
.section-header.reveal-on-scroll {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.section-header.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* === МОДАЛЬНЫЕ ОКНА === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-light);
  width: 100%;
  max-width: 400px;
  padding: 40px;
  border-radius: 20px;
  position: relative;
  text-align: center;
  display: none; /* Скрываем конкретные окна */
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  color: var(--text-dark);
}

.modal-overlay.active .modal-box.active-box {
  display: block;
  position: absolute; /* ДОБАВЛЕНО: чтобы окна всегда были по центру и не толкали друг друга */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Центрирование */
  opacity: 1;
}

/* Также нужно немного изменить базовое состояние .modal-box */
.modal-box {
  background: var(--bg-light);
  width: 100%;
  max-width: 400px;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  display: none; 
  position: absolute; /* ДОБАВЛЕНО */
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 30px)); /* Смещено чуть вниз для анимации */
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  color: var(--text-dark);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--primary-red); }

.modal-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 5px;
}

.modal-subtitle {
  color: #888;
  font-size: 14px;
  margin-bottom: 30px;
}

/* Поля ввода внутри модалок */
.modal-box form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-box input {
  padding: 15px 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.modal-box input:focus { border-color: var(--primary-red); }

.w-100 { width: 100%; }

/* СТИЛИ ДЛЯ ОКНА КОНТАКТОВ */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark);
  transition: background 0.2s, transform 0.2s;
  border: 1px solid #eee;
}

.contact-item:hover {
  background-color: #f0f0f0;
  transform: translateX(5px); /* Легкий сдвиг вправо при наведении */
  border-color: var(--primary-red);
}

.contact-label {
  font-weight: 600;
  color: #555;
}

.contact-value {
  font-weight: 500;
  color: var(--primary-red);
}

.btn-reviews {
  border-color: var(--primary-red);
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 500;
}
.btn-reviews:hover {
  background-color: var(--primary-red);
  color: white;
}

@media screen and (max-width: 768px) {
  /* Убираем белую полосу справа навсегда */
  body {
    overflow-x: hidden !important;
    width: 100vw !important;
  }

  /* Шапка */
  .navbar {
    padding: 15px 20px !important;
    background: #121212 !important; /* Темная шапка */
  }
  .nav-logo {
    color: #fff !important;
  }
  
  /* Бургер-иконка */
  .hamburger {
    display: flex !important;
    z-index: 1001 !important; /* Бургер всегда поверх меню */
  }
  .hamburger span {
    background-color: #fff !important; 
  }
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Выезжающее меню (теперь 100% темное и не прозрачное) */
  .nav-right {
    position: fixed !important;
    top: -120vh !important; /* Убираем меню далеко наверх */
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #121212 !important; /* Строго темный фон! */
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    gap: 20px !important;
    transition: 0.4s ease-in-out !important;
    z-index: 1000 !important; /* Меню перекрывает весь сайт */
  }
  .nav-right.active {
    top: 0 !important; /* Меню выезжает */
  }

  /* Кнопки внутри меню (Register, Login, Reviews) */
  .nav-right .btn-outline {
    width: 80% !important; /* Делаем кнопки не на всю ширину, а аккуратными */
    padding: 15px !important;
    font-size: 18px !important;
    color: #fff !important; /* Белый текст */
    border: 1px solid #fff !important; /* Белая рамка */
    background: transparent !important;
    border-radius: 50px !important;
  }

  /* Главный экран (Hero) */
  .hero-section {
    padding: 100px 15px 40px !important;
    overflow: hidden !important; /* Чтобы текст не выпирал */
  }
  .hero-logo {
    height: 50px !important;
    margin-bottom: 10px !important;
  }
  .hero-subtitle {
    font-size: 18px !important;
  }
  /* Делаем текст еще меньше, чтобы точно влез в экран телефона */
  .hero-title {
    font-size: 24px !important; 
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    margin-bottom: 15px !important;
    word-break: break-word !important; /* Если слово не влезает - переносить его */
  }
  .hero-description {
    font-size: 14px !important;
    padding: 0 10px !important;
  }
  .scroll-down {
    display: none !important;
  }

  /* Портфолио */
  .portfolio-section {
    padding: 50px 15px !important;
  }
  .section-title {
    font-size: 24px !important;
    margin-bottom: 30px !important;
  }
  .project-row, .project-row.reverse {
    flex-direction: column !important;
    gap: 20px !important;
    margin-bottom: 50px !important;
  }
  .project-text h3 {
    font-size: 20px !important;
  }
  .portfolio-link {
    height: 250px !important;
  }
  
  /* Плавающая кнопка (красный кружок внизу) */
  .floating-contact {
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    font-size: 9px !important;
  }
}