html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: url('fon.png') no-repeat center center fixed;
  background-size: cover;
  color: #4a3a22;
}

.header {
  width: 100%;
  height: 300px;
  background: url('Shapka.png') no-repeat center center;
  background-size: cover;
  opacity: 0.8;
}

main {
  max-width: 1200px;
  margin: 40px auto 80px;
  background: transparent;
  padding: 0 16px;
}

section {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
  padding: 30px 25px;
  margin-bottom: 40px;
}

h2 {
  font-family: 'Georgia', serif;
  font-size: 32px;
  text-align: center;
  color: #7b5e3c;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #c8a165;
  padding-bottom: 8px;
}

/* Обо мне */
.about-content {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  align-items: stretch;
}
.about-photo {
  flex-shrink: 0;
  width: auto;
  max-width: 300px;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.about-text {
  flex: 1;
  font-size: 18px;
  line-height: 1.7;
  text-align: justify;
}

/* Галерея (десктоп по умолчанию) */
.gallery {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: #1e5fff rgba(0,0,0,0.12);
}
.gallery img {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  flex-shrink: 0;
}
/* WebKit скроллбар */
.gallery::-webkit-scrollbar { height: 12px; }
.gallery::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.12);
  border-radius: 12px;
}
.gallery::-webkit-scrollbar-thumb {
  background: #1e5fff;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.7);
}
.gallery::-webkit-scrollbar-thumb:hover { background: #0d4aff; }

.creativity-text {
  margin-top: 15px;
  font-size: 18px;
  line-height: 1.6;
  text-align: justify;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

/* Тигель */
.tigel-content { text-align: center; }
.tigel-content img {
  max-width: 360px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.tigel-text {
  font-size: 18px;
  line-height: 1.7;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

/* Контакты */
/* --- Стили для блока "Связь со мной" --- */

.contact-flex-container {
  display: flex;         /* Включаем Flexbox-раскладку */
  align-items: center;     /* Выравниваем картинку и текст по центру по вертикали */
  gap: 30px;             /* Добавляем отступ между картинкой и текстом */
  flex-wrap: wrap;       /* Разрешаем перенос на новую строку на маленьких экранах */
}

.contact-logo-wrapper {
  flex-shrink: 0;        /* Запрещаем картинке сжиматься */
  text-align: center;      /* Центрируем логотип, если он станет в отдельную строку */
}

.contact-logo {
  width: 120px;          /* Задаем фиксированную ширину логотипа */
  height: 120px;
  border-radius: 15px;   /* Скругляем углы */
}

.contact-info {
  flex-grow: 1;          /* Разрешаем блоку с текстом занять всё оставшееся место */
  min-width: 300px;      /* Минимальная ширина, чтобы текст не слишком сжимался */
}

.contact-info ul {
  padding-left: 20px;    /* Добавляем небольшой отступ для списка */
  margin-top: 15px;
}

.contact-info li {
  margin-bottom: 10px;   /* Отступ между пунктами списка */
}

/* Подвал */
footer {
  text-align: center;
  padding: 18px 10px;
  color: #7b5e3c;
  font-family: 'Georgia', serif;
  font-size: 14px;
  background: rgba(255,255,255,0.15);
  border-top: 1px solid #c8a165;
}
.voskoplav-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.voskoplav-text {
    font-size: 18px;
    line-height: 1.7;
    text-align: justify;
}

.voskoplav-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.voskoplav-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* На узких экранах делаем 1 колонку, чтобы было крупно */
@media (max-width: 700px) {
    .voskoplav-gallery {
        grid-template-columns: 1fr;
    }
}
/* Юный свечевар */

.yunyj-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.yunyj-text {
    font-size: 18px;
    line-height: 1.7;
    text-align: justify;
}

/* Галерея для набора «Юный свечевар»:
   1 ряд — 3 вертикальных фото,
   2 ряд — 2 квадратных,
   3 ряд — 2 квадратных. */

.yunyj-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

/* Общие стили для всех фото */
.yunyj-gallery img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* Фото 4–7 делаем квадратными, чтобы
   два в ряд выглядели аккуратно */
.yunyj-gallery img:nth-child(4),
.yunyj-gallery img:nth-child(5),
.yunyj-gallery img:nth-child(6),
.yunyj-gallery img:nth-child(7) {
    aspect-ratio: 1 / 1;
}

/* На планшетах — по 2 фото в ряд */
@media (max-width: 900px) {
    .yunyj-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* На телефоне — по 1 фото в строке */
@media (max-width: 600px) {
    .yunyj-gallery {
        grid-template-columns: 1fr;
    }
}
/* Керамическая свеча (лампадка) */

.keram-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.keram-text {
    font-size: 18px;
    line-height: 1.7;
    text-align: justify;
}

.keram-note {
    font-size: 16px;
    text-align: center;
    color: #7b5e3c;
    font-style: italic;
}

/* Две горизонтальные фотографии в один ряд */
.keram-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: center;
}

.keram-photos img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover; /* подрезает лишнее, чтобы фото были одинаковыми по высоте */
}

/* На телефоне фото становятся друг под другом */
@media (max-width: 700px) {
    .keram-photos {
        grid-template-columns: 1fr;
    }
}

/* Адаптив */
@media (max-width: 900px){
  main { max-width: 100vw; padding: 0; }
  section { width: 100%; box-sizing: border-box; padding: 18px 10px; margin-bottom: 24px; }
  .about-content { flex-direction: column; gap: 12px; align-items: center;}
  .about-photo { max-width: 95vw; width: 100%; height: auto; }

  .gallery {
    gap: 10px;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 6px 18px;
    justify-content: flex-start;
  }
  .gallery img {
    height: 360px;
    width: auto;
    max-width: 95vw;
    object-fit: contain;
    border-radius: 12px;
    scroll-snap-align: center;
    flex: 0 0 auto;
  }
  .gallery::-webkit-scrollbar      { height: 12px; }
  .gallery::-webkit-scrollbar-track{ background: rgba(0,0,0,0.12); border-radius: 12px; }
  .gallery::-webkit-scrollbar-thumb{ background: #1e5fff; border-radius: 12px; border: 2px solid rgba(255,255,255,0.7); }
  .gallery { scrollbar-width: thin; scrollbar-color: #1e5fff rgba(0,0,0,0.12); }
}

@media (max-width: 1300px) and (min-width: 901px) {
  main { max-width: 98vw; }
  .gallery img { width: 18vw; height: 18vw; max-width: 180px; max-height: 180px;}
}
/* Стили для навигации */
nav {
  background-color: rgba(255, 255, 255, 0.3); /* Полупрозрачный фон */
  backdrop-filter: blur(5px); /* Эффект размытия */
  padding: 10px 0;
  text-align: center;
  border-bottom: 2px solid rgba(161, 136, 127, 0.5); /* Цвет из вашего стиля */
  border-top: 2px solid rgba(161, 136, 127, 0.5);
}

nav a {
  text-decoration: none;
  color: #6d4c41; /* Темный коричневый для текста */
  font-weight: bold;
  font-size: 18px;
  margin: 0 20px;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
}

nav a:hover, nav a.active {
  background-color: #a1887f; /* Цвет из вашего стиля при наведении */
  color: #ffffff; /* Белый текст */
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  nav a {
    display: block;
    margin: 5px 0;
  }
}

.track-info h4 {
    margin: 0;
    color: #000000; 
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left; /* Выравниваем текст слева */
}
/* Это новый стиль для выравнивания элементов внутри .track-item */
.track-item > * {
    flex-shrink: 0;
}