@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    --bg-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --input-bg: #ffffff;
    --input-border: #e5e7eb;
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.95);
    --glass-bg: rgba(30, 41, 59, 0.95);
    --input-bg: #334155;
    --input-border: #475569;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    transition: all 0.3s ease;
    line-height: 1.6;
}

[data-theme="dark"] body {
    background-color: #0f172a;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .glass {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
    background: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass-dark {
    background: rgba(15, 23, 42, 0.95);
}

/* Theme Classes */
.bg-white-theme { 
    background-color: var(--bg-secondary); 
}

.text-primary-theme { 
    color: var(--text-primary); 
}

.text-secondary-theme { 
    color: var(--text-secondary); 
}

.card-bg { 
    background: var(--card-bg); 
}

.input-theme {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-theme="dark"] .input-theme::placeholder { 
    color: #94a3b8; 
}

/* Animations */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-20px); 
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.animate-fadeInUp { 
    animation: fadeInUp 0.6s ease-out; 
}

.animate-float { 
    animation: float 6s ease-in-out infinite; 
}

.animate-pulse-slow { 
    animation: pulse 3s ease-in-out infinite; 
}

.animate-shake { 
    animation: shake 0.5s ease-in-out; 
}

.animate-slideInRight { 
    animation: slideInRight 0.5s ease-out; 
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Navigation */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after { 
    width: 100%; 
}

/* Progress Bar */
.progress-bar {
    position: relative;
    height: 8px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Input Styling */
.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.input-field.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    animation: shake 0.5s ease-in-out;
}

[data-theme="dark"] .input-field.error {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-summary {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .error-summary {
    background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981, #059669);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

/* Cards */
.visa-card {
    background: white;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

[data-theme="dark"] .visa-card { 
    background: #334155; 
}

.visa-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.visa-card.selected {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    border-color: #10b981 !important;
}

.visa-card.selected .font-semibold {
    color: white !important;
}

.pricing-card {
    position: relative;
    overflow: hidden;
}

.pricing-card::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;
}

.pricing-card:hover::before { 
    left: 100%; 
}

/* Custom Checkboxes */
.checkbox-custom {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    background: white;
}

[data-theme="dark"] .checkbox-custom {
    background: #334155;
    border-color: #475569;
}

.checkbox-custom:checked {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-color: #3b82f6;
}

.checkbox-custom:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Custom Radio */
.radio-custom {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    background: white;
}

[data-theme="dark"] .radio-custom {
    background: #334155;
    border-color: #475569;
}

.radio-custom:checked { 
    border-color: #3b82f6; 
}

.radio-custom:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 50%;
}

/* Fullscreen Form */
.fullscreen-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    overflow-y: auto;
    background: var(--bg-secondary);
    padding-top: 80px;
}

[data-theme="dark"] .fullscreen-form { 
    background: #0f172a; 
}

.back-to-home-btn {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 1001;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    animation: pulse 2s infinite;
}

/* Saved Progress Badge */
.saved-progress-badge {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
}

@media (max-width: 768px) {
    .saved-progress-badge {
        top: auto;
        bottom: 80px;
        right: 20px;
    }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-toggle-btn i {
    font-size: 1.25rem;
}

.theme-toggle-btn-mobile {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Old theme toggle - keep for compatibility */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: #374151;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.theme-toggle::after {
    content: '☀️';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

[data-theme="dark"] .theme-toggle { 
    background: #3b82f6; 
}

[data-theme="dark"] .theme-toggle::after { 
    content: '🌙'; 
    left: 33px; 
}

/* Trust Badges */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50px;
}

[data-theme="dark"] .trust-badge { 
    background: rgba(16, 185, 129, 0.2); 
}

/* Hero Pattern */
.hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

/* Hero Section with gradient background */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* Stats in Hero */
.hero-section .glass {
    background: rgba(255, 255, 255, 0.95);
}

.hero-section .glass .text-blue-900 {
    color: #1e3a8a !important;
}

.hero-section .glass .text-gray-700 {
    color: #374151 !important;
}

[data-theme="dark"] .hero-section .glass {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .hero-section .glass .text-blue-900 {
    color: #93c5fd !important;
}

[data-theme="dark"] .hero-section .glass .text-gray-700 {
    color: #94a3b8 !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 56rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

[data-theme="dark"] .modal-content { 
    background: #1e293b; 
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Utility */
.min-h-screen {
    min-height: 100vh;
}

/* ================================
   TESTIMONIAL CAROUSEL
   ================================ */
.testimonials-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-theme="dark"] .testimonials-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

#testimonialTrack {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

[data-theme="dark"] .carousel-btn {
    background: #334155;
    color: #60a5fa;
}

[data-theme="dark"] .carousel-btn:hover {
    background: #3b82f6;
    color: white;
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn-prev {
        left: -5px;
    }
    
    .carousel-btn-next {
        right: -5px;
    }
}

/* Carousel Dots */
#testimonialDots button {
    transition: all 0.3s ease;
}

/* ================================
   PLAN SELECTION STYLES
   ================================ */
.plan-option {
    cursor: pointer;
}

.plan-option input[type="radio"]:checked + div {
    border-color: #3b82f6 !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.plan-option input[type="radio"]:checked + div .plan-check {
    background: #3b82f6;
    border-color: #3b82f6;
}

.plan-option input[type="radio"]:checked + div .plan-check i {
    opacity: 1;
}

.plan-option:has(input[value="premium"]) input[type="radio"]:checked + div {
    border-color: #10b981 !important;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.plan-option:has(input[value="premium"]) input[type="radio"]:checked + div .plan-check {
    background: #10b981;
    border-color: #10b981;
}

/* ================================
   DARK MODE SPECIFIC OVERRIDES
   ================================ */

/* Dark mode navigation */
[data-theme="dark"] nav {
    background: rgba(15, 23, 42, 0.95) !important;
}

[data-theme="dark"] #mobileMenu {
    background: rgba(15, 23, 42, 0.98) !important;
}

/* Dark mode hero section */
[data-theme="dark"] #inicio {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

/* Dark mode sections */
[data-theme="dark"] .bg-white-theme {
    background-color: #1e293b !important;
}

[data-theme="dark"] .testimonials-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

/* Dark mode glass */
[data-theme="dark"] .glass {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark mode text colors */
[data-theme="dark"] .text-primary-theme {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .text-secondary-theme {
    color: #94a3b8 !important;
}

/* Dark mode colored backgrounds */
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="dark"] .bg-green-50,
[data-theme="dark"] .bg-green-100 {
    background-color: rgba(16, 185, 129, 0.15) !important;
}

[data-theme="dark"] .bg-yellow-50 {
    background-color: rgba(234, 179, 8, 0.15) !important;
}

[data-theme="dark"] .bg-red-50 {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] .bg-purple-100 {
    background-color: rgba(139, 92, 246, 0.15) !important;
}

/* Dark mode text on colored backgrounds */
[data-theme="dark"] .text-blue-800,
[data-theme="dark"] .text-blue-900 {
    color: #93c5fd !important;
}

[data-theme="dark"] .text-green-800,
[data-theme="dark"] .text-green-900 {
    color: #86efac !important;
}

[data-theme="dark"] .text-yellow-800,
[data-theme="dark"] .text-yellow-900 {
    color: #fde047 !important;
}

[data-theme="dark"] .text-red-800 {
    color: #fca5a5 !important;
}

[data-theme="dark"] .text-purple-800 {
    color: #c4b5fd !important;
}

/* Dark mode gray text */
[data-theme="dark"] .text-gray-600 {
    color: #94a3b8 !important;
}

[data-theme="dark"] .text-gray-700 {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .text-gray-800 {
    color: #e2e8f0 !important;
}

/* Dark mode borders */
[data-theme="dark"] .border-gray-200 {
    border-color: #475569 !important;
}

[data-theme="dark"] .border-blue-200 {
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Dark mode carousel buttons */
[data-theme="dark"] .carousel-btn {
    background: #334155;
    color: #60a5fa;
}

[data-theme="dark"] .carousel-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Dark mode cards */
[data-theme="dark"] .card-bg {
    background: rgba(30, 41, 59, 0.95) !important;
}

[data-theme="dark"] .visa-card {
    background: #334155 !important;
}

[data-theme="dark"] .pricing-card.glass {
    background: rgba(30, 41, 59, 0.95) !important;
}

/* Dark mode inputs */
[data-theme="dark"] .input-theme {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .input-theme::placeholder {
    color: #94a3b8 !important;
}

/* Dark mode checkboxes and radios */
[data-theme="dark"] .checkbox-custom,
[data-theme="dark"] .radio-custom {
    background: #334155;
    border-color: #475569;
}

/* Dark mode modal */
[data-theme="dark"] .modal-content {
    background: #1e293b !important;
}

/* Dark mode fullscreen form */
[data-theme="dark"] .fullscreen-form {
    background: #0f172a !important;
}

/* Dark mode stats in hero */
[data-theme="dark"] #inicio .rounded-2xl[style*="background: rgba(255,255,255"] {
    background: rgba(30, 41, 59, 0.95) !important;
}

[data-theme="dark"] #inicio .rounded-2xl div[style*="color: #1e3a8a"] {
    color: #93c5fd !important;
}

[data-theme="dark"] #inicio .rounded-2xl div[style*="color: #374151"] {
    color: #94a3b8 !important;
}
