/* =========================================
   CLUBE DE TEATRO - PROFESSIONAL THEME (BLUE/RED)
   ========================================= */

:root {
  /* Palette - Professional & Serious */
  --primary: #2c3e50;
  /* Midnight Blue */
  --secondary: #34495e;
  /* Wet Asphalt */
  --accent: #c0392b;
  /* Deep Red */
  --accent-hover: #e74c3c;
  /* Bright Red */
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --bg: #f5f7fa;
  /* Clean light grey/white */
  --white: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.98);

  /* Spacing */
  --container-max: 1200px;
  --header-height: 80px;

  /* Effects */
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  /* Subtle shadow */
  --hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  /* Standard rounded, not rounded-pill */
  --transition: cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --primary: #f8fafc;
  --secondary: #94a3b8;
  --accent: #ff4d4d;
  /* More vibrant neon red */
  --accent-hover: #ff6666;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --bg: #020617;
  /* Deepest blue/black */
  --white: rgba(30, 41, 59, 0.7);
  /* Glass surface */
  --header-bg: rgba(2, 6, 23, 0.85);
  /* Deep glass header */
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  --hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 15px rgba(255, 77, 77, 0.1);
}

body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

[data-theme="dark"] .card,
[data-theme="dark"] .peca-card,
[data-theme="dark"] .member-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================
   HEADER & NAV
   ========================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--accent);
  transition: background-color 0.5s ease, border-bottom 0.5s ease;
}

.header__logo img {
  height: 50px;
  width: auto;
}

.nav {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav__link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  position: relative;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: 0.3s;
}

.nav__link:hover {
  color: var(--accent);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--highlight {
  background: var(--accent);
  color: white !important;
  padding: 10px 24px;
  border-radius: 4px;
  /* Slight radius */
  font-weight: 700;
  box-shadow: 0 4px 6px rgba(192, 57, 43, 0.3);
}

.nav__link--highlight::after {
  display: none;
}

.nav__link--highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(192, 57, 43, 0.4);
  background: var(--accent-hover);
}

.btn-theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: transform 0.3s var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-theme-toggle:hover {
  transform: scale(1.1);
}

.nav__toggle {
  display: none;
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
  height: 80vh;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  margin-top: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dynamic gradient based on theme */
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(52, 152, 219, 0.8) 100%);
  transition: opacity 0.5s ease;
}

[data-theme="dark"] .hero::before {
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 900px;
  padding: 20px;
  animation: fadeUp 1s var(--transition);
}

.hero__title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: white;
  text-transform: uppercase;
}

.hero__subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 0;
  display: inline-block;
}

/* =========================================
   CONTAINERS & SECTIONS
   ========================================= */

.section {
  padding: 80px 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 30px;
}

.section__title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 60px;
  color: var(--primary);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section__title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 15px auto 0;
}

/* =========================================
   CARDS GRID
   ========================================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.3s var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .card {
  border-color: rgba(255, 255, 255, 0.05);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary);
}

.card__image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 4px solid var(--primary);
}

.card__content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.card__text {
  color: var(--text-light);
  margin-bottom: 20px;
  flex: 1;
  font-size: 0.95rem;
}

.section--alt {
  background-color: var(--white);
}

/* =========================================
   MEMBRO CARDS
   ========================================= */
.member-card {
  background: var(--white);
  border-radius: var(--radius);
  text-align: center;
  padding: 40px 30px;
  box-shadow: var(--shadow);
  transition: 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

[data-theme="dark"] .member-card {
  border-color: rgba(255, 255, 255, 0.05);
  border-top-color: var(--primary);
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.member-card--student {
  border-top-color: var(--accent);
}

.member-card__name {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.member-card__role {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  display: block;
}

.member-card__bio {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* =========================================
   PROFILE PAGE (Individual)
   ========================================= */
.profile {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 50px;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .profile {
  border-color: rgba(255, 255, 255, 0.05);
}

.profile__image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}

/* =========================================
   BUTTONS
   ========================================= */

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: 0.2s;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.btn--primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 77, 77, 0.3);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 77, 77, 0.4);
}

.btn--primary:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn--secondary:hover {
  background: var(--primary);
  color: white;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.9);
  padding: 60px 20px;
  text-align: center;
  margin-top: 100px;
  border-top: 1px solid var(--accent);
  transition: background-color 0.5s ease, border-top 0.5s ease;
  position: relative;
  z-index: 10;
}

[data-theme="dark"] .footer {
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer__logo {
  height: 50px;
  margin: 25px auto;
  filter: brightness(0) invert(1);
  /* Make it white if it's not */
  opacity: 0.8;
  transition: 0.3s;
}

.footer__logo:hover {
  opacity: 1;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .profile {
    grid-template-columns: 1fr;
  }

  .profile__image {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: auto;
    background: var(--header-bg);
    flex-direction: column;
    padding: 40px;
    gap: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-150%);
    transition: 0.4s var(--transition);
    z-index: 999;
  }

  .nav.active {
    transform: translateY(0);
  }

  .nav__toggle {
    display: block;
    width: 40px;
    height: 30px;
    background: none;
    border: none;
  }

  .nav__toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary);
    margin-bottom: 6px;
    transition: 0.3s;
  }

  .hero__title {
    font-size: 2.5rem;
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeUp 0.6s var(--transition) forwards;
}

/* =========================================
   CARTAZ PAGE SPECIFIC
   ========================================= */
.cartaz-atual {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 50px;
  align-items: center;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #eee;
}

.cartaz-poster {
  width: 400px;
  height: 560px;
  /* Aspect ratio 5:7 approx */
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--hover-shadow);
  border: 1px solid var(--primary);
}

.cartaz-info h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.cartaz-info p {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .cartaz-atual {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 20px;
  }

  .cartaz-poster {
    width: 280px;
    height: 400px;
    margin: 0 auto 30px;
  }

  .cartaz-info h2 {
    font-size: 2rem;
  }
}

/* =========================================
   ERROR PAGE (404)
   ========================================= */
.error-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: var(--bg);
}

.error-page__code {
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  opacity: 0.1;
  font-family: 'Outfit', sans-serif;
  margin-bottom: -1rem;
}

.error-page h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.error-page__message {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

/* =========================================
   PEÇA DETAILS (DYNAMIC CONTENT)
   ========================================= */
.peca-subtitle {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.peca-description-card,
.peca-sessions-card,
.peca-cast-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.peca-sinopse {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.8;
  white-space: pre-line;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.session-time {
  font-weight: 700;
  color: var(--accent);
}

.session-day {
  font-weight: 800;
  font-size: 1.4rem;
  display: block;
  line-height: 1;
}

.session-month {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.8;
}

[data-theme="dark"] .peca-subtitle {
  color: var(--primary);
}

[data-theme="dark"] .session-row {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Cast Grid cinematic styling */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.cast-item {
  display: flex;
  flex-direction: column;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.3s;
}

.cast-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
  border-color: var(--accent);
}

.cast-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

.cast-role {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-top: 4px;
}

@keyframes poster-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.peca-poster {
  animation: poster-float 6s ease-in-out infinite;
}

/* =========================================
   CINEMATIC PEÇA REDESIGN
   ========================================= */

.peca-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.4);
  transform: scale(1.1);
  z-index: 1;
  transition: opacity 1s ease;
}

.peca-hero .hero__content {
  z-index: 2;
  text-align: center;
}

.hero__title#peca-title-main {
  font-size: 5rem;
  letter-spacing: -2px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.container--peca {
  max-width: 1400px;
  margin-top: -100px;
  position: relative;
  z-index: 10;
}

.peca-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 40px;
}

/* Cinematic Sidebar */
.peca-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.peca-poster {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.5s var(--transition);
}

.peca-poster:hover {
  transform: scale(1.02);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: var(--text);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .glass-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.peca-meta-card {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  margin-bottom: 20px;
}

.meta-item {
  text-align: center;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.6;
  margin-bottom: 5px;
}

.meta-value {
  font-weight: 700;
  font-size: 1.2rem;
}

/* Typography Refinement */
.peca-subtitle {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 25px;
  background: linear-gradient(to right, var(--accent), #ff8a80);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Photo Gallery Grid */
.peca-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s var(--transition);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 2rem;
  opacity: 0;
  transition: 0.3s;
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 900px) {
  .peca-layout {
    grid-template-columns: 1fr;
  }

  .peca-hero {
    height: 40vh;
  }

  .hero__title#peca-title-main {
    font-size: 3rem;
  }

  .peca-sidebar {
    position: static;
  }

  .container--peca {
    margin-top: -50px;
  }
}