/* ==============================
   LOADER OVERRIDES
   ============================== */
.tm-loader { position: fixed; inset: 0; z-index: 9999; background: #000; display: flex; align-items: center; justify-content: center; }
.tm-loader__inner { width: 100%; display: flex; justify-content: center; }
.tm-loader__logo { width: 60vw !important; max-width: 800px !important; min-width: 320px !important; height: auto; }
.tm-loader__logo svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ==============================
   THEATRE BACKDROP
   ============================== */
.theatre-backdrop-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; background: #000; }
.theatre-backdrop-container::after { content: ""; position: absolute; inset: 0; background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.04) 0%, rgba(0,0,0,0.08) 45%, rgba(0,0,0,0.25) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.22) 60%, rgba(0,0,0,0.3) 100%);
    z-index: 3; }
.theatre-backdrop-canvas { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; z-index: 1; }
.theatre-backdrop-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; z-index: 0; opacity: 0; }
.tm-black-backdrop { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 55%, rgba(0,0,0,0) 100%); opacity: 0; transition: opacity 0.6s ease; z-index: 2; }

/* ==============================
   ATMOSPHERE
   ============================== */
.atmosphere-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.smoke-layer { position: fixed; bottom: 0; left: 0; right: 0; height: 40vh; pointer-events: none; z-index: 5; overflow: hidden; }

/* Spotlights */
.spotlight { position: absolute; top: -20%; width: 150px; height: 80vh; background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 80%); filter: blur(20px); opacity: 0.3; transform-origin: top center; }
.spotlight-left { left: 25%; animation: tm-sway-left 8s ease-in-out infinite alternate; }
.spotlight-right { right: 25%; animation: tm-sway-right 9s ease-in-out infinite alternate-reverse; }
@keyframes tm-sway-left { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes tm-sway-right { from { transform: rotate(5deg); } to { transform: rotate(-5deg); } }

/* Light Beams */
.stage-light-beam { position: absolute; top: -10%; background: linear-gradient(180deg, rgba(241, 213, 138, 0.3) 0%, transparent 70%); filter: blur(15px); transform-origin: top center; }
.beam-left { left: 10%; width: 200px; height: 70vh; transform: rotate(-15deg); opacity: 0.2; }
.beam-right { right: 10%; width: 200px; height: 70vh; transform: rotate(15deg); opacity: 0.2; }
.beam-center { left: 40%; width: 150px; height: 60vh; opacity: 0.15; }

/* Glows & Smoke */
.ambient-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.glow-purple-1 { top: 20%; left: 5%; width: 400px; height: 400px; background: rgba(147, 51, 234, 0.3); }
.glow-blue { top: 40%; right: 5%; width: 350px; height: 350px; background: rgba(59, 130, 246, 0.3); }
.glow-gold { top: 60%; left: 20%; width: 300px; height: 300px; background: rgba(251, 191, 36, 0.2); }

.smoke { position: absolute; background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%); filter: blur(20px); border-radius: 50%; opacity: 0; animation: tm-smoke-rise 8s linear infinite; }
.smoke-column-0 { left: 5%; width: 120px; height: 120px; animation-delay: 0s; }
.smoke-column-1 { left: 20%; width: 160px; height: 160px; animation-delay: 1.5s; }
.smoke-column-2 { left: 40%; width: 100px; height: 100px; animation-delay: 3s; }
.smoke-column-3 { left: 60%; width: 140px; height: 140px; animation-delay: 0.5s; }
.smoke-column-4 { left: 80%; width: 180px; height: 180px; animation-delay: 2s; }
.smoke-column-5 { left: 95%; width: 90px; height: 90px; animation-delay: 4s; }
@keyframes tm-smoke-rise { 0% { transform: translateY(50px) scale(0.8); opacity: 0; } 20% { opacity: 0.3; } 80% { opacity: 0.1; } 100% { transform: translateY(-200px) scale(1.5); opacity: 0; } }

/* ==============================
   SECTIONS & LAYOUT
   ============================== */
.tm-main { position: relative; width: 100%; overflow: hidden; }
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    font-family: "Cinzel Decorative", serif;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.tm-section { position: relative; width: 100%; min-height: 100vh; padding: 6rem 1rem; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; }
@supports (height: 100svh) {
  .tm-section { min-height: 100svh; }
  .hero-content { height: 100svh; }
}

.hero-section { z-index: 10; }
.video-section { z-index: 20; }
.gallery-section { z-index: 30; position: relative; overflow: hidden; }
.youtube-section { z-index: 40; }
.cartelera-section { z-index: 45; }
.contacto-section { z-index: 50; }

/* NAV */
.tm-nav {
    position: fixed; top: 2rem; width: 100%; z-index: 9999;
    display: flex; justify-content: center; pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
}
/* Cuando hay barra de administración de WP (usuario logueado), bajar el menú para que no se solape */
body.admin-bar .tm-nav { top: calc(32px + 2rem); }
@media screen and (max-width: 782px) {
    body.admin-bar .tm-nav { top: calc(46px + 1rem); }
}
.tm-nav.hidden-until-open { transform: translateY(-100%); opacity: 0; }
.tm-nav.visible { transform: translateY(0); opacity: 1; }
.tm-nav__inner {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(241, 213, 138, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 999px;
    padding: 0.75rem 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}
/* Sin puntitos ni separadores entre ítems del menú (items_wrap deja li directos dentro del div) */
.tm-nav__inner ul,
.tm-nav__inner > li {
    list-style: none !important;
    list-style-type: none !important;
}
.tm-nav__inner ul li::before,
.tm-nav__inner ul li::after,
.tm-nav__inner > li::before,
.tm-nav__inner > li::after,
.tm-nav__inner a::before,
.tm-nav__inner a::after {
    content: none !important;
    display: none !important;
}
.tm-nav__link { 
    color: #F1D58A; text-decoration: none; font-family: "Cinzel Decorative", serif; 
    font-size: 0.75rem; letter-spacing: 0.2em; font-weight: 400;
    background: none; border: none; padding: 0; cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.tm-nav__link:hover { color: #fff; text-shadow: 0 0 10px rgba(241, 213, 138, 0.6); }

@media (max-width: 768px) {
  .tm-nav { top: 1rem; width: 100%; left: 0; transform: none; justify-content: center; padding: 0 1rem; box-sizing: border-box; }
  .tm-nav__inner {
    padding: 0.75rem 1rem;
    gap: 0.5rem 1rem;
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.75);
  }
  .tm-nav__link { 
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .tm-nav__inner { padding: 0.6rem; gap: 0.5rem 0.8rem; }
  .tm-nav__link { font-size: 0.7rem; }
}

/* HERO CONTENT */
.hero-content { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding-bottom: 0; position: relative; z-index: 10; opacity: 0; transition: opacity 1s ease-out; }
.stage-mago { position: relative; z-index: 2; margin-bottom: 0; transform: translateY(-7vh); }
.stage-mago-img { 
    max-height: 50vh; 
    width: auto; 
    filter: drop-shadow(0 0 30px rgba(0,0,0,0.6));
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}
.stage-smoke { position: absolute; bottom: 0; left: 0; right: 0; height: 300px; z-index: 3; pointer-events: none; }

.stage-ui { position: relative; z-index: 20; text-align: center; margin-top: -6rem; transform: translateY(0); }
.stage-title-main { font-family: "Great Vibes", cursive; font-size: clamp(4rem, 10vw, 8rem); color: #F1D58A; text-shadow: 0 0 30px rgba(241, 213, 138, 0.6), 0 0 10px rgba(0,0,0,0.8); margin: 0; line-height: 1; font-weight: 400; }
.stage-title-sub { font-family: "Cinzel", serif; font-size: clamp(1rem, 2.5vw, 1.5rem); letter-spacing: 0.4em; text-transform: uppercase; color: rgba(241, 213, 138, 0.9); margin-top: 1.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
@media (max-width: 480px) {
  .stage-title-main { font-size: clamp(2.5rem, 12vw, 4rem); }
  .stage-title-sub { letter-spacing: 0.2em; font-size: 0.85rem; margin-top: 1rem; }
  .tm-title { font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: 0.12em; }
  .contacto-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
}

/* TITLES */
.tm-title { font-family: "Cinzel Decorative", serif; font-weight: 400; font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 3rem; text-align: center; text-transform: uppercase; letter-spacing: 0.18em; color: #F1D58A; text-shadow: 0 0 20px rgba(241, 213, 138, 0.3); }
.text-gold { color: var(--tm-gold); background: linear-gradient(to bottom, #F1D58A 0%, #D4AF37 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* VIDEO RESUMEN */
.video-section { z-index: 20; display: flex; flex-direction: column; align-items: center; }
.video-container { width: min(90%, 1100px); aspect-ratio: 16/9; border: 3px solid rgba(241, 213, 138, 0.6); box-shadow: 0 0 0 10px rgba(0,0,0,0.8), 0 0 0 12px rgba(241, 213, 138, 0.3), 0 30px 60px rgba(0,0,0,0.7); border-radius: 4px; overflow: hidden; background: #000; position: relative; }
.tm-video-cover { width: 100%; height: 100%; object-fit: cover; }

/* FLOATING BACKGROUND ELEMENTS */
.gallery-float-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.gallery-float { position: absolute; opacity: 0.8; filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6)); transition: transform 0.1s linear; }
.float-left-1 { top: 5%; left: -5%; width: 15vw; min-width: 150px; transform: rotate(-15deg); }
.float-left-2 { bottom: 10%; left: 2%; width: 8vw; min-width: 80px; transform: rotate(10deg); }
.float-right-1 { top: 0%; right: -5%; width: 20vw; min-width: 200px; transform: rotate(10deg); }
.float-right-2 { bottom: 20%; right: -2%; width: 10vw; min-width: 100px; transform: rotate(-5deg); }

/* GALERÍA (Grid estilo React) */
#galeria .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: min(100%, 1400px);
    margin: 0 auto;
}
@media (max-width: 640px) { #galeria .gallery-grid { grid-template-columns: 1fr; gap: 0.75rem; } }
@media (min-width: 640px) { #galeria .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 768px) { #galeria .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { #galeria .gallery-grid { grid-template-columns: repeat(5, 1fr); gap: 1rem; } }

#galeria .gallery-panel-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(241,213,138,0.2);
    background: rgba(0,0,0,0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
#galeria .gallery-panel-item img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    display: block;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}
#galeria .gallery-panel-item:hover { border-color: rgba(241,213,138,0.4); }
#galeria .gallery-panel-item:hover img { opacity: 1; }
#galeria .gallery-card-overlay p {
    font-family: "Cinzel", serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: rgba(241,213,138,0.9);
}

/* YOUTUBE GRID */
.youtube-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; width: min(100%, 1200px); margin: 0 auto; padding: 0 1rem; }
@media (max-width: 640px) { .youtube-grid { grid-template-columns: 1fr; gap: 1rem; padding: 0 0.5rem; } }
.youtube-card { aspect-ratio: 16/9; border-radius: 20px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,0.1); background: rgba(0, 0, 0, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.4); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.youtube-card:hover { transform: translateY(-10px); box-shadow: 0 30px 60px rgba(0,0,0,0.6); border-color: rgba(241, 213, 138, 0.4); }
.youtube-card iframe { width: 100%; height: 100%; }
.youtube-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(20,20,20,0.9) 100%);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem;
    box-sizing: border-box;
}
.youtube-placeholder h3 {
    font-family: "Cinzel Decorative", serif; color: #fff; font-size: 1.1rem; margin: 0 0 0.3rem 0; text-transform: uppercase; letter-spacing: 0.1em;
}
.youtube-placeholder p {
    font-family: "Roboto", sans-serif; color: #F1D58A; font-size: 0.8rem; margin: 0; opacity: 0.8;
}

/* CARTELERA */
#cartelera .cartelera-carousel-wrapper { width: 100%; max-width: 1400px; margin: 0 auto; }
#cartelera .cartelera-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (max-width: 640px) { #cartelera .cartelera-group { grid-template-columns: 1fr; gap: 0.75rem; } }
@media (min-width: 640px) { #cartelera .cartelera-group { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 768px) { #cartelera .cartelera-group { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { #cartelera .cartelera-group { grid-template-columns: repeat(5, 1fr); gap: 1rem; } }

#cartelera .cartelera-group img.cartel-item {
    width: 100% !important; aspect-ratio: 1 / 1; object-fit: contain; padding: 0.5rem;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(241,213,138,0.2); border-radius: 12px;
    transition: border-color 0.3s ease, opacity 0.3s ease; opacity: 0.95;
}
#cartelera .cartelera-group img.cartel-item:hover { border-color: rgba(241,213,138,0.4); opacity: 1; }

/* CONTACTO */
.contacto-section { 
    position: relative; overflow: hidden; height: 100vh; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
}
.contacto-section::before, .contacto-section::after { content: none; }
.contacto-content, .contacto-lights { position: relative; z-index: 2; }
.contacto-content { text-align: center; max-width: 620px; margin: 0 auto; width: 100%; box-sizing: border-box; padding: 0 1rem; }
.contacto-title { font-family: "Cinzel Decorative", serif; font-weight: 300; font-size: clamp(2rem, 5vw, 3rem); color: #fff; margin-bottom: 1rem; letter-spacing: 0.08em; }
.contacto-subtitle { color: #9ca3af; font-size: 1rem; margin-bottom: 2.5rem; }
.contacto-social { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 2.5rem; margin-bottom: 2.5rem; width: 100%; }
.contacto-icon { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; flex: 0 0 auto; min-width: 100px; }
.contacto-icon-box { width: 64px; height: 64px; border-radius: 12px; background: rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.contacto-icon:hover .contacto-icon-box { transform: scale(1.1); }
.icon-whatsapp { width: 28px; height: 28px; color: #22c55e; }
.icon-email { width: 24px; height: 24px; color: #f87171; }
.icon-instagram { width: 28px; height: 28px; color: #c084fc; }
.contacto-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; font-family: "Cinzel Decorative", serif; padding: 0.2rem 0.6rem; border-radius: 6px; background: rgba(0,0,0,0.6); }
.contacto-label.whatsapp { color: #22c55e; border: 1px solid rgba(34,197,94,0.4); }
.contacto-label.email { color: #f87171; border: 1px solid rgba(248,113,113,0.4); }
.contacto-label.instagram { color: #c084fc; border: 1px solid rgba(192,132,252,0.4); }
.contacto-email { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #F1D58A; background: rgba(0,0,0,0.8); border: 1px solid rgba(241,213,138,0.5); padding: 0.5rem 1rem; border-radius: 12px; margin-top: 1.5rem; }
.contacto-email-text { font-size: 1rem; }
.contacto-lights { position: absolute; bottom: 80px; left: 0; right: 0; display: flex; justify-content: center; gap: 2.5rem; }
.contacto-lights span { width: 8px; height: 8px; border-radius: 50%; background: rgba(241,213,138,0.4); filter: blur(2px); animation: tm-pulse 2s infinite; }
.contacto-lights span:nth-child(2){ animation-delay: .2s; }
.contacto-lights span:nth-child(3){ animation-delay: .4s; }
.contacto-lights span:nth-child(4){ animation-delay: .6s; }
.contacto-lights span:nth-child(5){ animation-delay: .8s; }
@keyframes tm-pulse { 0%,100%{opacity:.2} 50%{opacity:1} }

/* LIGHTBOX */
.tm-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.tm-lightbox.open { opacity: 1; pointer-events: auto; }
.tm-lightbox__inner { width: min(92vw, 1100px); color: #F1D58A; font-family: "Cinzel Decorative", serif; }
.tm-lightbox__frame { position: relative; background: rgba(0,0,0,0.4); border: 1px solid rgba(241,213,138,0.25); border-radius: 12px; overflow: hidden; }
.tm-lightbox__frame img { width: 100%; max-height: 80vh; object-fit: contain; display: block; }
.lightbox-close { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.6); border: 1px solid rgba(241,213,138,0.4); color: #F1D58A; letter-spacing: 0.2em; font-size: 0.75rem; padding: 0.35rem 0.6rem; border-radius: 999px; cursor: pointer; font-family: "Cinzel Decorative", serif; }
.tm-lightbox__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; font-size: 0.8rem; letter-spacing: 0.2em; font-family: "Cinzel Decorative", serif; }
.tm-lightbox__nav button { background: none; border: none; color: #F1D58A; cursor: pointer; font-family: "Cinzel Decorative", serif; letter-spacing: 0.2em; font-size: 0.75rem; }
.tm-lightbox__hint { margin-top: 0.5rem; font-size: 0.7rem; color: rgba(241,213,138,0.6); letter-spacing: 0.18em; }

/* SCROLL INDICATOR */
.scroll-indicator { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; opacity: 1; z-index: 1; pointer-events: none; mix-blend-mode: normal; width: 100%; }
.scroll-text { font-family: "Cinzel Decorative", serif; font-size: 0.9rem; letter-spacing: 0.2em; font-weight: 700; background: linear-gradient(180deg, #FFFFFF 0%, #F1D58A 40%, #D4AF37 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8)); text-transform: uppercase; white-space: nowrap; animation: tm-bounce-text 1.5s infinite; }
.scroll-arrow { width: 15px; height: 15px; border-right: 3px solid #F1D58A; border-bottom: 3px solid #F1D58A; transform: rotate(45deg); animation: tm-bounce 1.5s infinite; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8)); }
@keyframes tm-bounce { 0%, 100% { transform: rotate(45deg) translate(0, 0); } 50% { transform: rotate(45deg) translate(5px, 5px); } }
@keyframes tm-bounce-text { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Responsive General */
@media (max-width: 1024px) {
    #galeria .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .youtube-grid { grid-template-columns: 1fr; }
    #cartelera .cartelera-group { gap: 1.5rem; }
}
@media (max-width: 768px) {
    #cartelera .cartelera-group img { width: 80% !important; }
    .tm-nav__inner { padding: 0.5rem 1rem; gap: 1rem; font-size: 0.7rem; }
    .hero-content { padding-bottom: 0; justify-content: center; }
    .stage-title-main { font-size: clamp(3rem, 15vw, 5rem); }
    .stage-mago-img { max-height: 45vh; } 
    .stage-mago { transform: translateY(-4vh); }
    .theatre-backdrop-canvas { object-position: center 20%; }
    #galeria .gallery-grid { grid-template-columns: 1fr; }
    .scroll-text { font-size: 0.7rem; letter-spacing: 0.15em; }
}

/* =========================================
   FOOTER (3 COLS)
   ========================================= */
.tm-footer {
    position: relative;
    width: 100%;
    background: #050505;
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 1rem 2rem;
    z-index: 100;
    border-top: 1px solid rgba(241, 213, 138, 0.15);
}
.tm-footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.tm-footer__col {
    flex: 1;
    display: flex;
    justify-content: center;
}
.tm-footer__col--left { justify-content: flex-start; }
.tm-footer__col--center { justify-content: center; }
.tm-footer__col--right { justify-content: flex-end; text-align: right; }

/* KIT DIGITAL: texto + logos */
.tm-footer__kit-digital {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}
.tm-footer__kit-digital-text {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #ffffff !important;
    letter-spacing: 0.02em;
    line-height: 1.3;
    display: block;
}
#site-footer.tm-footer .tm-footer__kit-digital-text,
.tm-footer .tm-footer__kit-digital-text {
    color: #ffffff !important;
}

/* LOGOS */
.tm-footer__logos {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.tm-footer__logos .logo-kit { height: 40px; width: auto; filter: invert(1) brightness(200%); } 
.tm-footer__logos .logo-xyz { height: 30px; width: auto; opacity: 0.8; }

/* LEGALES */
.tm-footer__legal {
    font-family: "Cinzel Decorative", serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.tm-footer__legal a { color: inherit; text-decoration: none; transition: color 0.3s; }
.tm-footer__legal a:hover { color: #F1D58A; }
.tm-footer__legal .sep { opacity: 0.3; }
.tm-footer__copyright { margin-top: 0.75rem; font-size: 0.65rem; color: rgba(255,255,255,0.4); }

/* CONTACTO (New) */
.tm-footer__contact {
    font-family: "Cinzel Decorative", serif;
    font-size: 0.85rem;
    color: #F1D58A;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.tm-footer__contact p { margin: 0; }
.tm-footer__contact a { color: inherit; text-decoration: none; transition: opacity 0.3s; }
.tm-footer__contact a:hover { opacity: 0.8; }

/* RESPONSIVE FOOTER */
@media (max-width: 900px) {
    .tm-footer__inner { flex-direction: column; text-align: center; gap: 2rem; }
    .tm-footer__col { width: 100%; justify-content: center !important; text-align: center !important; }
    .tm-footer__col--left { order: 2; } 
    .tm-footer__col--center { order: 3; } 
    .tm-footer__col--right { order: 1; margin-bottom: 1rem; } 
    
    .tm-footer__kit-digital { align-items: center; }
    .tm-footer__kit-digital-text { text-align: center; }
    .tm-footer__logos { justify-content: center; }
    .tm-footer__legal { flex-direction: column; gap: 0.5rem; }
    .tm-footer__legal .sep { display: none; }
    .tm-footer__contact { align-items: center; }
}


/* BLOG: fondo específico */
body.blog .theatre-backdrop-container {
  background: url('/wp-content/themes/teatro-magnifico-theme/assets/img/bg%20mago%202.png') center / cover no-repeat fixed !important;
}
body.blog .theatre-backdrop-img {
  opacity: 0 !important;
}

/* Oculta indicador de scroll fuera de Home */
body:not(.front-page) .scroll-indicator {
  display: none !important;
}

/* BLOG: fuerza fondo y apaga telón/canvas */
body.blog .theatre-backdrop-container {
  background: url('/wp-content/themes/teatro-magnifico-theme/assets/img/bg-mago-2.png') center / cover no-repeat fixed !important;
}
body.blog .theatre-backdrop-img,
body.blog .theatre-backdrop-canvas {
  opacity: 0 !important;
}

/* BLOG: quitar velo negro y mostrar fondo completo */
body.blog .tm-black-backdrop { opacity: 0 !important; }

/* BLOG: ajustar fondo a 100% ancho/alto */
body.blog .theatre-backdrop-container {
  background-size: 100% 100% !important;
}

/* BLOG: encuadre para que se vean cartas */
body.blog .theatre-backdrop-container {
  background-size: contain !important;
  background-position: left bottom !important;
  background-repeat: no-repeat !important;
  background-color: #000 !important;
}

/* Blog: títulos menos anchos */
.blog .section-title,
.single-post .section-title,
.blog h1,
.single-post h1 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Móvil: evitar deformación del fondo */
@media (max-width: 768px) {
  body.blog .theatre-backdrop-container,
  body.single-post .theatre-backdrop-container {
    background-size: cover !important;
    background-position: center top !important;
  }
  .blog h1,
  .single-post h1 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    letter-spacing: 0.02em;
  }
}

/* GALERÍA: flotes más a los bordes */
#galeria .gallery-float-layer { overflow: hidden; }
#galeria .float-left-1 { left: -12%; top: 2%; }
#galeria .float-left-2 { left: -8%; bottom: 6%; }
#galeria .float-right-1 { right: -12%; top: -2%; }
#galeria .float-right-2 { right: -8%; bottom: 8%; }

/* GALERÍA: grid 2 columnas en móvil */
@media (max-width: 640px) {
  #galeria .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.6rem; }
  #galeria .gallery-panel-item { aspect-ratio: 1 / 1; }
}

/* GALERÍA móvil: mosaico tipo masonry */
@media (max-width: 640px) {
  #galeria .gallery-grid {
    display: block !important;
    column-count: 2;
    column-gap: 0.6rem;
  }
  #galeria .gallery-panel-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 0.6rem 0;
    break-inside: avoid;
    aspect-ratio: auto;
  }
  #galeria .gallery-panel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    padding: 0;
  }
}

/* Móvil: evitar corte de títulos */
@media (max-width: 640px) {
  .tm-title,
  .blog h1,
  .single-post h1,
  .page h1 {
    padding: 0 1rem;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: center;
    letter-spacing: 0.06em;
  }
}

/* CARTELERA móvil: mosaico 1 columna (irregular) */
@media (max-width: 640px) {
  #cartelera .cartelera-group {
    display: block !important;
  }
  #cartelera .cartelera-group img.cartel-item {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 0 0.75rem 0;
  }
}

/* Footer: logo XYZ más grande en móvil */
@media (max-width: 640px) {
  .tm-footer__logos .logo-xyz { height: 45px; }
}

/* Loader: animación fallback */
.tm-loader__logo .loader-svg {
  animation: none !important;
}
@keyframes tmLoaderPulse {
  0% { transform: scale(0.98); opacity: 0.7; }
  50% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(0.98); opacity: 0.7; }
}

/* Títulos móviles más pequeños si no caben */
@media (max-width: 640px) {
  .tm-title {
    font-size: clamp(1.4rem, 6vw, 2.1rem);
    letter-spacing: 0.04em;
  }
}

/* CARTELERA móvil: ajustar a tamaño real de imagen */
@media (max-width: 640px) {
  #cartelera .cartelera-group img.cartel-item {
    aspect-ratio: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
    background: transparent !important;
  }
}

/* Títulos siempre centrados */
.tm-title,
.blog h1,
.single-post h1,
.page h1,
.entry-title {
  text-align: center !important;
}

/* Títulos centrados siempre (H1/H2/H3) */
.tm-section h1,
.tm-section h2,
.tm-section h3,
.tm-title,
.entry-title,
.page h1,
.blog h1,
.single-post h1 {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* Contenido con margen lateral para evitar cortes */
.tm-section .section-content,
.tm-section .legal-content,
.tm-section .content,
.page .entry-content,
.single-post .entry-content,
.blog .entry-content {
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  box-sizing: border-box;
}

/* Móvil: tipografía y espaciado legal/textos */
@media (max-width: 640px) {
  .page .entry-content,
  .single-post .entry-content,
  .blog .entry-content,
  .tm-section .section-content {
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }
  .page .entry-content h2,
  .page .entry-content h3 {
    margin-top: 1.6rem;
  }
}

/* Legales: centrar bloque y títulos */
.page .entry-content,
.single-post .entry-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.page .entry-content h1,
.page .entry-content h2,
.page .entry-content h3 {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* Páginas legales (plantilla genérica) centradas SIEMPRE */
.generic-page-section {
  align-items: center !important;
}
.generic-page-section .section-header {
  width: 100%;
  text-align: center !important;
}
.generic-page-section .tm-title {
  text-align: center !important;
}
.generic-page-section .content-container {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.6rem !important;
  padding-right: 1.6rem !important;
  max-width: 720px !important;
}

/* Legal: contenedor (padding/alineación se sobreescriben desde Layouts en wp-admin) */
.generic-page-section .content-container {
  max-width: 680px !important;
  margin: 0 auto !important;
  padding: 0 1.6rem !important;
  text-align: center !important;
  color: #ddd;
  line-height: 1.6;
}
.generic-page-section .content-container ul,
.generic-page-section .content-container ol {
  margin: 0 auto !important;
  padding-left: 1.2rem !important;
  text-align: left !important;
}

/* Forzar contenedor legal sin width 100% */
.generic-page-section .content-container {
  width: auto !important;
}

/* Loader solo en Home */
body:not(.home):not(.front-page) .tm-loader { display: none !important; }
