/* ==============================================
   SERVIEVENTOS RETANA - CSS FINAL CORREGIDO
   ============================================== */

/* --- 1. VARIABLES --- */
:root {
  --color-primary: #c0392b;
  --color-gold: #f39c12;
  --color-gold-light: #f5d78e;
  --color-cream: #faf3e0;
  --color-cream-dark: #f5e6cc;
  --color-chocolate: #5d4037;
  --font-primary: 'Montserrat', sans-serif;
  --font-display: 'Playfair Display', serif;
}

/* --- 2. RESET ANTI-SCROLL LATERAL --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-cream);
  color: #4a4a4a;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Evitar overflow en todos los contenedores */
section, .container, .row, [class*="col-"], .card, .glass-card, .timeline {
  max-width: 100%;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* --- 3. UTILIDADES --- */
.py-6 { padding-top: 6rem; padding-bottom: 6rem; }
.mb-6 { margin-bottom: 4rem; }

/* --- 4. BOTONES --- */
.btn-gold {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border: none;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(243,156,18,0.5);
  color: #fff;
}

/* --- 5. HERO --- */
/* --- HERO --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #1a1a1a; /* Fondo de respaldo */
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background-color: #000;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(192, 57, 43, 0.75) 0%,
    rgba(139, 69, 19, 0.6) 50%,
    rgba(30, 20, 10, 0.85) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero-logo {
  max-width: 250px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 20px rgba(187, 131, 9, 0.407));
}

.hero-title {
  font-family: 'Caveat', cursive;
  font-size: 4.5rem;
  font-weight: 600;
  color: #f5d78e;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 3px;
  color: #ffeaa7;
  text-transform: uppercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-divider {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f1c40f, #f39c12, #f1c40f, transparent);
  margin: 1rem auto;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-indicator span {
  display: block;
  width: 12px;
  height: 12px;
  border-bottom: 3px solid #f39c12;
  border-right: 3px solid #f39c12;
  transform: rotate(45deg);
  margin: -6px;
  animation: scrollDown 2s infinite;
}
.scroll-indicator span:nth-child(2) { animation-delay: -0.2s; }
.scroll-indicator span:nth-child(3) { animation-delay: -0.4s; }

@keyframes scrollDown {
  0%, 100% { opacity: 0; transform: rotate(45deg) translate(-10px, -10px); }
  50% { opacity: 1; }
}

/* Hero responsive */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: 4rem 0;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
  }
  .hero-logo {
    max-width: 250px;
  }
}

/* --- 6. TÍTULOS --- */
.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: #c0392b;
  text-align: center;
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.2rem;
  color: #d4a017;
  font-style: italic;
  text-align: center;
}

/* --- 7. GLASS CARDS --- */
.glass-card {
  background: rgba(255,248,240,0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 25px;
  border: 1px solid rgba(243,156,18,0.3);
  box-shadow: 0 10px 40px rgba(139,69,19,0.1);
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}
.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(243,156,18,0.25);
}

.glass-card-body {
  padding: 1.5rem;
  flex: 1;
}

.glass-card h4, .glass-card h5 {
  color: #e74c3c;
  font-weight: 700;
}
.glass-card p {
  color: #5d4037;
}

.card-video-top {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #000;
}

.glass-card .carousel-item img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #f5e6cc;
}

.service-icon {
  font-size: 2rem;
  color: #e74c3c;
  background: #fff;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto;
  transition: all 0.3s ease;
}
.glass-card:hover .service-icon {
  background: #e74c3c;
  color: #fff;
  transform: rotate(360deg);
}

.feature-list {
  list-style: none;
  padding: 0;
  text-align: left;
}
.feature-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(139,69,19,0.1);
}
.feature-list li::before {
  content: "✦";
  color: #f39c12;
  margin-right: 10px;
}

/* --- 8. FONDOS --- */
.bg-services {
  background: linear-gradient(160deg, #faf3e0, #f5e6cc, #f0dbb5, #faf3e0);
}
.bg-team {
  background: linear-gradient(160deg, #faf3e0, #f5e6cc);
}

/* --- 9. TIMELINE --- */
#about {
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: brightness(0.35) sepia(0.3);
  z-index: 0;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #f39c12 10%, #f39c12 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
  width: 50%;
}
.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 45px;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 45px;
}

.timeline-content {
  padding: 1.5rem;
  background: rgba(255,248,240,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(243,156,18,0.3);
  border-radius: 20px;
}
.timeline-content h4 {
  color: #f39c12;
  margin-bottom: 0.5rem;
}
.timeline-content p {
  color: #f5e6cc;
  margin: 0;
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 25px;
  width: 18px;
  height: 18px;
  background: #f39c12;
  border: 3px solid #e74c3c;
  border-radius: 50%;
  z-index: 1;
}
.timeline-item:nth-child(odd)::after { right: -10px; }
.timeline-item:nth-child(even)::after { left: -10px; }

/* --- 10. GALERÍA --- */
#gallery {
  background: #faf3e0;
  overflow: hidden;
}
#gallery .section-title {
  color: #d35400;
}

.gallery-carousel {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(139,69,19,0.2);
  background: #f5e6cc;
}
.gallery-carousel .carousel-item img {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  background: #f5e6cc;
}

.glightbox-img {
  display: block;
  cursor: pointer;
}
.glightbox-img::after {
  content: '🔍 Click para ampliar';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: rgba(192,57,43,0.85);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.glightbox-img:hover::after {
  opacity: 1;
}

.gallery-carousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f39c12;
  border: 2px solid #c0392b;
}
.gallery-carousel .carousel-indicators button.active {
  background: #c0392b;
}

.gallery-carousel .carousel-caption {
  background: linear-gradient(135deg, rgba(192,57,43,0.9), rgba(139,69,19,0.9));
  border-radius: 15px;
  padding: 0.5rem 1.5rem;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
}
.gallery-carousel .carousel-caption h5 {
  color: #fff;
  margin: 0;
  font-family: var(--font-display);
}

.video-showcase {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,248,240,0.4);
  backdrop-filter: blur(15px);
  box-shadow: 0 20px 50px rgba(139,69,19,0.2);
}
.video-showcase video {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  background: #000;
}
.video-showcase .video-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}
.video-showcase .video-wrapper:hover .video-overlay {
  opacity: 1;
}
.video-showcase .play-icon {
  width: 60px;
  height: 60px;
  background: rgba(243,156,18,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}
.video-showcase .video-info {
  padding: 1.5rem;
  text-align: center;
}
.video-showcase .video-info h4 {
  color: #e67e22;
}
.video-showcase .video-info p {
  color: #d4a017;
}

/* --- 11. CONTACTO --- */
#contacto h2 {
  color: #f39c12;
  font-size: 2.5rem;
}

.contact-glass-card {
  background: rgba(255,248,240,0.12);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(243,156,18,0.25);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}
.contact-glass-card:hover {
  background: rgba(243,156,18,0.2);
  transform: scale(1.05);
}
.contact-glass-card h5 {
  color: #f39c12;
  font-weight: 700;
}
.contact-icon {
  font-size: 2.5rem;
  color: #f1c40f;
  margin-bottom: 1rem;
}

/* --- 12. FOOTER --- */
footer {
  background: linear-gradient(180deg, #5d4037, #3e2723);
}
footer p {
  color: #f5d78e;
}

/* --- 13. RESPONSIVE (CORREGIDO) --- */
@media (max-width: 768px) {
  /* Hero */
  .hero {
    min-height: 100vh;
    height: auto;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
  .hero-logo {
    max-width: 250px;
  }
  
  /* Títulos */
  .section-title {
    font-size: 1.8rem;
  }
  .section-subtitle {
    font-size: 1rem;
  }
  
  /* Timeline - CORREGIDO */
  .timeline {
    padding: 20px 0;
    margin: 0;
    max-width: 100%;
  }
  .timeline::before {
    left: 20px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 45px !important;
    padding-right: 10px !important;
    text-align: left !important;
    left: 0 !important;
    margin-bottom: 30px;
  }
  .timeline-item::after {
    left: 11px !important;
    right: auto !important;
  }
  .timeline-content {
    padding: 1rem;
  }
  
  /* Galería */
  .gallery-carousel .carousel-item img,
  .video-showcase video {
    max-height: 280px;
  }
  .gallery-carousel .carousel-caption {
    padding: 0.3rem 1rem;
    bottom: 10px;
  }
  .gallery-carousel .carousel-caption h5 {
    font-size: 0.8rem;
  }
  .gallery-carousel .carousel-control-prev,
  .gallery-carousel .carousel-control-next {
    width: 35px;
    height: 35px;
    opacity: 0.8;
  }
  
  /* Glass cards */
  .glass-card {
    margin: 0;
  }
  .glass-card-body {
    padding: 1rem;
  }
  
  /* Contacto */
  #contacto h2 {
    font-size: 1.8rem;
  }
  .contact-glass-card {
    padding: 1.5rem;
  }
  
  /* Utilidades */
  .py-6 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .mb-6 {
    margin-bottom: 2rem;
  }
  
  /* Arreglar márgenes del row */
  .row {
    margin-left: 0;
    margin-right: 0;
  }
  [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }
}