/* Variables CSS - ACTUALIZADAS CON TUS COLORES */
:root {
  --color-inicio: #1867db;
  --color-nosotros: #6391d6;
  --color-servicios: #769dd6;
  --color-contacto: #a9c3eb;
  --transition-base: 0.35s ease;
  --navbar-height: 110px;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Estilos Globales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: var(--navbar-height);
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  background-color: var(--color-inicio);
  transition: all var(--transition-base);
  height: var(--navbar-height);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

body.navbar-inicio .navbar { background-color: var(--color-inicio); }
body.navbar-nosotros .navbar { background-color: var(--color-nosotros); }
body.navbar-servicios .navbar { background-color: var(--color-servicios); }
body.navbar-contacto .navbar { background-color: var(--color-contacto); }

.navbar-brand img {
  height: 100px;
  width: auto;
  transition: all var(--transition-base);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.navbar-brand:hover img {
  transform: scale(1.05) rotate(2deg);
}

.nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  margin: 0 10px;
  transition: all var(--transition-base);
  position: relative;
  font-size: 1.1rem;
}

.nav-link:hover,
.nav-link.active {
  color: #fff !important;
  transform: translateY(-3px);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #fff, transparent);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Secciones */
section {
  padding: 100px 0;
  scroll-margin-top: calc(var(--navbar-height) + 12px);
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 0;
}

section > .container {
  position: relative;
  z-index: 1;
}

/* Fondos de sección CON IMÁGENES Y COLORES EXACTOS */
#inicio { 
  background-image: url('/img/inicio.jpg'), linear-gradient(135deg, var(--color-inicio) 0%, #0a4da0 100%);
  background-attachment: fixed;
}

#nosotros { 
  background-image: url('/img/nosotros.jpg'), linear-gradient(135deg, var(--color-nosotros) 0%, #4a7bc4 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

#servicios { 
  background-image: url('/img/servicios.jpg'), linear-gradient(135deg, var(--color-servicios) 0%, #5a8bc9 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

#contacto { 
  background-image: url('/img/contacto.jpg'), linear-gradient(135deg, var(--color-contacto) 0%, #8fb3e6 100%);
  background-attachment: fixed;
}

/* Fallbacks para imágenes que no cargan */
#nosotros.no-image {
  background: linear-gradient(135deg, var(--color-nosotros) 0%, #4a7bc4 100%);
}

#servicios.no-image {
  background: linear-gradient(135deg, var(--color-servicios) 0%, #5a8bc9 100%);
}

/* Efectos de partículas para secciones sin imagen */
#nosotros::after, #servicios::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

/* Cards mejoradas */
.card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.95);
}

.card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.feature-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
}

.feature-card .icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.feature-card:hover .icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.price-card {
  background: var(--primary-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.price-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.price-card.recommended {
  background: var(--secondary-gradient);
  transform: scale(1.05);
  border: 3px solid #fff;
}

.price-card.recommended:hover {
  transform: scale(1.08) translateY(-15px);
}

.price-badge {
  position: relative;
  z-index: 1;
}

.price-amount {
  position: relative;
  z-index: 1;
}

/* Video Preview Container */
.video-preview-container {
  cursor: pointer;
  position: relative;
  display: inline-block;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transition: all var(--transition-base);
}

.video-preview-container:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.video-preview {
  position: relative;
}

.video-preview img {
  width: 100%;
  height: auto;
  display: block;
  transition: all var(--transition-base);
}

.video-preview-container:hover .video-preview img {
  transform: scale(1.05);
  filter: brightness(0.8);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.play-button i {
  font-size: 30px;
  color: #e74c3c;
  margin-left: 5px;
}

.video-preview-container:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}

.video-overlay {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
}

/* Modal de Video */
.modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
}

.modal-body {
  padding: 0;
}

.modal-backdrop {
  background: rgba(0,0,0,0.9);
}

/* Banner de Cookies mejorado */
.cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.9) 100%);
  color: white;
  padding: 20px 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
}

.cookies-banner.show {
  transform: translateY(0) !important;
  animation: slideInUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookies-banner.hide {
  transform: translateY(100%) !important;
  animation: slideOutDown 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Animaciones mejoradas */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  60% { transform: translateY(-15px); }
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(50px) scale(0.9);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInLeft {
  from { 
    opacity: 0; 
    transform: translateX(-50px);
  }
  to { 
    opacity: 1; 
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from { 
    opacity: 0; 
    transform: translateX(50px);
  }
  to { 
    opacity: 1; 
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-bounce {
  animation: bounce 1.5s ease-out;
}

.animate-fade-in {
  opacity: 0;
  transform: translateY(50px) scale(0.9);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.animate-slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.animate-slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.animate-slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Botones mejorados */
.btn {
  border-radius: 50px;
  padding: 15px 40px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  color: white;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

/* WhatsApp Flotante mejorado */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  animation: bounce 2s infinite;
  transition: all var(--transition-base);
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.whatsapp-float:hover {
  transform: scale(1.15) rotate(10deg);
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4));
}

/* FAQ Accordion mejorado */
.accordion-button {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  color: white;
  font-weight: 500;
  font-size: 1.1rem;
  border: none;
  padding: 20px;
  transition: all var(--transition-base);
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 100%);
  color: white;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.2);
}

.accordion-button::after {
  filter: brightness(0) invert(1);
  transition: transform var(--transition-base);
}

.accordion-body {
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.2) 100%);
  color: white;
  font-size: 1rem;
  line-height: 1.8;
}

.faq-item {
  border: none;
  margin-bottom: 10px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  transition: all var(--transition-base);
}

.faq-item:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.02);
}

/* Formulario mejorado */
.form-control {
  border-radius: 15px;
  border: 2px solid rgba(255,255,255,0.2);
  padding: 15px 20px;
  transition: all var(--transition-base);
  background: rgba(255,255,255,0.9);
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--color-inicio);
  box-shadow: 0 0 0 0.25rem rgba(24, 103, 219, 0.25);
  background: white;
  transform: scale(1.02);
}

.form-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

/* Sección Nosotros mejorada */
.highlight-box {
  background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
  border-radius: 25px;
  padding: 40px;
  border: 2px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.benefits-grid {
  margin-top: 30px;
}

.benefit-item {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
  transition: all var(--transition-base);
  border: 1px solid rgba(255,255,255,0.2);
}

.benefit-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Sección Servicios mejorada */
.service-item {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 15px;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}

.service-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-5px) scale(1.05);
}

.service-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  transform: scale(1.2) rotate(10deg);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.process-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  position: relative;
}

.process-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--secondary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

/* Contacto mejorado */
.contact-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);
  border-radius: 25px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Footer mejorado */
footer {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
  animation: gradient 3s ease infinite;
}

@keyframes gradient {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

footer a {
  transition: all var(--transition-base);
  position: relative;
}

footer a:hover {
  color: var(--color-inicio) !important;
  transform: translateY(-3px);
}

/* Optional Services */
.optional-services {
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

.optional-services p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* Responsive mejorado */
@media (max-width: 768px) {
  section {
    background-attachment: scroll;
    padding: 80px 0;
  }
  
  .navbar {
    height: auto;
    padding: 15px 0;
  }
  
  body {
    padding-top: 80px;
  }
  
  .price-card.recommended {
    transform: scale(1);
  }
  
  .display-3 {
    font-size: 2.5rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .highlight-box {
    padding: 25px;
  }
  
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-float img {
    width: 50px;
  }
  
  .play-button {
    width: 60px;
    height: 60px;
  }
  
  .play-button i {
    font-size: 20px;
  }
  
  .cookies-banner {
    padding: 15px 0;
  }
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success/Error messages mejorados */
.alert {
  border-radius: 15px;
  margin-top: 20px;
  animation: fadeIn 0.5s ease-out;
  border: none;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

/* Efectos hover en imágenes */
img {
  transition: all var(--transition-base);
}

img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Text Shadows mejorados */
.text-shadow {
  text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}

h1, h2, h3, h4, h5, h6 {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Animación de entrada para el título principal mejorada */
.hero-content {
  opacity: 0;
  transform: scale(0.8);
  animation: heroEntry 1.2s ease-out forwards;
}

@keyframes heroEntry {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Efecto parallax mejorado */
.parallax-element {
  transition: transform 0.1s ease-out;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* Selector de texto */
::selection {
  background: var(--color-inicio);
  color: white;
}

::-moz-selection {
  background: var(--color-inicio);
  color: white;
}

/* Animaciones adicionales para cookies */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}
/* SOLUCIÓN DEFINITIVA PARA IMÁGENES FALTANTES */
#inicio {
    background: linear-gradient(135deg, #1867db 0%, #0a4da0 100%) !important;
}

#contacto {
    background: linear-gradient(135deg, #a9c3eb 0%, #8fb3e6 100%) !important;
}

/* Forzar que no busque las imágenes que no existen */
#inicio, #contacto {
    background-image: none !important;
}
/* Cookies - FORZAR VISIBILIDAD */
.cookies-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: rgba(0,0,0,0.95) !important;
    color: white !important;
    padding: 20px 0 !important;
    transform: translateY(0) !important;
    display: block !important;
}

.cookies-banner.hide {
    transform: translateY(100%) !important;
}
/* FORZAR VISIBILIDAD DE IMÁGENES DE FONDO */
#nosotros, #servicios {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

#nosotros::before, #servicios::before {
    background: rgba(0,0,0,0.4) !important; /* Más transparente para ver la imagen */
}

/* Asegurar que el contenido sea visible */
#nosotros .container, #servicios .container {
    position: relative;
    z-index: 10;
}
/* ARREGLAR SECCIÓN INICIO */
#inicio {
    background: linear-gradient(135deg, #1867db 0%, #0a4da0 100%) !important;
    background-image: url('/img/inicio.jpg'), linear-gradient(135deg, #1867db 0%, #0a4da0 100%) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

#inicio::before {
    background: rgba(0,0,0,0.4) !important;
}