/* =========================
   1. CSS-переменные и базовые стили
   ========================= */

:root {
  --font-main: "Georgia", "Times New Roman", serif;

  --text-base: 1.3rem; /* 18px */
  --text-small: 1rem;    /* 16px */

  --h2: 2rem;            /* 32px */
  --h3: 1.5rem;          /* 24px */

  --color-text: gainsboro;
  --color-accent: #CCB997;
  --color-white: gainsboro;

  --space-xl: 60px;  /* большие расстояния между секциями */
  --space-l: 40px;   /* подзаголовки / блоки внутри секций */
  --space-m: 30px;   /* элементы внутри блока */
  --space-s: 20px;   /* абзацы, небольшие отступы */
  --space-xs: 10px;  /* минимальные */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(to bottom, #1f0e11, #0a0a0a);
  color: var(--color-text);
  padding-top: 0; /* компенсируем фиксированный header */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Общие правила для секций и текста */

section {
  width: 100%;
  margin-block: var(--space-xl);
  padding-inline: var(--space-s);
}

section > * + * {
  margin-top: var(--space-l);
}

p {
  font-size: var(--text-base);
  margin: 0 0 var(--space-s) 0;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-m) 0;
  font-family: var(--font-main);
  font-weight: bold;
}

h2 {
  text-align: center;
  font-size: var(--h2);
  color: var(--color-text);
}

h3 {
  font-size: var(--h3);
  color: var(--color-text);
}

/* =========================
   2. Header
   ========================= */

header {
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  background-color: transparent;
  color: var(--color-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
}

header * {
    background: transparent !important;
}

header * {
    background: transparent !important;
}

.noscroll {
  overflow: hidden;
  height: 100%;
  touch-action: none;
  position: fixed;
  width: 100%;
}

.header-logo {
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header-logo h1 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--color-text);
}

.header-logo p {
  font-size: 1rem;
  margin: 0;
  color: var(--color-text);
}

header.scrolled .header-logo {
  opacity: 1;
}

.social-icons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.icon-link:hover {
  transform: scale(1.2);
}

.social-icon {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* =========================
   3. Hero
   ========================= */

.hero-section {
  width: 100%;
  margin-block: 0; /* hero без доп. отступа сверху/снизу */
  height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-buttons {
  position: absolute;
  bottom: 40%;
  left: 25%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 3;
}

/* Если вдруг вернёшь логотип в hero */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--color-text);
  z-index: 2;
  position: absolute;
  top: 57%;
  left: 65%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.logo-container h1 {
  font-size: 2.8rem;
}

.logo-container p {
  font-size: 1.6rem;
}

/* =========================
   4. Кнопки (единый стиль)
   ========================= */

.btn {
  padding: 14px 28px;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  background: transparent;
  border-radius: 14px;
  font-size: var(--text-base);
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s ease;
  font-family: var(--font-main);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn.primary {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.btn.outline {
  background: transparent;
  border-color: var(--color-text);
}

.btn.full {
  width: 100%;
}

.btn.blur {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
}

.btn.fit {
    width: auto !important;
    display: inline-block;
}

/* =========================
   5. Афиша / Concerts
   ========================= */

.concerts {
    margin-inline: auto;
    width: 90%;
    max-width: 900px;
    margin: 40px auto; /* Центрируем блок .concerts */
    padding: 20px;
    padding-inline: 0;
    background-color: transparent;
    border-radius: 10px;
    z-index: 2;
    position: relative;
    margin-block: var(--space-m);
    padding-block: var(--space-s);
}

.concerts h2 {
  margin-bottom: var(--space-m);
}

.concert {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  gap: var(--space-xs);
  background-color: transparent;
  padding: 8px 0;
  color: var(--color-text);
  align-items: center;
  border-bottom: 0.5px solid var(--color-text);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Центрирование блока даты */
.date-time {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Первая строка — дата */
.date-time h3:first-child {
    font-size: var(--text-base);       /* чуть крупнее */
    margin: 0 0 6px 0;        /* отступ вниз */
    color: var(--color-text);
    line-height: 1.3;
}

/* Вторая строка — тип ("Премьера!") */
.date-time h3:nth-child(2) {
    font-size: 1.2rem;        /* немного меньше */
    margin: 0;                /* убираем отступы */
    color: var(--color-accent); /* менее яркий */
    opacity: 0.8;
}


.details h3 {
  margin: 0;
  font-size: var(--h3);
  color: var(--color-accent);
  text-align: center;
}

.details p {
  margin: var(--space-xs) 0 0;
  color: var(--color-text);
  text-align: center;
}

.time {
  font-size: var(--text-small);
  text-align: center;
  color: var(--color-text);
}

.hidden-concerts {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

.hidden-concerts.show {
  max-height: 1000px;
  padding-top: 0 !important;
}

/* =========================
   6. Блок «Гала»
   ========================= */

.gala-section {
  max-width: 1100px;
  margin-inline: auto;
}

.gala-title {
  font-size: 2.2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: var(--space-l);
}

.gala-content {
  display: flex;
  gap: var(--space-m);
  align-items: flex-start;
  justify-content: center;
}

.gala-text {
  flex: 2;
  padding-right: var(--space-s);
  max-width: 660px;
}

.gala-text p {
  line-height: 1.7;
  text-wrap: pretty;
}

.gala-image {
  flex: 1.2;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

/* Слайдер */

.gala-slider {
  position: relative;
  width: 100%;
  padding-top: 140%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.gala-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.gala-slide.active {
  opacity: 1;
}

.gala-prev,
.gala-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 12px;
  font-size: 26px;
  font-weight: bold;
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  user-select: none;
  z-index: 20;
  transition: background 0.3s;
}

.gala-prev:hover,
.gala-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gala-prev {
  left: 10px;
}

.gala-next {
  right: 10px;
}

.gala-dots {
  text-align: center;
  margin-top: var(--space-s);
}

.gala-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background: #888;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.gala-dot.active {
  background: var(--color-white);
}

/* =========================
   7. Блок «Профиль Яны»
   ========================= */

.profile-section {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-text);
}

.profile-content {
  display: flex;
  max-width: 1000px;
  width: 100%;
  align-items: center;
  gap: var(--space-m);
}

.profile-image {
  flex: 1;
}

.profile-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.profile-text {
  flex: 2;
  text-align: center;
  max-width: 660px;
}

.profile-text h2 {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

.profile-text .subtitle {
  font-size: var(--text-small);
  color: var(--color-accent);
  opacity: 0.7;
  margin-bottom: var(--space-m);
  text-align: center;
}

.profile-text hr {
  border: 0;
  border-top: 1px solid var(--color-text);
  opacity: 0.3;
  margin: 10px auto var(--space-m);
  width: 50px;
}

/* =========================
   8. Репертуар и программы
   ========================= */

.repertoire {
  text-align: center;
}

.repertoire-title {
  font-size: 2rem;
  color: var(--color-text);
  line-height: 1.6;
}

.subsection-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-m);
  margin-top: var(--space-m);
  color: var(--color-text);
}

.programs-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  justify-content: center;
}

.program {
  width: calc(33.333% - var(--space-m));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  background-color: transparent;
  padding: var(--space-m);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  position: relative;
}

.program:hover {
  transform: scale(1.03);
}

.program-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-s);
}

.program-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.program-details h3 {
  margin-bottom: var(--space-s);
  font-size: 1.5rem;
  color: var(--color-text);
}

.program-details p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-m);
  max-width: 660px;
}

/* =========================
   9. Танцевальные номера / Коллаж
   ========================= */

.dance-text {
  max-width: 660px;
  margin: var(--space-m) auto var(--space-s);
  padding: 0 var(--space-s);
  text-align: center;
}

.dance-text p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
}

.photo-collage {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 250px;
  gap: 0;
  width: 100%;
  margin: var(--space-xl) auto;
}

.photo-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

.photo-container:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.4s ease-in-out;
}

.photo-container:hover .thumbnail {
  filter: brightness(1.2) contrast(1.1) saturate(1.2);
}

/* Lightbox */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  color: var(--color-white);
  font-size: 24px;
  padding: 16px;
  font-weight: bold;
  transition: 0.6s ease;
  user-select: none;
}

.prev {
  left: 10px;
  margin-top: -22px;
  border-radius: 0 3px 3px 0;
}

.next {
  right: 10px;
  margin-top: -22px;
  border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* =========================
   10. Footer
   ========================= */

.main-footer {
  background: transparent;
  color: var(--color-text);
  padding: var(--space-m) 0;
  width: 100%;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-m);
  border-top: 1px solid var(--color-text);
  opacity: 0.85;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-s);
  color: var(--color-text);
}

.contact-info p {
  font-size: var(--text-small);
  color: var(--color-text);
  margin: 4px 0;
}

.contact-info p strong {
  font-weight: bold;
}

.footer-icons {
  margin-top: var(--space-m);
}

.footer-icons p {
  font-size: 0.8rem;
  color: var(--color-text);
  opacity: 0.55;
}

.footer-icons a {
  color: var(--color-text);
  opacity: 0.7;
  text-decoration: none;
}

.footer-icons a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (min-width: 769px) {
    header,
    header.scrolled {
        background: transparent !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }
}

/* =========================
   11. Адаптив (max-width: 768px)
   ========================= */

@media only screen and (max-width: 768px) {
  .hero-section {
        background-position: 8% center !important;
    }

  .btn {
    padding: 16px 22px;
    width: 100%;
    font-size: var(--text-small);
    border-radius: 12px;
  }

  .btn + .btn {
    margin-top: 12px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    bottom: 20%;
  }

  header {
      padding: 6px 14px !important;          /* Было 12px 18px */
      height: 52px;                           /* фиксированная минимальная высота */
      background: rgba(0, 0, 0, 0.85) !important;
      backdrop-filter: blur(8px);
      border-bottom: 1px solid rgba(255,255,255,0.12);
      display: flex;
      align-items: center;
  }

  .header-logo {
      opacity: 1;
      text-align: left;
      line-height: 1.1;
  }

  .header-logo h1 {
      font-size: 1.05rem;   /* Было 1.2rem */
      margin: 0;
  }

  .header-logo p {
      font-size: 0.78rem;   /* Было 0.9rem */
      margin: 0;
      opacity: 0.85;
  }

  .social-icons {
      gap: 10px;            /* было 15px */
  }

  .icon-link {
      width: 28px;          /* было 35px */
      height: 28px;
  }

  .social-icon {
      width: 100%;
      height: 100%;
  }

  .icon-link {
    width: 35px;
    height: 35px;
  }

  .concert {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 8px 0;
  }

  .profile-content {
    flex-direction: column;
    align-items: center;
    gap: var(--space-m);
  }

  .profile-image {
    width: 80%;
  }

  .profile-text {
    text-align: center;
  }

  .profile-text .subtitle {
    text-align: center;
  }

  .program {
    width: calc(50% - var(--space-m));
  }

  .photo-collage {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }

  .footer-content {
    padding: var(--space-s);
  }

  .gala-content {
        flex-direction: column;
    }

    .gala-image {
        order: 1;
        width: 100%;
        max-width: none;
    }

    .gala-text {
        order: 2;
        padding-right: 0;
        margin-top: 20px;
    }
}

/* =========================
   12. Адаптив (max-width: 480px)
   ========================= */

@media only screen and (max-width: 480px) {
  .btn {
    padding: 14px 18px;
    font-size: 0.95rem;
  }

  .icon-link {
    width: 30px;
    height: 30px;
  }

  .hero-section {
    height: 70vh;
  }

  .concert {
    padding: 6px 0;
  }

  .details h3 {
    font-size: 1.3rem;
  }

  .details p {
    font-size: 0.95rem;
  }

  .time,
  .date-time {
    font-size: 0.9rem;
  }

  .profile-image {
    width: 100%;
  }

  .program {
    width: 100%;
  }

  .photo-collage {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .footer-content {
    padding: var(--space-xs);
  }

  .footer-icons p {
    font-size: 0.7rem;
  }
}

/* --- FIX 1. Дата в афише ниже --- */
.concert .date-time h3:first-child {
    margin-top: 6px;
    line-height: 1.35;
}

/* --- FIX 2. Кнопка "Другие концерты" по центру и по ширине текста --- */
#toggleButton {
    display: block;              /* был inline-block */
    margin: 20px auto 0 auto;    /* центрирование по горизонтали */
    text-align: center;
    width: auto !important;      /* кнопка по ширине текста */
}

/* Увеличенный размер текста названия спектакля в афише */
.concert .details h3 {
    font-size: 1.9rem;   /* Было 1.5rem */
    line-height: 1.2;
}

/* =========================
   Gala – support block
   ========================= */

/* --- Block: Support ("При поддержке") --- */
.gala-support {
    margin-top: 12px;
    padding: 18px 18px;

    width: fit-content;          /* блок ровно по ширине контента */
    max-width: 100%;             /* но не выходить за пределы */
    margin-left: auto;
    margin-right: auto;

    background: rgba(0, 0, 0, 0.2);   /* лёгкая прозрачность */
    backdrop-filter: blur(4px);
    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;

    color: var(--color-accent);
    font-size: var(--text-base);
    text-align: center;
}

/* Логотип */
.gala-support .bru-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 30px;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .gala-support {
        flex-direction: column;
        gap: 0;              /* было 8px — делаем ближе */
        padding: 8px 8px;     /* немного компактнее */
        width: 90%;
    }

    .gala-support span {
        white-space: normal;
        line-height: 1.15;     /* чуть плотнее */
    }

    .gala-support .bru-logo {
        height: 46px;          /* была 50px — тоже уменьшили */
    }
}
