html, body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* =========================
   Адаптация главной страницы
   ========================= */

/* Ноутбуки */
@media (max-width: 1500px) {
  .site-header {
    height: 86px !important;
    min-height: 86px !important;
  }

  .header-inner {
    height: 86px !important;
    min-height: 86px !important;
    width: calc(100vw - 36px) !important;
    gap: 14px !important;
  }

  .logo-wrap {
    width: 72px !important;
    height: 72px !important;
  }

  .brand-title {
    max-width: 610px !important;
    font-size: clamp(22px, 2.05vw, 28px) !important;
    line-height: 1.08 !important;
  }

  .nav {
    gap: 11px !important;
    font-size: 10px !important;
    letter-spacing: 0.07em !important;
  }

  .hero {
    min-height: calc(100vh - 86px) !important;
  }

  .curtain {
    height: calc(100vh - 86px) !important;
    min-height: 600px !important;
  }

  .curtain-right {
    right: -70px !important;
  }

  .hero-inner {
    width: calc(100vw - 36px) !important;
    min-height: calc(100vh - 86px) !important;
    padding: 18px 0 22px !important;
    grid-template-columns: minmax(410px, 0.85fr) minmax(600px, 1fr) !important;
    gap: 20px !important;
    align-items: center !important;
  }

  .slogan-side {
    padding-left: clamp(52px, 7vw, 110px) !important;
  }

  .eyebrow {
    margin-bottom: 18px !important;
    font-size: 11px !important;
    letter-spacing: 0.25em !important;
    line-height: 1.35 !important;
  }

  .headline h1 {
    font-size: clamp(54px, 4.7vw, 68px) !important;
    line-height: 1.02 !important;
  }

  .subtitle {
    margin-top: 20px !important;
    max-width: 560px !important;
    font-size: 16px !important;
    line-height: 1.38 !important;
  }

  .appeal-window {
    max-width: 700px !important;
    min-height: 500px !important;
    margin-right: 0 !important;
    border-radius: 30px !important;
  }

  .appeal-inner {
    min-height: 500px !important;
    grid-template-columns: minmax(360px, 1fr) minmax(250px, 0.75fr) !important;
  }

  .appeal-text {
    max-width: 500px !important;
    padding: 34px 18px 34px 44px !important;
  }

  .appeal-text h2 {
    margin-bottom: 14px !important;
    font-size: 32px !important;
    line-height: 1.08 !important;
  }

  .appeal-text p {
    margin-bottom: 12px !important;
    font-size: 15px !important;
    line-height: 1.42 !important;
  }

  .signature {
    margin-top: 16px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
  }

  .signature strong {
    font-size: 24px !important;
  }

  .signature span {
    font-size: 13px !important;
  }

  .portrait-zone {
    min-height: 500px !important;
  }

  .portrait-zone img {
    width: clamp(310px, 27vw, 380px) !important;
    transform: translateX(34px) translateY(14px) !important;
  }

  .sections {
    width: calc(100vw - 36px) !important;
  }
}

/* Ноутбуки с небольшой высотой экрана */
@media (max-width: 1500px) and (max-height: 800px) {
  .site-header,
  .header-inner {
    height: 80px !important;
    min-height: 80px !important;
  }

  .logo-wrap {
    width: 66px !important;
    height: 66px !important;
  }

  .brand-title {
    font-size: clamp(20px, 1.9vw, 26px) !important;
  }

  .hero {
    min-height: calc(100vh - 80px) !important;
  }

  .curtain {
    height: calc(100vh - 80px) !important;
    min-height: 560px !important;
  }

  .hero-inner {
    transform: scale(0.81) !important;
    transform-origin: top center !important;
  }

  .headline h1 {
    font-size: clamp(48px, 4.25vw, 62px) !important;
  }

  .subtitle {
    margin-top: 14px !important;
    font-size: 14px !important;
    line-height: 1.32 !important;
  }

  .appeal-window {
    min-height: 445px !important;
    max-width: 660px !important;
  }

  .appeal-inner,
  .portrait-zone {
    min-height: 445px !important;
  }

  .appeal-text {
    padding: 24px 16px 24px 36px !important;
  }

  .appeal-text h2 {
    font-size: 28px !important;
  }

  .appeal-text p {
    font-size: 13.5px !important;
    line-height: 1.34 !important;
    margin-bottom: 10px !important;
  }

  .signature {
    margin-top: 12px !important;
  }

  .signature strong {
    font-size: 21px !important;
  }

  .portrait-zone img {
    width: clamp(280px, 25vw, 335px) !important;
    transform: translateX(30px) translateY(12px) !important;
  }
}

/* Планшеты и узкие экраны */
@media (max-width: 900px) {
  .site-header {
    position: relative !important;
    height: auto !important;
  }

  .header-inner {
    height: auto !important;
    min-height: 90px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 10px 0 !important;
  }

  .brand {
    justify-content: center !important;
  }

  .brand-title {
    max-width: 78vw !important;
    text-align: center !important;
    font-size: 22px !important;
  }

  .nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    white-space: normal !important;
  }

  .hero-inner {
    grid-template-columns: 1fr !important;
    width: calc(100vw - 28px) !important;
    min-height: auto !important;
    gap: 28px !important;
    padding: 36px 0 !important;
  }

  .slogan-side {
    padding-left: 0 !important;
    text-align: center !important;
  }

  .headline {
    width: auto !important;
    text-align: center !important;
  }

  .headline h1 {
    text-align: center !important;
    font-size: 48px !important;
  }

  .subtitle {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .appeal-window {
    max-width: 94vw !important;
    min-height: auto !important;
  }

  .appeal-inner {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .appeal-text {
    padding: 30px 24px !important;
  }

  .portrait-zone {
    min-height: auto !important;
    justify-content: center !important;
  }

  .portrait-zone img {
    width: min(320px, 78vw) !important;
    transform: none !important;
  }
}

/* =========================
   Переключатель языков
   ========================= */

.nav .lang-switch,
.lang-switch {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin-left: 8px !important;
  vertical-align: middle !important;
}

.nav .lang-flag,
.lang-flag {
  width: 28px !important;
  height: 20px !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  border-radius: 3px !important;
  border: 1px solid rgba(216, 173, 86, 0.75) !important;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35) !important;
  opacity: 0.95 !important;
}

.lang-flag:hover {
  transform: translateY(-1px);
  opacity: 1 !important;
}

.lang-flag.current {
  opacity: 0.55 !important;
  cursor: default !important;
}

.flag-ru {
  background: linear-gradient(
    to bottom,
    #ffffff 0 33.33%,
    #0039a6 33.33% 66.66%,
    #d52b1e 66.66% 100%
  ) !important;
}

.flag-gb {
  background:
    linear-gradient(0deg, transparent 40%, #ffffff 40% 60%, transparent 60%),
    linear-gradient(90deg, transparent 42%, #ffffff 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 45%, #c8102e 45% 55%, transparent 55%),
    linear-gradient(90deg, transparent 46%, #c8102e 46% 54%, transparent 54%),
    linear-gradient(33deg, transparent 46%, #ffffff 46% 54%, transparent 54%),
    linear-gradient(-33deg, transparent 46%, #ffffff 46% 54%, transparent 54%),
    linear-gradient(33deg, transparent 48%, #c8102e 48% 52%, transparent 52%),
    linear-gradient(-33deg, transparent 48%, #c8102e 48% 52%, transparent 52%),
    #012169 !important;
}

/* =========================
   Список новостей
   ========================= */

.news-list {
  width: 100%;
}

.news-list .news-item {
  display: grid;
  grid-template-columns: 110px 120px 1fr;
  align-items: center;
  gap: 28px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(201, 145, 67, 0.25);
  color: #f7e3a3;
  text-decoration: none;
}

.news-list .news-item:hover {
  background: rgba(255, 220, 150, 0.06);
}

.news-list .news-date {
  font-size: 16px;
  line-height: 1.2;
  color: #ffe9a8;
}

.news-list .news-thumb {
  width: 100px;
  height: 70px;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  flex-shrink: 0;
}

.news-list .news-thumb img {
  width: 100px !important;
  height: 70px !important;
  max-width: 100px !important;
  object-fit: cover;
  display: block;
}

.news-list .news-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffe9a8;
}

/* =========================
   История: список поставленных спектаклей
   ========================= */

.history-table {
  margin-top: 28px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.history-table td {
  padding: 0;
  vertical-align: baseline;
}

.history-table .history-date {
  width: 250px;
  padding-right: 38px;
  color: #fff3c4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 400;
  white-space: nowrap;
}

.history-table .history-title {
  text-align: left;
}

.history-table .history-title a {
  color: #f3d37a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 400;
  text-decoration: none;
  
}

.history-table .history-title a:hover {
  color: #fff0a8;
}

.performance-video {
    margin-top: 30px;
    text-align: center;
}

.performance-video h2 {
    margin-bottom: 15px;
    color: #f3d28b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4rem;
}

.performance-video video {
    width: 100%;
    max-width: 760px;
    border-radius: 14px;
    border: 1px solid rgba(243, 210, 139, 0.45);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    background: #000;
}

.performance-gallery {
    margin-top: 35px;
    text-align: center;
}

.performance-gallery h2 {
    margin-bottom: 18px;
    color: #f3d28b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    max-width: 820px;
    margin: 0 auto;
}

.photo-grid img {
    width: 100%;
    height: 95px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(243, 210, 139, 0.45);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.photo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
}

.photo-modal img {
    max-width: 92%;
    max-height: 88%;
    border-radius: 12px;
    border: 1px solid rgba(243, 210, 139, 0.6);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}

.photo-close {
    position: absolute;
    top: 18px;
    right: 32px;
    color: #f3d28b;
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
}
.performance-video {
    margin-top: 35px;
    text-align: center;
}

.performance-video h2 {
    margin-bottom: 18px;
    color: #f3d28b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.4rem;
}

.video-thumb {
    position: relative;
    width: 220px;
    height: 135px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(243, 210, 139, 0.55);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.video-thumb:hover img {
    transform: scale(1.05);
}

.video-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.68);
    color: #f3d28b;
    font-size: 28px;
    line-height: 54px;
    text-align: center;
    padding-left: 4px;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.65);
}

.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 30px;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
}

.video-modal video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(243, 210, 139, 0.6);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    background: #000;
}

.video-close {
    position: absolute;
    top: -48px;
    right: 0;
    color: #f3d28b;
    font-size: 42px;
    font-weight: bold;
    cursor: pointer;
}
