/* Performances Page - Image Stack Cycle */

.performances-page {
  min-height: 100vh;
  background: var(--bg-dark);
  padding: 140px 0 60px;
}

.performances-hero {
  text-align: center;
  padding: 40px 20px 80px;
  margin-bottom: 40px;
}

.performances-hero .section-title {
  font-size: 4rem;
  margin-bottom: 20px;
  color: var(--text-light);
}

.performances-hero .section-subtitle {
  font-size: 1.5rem;
  color: rgba(252, 241, 219, 0.8);
  max-width: 700px;
  margin: 0 auto;
}

/* Stack Container */
.stack-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
  touch-action: pan-y;
}

.performances-stack {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  touch-action: pan-y;
}

/* Individual Performance Cards - GSAP Pin & Scale Style */
.performance-item {
  touch-action: pan-y;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0;
  margin-bottom: 40px;
  width: 100%;
  height: auto;
  min-height: 550px;
  background: linear-gradient(135deg, rgba(252, 241, 219, 0.98) 0%, rgba(252, 241, 219, 0.95) 100%);
  border: 2px solid var(--secondary-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Flip Card Container */
.performance-flip-container {
  perspective: 1200px;
  width: 100%;
  height: 100%;
  position: relative;
  min-height: 550px;
}

.performance-flip-box {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 550px;
  transition: transform 0.6s ease-out;
  transform-style: preserve-3d;
}

.performance-flip-box.flipped {
  transform: rotateY(-180deg);
}

/* Scroll Spacer */
.scroll-spacer {
  width: 100%;
  height: 30vh;
}

/* Stack animation prep */
.performances-stack {
  position: relative;
}

.performance-item:first-child {
  margin-top: 0;
}

/* Image Section */
.performance-image {
  position: relative;
  overflow: hidden;
  min-height: 550px;
  height: 100%;
  grid-column: 1;
  border-radius: 20px 0 0 20px;
}

.performance-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Content Section */
.performance-content {
  padding: 40px 50px 80px 50px;
  overflow-y: auto;
  background: rgba(58, 12, 15, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 550px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
  top: 0;
  left: 0;
}

.performance-content.front {
  transform: rotateY(0deg);
  z-index: 2;
}

.performance-content.back {
  transform: rotateY(180deg);
  z-index: 1;
  padding-top: 50px;
}

.back-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #3a0c0f;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Custom scrollbar */
.performance-content::-webkit-scrollbar {
  width: 8px;
}

.performance-content::-webkit-scrollbar-track {
  background: rgba(58, 12, 15, 0.1);
  border-radius: 4px;
}

.performance-content::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

.performance-content::-webkit-scrollbar-thumb:hover {
  background: #c99437;
}

.performance-tagline {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #3a0c0f;
  margin-bottom: 16px;
  opacity: 0.7;
}

.performance-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: #3a0c0f;
  margin-bottom: 12px;
  line-height: 1.2;
}

.performance-credits {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(58, 12, 15, 0.15);
}

.credit-item {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: #3a0c0f;
  margin-bottom: 8px;
  font-style: italic;
  opacity: 0.8;
}

.credit-label {
  font-weight: 600;
  font-style: normal;
  color: #3a0c0f;
}

.credit-value {
  font-weight: 500;
  color: #3a0c0f;
}

.performance-description {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
  color: #3a0c0f;
  margin-bottom: 20px;
}

.performance-description strong {
  color: #3a0c0f;
  font-weight: 600;
}

/* Performance Highlights */
.performance-highlights {
  margin-top: 24px;
  padding: 20px 24px;
  background: rgba(221, 165, 72, 0.08);
  border-left: 4px solid var(--secondary-color);
  border-radius: 8px;
}

.performance-highlights h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #3a0c0f;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.performance-highlights ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.performance-highlights li {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: #3a0c0f;
  padding: 6px 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .performance-content {
    padding: 30px 40px 80px 40px;
  }

  .performance-content.back {
    padding-top: 40px;
  }

  .performance-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 992px) {
  .performance-item {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .performance-image {
    height: 400px;
    min-height: 400px;
    order: 1;
    border-radius: 20px 20px 0 0;
  }

  .performance-flip-container {
    order: 2;
    min-height: 450px;
  }

  .performance-flip-box {
    min-height: 450px;
  }

  .performance-content {
    padding: 25px 25px 70px 25px;
    min-height: 450px;
  }

  .performance-content.back {
    padding-top: 35px;
  }

  .performance-title {
    font-size: 2rem;
  }

  .performance-description {
    font-size: 16px;
  }

  .credit-item {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .performances-hero .section-title {
    font-size: 3rem;
  }

  .performance-content {
    padding: 25px 20px 70px 20px;
  }

  .performance-content.back {
    padding-top: 30px;
  }

  .performance-title {
    font-size: 1.8rem;
  }

  .performance-image {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .performances-page {
    padding: 110px 0 40px;
  }

  .performances-hero {
    padding: 30px 15px 60px;
  }

  .performances-hero .section-title {
    font-size: 2rem;
  }

  .performances-hero .section-subtitle {
    font-size: 1.1rem;
  }

  .performance-item {
    margin-bottom: 30px;
  }

  .performance-image {
    height: 250px;
    min-height: 250px;
  }

  .performance-flip-container,
  .performance-flip-box,
  .performance-content {
    min-height: 400px;
  }

  .performance-content {
    padding: 20px 15px 70px 15px;
  }

  .performance-content.back {
    padding-top: 25px;
  }

  .performance-title {
    font-size: 1.5rem;
  }

  .credit-label {
    min-width: 100px;
    font-size: 12px;
  }

  .credit-value {
    font-size: 13px;
  }

  .performance-description {
    font-size: 14px;
  }

  .back-title {
    font-size: 1.5rem;
  }

  .scroll-spacer {
    height: 5vh;
  }
}

/* Flip Button Styles */
.flip-button-wrap {
  margin-top: 24px;
}

.flip-button {
  min-width: 120px;
  height: 40px;
  border-radius: 20px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #c99437 100%);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(221, 165, 72, 0.3);
  transition: all 0.3s ease;
}

.flip-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #3a0c0f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.flip-arrow {
  width: 16px;
  height: 16px;
}

.flip-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(221, 165, 72, 0.6);
}

.flip-button:active {
  transform: scale(0.95);
}

.flip-arrow {
  color: #3a0c0f;
  transition: transform 0.3s ease;
}

.flip-button:hover .flip-arrow {
  transform: translateX(3px);
}

.flip-button.flip-back:hover .flip-arrow {
  transform: translateX(-3px);
}

@media (max-width: 768px) {
  .flip-button-wrap {
    margin-top: 20px;
  }

  .flip-button {
    min-width: 110px;
    height: 36px;
    padding: 0 16px;
  }

  .flip-label {
    font-size: 11px;
  }

  .flip-arrow {
    width: 14px;
    height: 14px;
  }
}

/* Simple Content Layout (Homepage - No Flip) */
/* Side by side: image left, content right on desktop */
/* Larger card size for homepage */
.performance-item:has(.performance-content-simple) {
  min-height: 80vh;
  grid-template-columns: 1fr 1fr;
}

.performance-item:has(.performance-content-simple) .performance-image {
  min-height: 80vh;
}

.performance-content-simple {
  padding: 50px 60px;
  background: rgba(58, 12, 15, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80vh;
  box-sizing: border-box;
}

.production-cta {
  margin-top: 24px;
}

.production-cta a {
  display: inline-block;
  padding: 16px 32px;
  background-color: #3a0c0f;
  color: var(--secondary-color);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px;
  border: 2px solid #3a0c0f;
  transition: all 0.3s ease;
}

.production-cta a:hover {
  background-color: transparent;
  color: #3a0c0f;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(58, 12, 15, 0.2);
}

/* Responsive for simple content */
@media (max-width: 1200px) {
  .performance-content-simple {
    padding: 30px 40px;
  }
}

@media (max-width: 992px) {
  /* Stack layout for tablet/mobile: image on top, content below */
  .performance-item:has(.performance-content-simple) {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .performance-item:has(.performance-content-simple) .performance-image {
    min-height: 350px;
    height: 350px;
    order: 1;
    border-radius: 20px 20px 0 0;
  }

  .performance-content-simple {
    order: 2;
    padding: 25px 25px;
    min-height: auto;
    border-radius: 0 0 20px 20px;
  }
}

@media (max-width: 768px) {
  .performance-item:has(.performance-content-simple) .performance-image {
    min-height: 300px;
    height: 300px;
  }

  .performance-content-simple {
    padding: 25px 20px;
  }
}

@media (max-width: 576px) {
  .performance-item:has(.performance-content-simple) .performance-image {
    min-height: 250px;
    height: 250px;
  }

  .performance-content-simple {
    padding: 20px 15px;
  }

  .production-cta a {
    padding: 14px 24px;
    font-size: 14px;
  }
}
