/* assets/css/styles.css

*/

/* ========== БАЗА ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #222;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x: hidden; /* предотвращает горизонтальную прокрутку */
  background: 
    linear-gradient(120deg, rgba(255,255,255,0.85), rgba(255,255,255,0.9)),
    url("../img/background1.jpg") center/cover no-repeat;
  transition: background-color .25s ease, color .25s ease;
}

/* Для опции с фоновой картинкой:
   Замените фон выше на:
   background:
     linear-gradient(120deg, rgba(255,255,255,0.7), rgba(255,255,255,0.8)),
     url("../img/background1.jpg") no-repeat center/cover;
*/

/* Сеточная контейнер-обёртка */
.container {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  inset: 0 0 auto 0; /* top:0; left:0; right:0 */
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  z-index: 999;
  box-shadow: 0 6px 18px rgba(30,30,40,0.06);
  backdrop-filter: blur(4px);
}

/* nav layout inside container */
.header .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Лого слева */
.logo {
  font-weight: 600;
  font-size: 18px;
  color: #111;
}

.dark .logo {
    color: #ffffff;
  }

/* Menu центр/право */
.menu {
  display: flex;
  gap: 18px;
  margin-left: 24px;
  align-items: center;
  flex-wrap: wrap;
}

/* Ссылки меню */
.menu a {
  color: #444;
  text-decoration: none;
  font-size: 15px;
  padding: 6px 8px;
  border-radius: 6px;
}
.menu a:hover {
  background: rgba(108,99,255,0.08);
}

/* Кнопка темы справа */
.theme-btn {
  margin-left: auto; /* отодвинет вправо */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #444;
}
.theme-btn:active { transform: translateY(1px); }

/* Отводим от header содержимое страницы */
main { 
  padding-top: 84px; /* должен быть >= высоты хедера */
}

/* ========== HERO ========== */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 84px); /* экран минус header */
  padding: 48px 0;
}

/* Контейнер внутри хиро */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 48px);
  width: 100%;
  flex-wrap: nowrap;
}

/* Блок текста (левый) */
.home__data {
  flex: 1 1 420px;          /* расширяемый блок, но не меньше 420px */
  max-width: 720px;
  padding: 8px 0;
}

/* Заголовок и текст */
.home__data h1 {
  margin: 0 0 8px 0;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.02;
  color: #101020;
}
.dark .home__data h1 {
    color: #ffffff;
}

.home__data p {
  margin: 8px 0 16px 0;
  font-size: clamp(15px, 1.8vw, 18px);
  color: #444;
  line-height: 1.5;
  max-width: 60ch;
}

/* кнопка */
.btn, .button {
  display: inline-block;
  padding: 12px 22px;
  background: #6c63ff;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(108,99,255,0.12);
}

/* Блок картинки (правый) */
.home__img {
    position: relative;
    width: clamp(180px, 28vw, 320px);
    height: clamp(180px, 28vw, 320px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(16,24,40,0.16);
    border: 6px solid rgba(255,255,255,0.9);
  }

  .home__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  
    object-position: 50% 25%;
  
    border-radius: 50%;
  }

@media (min-width: 1200px) {
    .home__img {
        width: clamp(220px, 22vw, 340px);
    }
}

/* ========== Отступ между секциями ========== */
.section {
  padding: 30px 0;
}

/* Немного визуальной разметки для заголовков */
.section__title {
  font-size: clamp(20px, 2.6vw, 32px);
  margin-bottom: 14px;
  color: #0b0b1a;
}

/* ========== ПОРТФОЛИО / SWIPER ========== */
.portfolio {
  position: relative;
}

/* Свой контейнер для слайдера */
.swiper {
  width: 100%;
  max-width: 960px;
  margin: 36px auto 0;
  overflow: visible; /* показываем соседние слайды */
  padding-bottom: 12px;
}

/* Делаем слайд центрированным */
.swiper-wrapper {
  align-items: center;
}

/* Слайд */
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Картинка в слайде: показываем чуть меньше ширины слайда */
.swiper-slide img {
  width: 92%;
  max-width: 720px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 14px 40px rgba(12,18,40,0.12);
}

/* Если нужен «карточный» вид вместо слайдера (fallback) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  padding: 26px 0;
  color: #555;
  font-size: 14px;
}

/* ========== АНИМАЦИИ ========== */
.home__data { animation: fadeInLeft .9s ease both; }
.home__img  { animation: fadeInRight .9s ease both; }

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ========== ТЁМНАЯ ТЕМА ========== */
.dark {
  background: #0a0a0e;
  color: #e6e6e9;
}
.dark .header { background: rgba(12,12,16,0.92); }
.dark .menu a { color: #ddd; }
.dark .home__data p { color: #d0d0d6; }
.dark .swiper-slide img { box-shadow: 0 18px 50px rgba(0,0,0,0.45); }
.dark .btn { background: #8b86ff; }

/* ========== АДАПТИВ ========== */
/* Mobile first handled above; уточнения для небольших экранов: */
@media (max-width: 767px) {
  .header { height: 58px; }
  main { padding-top: 70px; }

  .hero {
    padding: 18px 0;
  }

  /* На мобильных: картинка над текстом, текст под картинкой */
  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }
  .home__img { order: 0; }   /* картинка первая */
  .home__data { order: 1; }  /* текст — под ней */

  /* Смещаем объект изображения в кадре, чтобы голову не обрезало */
  .home__img img {
    object-position: 50% 35%;
  }

  .home__data h1 {
    font-size: 28px;
  }
  .home__data p {
    font-size: 15px;
    padding: 0 6px;
  }

  /* swiper — делаем более компактным на телефоне */
  .swiper {
    max-width: 92%;
    margin: 20px auto;
  }
  .swiper-slide img {
    width: 92%;
  }

  .menu { gap: 12px; }
  .menu a { font-size: 14px; padding: 6px; }
}

/* Средние экраны (таблеты) */
@media (min-width: 768px) and (max-width: 1199px) {
    .home__img img {
      object-position: 50% 25%;
    }

  .home__data { max-width: 56ch; }
  .swiper { max-width: 820px; }
}

/* Большие экраны */
@media (min-width: 1200px) {
  .hero { padding: 56px 0; }
  .home__data h1 { font-size: 48px; }
  .swiper { max-width: 960px; }
}


/* ===== MOBILE MENU ===== */

.burger {
display: none;
font-size: 26px;
cursor: pointer;
margin-left: auto;
}

/* мобильная версия */
@media (max-width: 767px) {
.menu {
    position: fixed;
    top: 58px;
    right: -100%;
    width: 220px;
    height: calc(100vh - 58px);
    background: white;
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
}

.menu.active {
    right: 0;
}

.burger {
    display: block;
}

.dark .menu {
    background: #111;
}
}

.slide-content {
    text-align: center;
}
  
.slide-content p {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}
  
.dark .slide-content p {
    color: #ccc;
}


/* ========== УТИЛИТЫ ========== */
.hidden { display: none !important; }

/* КОНЕЦ ФАЙЛА */
