@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Space+Mono:wght@400;700&display=swap');

/* ── 1. VARIABLES DINÁMICAS (Temas Rústicos) ── */
:root {
  --negro: #FDFBF7;         /* Fondo principal claro */
  --sombra: #F4EFE6;        /* Fondo secundario (secciones) */
  --teal: #A0522D;          /* Terracota / Ladrillo */
  --teal-rgb: 160, 82, 45;  
  --teal-claro: #CD853F;    /* Madera clara */
  --crema: #2C1E16;         /* Texto principal oscuro */
  --crema-suave: #5C4A3D;   /* Texto secundario */
  --dorado: #B8860B;
  --gris: #EADDCE;          /* Fondos de placeholders */
}

[data-theme="dark"] {
  --negro: #1A1614;         /* Fondo café muy oscuro */
  --sombra: #241E1A;        /* Fondo secciones oscuro */
  --teal: #D2691E;          /* Terracota vibrante */
  --teal-rgb: 210, 105, 30; 
  --teal-claro: #E6A15C;
  --crema: #F0E8D8;         /* Texto principal claro */
  --crema-suave: #CDBEAF;   /* Texto secundario claro */
  --dorado: #c9a84c;
  --gris: #3a3a4a;
}

/* ── 2. BASE Y RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--negro);
  color: var(--crema);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ── 3. NAVEGACIÓN ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
  background: var(--negro);
  border-bottom: 1px solid rgba(var(--teal-rgb), 0.2);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--teal); text-transform: uppercase; text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  font-family: 'Space Mono', monospace; font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--crema-suave); text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal); }

.nav-admin-btn {
  font-family: 'Space Mono', monospace; font-size: 0.6rem;
  border: 1px solid var(--teal); color: var(--teal);
  padding: 0.4rem 1rem; text-decoration: none; transition: 0.3s;
}
.nav-admin-btn:hover { background: var(--teal); color: var(--negro); }

.theme-btn {
  background: transparent; border: 1px solid var(--teal);
  color: var(--teal); border-radius: 50%; cursor: pointer;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
}

/* ── 4. BOTONES ── */
.btn-primary {
  background: var(--teal); color: #fff;
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  padding: 1rem 2.5rem; text-decoration: none; display: inline-block;
  letter-spacing: 0.1em; text-transform: uppercase; transition: 0.3s;
}
.btn-outline {
  border: 1px solid var(--teal); color: var(--crema);
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  padding: 1rem 2.5rem; text-decoration: none; display: inline-block;
  text-transform: uppercase; transition: 0.3s;
}
.btn-primary:hover, .btn-outline:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* ── 5. HERO ── */
.hero {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  text-align: center; padding: 0 2rem;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--negro); }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.2; filter: sepia(0.3); }

.hero-tag { font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--teal); letter-spacing: 0.3em; margin-bottom: 1.5rem; }
.hero-title { font-family: 'Playfair Display', serif; font-size: clamp(3rem, 10vw, 6rem); line-height: 0.9; margin-bottom: 1.5rem; }
.hero-title em { font-style: italic; color: var(--teal-claro); }
.hero-sub { max-width: 600px; font-size: 1.2rem; color: var(--crema-suave); margin-bottom: 2.5rem; line-height: 1.6; }
.hero-cta { display: flex; gap: 1rem; }

/* ── 6. SECCIONES ── */
section { padding: 8rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label { font-family: 'Space Mono', monospace; font-size: 0.6rem; color: var(--teal); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: 3rem; margin-bottom: 2rem; }
.divider { width: 50px; height: 2px; background: var(--teal); margin-bottom: 3rem; }

/* ── 7. HISTORIA & SINOPSIS ── */
.sinopsis-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: start; }
.sinopsis-text p { font-size: 1.2rem; line-height: 1.8; margin-bottom: 1.5rem; font-weight: 300; }
.sinopsis-quote { border-left: 3px solid var(--teal); padding: 2rem; margin: 2rem 0; font-style: italic; background: rgba(var(--teal-rgb), 0.05); }
.tecnicas-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.tag { border: 1px solid var(--teal); color: var(--teal); font-family: 'Space Mono', monospace; font-size: 0.55rem; padding: 0.3rem 0.7rem; text-transform: uppercase; }

/* ── 8. NUEVOS ESTILOS DE OBRAS (Grid y Card con póster completo) ── */
.obras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.obra-card {
    background: var(--sombra);
    border: 1px solid rgba(var(--teal-rgb), 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.obra-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.obra-poster-container {
    width: 100%;
    aspect-ratio: 2 / 3; /* Proporción ideal para pósters */
    overflow: hidden;
    background: var(--gris);
}

.obra-poster-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Asegura que el póster no se corte */
}

.obra-info-block {
    padding: 1.5rem;
    background: var(--sombra); 
    border-top: 1px solid rgba(var(--teal-rgb), 0.1);
    flex-grow: 1;
}

/* En tema oscuro, el bloque de info resalta más con el fondo negro rústico */
[data-theme="dark"] .obra-info-block {
    background: var(--negro);
}

.obra-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.obra-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--crema);
    line-height: 1.2;
}

.obra-subtitle {
    font-size: 0.95rem;
    color: var(--crema-suave);
    font-weight: 300;
    line-height: 1.5;
}

/* ── 9. ESTILOS DE EQUIPO PÚBLICO ── */
.equipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.equipo-card-public {
    background: var(--sombra);
    padding: 2rem;
    border: 1px solid rgba(var(--teal-rgb), 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.equipo-card-public:hover {
    transform: translateY(-10px);
    border-color: var(--teal);
}

.equipo-foto-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--teal);
}

.equipo-foto-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.equipo-info-public { text-align: center; }

.equipo-rol-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.equipo-nombre-h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--crema);
}

.equipo-bio-p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--crema-suave);
    font-weight: 300;
}

/* ── 10. PRENSA Y GALERÍA ── */
.funciones-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

.funcion-card { background: var(--negro); padding: 2.5rem; border: 1px solid rgba(var(--teal-rgb), 0.1); transition: 0.3s; }
.funcion-card:hover { border-color: var(--teal); transform: translateY(-5px); }

.galeria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gal-item { aspect-ratio: 1; background: var(--gris); overflow: hidden; border-radius: 2px; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: 0.4s; }
.gal-item:hover img { opacity: 1; transform: scale(1.03); }

.prensa-item { border-bottom: 1px solid rgba(var(--teal-rgb), 0.1); padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; }
.prensa-medio { font-family: 'Space Mono', monospace; font-size: 0.6rem; color: var(--teal); width: 150px; text-transform: uppercase; }
.prensa-titulo { font-size: 1.1rem; flex: 1; }

/* ── 11. FOOTER ESTILIZADO ── */
footer {
  padding: 6rem 2rem 3rem;
  background: var(--negro);
  border-top: 1px solid rgba(var(--teal-rgb), 0.1);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
}

.footer-socials { list-style: none; }
.footer-socials li { margin-bottom: 0.8rem; }
.footer-socials a { text-decoration: none; color: var(--crema-suave); font-size: 0.9rem; transition: 0.3s; }
.footer-socials a:hover { color: var(--teal); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--teal-rgb), 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--crema-suave);
}

.footer-credits { display: flex; align-items: center; gap: 1rem; }
.separator { opacity: 0.3; color: var(--teal); }
.my-name { color: var(--teal); font-weight: 700; letter-spacing: 0.1em; }

/* ── 12. ANIMACIONES ── */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── 13. RESPONSIVE DESIGN ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .nav-links { display: flex; width: 100%; justify-content: center; gap: 1rem; border-top: 1px solid rgba(var(--teal-rgb), 0.1); padding-top: 0.8rem; order: 3; }
  .nav-links a { font-size: 0.55rem; }

  .hero-title { font-size: 3.2rem; }
  .hero-cta { flex-direction: column; width: 100%; }
  
  section { padding: 4rem 1.5rem; }
  .section-title { font-size: 2.2rem; }
  .sinopsis-layout, .funciones-grid, .obras-grid, .equipo-grid { grid-template-columns: 1fr; }

  .footer-inner, .footer-bottom { flex-direction: column; text-align: center; gap: 2rem; }
  .footer-credits { flex-direction: column; gap: 0.5rem; }
  .separator { display: none; }
}