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

:root {
    /* Color Palette - Premium Dark */
    --primary: #3B82F6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #10B981;
    --secondary-glow: rgba(16, 185, 129, 0.5);
    --dark: #0A0A0B;
    --dark-surface: #121214;
    --dark-card: #1C1C1F;
    --text: #F9FAFB;
    --text-muted: #9CA3AF;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));

    /* Layout */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Star Background Effect */
.stars-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, #0D1117 0%, #050505 100%);
}

.stars-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 1744px 122px #FFF, 134px 1321px #FFF, 92px 859px #FFF, 547px 1141px #FFF, 1511px 328px #FFF, 792px 147px #FFF, 1581px 1860px #FFF, 1321px 1238px #FFF, 1235px 1248px #FFF, 1872px 147px #FFF, 321px 1582px #FFF, 1421px 238px #FFF;
    animation: stars-twinkle 100s linear infinite;
}

@keyframes stars-twinkle {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-1000px);
    }
}

/* Star Rain (Shooting Stars) */
.stars-overlay::after {
    content: "";
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, #eee, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: star-rain 3s linear infinite;
}

@keyframes star-rain {
    0% {
        transform: translateY(-200px) translateX(200px) rotate(-45deg);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(1000px) translateX(-1000px) rotate(-45deg);
        opacity: 0;
    }
}

h1,
h2,
h3,
.brand {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography & Utilities */
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-padding {
    padding: 100px 0;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px var(--primary-glow);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.brand:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-visual {
    width: 100%;
    max-width: 500px;
    opacity: 1;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.hero-visual img {
    width: 100%;
    height: auto;
    border-radius: 30px;
    filter: drop-shadow(0 0 50px var(--primary-glow));
    animation: float 6s ease-in-out infinite;

    /* Smooth Integration with Star Background */
    mask-image: radial-gradient(circle at 50% 50%, black 80%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 80%, rgba(0, 0, 0, 0) 100%);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-badge {
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Why Section */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.why-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem;
    border-radius: 20px;
    background: var(--dark-card);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 4rem auto 0;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-header {
    width: 100%;
    padding: 1.5rem;
    background: var(--dark-surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text);
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-header:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.faq-header span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    font-weight: 300;
}

.faq-item.active .faq-header span {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    overflow: visible;
}

.faq-answer p {
    padding: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--dark-surface);
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.contact-form input,
.contact-form select {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    appearance: none;
    /* Eliminar flecha por defecto para estilizar */
}

.contact-form input:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.contact-form select option {
    background: var(--dark-surface);
    color: var(--text);
}

/* Modal Privacy Policy */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content h2 {
    margin-bottom: 2rem;
}

.modal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.footer-link {
    cursor: pointer;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1,
.hero p,
.hero .btn {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero .container {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero {
        padding-top: 120px;
    }

    .hero p {
        margin: 0 auto 2.5rem;
    }

    .hero-visual {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
        align-items: center;
    }

    .footer-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .why-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .contact-form {
        max-width: 100%;
    }

    .glass-card {
        padding: 1.5rem;
    }

    /* Reduce vertical spacing between FAQ and contact sections */
    #contacto {
        padding-top: 6rem !important;
    }

    .section-padding {
        padding: 3rem 0;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    animation: pulse-whatsapp 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* Hide WhatsApp button on mobile if needed */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* Desktop: Reduce contact form card width */
@media (min-width: 769px) {
    #contacto .glass-card {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}