/* =========================================
   MENTAL REVOLUTION FILMS - ESTILOS PRINCIPALES
   ========================================= */

/* === 1. VARIABLES Y CONFIGURACIÓN BASE === */
:root {
  --bg-dark: #0a0a0a;       /* Fondo oscuro cinematográfico */
  --bg-card: #141414;       /* Fondo para las tarjetas */
  --text-main: #f0f0f0;     /* Texto principal claro */
  --text-muted: #888888;    /* Texto secundario gris */
  --header-bg: #fdfdfd;     /* Fondo de la cabecera clara */
  --header-border: #e0e0e0; /* Borde sutil de la cabecera */
}

* { box-sizing: border-box; }

html, body {
  margin: 0; 
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Inter", -apple-system, system-ui, sans-serif;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* === 2. CABECERA Y NAVEGACIÓN === */
header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky; 
  top: 0; 
  z-index: 1000;
}

.head {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  max-width: 1400px; 
  margin: auto; 
  padding: 15px 24px;
}

.logo img { 
  height: 85px; 
  width: auto; 
  filter: grayscale(100%); 
}

.social { display: flex; gap: 10px; }
.pill {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid #ccc; border-radius: 50%; color: #333;
  font-size: 0.8rem; font-weight: 600; transition: 0.3s;
}
.pill:hover { background: #333; color: #fff; }


/* === 3. LAYOUT PRINCIPAL (ESTILO YOUTUBE 70/30) === */
.main-layout {
  max-width: 1400px; 
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2.5fr 1fr; /* Proporción 70% izquierda, 30% derecha */
  gap: 30px;
  align-items: start; 
}


/* === 4. LADO IZQUIERDO: REPRODUCTOR === */
.hero-viewer {
  width: 100%;
}

.media {
  background: #000; 
  aspect-ratio: 16/9; 
  position: relative;
  border-radius: 12px; 
  overflow: hidden;
  border: 1px solid #222;
  box-shadow: 0 0 70px rgba(255, 255, 255, 0.07); /* Resplandor ambiental */
}

.media iframe { 
  width: 100%; height: 100%; 
  position: absolute; top: 0; left: 0; border: 0; 
}

/* Estado Vacío del Reproductor (Cuando no hay video) */
.player-placeholder {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: #080808; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}

.player-placeholder img.bg-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.2; filter: blur(6px);
}

.player-placeholder .content {
  position: relative; z-index: 2; padding: 20px;
}

/* Textos debajo del video */
.hero-info { margin-top: 25px; text-align: left; }
.eyebrow { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.title { 
  margin: 10px 0 25px; 
  font-size: clamp(1.8rem, 4vw, 2.5rem); 
  font-weight: 300; letter-spacing: -0.5px; 
  font-family: 'Playfair Display', serif; /* Tipografía cinematográfica */
}

/* Botones y Enlaces */
.links { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; }

.btn {
  font-size: 0.85rem; padding: 10px 18px; 
  background: #181818; color: #cfcfcf;
  border: 1px solid #2a2a2a; border-radius: 8px; 
  font-weight: 500; letter-spacing: 0.5px;
  transition: all 0.2s ease; cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}

.btn:hover { 
  background: #2a2a2a; color: #ffffff; 
  border-color: #555555; 
  transform: translateY(-2px); 
}

/* Botón Primario (Resaltado) */
.btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
.btn-primary:hover {
  background: #cccccc;
  color: #000000;
  border-color: #cccccc;
}


/* === 5. LADO DERECHO: GALERÍA LATERAL === */
.sidebar-gallery {
  background: var(--bg-card);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  position: sticky; /* Congela el panel al hacer scroll */
  top: 130px; 
  max-height: calc(100vh - 160px); 
  overflow-y: auto; 
}

/* Scrollbar personalizado para el panel */
.sidebar-gallery::-webkit-scrollbar { width: 6px; }
.sidebar-gallery::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }

.gallery-title { 
  font-size: 0.85rem; color: var(--text-muted); letter-spacing: 2px; 
  text-transform: uppercase; margin-bottom: 20px; 
  border-bottom: 1px solid #222; padding-bottom: 15px;
}

.gallery-grid {
  display: grid; 
  grid-template-columns: 1fr; /* Lista de 1 columna */
  gap: 15px;
}

/* Tarjetas individuales */
.card {
  background: var(--bg-card); border: 1px solid #1a1a1a;
  border-radius: 8px; cursor: pointer;
  text-align: center; transition: all 0.3s ease;
  padding: 0; overflow: hidden;
}

.card:hover { transform: translateY(-5px); border-color: #444; background: #1c1c1c; }
.card[aria-current="true"] { border-color: #666; background: #222; }

/* Contenedor y efecto de imagen (Ken Burns) */
.card-img-wrapper {
  overflow: hidden;
  border-bottom: 1px solid #1a1a1a;
}

.card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-img {
  transform: scale(1.08); /* Zoom al pasar el mouse */
}

/* Imagen de reemplazo (Logo semitransparente) */
.fallback-thumb {
  width: 100%; height: 130px; display: flex;
  align-items: center; justify-content: center;
  background: #0f0f0f; border-bottom: 1px solid #1a1a1a;
}
.fallback-thumb img { height: 45px; opacity: 0.15; }

.card-content { padding: 12px 15px; }
.card-cat { font-size: 0.65rem; color: #666; letter-spacing: 1px; text-transform: uppercase; }
.card-title { 
  font-size: 1.05rem; margin: 5px 0 0; font-weight: 400; color: #ddd; 
  font-family: 'Playfair Display', serif; /* Tipografía cinematográfica */
}


/* === 6. FOOTER === */
.foot { 
  margin-top: 60px; padding: 40px 0; border-top: 1px solid #222; 
  color: #666; text-align: center; font-size: 0.85rem; background: #050505;
}
.foot a { margin: 0 10px; transition: color 0.3s; }
.foot a:hover { color: #aaa; }


/* === 7. DISEÑO RESPONSIVO (CELULARES Y TABLETS) === */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr; /* Colapsa a 1 columna */
  }
  .sidebar-gallery {
    position: relative; /* Quita el modo congelado */
    top: 0; max-height: none; overflow-y: visible;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  }
  .card-img, .fallback-thumb {
    height: 160px; /* Hace las miniaturas más altas en móviles */
  }
}