:root {
  --red: #d50000;
  --red-deep: #890000;
  --red-highlight: #6f0000;
  --cream: #F9F6C3;
  --ink: #1e1e1e;
  --ink-soft: #4e4e4e;
  --gray: #808080;
  --paper: #ffffff;
  --line: #e5e3df;
  --serif: "Philosopher", Georgia, serif;
  --script: "Monotype Corsiva", "Philosopher", cursive, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 15px;
}

img { max-width: 100%; display: block; }
a { color: #069; }
a:hover { text-decoration: underline; }

#content { width: 95%; max-width: 1235px; margin: 1em auto 0; }

h1 { font-family: var(--serif); font-size: 1.9em; margin: 0 0 0.6em; color: var(--ink); }
h1.highlighted { color: var(--red-highlight); }
h2 { font-family: var(--serif); font-size: 1.4em; margin: 1.2em 0 0.5em; }
h3 { font-family: var(--serif); font-size: 1.15em; margin: 0 0 0.4em; }

/* ===== Banner group (site header, on every page) ===== */
#bannerGroup {
  width: 100%;
  overflow: hidden;
  font-family: var(--serif);
  text-align: center;
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
#preview_photos_left, #preview_photos_right {
  width: 170px;
  height: 240px;
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
  position: relative;
  border: 6px solid #fff;
  outline: 1px solid var(--line);
}
#preview_photos_left img, #preview_photos_right img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: rotator 12s infinite;
}
#preview_photos_left img:nth-child(1), #preview_photos_right img:nth-child(1) { animation-delay: 0s; }
#preview_photos_left img:nth-child(2), #preview_photos_right img:nth-child(2) { animation-delay: 3s; }
#preview_photos_left img:nth-child(3), #preview_photos_right img:nth-child(3) { animation-delay: 6s; }
#preview_photos_left img:nth-child(4), #preview_photos_right img:nth-child(4) { animation-delay: 9s; }
@keyframes rotator {
  0% { opacity: 0; }
  3% { opacity: 1; }
  22% { opacity: 1; }
  27% { opacity: 0; }
  100% { opacity: 0; }
}
#banner { display: inline-block; vertical-align: middle; width: 640px; max-width: calc(100% - 380px); padding: 0 10px; }
#banner .brand-monogram { max-width: 260px; margin: 0 auto 6px; }
#logos h1 { font-family: var(--script); font-size: 2.1em; color: var(--red); font-style: italic; margin-bottom: 0.35em; }
#banner a { text-decoration: none; color: var(--ink); display: inline-block; padding-bottom: 5px; border-bottom: 2px solid transparent; }
#banner a:hover, #banner a.active { color: var(--red); border-bottom-color: var(--red); text-decoration: none; }
#primary { width: 100%; display: flex; justify-content: center; gap: 60px; margin-bottom: 6px; }
#primary-left, #primary-right { display: flex; flex-direction: column; gap: 6px; font-size: 1.05em; }
#secondary { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; font-size: 0.9em; }
#tertiary { margin-top: 14px; font-size: 1em; }
#tertiary a { color: var(--red-deep); font-weight: 700; }

/* ===== Page title ===== */
main > h1:first-child { text-align: center; }

/* ===== Events list (homepage news) ===== */
#events-list { list-style: none; margin: 0 0 20px; padding: 0; max-width: 820px; margin-left: auto; margin-right: auto; }
#events-list .event-entry { padding: 18px 0; border-bottom: 1px solid var(--line); }
#events-list .event-entry:first-child { padding-top: 0; }
#events-list .event-entry h3 a { color: var(--ink); }
#events-list .event-entry h3 a:hover { color: var(--red); }
#events-list .timestamp { font-size: 0.82em; color: var(--gray); margin: 0 0 8px; }
#events-list .event-entry img { max-width: 200px; max-height: 200px; float: left; margin: 0 16px 8px 0; border: 1px solid var(--line); }
#events-list .event-entry p { color: var(--ink-soft); margin: 0 0 8px; }
#events-list .event-entry .clearfix { clear: both; }
.pagination { text-align: center; margin: 20px 0; font-size: 0.9em; }
.pagination a { margin: 0 6px; }

/* ===== Plays list (repertoire), 3-column flex ===== */
.plays-list { display: flex; flex-flow: row wrap; gap: 30px; align-items: flex-start; }
.play-category { flex: 1 1 280px; min-width: 260px; }
.category-title { text-align: center; border-bottom: 2px solid var(--cream); padding-bottom: 10px; }
.category-title em { font-style: italic; color: var(--red-deep); }
.play { min-height: 90px; margin-bottom: 18px; }
.play h3 a { color: var(--ink); }
.play .preview { float: left; width: 90px; margin-right: 12px; }
.play .preview img { width: 90px; height: 90px; object-fit: cover; border: 1px solid var(--line); }
.play .desc { overflow: hidden; }
.play .desc p { margin: 0 0 4px; font-size: 0.85em; color: var(--ink-soft); }
.play .desc em { font-style: italic; color: var(--gray); }
.play .delimiter { clear: both; }

/* ===== Photo gallery: album accordion ===== */
.accordion-wrapper h1 { text-align: left; font-size: 1.3em; }
.accordion-toggler { color: var(--ink); text-decoration: none; }
.arrow { border: solid var(--red); border-width: 0 3px 3px 0; display: inline-block; padding: 3px; margin-right: 8px; transform: rotate(45deg); }
.album-preview { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px dashed var(--line); }
.album-title { margin-bottom: 10px; font-weight: 700; font-family: var(--serif); font-size: 1.1em; }
.album-title a { color: var(--ink); text-decoration: none; }
.album-preview .thumbs { display: flex; gap: 10px; margin-bottom: 8px; }
.album-preview img { width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--line); }
.album-info { color: var(--gray); font-size: 0.85em; }

/* ===== Generic article body (О театре, Проекты, Афиша, Контакты) ===== */
main .article p { margin: 0 0 14px; color: var(--ink-soft); font-size: 1em; max-width: 760px; }
main .article ul { color: var(--ink-soft); margin: 0 0 14px; padding-left: 20px; max-width: 760px; }
main .article li { margin-bottom: 6px; }
main .article strong { color: var(--ink); }
.hudruk-photo { float: right; width: 180px; margin: 0 0 16px 24px; border: 1px solid var(--line); }

table { border-collapse: collapse; width: 100%; margin-top: 20px; max-width: 820px; }
table th { background: var(--cream); text-align: left; padding: 10px 12px; font-size: 0.85em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); }
table td { padding: 10px 12px; border: 1px solid var(--line); }
.gigs-note { text-align: center; color: var(--ink-soft); font-style: italic; margin: 20px 0; }

/* ===== Footer ===== */
#footer { text-align: center; padding: 30px 0; margin-top: 40px; border-top: 1px solid var(--line); color: var(--gray); font-size: 0.85em; }
.social { margin-bottom: 10px; }
.social-link { display: inline-block; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; text-align: center; line-height: 34px; margin: 0 4px; text-decoration: none; font-size: 0.8em; font-weight: 700; }
.social-link:hover { background: var(--red); text-decoration: none; }
#footer small { display: block; margin-top: 6px; }
#footer small a { color: var(--gray); }

@media (max-width: 850px) {
  #preview_photos_left, #preview_photos_right { display: none; }
  #banner { max-width: 100%; width: 100%; }
  .plays-list { flex-direction: column; }
  .play .preview { width: 70px; }
  .play .preview img { width: 70px; height: 70px; }
  #primary { flex-direction: column; gap: 10px; }
  #primary-left, #primary-right { flex-direction: row; justify-content: center; gap: 24px; }
}
