/* ===== VARIABLES GLOBALES ===== */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --accent-color: #4cc9f0;
  --success-color: #4ade80;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 20px;
  --transition: all 0.3s ease;
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
  padding-top: 76px;
  background-color: var(--bg-light);
}

/* ===== TIPOGRAFÍA ===== */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  text-align: center;
}

/* ===== NAVBAR ===== */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar-custom.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  margin: 0 0.5rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.login-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 8px;
  font-weight: 600;
  color: white !important;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ===== HERO SECTION ===== */
.services-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.services-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(76, 201, 240, 0.3), transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(67, 97, 238, 0.2), transparent 50%);
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== SECCIONES GENERALES ===== */
.module-section {
  padding: 4rem 0;
}

.module-header {
  text-align: center;
  margin-bottom: 3rem;
}

.module-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: inline-block;
}

/* ===== FEATURE GRID ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-item {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  border-left: 5px solid var(--primary-color);
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.feature-item h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* ===== SLIDER FIX MOBILE ===== */
/* SLIDER WRAPPER (SCROLL NATIVO + TÁCTIL) */
.plans-slider-wrapper{
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 20px 0;
  cursor: grab;
  user-select: none;
  touch-action: pan-y; /* permite scroll vertical en mobile */
}
.plans-slider-wrapper::-webkit-scrollbar{ display:none; }
.plans-slider-wrapper:active{ cursor: grabbing; }

.plans-slider{
  display:flex;
  gap:30px;
  padding: 0 10px;
  flex-wrap: nowrap;
  width: max-content;
  scroll-snap-type: x mandatory;
}
.plan-card-slider{ scroll-snap-align: start; }


.plan-card-slider{
  scroll-snap-align: start;
  flex: 0 0 86vw;               /* ✅ en celular ocupa casi toda la pantalla */
  max-width: 360px;             /* ✅ no se va al carajo en pantallas grandes */
}

@media (min-width: 576px){
  .plan-card-slider{ flex: 0 0 320px; }
}


.plans-slider-wrapper:active{ cursor: grabbing; }
.plans-slider-wrapper::-webkit-scrollbar{ display:none; }


.plans-slider-wrapper:active {
  cursor: grabbing;
}

.plans-slider-wrapper::-webkit-scrollbar {
  display: none;
}

.plans-slider {
  display: flex;
  gap: 30px;
  padding: 0 10px;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
}

/* ===== TARJETAS DE PLANES ===== */
.plan-card-slider {
  flex: 0 0 320px;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column; /* ✅ iguala alturas */
}

.plan-card-slider:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-hover);
}

.plan-header {
  padding: 2.5rem 2rem;
  color: white;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

/* título 2 líneas (para que no “salte” la altura) */
.plan-header h5 {
  line-height: 1.2;
  min-height: 2.4em; /* 2 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* descripción 3 líneas (prolijo y parejo) */
.plan-header p {
  line-height: 1.25;
  min-height: 3.75em; /* 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-badge-custom {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.plan-price {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 1rem 0;
}

.plan-price .period {
  font-size: 1rem;
  opacity: 0.9;
}

/* ✅ cuerpo que crece igual para todas */
.plan-features {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ✅ lista con scroll interno (no rompe la card si hay muchas features) */
.plan-features ul {
  list-style: none;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  max-height: 180px;
  overflow: auto;
  padding-right: 6px;
}

.plan-features ul::-webkit-scrollbar {
  width: 6px;
}

.plan-features ul::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.25);
  border-radius: 10px;
}

.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li i {
  color: var(--success-color);
  font-size: 1.1rem;
  margin-right: 10px;
  flex-shrink: 0;
}

/* ===== BOTÓN CONTRATAR AHORA ===== */
.btn-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 1.1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  transition: var(--transition);
  margin: 0.5rem 0 1rem;
  height: 58px;
}

.btn-plan i {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.btn-plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.btn-plan:hover i {
  transform: translateX(6px);
}

/* ===== NAVEGACIÓN DEL SLIDER ===== */
.slider-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 2rem;
}

.slider-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  font-size: 1.2rem;
}

.slider-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.slider-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}

.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1.5rem;
}

.slider-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dee2e6;
  cursor: pointer;
  transition: var(--transition);
}

.slider-indicator.active {
  background: var(--primary-color);
  transform: scale(1.4);
}

/* ===== FILTROS ===== */
#filterButtons .filter-btn {
  border-radius: 30px;
  padding: 10px 24px;
  font-weight: 500;
}

#filterButtons .filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ===== FAQ SECTION ===== */
.faq-section {
  padding: 5rem 0;
  background: var(--bg-light);
}

.accordion-button {
  font-weight: 600;
  padding: 1.5rem;
  border: none;
  background: white;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  border-radius: 12px !important;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.accordion-body {
  padding: 1.5rem;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow);
}
   .plan-ref-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: bold;
        z-index: 10;
        display: flex;
        align-items: center;
        gap: 5px;
        box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
        animation: pulse 2s infinite;
    }
    
    .plan-ref-badge i {
        font-size: 10px;
    }
    
    @keyframes pulse {
        0% { box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3); }
        50% { box-shadow: 0 3px 20px rgba(102, 126, 234, 0.6); }
        100% { box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3); }
    }
    
    .ref-banner {
        position: relative;
    }
    
    .ref-mini-info .alert {
        border-left: 4px solid #667eea;
        background: rgba(102, 126, 234, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .ref-alert-plan .alert {
        border-left: 4px solid #28a745;
        background: rgba(40, 167, 69, 0.1);
        backdrop-filter: blur(10px);
    }
    

       /* NOTIFICACIÓN DE REFERENCIA */
        .ref-notification {
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 9999;
            max-width: 350px;
            animation: slideInRight 0.5s ease-out;
            box-shadow: 0 5px 15px rgba(0,0,0,0.15);
            border-radius: 10px;
            overflow: hidden;
        }
        
        .ref-notification.hidden {
            animation: slideOutRight 0.5s ease-in forwards;
        }
        
        .ref-notification-content {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 10px;
            position: relative;
        }
        
        .ref-notification-close {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .ref-notification-close:hover {
            background: rgba(255,255,255,0.3);
            transform: scale(1.1);
        }
        
        .ref-avatar {
            width: 50px;
            height: 50px;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-bottom: 10px;
        }
        
        .ref-info {
            padding-left: 15px;
        }
        
        .ref-badge {
            background: rgba(255,255,255,0.2);
            color: white;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 12px;
            margin-bottom: 5px;
            display: inline-block;
        }
        
        .ref-name {
            font-weight: bold;
            margin-bottom: 5px;
        }
        
        .ref-code {
            font-family: 'Courier New', monospace;
            background: rgba(0,0,0,0.2);
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
        }
        
        .ref-benefit {
            margin-top: 10px;
            padding: 10px;
            background: rgba(255,255,255,0.1);
            border-radius: 8px;
            font-size: 14px;
        }
        
        .ref-benefit i {
            color: #4cd964;
            margin-right: 8px;
        }
        
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }
        
        /* Ajustar navbar para la notificación */
        .navbar-custom {
            transition: all 0.3s ease;
        }
        
        /* Para móviles */
        @media (max-width: 768px) {
            .ref-notification {
                top: 70px;
                right: 10px;
                left: 10px;
                max-width: calc(100% - 20px);
            }
        }
/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: white;
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
}

/* ===== GRADIENTES PARA BOTONES DE PLAN ===== */
.bg-primary, .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}
.bg-danger, .btn-danger {
  background: linear-gradient(135deg, #dc2626, var(--danger-color)) !important;
}
.bg-success, .btn-success {
  background: linear-gradient(135deg, #22c55e, var(--success-color)) !important;
}
.bg-secondary, .btn-secondary {
  background: linear-gradient(135deg, #6b7280, #374151) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .plan-card-slider { flex: 0 0 290px; }
}

@media (max-width: 768px) {
  body { padding-top: 66px; }
  .section-title { font-size: 2.2rem; }
  .plan-card-slider { flex: 0 0 270px; }
  .plans-slider { gap: 20px; }
  .module-section { padding: 3rem 0; }
  .services-hero { min-height: 60vh; }
}

@media (max-width: 576px) {
  .plan-card-slider { flex: 0 0 260px; }
  .plan-header { padding: 2rem 1.5rem; }
  .plan-features { padding: 1.5rem; }
  .btn-plan {
    padding: 1rem;
    font-size: 1rem;
    height: 52px;
  }
}

@media (max-width: 400px) {
  .plan-card-slider { flex: 0 0 240px; }
  .plan-price { font-size: 2.4rem; }
}

/* ===== ANIMACIONES Y ACCESIBILIDAD ===== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.plan-card.popular {
  animation: pulse 2s infinite;
  border: 3px solid var(--primary-color);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
