/*
  style3.css - reorganized
  Sections:
    1. :root variables
    2. Base / layout
    3. Navigation
    4. Typography
    5. Galleries / Lightbox
    6. Shows / Production pages
    7. Footer / utilities
    8. Helpers / small components
*/

:root {
  --primary-color: #CD0055;
  --complementary-color: #333;
  --font-family: "M PLUS 1 Code", Arial, sans-serif;

  /* link states */
  --link-color: var(--primary-color);
  --link-hover: var(--complementary-color);
  --link-focus-ring: 3px rgba(205, 0, 85, 0.18);

  /* blacks for overlay/shadows */
  --black-50: rgba(0, 0, 0, 0.5);
  --black-80: rgba(0, 0, 0, 0.8);
}

/* -----------------------------
   Base / Layout
   ----------------------------- */
html,
body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  align-self: center;
  min-height: 100vh;
  align-items: center;
  color: var(--complementary-color);
  min-height: 100vh;
}

.content-container {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: 0px;
  padding: 20px;
  box-sizing: border-box;
  height: 100%;
}

main {
  width: 100%;
  padding: 0px;
  margin: 0px;
  padding-top: 20px;
  flex-grow: 1;
}

.center-align {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
}

/* -----------------------------
   Navigation
   ----------------------------- */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0px;
  flex-direction: row;
}

.topnav img {
  height: 150px;
  width: auto;
}

nav {
  display: flex;
  justify-content: right;
  gap: 25px;
  width: 100%;
}

nav a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.3rem;
}

nav a:hover {
  color: var(--complementary-color);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .topnav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  nav {
    justify-content: center;
    gap: 15px;
  }
}

/* -----------------------------
   Typography
   ----------------------------- */

h1 {
  font-weight: 500;
  font-size: 2.5rem;
}

h1 small {
  font-size: 0.6em;
}

.title {
  color: var(--complementary-color);
  font-size: 40px;
  font-weight: bold;
  margin-bottom: -15px;
  text-transform: uppercase;
}

.credits,
.blurb {
  color: var(--complementary-color);
}

.credits {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 0;
  text-transform: uppercase;
}

.credits .date {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: bold;
  margin-top: 0;
  text-transform: uppercase;
}

.blurb {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.date {
  font-size: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-top: 8px;
}

/* -----------------------------
   Hero / Banner
   ----------------------------- */
.hero-image {
  width: 100%;
  aspect-ratio: 3/1;
  background-size: cover;
  padding: 20px 0;
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.hero-image h1 {
  width: 100%;
  display: block;
  text-align: right;
  color: white;
  padding: 2px 20px;
  background-color: #00000050;
  margin: 0;
}

/* Banner image (production pages) */
.banner img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .banner img {
    height: 40vh;
    object-position: center top;
  }
}

@media (max-width: 480px) {
  .banner img {
    height: 30vh;
    object-position: center center;
  }
}

/* -----------------------------
   Galleries & Lightboxes
   ----------------------------- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  width: 100%;
  align-items: center;
}

.gallery img {
  width: 80%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.gallery-item {
  width: 80%;
  height: 200px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  box-sizing: border-box;
  padding: 10px;
}

.gallery-item::first-line {
  background-color: var(--black-80);
  color: white;
  padding: 5px;
  border-radius: 4px;
  font-weight: bold;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
}

.gallery-item:hover,
.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--black-50);
}

.production-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
  width: 100%;
}

.production-gallery img {
  width: calc(100% - 20px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  border: none;
  border-radius: 0;
}

.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.lightbox-close {
  position: absolute;
  top: 32px;
  right: 48px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #ff5252;
}

.production-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

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

/* Close (X) button */
.production-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

/* Navigation arrows */
.production-prev,
.production-next {
  position: absolute;
  top: 50%;
  color: white;
  font-size: 60px;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  padding: 10px;
  transition: color 0.3s;
}

.production-prev:hover,
.production-next:hover {
  color: #CD0055;
}

.production-prev {
  left: 20px;
}

.production-next {
  right: 20px;
}

@media (max-width: 600px) {
  .production-close {
    font-size: 30px;
    top: 10px;
    right: 15px;
  }

  .production-prev,
  .production-next {
    font-size: 40px;
    padding: 5px;
  }

  .production-gallery {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns instead of 3 */
    gap: 10px;
  }
}

/* ===========================
   NOW SHOWING SECTION
   =========================== */

.now-showing-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px 0px;
}

/* Layout container */
.now-showing {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin: 40px 0;
}

/* Image and pink bar */
.now-showing-image {
  position: relative;
  width: 200px;
  aspect-ratio: 1 / 1;
  display: block;
  text-decoration: none;
}

.now-showing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pink bar */
.now-showing-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: #CD0055;
  color: #fff;
  text-align: center;
  padding: 8px 0;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

/* Text section */
.now-showing-info {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.now-showing-title {
  font-size: 2rem;
  color: #333;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0px;
  transition: color 0.3s, border-color 0.3s;
  border-bottom: 3px solid transparent;
  /* remove underline by default */
}

.now-showing-title:hover {
  color: #CD0055;
  /* pink on hover */
  border-bottom: 3px solid #CD0055;
  /* underline appears in pink */
}

.now-showing-date {
  font-weight: bold;
  color: #CD0055;
  margin: 5px 0;
  font-size: 1.2rem;
}

.now-showing-tagline {
  color: #333;
  font-size: 1rem;
  margin: 0;
}

/* Responsive layout */
@media (max-width: 600px) {
  .now-showing {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .now-showing-info {
    text-align: center;
    margin-top: -20px;
  }

  .now-showing-title {
    font-size: 1.6rem;
  }
}

/* -----------------------------
   Whats On / Show list
   ----------------------------- */

.shows-list {
  gap: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.show {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  width: 100%;
}

.show a {
  flex-grow: 0;
  flex-shrink: 0;
  width: 200px;
  max-width: 33%;
}

.show-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  min-width: 0;
  /* allow text to shrink inside flex container */
}

.show img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  margin-right: 30px;
  border-radius: 0;
  transition: transform 0.3s ease;
  flex-grow: 0;
  display: block;
}

.show-info h2 {
  font-size: 1.75rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  word-break: break-word;

}

.show-info h2 a {
  color: var(--complementary-color);
  text-decoration: none;
}

.show-info h2 a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

/* Stack/show vertical layout below 400px so image doesn't shrink into text */
@media (max-width: 480px) {
  .show {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .show a {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }

  .show img {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    border-radius: 0px;
  }

  .show-info {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .show-info h2 {
    font-size: 1.25rem;
  }
}

/* -----------------------------
   Production page content
   ----------------------------- */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* -----------------------------
   Footer / Small components
   ----------------------------- */
footer {
  margin-top: 40px;
  padding: 10px 0;
  border-top: 1px solid var(--primary-color);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--complementary-color);
  width: 100%;
}

.social-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 18px;
  margin-left: 8px;
}

footer .copyright {
  flex-grow: 1;
  display: block;
}

footer .socials {
  display: flex;
  align-items: center;
  flex-grow: 0;
}

/* -----------------------------
   Links / Accessibility tweaks
   ----------------------------- */
a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  transition: color 160ms ease, transform 120ms ease, box-shadow 120ms ease;
  cursor: pointer;
}

a:hover,
a:active {
  color: var(--link-hover);
  transform: translateY(-1px);
}

a:focus {
  outline: none;
  box-shadow: 0 0 0 6px var(--link-focus-ring);
  border-radius: 4px;
}

.content a,
main a,
footer a {
  word-break: break-word;
  text-underline-offset: 3px;
}

a.external::after {
  content: " ↗";
  font-size: 0.9em;
  margin-left: 4px;
  opacity: 0.85;
}

/* -----------------------------
   Small utilities
   ----------------------------- */
.highlight {
  color: var(--primary-color);
  font-weight: bold;
}

.this-page {
  text-decoration: underline;
}

.pink-bar {
  display: block;
  background-color: var(--primary-color);
  color: white;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 50px;
  text-align: center;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  margin: 20px auto;
  margin-bottom: -10px;
}

.pink-bar:hover {
  background-color: var(--complementary-color);
  color: white;
}

@media (max-width: 600px) {
  .pink-bar {
    font-size: 14px;
    padding: 10px 16px;
    max-width: calc(100% - 20px);
  }
}

/* ===========================
   ANNOUNCEMENT SECTION
   =========================== */

.new-play {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin: 60px 0;
  flex-wrap: wrap;
}

.new-play-image {
  flex: 0 0 40%;
  display: block;
}

.new-play-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
}

.new-play-info {
  flex: 1;
  color: #333;
  text-align: left;
  font-size: 1.1rem;
}

.new-play-info p {
  margin: 6px 0;
}

.by-text {
  font-weight: normal;
  text-transform: uppercase;
}

.new-play-info strong {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.new-play-date {
  font-weight: bold;
  margin-top: 12px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.new-play-blurb {
  margin-top: 15px;
  line-height: 1.4;
}

.new-play-button {
  display: inline-block;
  color: white;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 50px;
  margin-top: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: 400;
}

.new-play-button:hover {
  background-color: #333 !important;
  /* overrides any per-show background */
  color: white;
}

/* Mobile layout */
@media (max-width: 768px) {
  .new-play {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .new-play-image {
    flex: 0 0 100%;
    width: 100%;
    max-width: 400px;
  }

  .new-play-info {
    text-align: center;
    margin-top: -40px;
  }
}

/* Past Production List */

.PastProductionList__item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 30px;
}

.PastProductionList__thumb-wrapper {
  position: relative;
  display: inline-block;
}

.PastProductionList__thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  cursor: pointer;
}

.PastProductionList__info {
  flex: 1;
}

.PastProductionList__title {
  font-weight: bold;
  text-transform: uppercase;
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.PastProductionList__author {
  text-transform: uppercase;
  color: #333;
  margin-bottom: 4px;
}

.PastProductionList__author strong {
  font-weight: bold;
}

.PastProductionList__date {
  text-transform: uppercase;
  color: #CD0055;
  font-weight: bold;
}

@media (max-width: 300px) {
  .PastProductionList__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .PastProductionList__thumb {
    width: 100%;
    height: auto;
  }
}

/* Instagram-style More Images Icon */
.more-images-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  cursor: default;
  pointer-events: none;
}

.more-images-icon::before,
.more-images-icon::after {
  content: '';
  position: absolute;
  border-radius: 4px;
  background: white;
  border: 2px solid #CD0055;
}

/* Back square slightly offset */
.more-images-icon::before {
  width: 16px;
  height: 16px;
  top: 4px;
  left: 4px;
  z-index: 0;
}

/* Front square on top */
.more-images-icon::after {
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Hidden gallery images */
.hidden-gallery {
  display: none;
}

/* Dynamic Lightbox */
#dynamicLightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
}

#dynamicLightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
}

#dynamicLightbox .dynamic-close,
#dynamicLightbox .dynamic-prev,
#dynamicLightbox .dynamic-next {
  position: absolute;
  color: white;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

#dynamicLightbox .dynamic-close {
  top: 20px;
  right: 30px;
  font-size: 40px;
}

#dynamicLightbox .dynamic-prev,
#dynamicLightbox .dynamic-next {
  top: 50%;
  font-size: 60px;
  transform: translateY(-50%);
}

#dynamicLightbox .dynamic-prev {
  left: 20px;
}

#dynamicLightbox .dynamic-next {
  right: 20px;
}

#dynamicLightbox .dynamic-close:hover,
#dynamicLightbox .dynamic-prev:hover,
#dynamicLightbox .dynamic-next:hover {
  color: #CD0055; /* pink hover */
}

  /* Year Arrows */

  .year-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .year-nav {
    font-weight: bold;
    font-size: 1.1rem;
    color: #CD0055;
    /* pink */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
  }

  /* Arrows */
  .arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
  }

  .arrow.left {
    border-right: 12px solid #CD0055;
  }

  .arrow.right {
    border-left: 12px solid #CD0055;
  }

  /* Change arrow color and underline text on hover */
  .year-nav:hover {
    color: #333;
    /* text turns grey */
    text-decoration: underline;
    /* underline on hover */
  }

  .year-nav:hover .arrow.left {
    border-right-color: #333;
    /* arrow turns grey */
  }

  .year-nav:hover .arrow.right {
    border-left-color: #333;
    /* arrow turns grey */
  }

  /* Optional: mobile adjustments (keep same line) */
  @media (max-width: 600px) {
    .year-nav {
      font-size: 1rem;
      gap: 4px;
    }

    .arrow {
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
    }

    .arrow.left {
      border-right-width: 10px;
    }

    .arrow.right {
      border-left-width: 10px;
    }
  }