/* ============================================================
   Mali Producción Audiovisual — hoja de estilos única
   HTML5 + CSS3 puro (sin Bootstrap, sin .NET)
   ============================================================ */

:root {
  --dorado: #d4af37;
  --dorado-claro: #f1d27a;
  --negro: #0f172a;
  --negro2: #1e293b;
  --texto-claro: #f8f9fa;
  --font-titulo: 'Playfair Display', serif;
  --font-cuerpo: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-cuerpo);
  background: #000;
  color: var(--texto-claro);
}

img, video { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(15, 23, 42, 0.55);
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
}

.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.92);
  box-shadow: 0 2px 14px rgba(0,0,0,.5);
  padding: 8px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-mali {
  font-family: var(--font-titulo);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--dorado);
}

.logo-eventos {
  font-family: var(--font-cuerpo);
  font-size: .78rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fff;
  margin-top: 2px;
}

.logo-text:hover .logo-mali { color: var(--dorado-claro); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px; background: #fff; display: block;
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links a {
  font-size: .92rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--dorado-claro);
  transition: width .3s ease;
}
.nav-links a:hover::after { width: 100%; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(0,0,0,0.96);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 16px 0; }
  .logo-mali { font-size: 1.55rem; }
  .logo-eventos { font-size: .65rem; letter-spacing: 3px; }
}

/* ===== BOTONES FLOTANTES ===== */
.float-btn {
  position: fixed;
  right: 20px;
  width: 58px; height: 58px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  transition: transform .3s;
}
.float-btn img { width: 100%; height: 100%; object-fit: cover; }
.float-btn:hover { transform: scale(1.1); }
.float-btn.instagram { bottom: 20px; }
.float-btn.whatsapp { bottom: 90px; }

/* ===== HERO ===== */
.hero-video {
  width: 100%;
  height: 100vh;
  position: relative;
  background: #000;
}
.hero-video video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.55));
  padding: 0 20px;
}
.hero-caption h1 {
  font-family: var(--font-titulo);
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: #fff;
  margin: 0 0 10px;
}
.hero-caption p {
  font-size: 1.1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dorado-claro);
}
.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1.6rem;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,10px);} }

/* ===== SECCIONES GENERALES ===== */
section { position: relative; }

.section-pad { padding: 90px 0; }

h2.section-title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 50px;
  font-family: var(--font-cuerpo);
  background: linear-gradient(45deg, #ff6a95, #ffde7d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(.6);
  z-index: 0;
}

.rel { position: relative; z-index: 1; }

.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}
.split-row.reverse .split-img { order: -1; }
@media (max-width: 800px) {
  .split-row { grid-template-columns: 1fr; }
  .split-row.reverse .split-img { order: 0; }
}
.split-text h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.split-text p { line-height: 1.65; color: #eee; }

.section-img {
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .5s ease, transform .3s ease;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: top;
}
.section-img.loaded { opacity: 1; }
.section-img:hover { transform: scale(1.03); }

/* ===== BOTONES ACCIÓN (fotos / trailer / exteriores) ===== */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.btn-fiestas {
  width: 170px; height: 170px;
  background: linear-gradient(145deg, var(--negro), var(--negro2));
  border: none;
  border-radius: 26px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
  font-size: .85rem;
  text-align: center;
  padding: 10px;
}
.btn-fiestas svg { width: 40px; height: 40px; fill: var(--dorado-claro); }
.btn-fiestas:hover {
  transform: translateY(-8px) scale(1.04);
  background: linear-gradient(145deg, var(--negro2), #334155);
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}

/* ===== QUIENES SOMOS ===== */
#quienessomos { min-height: 100vh; background: #000; display: flex; align-items: center; }
#quienessomos .bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
#quienessomos .overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); z-index: 0; }
#quienessomos .container { position: relative; z-index: 1; padding: 90px 20px; }
#quienessomos p { line-height: 1.7; font-size: 1.05rem; }
.valores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  margin-top: 40px;
}
@media (max-width: 700px) { .valores { grid-template-columns: repeat(2, 1fr); } }
.valores span.icono { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.frase-destacada { text-align: center; font-style: italic; font-weight: 700; margin-top: 40px; }

/* ===== EMPRESARIAL / CONTACTO ===== */
#empresarial, #contacto {
  background: linear-gradient(135deg, rgba(25,25,50,.9), rgba(40,20,60,.9));
  padding: 80px 0;
}
#contacto form { max-width: 560px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: .9rem; letter-spacing: .5px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06); color: #fff; font-family: inherit; font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--dorado-claro); background: rgba(255,255,255,.1);
}
.btn-enviar {
  width: 100%; padding: 14px; border-radius: 8px; border: none;
  background: var(--dorado); color: #111; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; cursor: pointer; transition: background .25s;
}
.btn-enviar:hover { background: var(--dorado-claro); }
.btn-enviar:disabled { opacity: .6; cursor: not-allowed; }
.form-alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; text-align: center; display: none;
}
.form-alert.show { display: block; }
.form-alert.ok { background: rgba(46, 204, 113, .18); border: 1px solid #2ecc71; }
.form-alert.err { background: rgba(231, 76, 60, .18); border: 1px solid #e74c3c; }

/* ===== FOOTER ===== */
footer.site-footer {
  background: #111;
  text-align: center;
  padding: 22px 0;
  font-size: .9rem;
  letter-spacing: .5px;
}

/* ============================================================
   GALERÍAS (15 años / bodas / exteriores)
   ============================================================ */
.galeria-hero {
  min-height: 55vh;
  display: flex;
  align-items: center;
  padding: 130px 0 40px;
}
.badge-titulo {
  display: inline-block;
  padding: 16px 42px;
  border-radius: 60px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 15px 40px rgba(0,0,0,.6);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.carpetas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .carpetas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .carpetas-grid { grid-template-columns: 1fr; } }

.carpeta-card {
  position: relative;
  height: 380px;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 25px 60px rgba(0,0,0,.6);
  transition: transform .4s ease, box-shadow .4s ease;
  background-size: cover;
  background-position: center;
  background-color: #111;
}
.carpeta-card:hover { transform: scale(1.02); box-shadow: 0 35px 80px rgba(0,0,0,.8); }
.carpeta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.1));
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding-bottom: 30px; text-align: center;
}
.carpeta-overlay h3 { font-size: 1.5rem; letter-spacing: 2px; margin: 0 0 6px; }
.carpeta-overlay span { font-size: .82rem; letter-spacing: 3px; opacity: .85; }

.fotos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 10px;
}
@media (max-width: 900px) { .fotos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .fotos-grid { grid-template-columns: 1fr 1fr; } }

.foto-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,.4);
  aspect-ratio: 3/2;
  background: #111;
}
.foto-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transition: opacity .4s ease, transform .4s ease;
}
.foto-card img.loaded { opacity: 1; }
.foto-card:hover img { transform: scale(1.08); }
.foto-card.destacada { grid-column: span 2; aspect-ratio: 16/9; }
@media (max-width: 480px) { .foto-card.destacada { grid-column: span 2; } }

.hidden { display: none !important; }

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 30px;
  padding: 12px 30px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  background: transparent;
  color: #fff;
  transition: background .25s;
}
.btn-outline:hover { background: rgba(255,255,255,.12); }

.volver-wrap { text-align: center; margin-top: 55px; }

/* ===== TRAILERS ===== */
.trailer-page { min-height: 100vh; padding: 130px 0 80px; background: #000; }
.trailer-box { max-width: 900px; margin: 0 auto 70px; }
.trailer-title {
  font-size: 1.35rem; font-weight: 700; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 1px; text-align: center;
}
.video-wrapper {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 20px; overflow: hidden; background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.85);
}
.video-wrapper video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-poster {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3; background-size: cover; background-position: center;
}
.video-poster::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.play-btn {
  width: 66px; height: 66px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center; position: relative; z-index: 4;
  transition: background .2s;
}
.play-btn:hover { background: rgba(255,255,255,.28); }
.play-btn svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }

/* ===== EXTERIORES: selector ===== */
.selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
@media (max-width: 700px) { .selector-grid { grid-template-columns: 1fr; } }
.selector-card {
  position: relative; height: 320px; border-radius: 22px; overflow: hidden; cursor: pointer;
  box-shadow: 0 15px 40px rgba(0,0,0,.4); transition: transform .4s ease;
}
.selector-card:hover { transform: scale(1.02); }
.selector-card video { width: 100%; height: 100%; object-fit: cover; }
.selector-overlay {
  position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.8));
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.selector-overlay h3 { font-size: 1.9rem; font-weight: 800; letter-spacing: 2px; margin: 0; }
.selector-overlay span { font-size: .85rem; letter-spacing: 3px; opacity: .85; margin-top: 6px; }

.video-card { border-radius: 18px; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,.6); position: relative; }
.video-card video { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.videos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .videos-grid { grid-template-columns: 1fr; } }

.subseccion-title {
  text-align: center; font-size: 1.6rem; font-weight: 700; margin: 40px 0 30px;
}

/* ============================================================
   AJUSTES PARA CELULAR / TABLET
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Portada: alto real de la pantalla en celulares (evita saltos con la barra del navegador) */
.hero-video { height: 100svh; min-height: 320px; }

/* Pantallas verticales: el video del logo es cuadrado, la portada pasa a ser cuadrada
   para que el logo se vea completo sin recortarse */
@media (max-aspect-ratio: 1/1) {
  .hero-video { height: auto; aspect-ratio: 1 / 1; min-height: 0; margin-top: 64px; }
  .scroll-hint { display: none; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }

  .section-pad { padding: 60px 0; }
  #empresarial, #contacto { padding: 60px 0; }
  #quienessomos { min-height: 0; }
  #quienessomos .container { padding: 70px 16px; }
  #quienessomos p { font-size: 1rem; }
  h2.section-title { margin-bottom: 32px; letter-spacing: 1px; }
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }

  .split-row { gap: 20px; margin-bottom: 40px; }
  .section-img { height: 240px; }
  .section-img:hover, .carpeta-card:hover, .selector-card:hover, .foto-card:hover img { transform: none; }

  .action-buttons { gap: 14px; }
  .btn-fiestas { width: calc(50% - 7px); max-width: 160px; height: 130px; border-radius: 20px; font-size: .78rem; }
  .btn-fiestas svg { width: 32px; height: 32px; }

  .float-btn { width: 48px; height: 48px; right: 14px; }
  .float-btn.instagram { bottom: 14px; }
  .float-btn.whatsapp { bottom: 72px; }

  .galeria-hero { min-height: 0; padding: 100px 0 30px; }
  .badge-titulo { padding: 12px 24px; letter-spacing: 2px; font-size: .9rem; max-width: 100%; }
  .carpetas-grid { gap: 16px; }
  .carpeta-card { height: 280px; }
  .carpeta-overlay h3 { font-size: 1.25rem; }
  .fotos-grid { gap: 10px; }
  .foto-card { border-radius: 10px; }

  .trailer-page { padding: 100px 0 50px; }
  .trailer-box { margin-bottom: 44px; }
  .trailer-title { font-size: 1.05rem; }
  .video-wrapper { border-radius: 12px; }

  .selector-card { height: 220px; }
  .selector-overlay h3 { font-size: 1.5rem; }
  .videos-grid { gap: 20px; }
  .subseccion-title { font-size: 1.3rem; margin: 30px 0 20px; }
  .volver-wrap { margin-top: 36px; }
}

/* ============================================================
   GALERÍAS DINÁMICAS (gallery.js)
   ============================================================ */
.galeria-cargando, .galeria-vacia { text-align: center; opacity: .75; padding: 30px 0; grid-column: 1 / -1; }
.carpeta-card--sm { height: 280px; }
.carpeta-card.sin-portada { background: linear-gradient(145deg, var(--negro), var(--negro2)); }

/* Fotos: mosaico que respeta verticales y horizontales sin recortar feo */
.fotos-masonry { display: flex; gap: 18px; margin-top: 10px; align-items: flex-start; }
.m-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.foto-item {
  margin: 0; border-radius: 16px; overflow: hidden;
  background: #111; box-shadow: 0 15px 35px rgba(0,0,0,.4); cursor: zoom-in; display: block;
}
.foto-item img { width: 100%; height: auto; object-fit: cover; opacity: 0; transition: opacity .4s ease, transform .4s ease; }
.foto-item img.loaded { opacity: 1; }
.foto-item.o-v img { aspect-ratio: 2 / 3; }
.foto-item.o-h img { aspect-ratio: 3 / 2; }
.foto-item.o-auto img { min-height: 160px; }
.foto-item:hover img { transform: scale(1.04); }
@media (max-width: 768px) {
  .fotos-masonry, .m-col { gap: 10px; }
  .foto-item { border-radius: 10px; }
  .foto-item:hover img { transform: none; }
}

/* Visor de fotos */
.lightbox {
  position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 16px; right: 16px; font-size: 1.2rem !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: .85rem; opacity: .75; letter-spacing: 1px; }
@media (max-width: 768px) {
  .lightbox img { max-width: 100vw; max-height: 80vh; border-radius: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
}
