* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
}

body, html {
  width: 100%;
  height: 100%;
  background-color: #000000;
  color: #ffffff;
  overflow: hidden;
}

/* ==========================================================
   1. PANTALLA DE CARGA / INGRESO INTERACTIVO
   ========================================================== */
#preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1b2838 0%, #080d14 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-logo-box {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.preloader-logo-box:hover {
  transform: scale(1.06);
}

.preloader-spinner {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(0, 180, 216, 0.2);
  border-top: 3px solid #00b4d8;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.preloader-logo-box img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.5);
}

.play-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: #00b4d8;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid #080d14;
}

.preloader-btn {
  margin-top: 24px;
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.preloader-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 180, 216, 0.6);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ==========================================================
   2. APP PRINCIPAL Y VIDEO
   ========================================================== */
#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  transition: opacity 1s ease-in;
}

.video-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#mainVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================
   3. HEADER SUPERIOR IZQUIERDO
   ========================================================== */
.top-brand {
  position: absolute;
  top: 18px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  background: rgba(8, 14, 23, 0.75);
  padding: 8px 18px 8px 10px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00b4d8;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #90e0ef;
  font-weight: 500;
}

/* ==========================================================
   4. COLUMNAS Y RECUADROS LATERALES
   ========================================================== */
.cards-column {
  position: absolute;
  top: 85px;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 250px;
  z-index: 90;
  pointer-events: none;
}

.left-column {
  left: 24px;
}

.right-column {
  right: 24px;
}

.service-card {
  background: rgba(11, 20, 32, 0.88);
  border: 1px solid rgba(0, 180, 216, 0.35);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.service-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #00b4d8;
  text-transform: uppercase;
}

.card-head a {
  color: #ff4d87;
  font-size: 0.95rem;
  text-decoration: none;
}

.card-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.card-gallery img {
  width: 100%;
  height: 65px;
  border-radius: 6px;
  object-fit: cover;
}

.card-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 0;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.card-btn:hover {
  opacity: 0.85;
}

/* ==========================================================
   5. BARRA DE REDES SOCIALES (MINUTO 1:35)
   ========================================================== */
.social-bar {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  opacity: 0;
  background: rgba(11, 20, 32, 0.92);
  border: 1px solid rgba(0, 180, 216, 0.4);
  padding: 12px 24px;
  border-radius: 40px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 120;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-bar.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.social-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #90e0ef;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: transform 0.2s, filter 0.2s;
}

.social-item:hover {
  transform: translateY(-3px);
  filter: brightness(1.2);
}

.social-item.fb { background: #1877f2; }
.social-item.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-item.tt { background: #000000; border: 1px solid rgba(255, 255, 255, 0.3); }
.social-item.wa { background: #25d366; }
.social-item.coffee { background: #6f4e37; border: 1px solid #c89666; }

/* ==========================================================
   6. CONTROLES FLOTANTES Y ANIMACIÓN CTA
   ========================================================== */
.floating-controls {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 10px;
  z-index: 110;
}

.ctrl-btn {
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn:hover {
  background: rgba(0, 180, 216, 0.7);
  transform: scale(1.05);
}

.ctrl-btn.highlight-cta {
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  border-color: #90e0ef;
  color: #ffffff;
  animation: attentionBounce 1.5s infinite;
}

@keyframes attentionBounce {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.8);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 16px rgba(0, 180, 216, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0);
  }
}

/* ==========================================================
   7. MODAL DE CAPÍTULOS
   ========================================================== */
.chapters-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.chapters-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  background: #0f1c2d;
  border: 1px solid rgba(0, 180, 216, 0.4);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
}

.modal-content h2 {
  font-size: 1.5rem;
  color: #00b4d8;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 0.9rem;
  color: #a0aec0;
  margin-bottom: 24px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #ffffff;
  cursor: pointer;
}

.chapters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chapter-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.chapter-card i {
  font-size: 1.4rem;
  color: #00b4d8;
  width: 30px;
  text-align: center;
}

.chapter-card strong {
  display: block;
  font-size: 0.88rem;
}

.chapter-card small {
  font-size: 0.72rem;
  color: #90e0ef;
}

.chapter-card:hover {
  background: rgba(0, 180, 216, 0.2);
  border-color: #00b4d8;
  transform: translateY(-2px);
}

/* ==========================================================
   8. RESPONSIVE / CELULARES (PANTALLAS <= 900PX)
   ========================================================== */
@media (max-width: 900px) {
  .top-brand {
    top: 12px;
    left: 12px;
    padding: 6px 14px 6px 8px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-title {
    font-size: 0.78rem;
  }

  .brand-subtitle {
    font-size: 0.65rem;
  }

  .cards-column {
    top: auto;
    bottom: 135px;
    width: calc(100% - 24px);
    left: 12px;
    right: 12px;
    flex-direction: row;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cards-column::-webkit-scrollbar {
    display: none;
  }

  .right-column {
    display: none;
  }

  .service-card {
    min-width: 170px;
    max-width: 170px;
    padding: 8px;
    flex-shrink: 0;
  }

  .card-head {
    font-size: 0.7rem;
  }

  .card-gallery img {
    height: 48px;
  }

  .card-btn {
    font-size: 0.62rem;
    padding: 4px 0;
  }

  .social-bar {
    bottom: 70px;
    width: 94%;
    padding: 10px 14px;
  }

  .social-title {
    font-size: 0.68rem;
  }

  .social-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .social-item {
    font-size: 0.68rem;
    padding: 6px 10px;
  }

  .floating-controls {
    bottom: 16px;
    right: 50%;
    transform: translateX(50%);
    width: 90%;
    justify-content: center;
  }

  .ctrl-btn {
    font-size: 0.75rem;
    padding: 8px 14px;
  }

  .modal-content {
    padding: 20px 16px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .modal-content h2 {
    font-size: 1.2rem;
  }

  .chapters-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chapter-card {
    padding: 10px;
  }
}