/* style.css */

/* ============================================================
   1. БАЗОВЫЕ СТИЛИ СТРАНИЦЫ
   ============================================================ */

body {
  margin: 0;
  min-height: 100vh;
  height: 100vh;          /* фиксируем высоту */
  overflow: hidden;       /* запрещаем прокрутку */
  display: grid;
  place-items: center;
  padding: 32px;
  box-sizing: border-box; /* важно, чтобы padding не добавлял высоту */
  font-family: Inter, system-ui, sans-serif;
  color: #1a1a1a;
  background:
    radial-gradient(1200px 600px at 80% -10%, #ffe9c7 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 100%, #d6ecff 0%, transparent 55%),
    #faf7f0;
}

/* ----- обёртка страницы ----- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1080px;
  width: 100%;
}

/* ============================================================
   2. ШАПКА: ЛОГОТИП + ЗАГОЛОВОК
   Ширина ограничена 1000px — как у .carousel, поэтому логотип
   не выступает за левую границу карусели.
   ============================================================ */

.header-row {
  width: 100%;
  max-width: 1000px;          /* совпадает с шириной карусели */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin: 0 0 24px;
  box-sizing: border-box;
}

/* ----- логотип 95×64 ----- */
.logo {
  width: 95px;
  height: 64px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

/* ============================================================
   3. ТЕКСТОВЫЕ НАДПИСИ
   ============================================================ */

/* ----- заголовок "В настоящее время сайт..." ----- */
.idea {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  color: #3a3a3a;
}


/* ----- подпись под каруселью ----- */
.idea2 {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 600;
  line-height: 2.15;
  text-align: center;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;          /* графитовый цвет */
}
/* ============================================================
   4. КНОПКИ
   ============================================================ */

button {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: #cc1616;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

/* ----- кнопка "Посмотреть контакты" ----- */
#next {
  background: #a80000;
  color: #ffffff;
  min-width: 220px;
  flex: unset;
  margin-top: 8px;
  text-transform: uppercase;
}

#next:hover {
  background: #f90303;
  transform: translateY(-1px);
}

/* ============================================================
   5. КАРУСЕЛЬ + ОБЁРТКА СО СТРЕЛКАМИ
   .carousel-wrapper — точка отсчёта для абсолютного
   позиционирования стрелок по бокам видимой области.
   ============================================================ */

.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin-bottom: 20px;
}

.carousel {
  width: 100%;
  max-width: 1000px;
  overflow: hidden;
  border-radius: 15px;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 320px;
  width: 320px;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 320px;
  height: 240px;
  object-fit: cover;
  display: block;
}

.carousel-placeholder {
  color: #888;
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

/* ============================================================
   6. БОКОВЫЕ СТРЕЛКИ КАРУСЕЛИ
   Узкие, высокие, белые полупрозрачные.
   Расположены поверх карусели слева и справа.
   При наведении становятся чуть ярче.
   ============================================================ */

.carousel-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;                    /* узкие */
  min-height: 100%;               /* высокие — на всю высоту карусели */
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.18);   /* полупрозрачный белый */
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  flex: unset;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Слегка скруглим углы со стороны карусели */
.carousel-arrow--prev {
  left: 0;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}
.carousel-arrow--next {
  right: 0;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}

/* Иконка (стрелочка) внутри кнопки */
.carousel-arrow__icon {
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  user-select: none;
}

/* Наведение / фокус — стрелка чуть заметнее */
.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  outline: none;
  transform: none;               /* отключаем общий hover-сдвиг кнопок */
}

/* Нажатие */
.carousel-arrow:active {
  background: rgba(255, 255, 255, 0.45);
}

/* Отключённое состояние (например, когда листать некуда) */
.carousel-arrow[disabled] {
  opacity: 0.35;
  cursor: default;
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================================
   7. ОКНО ВИЗИТКИ (OVERLAY)
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 999;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ----- окно визитки ----- */
.card-window {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 340px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  position: relative;
}

.overlay.show .card-window {
  transform: translateY(0);
  opacity: 1;
}

/* ----- кнопка закрытия ----- */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #888;
  min-height: auto;
  padding: 0;
  flex: unset;
  line-height: 1;
}

.close-btn:hover {
  color: #333;
  background: transparent;
  transform: none;
}

/* ============================================================
   8. КАРТОЧКА ВИЗИТКИ
   ============================================================ */

.card {
  text-align: left;
}

.card-org {
  font-size: 20px;
  color: #8e0202;
  font-weight: 700;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.num {
  color: #8e0202;
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 14px;
  margin-top: 10px;
  display: block;
  font-weight: bold;
}

.card-row {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.card-label {
  font-weight: 600;
  margin-right: 6px;
}

/* ----- защита от копирования ----- */
.no-copy {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* ============================================================
   9. АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА
   ============================================================ */

@media (max-width: 720px) {
  .idea {
    font-size: 22px;
    min-height: auto;
  }
  .logo {
    width: 76px;
    height: 51px;
  }
  .carousel-slide {
    flex: 0 0 280px;
    width: 280px;
    height: 210px;
  }
  .carousel-slide img {
    width: 280px;
    height: 210px;
  }
  /* На планшетах стрелки чуть уже */
  .carousel-arrow {
    width: 38px;
  }
  .carousel-arrow__icon {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .header-row {
    gap: 12px;
  }
  .idea {
    font-size: 18px;
  }
  .idea2 {
    font-size: 14px;
    line-height: 1.6;
  }
  .logo {
    width: 60px;
    height: 40px;
  }
  .card-window {
    width: 90%;
    padding: 18px;
  }
  .carousel-slide {
    flex: 0 0 220px;
    width: 220px;
    height: 165px;
  }
  .carousel-slide img {
    width: 220px;
    height: 165px;
  }
  /* На телефонах стрелки ещё уже, чтобы не закрывать картинку */
  .carousel-arrow {
    width: 32px;
  }
  .carousel-arrow__icon {
    font-size: 18px;
  }
}
