:root {
    --primary: #4e73df;
    --secondary: #224abe;
    --accent: #36b9cc;
    --dark: #2c3e50;
    --text: #5a6570;
    --light: #f8f9fc;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px rgba(78, 115, 223, 0.15);
}

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

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

h1, h2, h3, h4 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(78, 115, 223, 0.6);
}

.btn-white {
    background: white; 
    color: var(--primary);
}

.btn-white:hover {
    background: #f0f0f0;
    color: var(--secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text);
    max-width: 600px;
    margin: 0 auto;
}

header {
    background-color: var(--primary);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.logo img {
    height: 35px;
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.9;
}

.nav-links a:hover {
    opacity: 1;
    background-color: rgba(255,255,255,0.2);
}

.nav-links a.active {
    color: var(--primary);
    background-color: #ffffff;
    font-weight: 700;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.nav-btn-highlight {
    border: 2px solid rgba(255,255,255,0.3);
}

.nav-btn-highlight.active {
    background-color: var(--secondary) !important;
    color: white !important;
    border: 2px solid var(--secondary);
}

.mobile-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 160px 0 100px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 500px;
}

.store-badge img {
    width: 180px;
    transition: transform 0.3s;
}

.store-badge:hover img {
    transform: scale(1.05);
}

.hero-img {
    display: flex;
    justify-content: center;
}

.hero-img img {
    width: 85%;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
    animation: float 6s ease-in-out infinite;
}

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

.about {
    padding: 100px 0;
    background-color: var(--white);
}

/* --- CAMBIO IMPORTANTE AQUI --- */
/* Usamos Flexbox con wrap y centrado para arreglar el problema de la 4ta card */
.grid-2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Esto asegura que si una card baja, quede centrada */
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    z-index: 1;
    
    /* Propiedades Flex para que las cards tengan buen tamaño */
    flex: 1 1 280px;
    max-width: 400px;
    width: 100%;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(78, 115, 223, 0.15);
}

.card:hover::after {
    transform: scaleX(1);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: rgba(78, 115, 223, 0.08);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    transition: all 0.4s ease;
    position: relative;
}

.card:hover .icon-circle {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(78, 115, 223, 0.3);
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.card p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
}

.technologies {
    padding: 100px 0;
    background-color: var(--light);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step-card {
    background: var(--white);
    padding: 50px 30px 40px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: all 0.3s ease;
    border-top: 5px solid transparent;
    overflow: visible;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-top: 5px solid var(--secondary);
}

.step-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(78, 115, 223, 0.3);
    border: 4px solid var(--light);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    margin-top: 10px;
    transition: 0.3s;
}

.step-card:hover .step-icon {
    transform: scale(1.1);
    color: var(--secondary);
}

.step-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text);
}

.faq-section {
    padding: 100px 0;
    background-color: var(--white);
}

.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid #e3e6f0;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #d1d3e2;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 25px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #fbfcfe;
}

.faq-answer p {
    padding: 0 25px 25px;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: justify; 
}

.faq-video-container {
    padding: 0 25px 25px;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    overflow: hidden;
    margin-top: 15px;
}

.faq-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    overflow: auto;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    color: var(--primary);
}

.contact {
    padding: 100px 0;
    background-color: var(--light);
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    background-color: #fdfdfd;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
    background-color: var(--white);
}

.download-cta {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    padding: 80px 0;
    text-align: center;
    color: white;
}

.download-cta h2 {
    color: white;
    margin-bottom: 20px;
}

.download-cta p {
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
}

footer {
    background-color: #1a1c20;
    color: #b7b9cc;
    padding: 70px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col {
    text-align: center;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-links i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-links a {
    color: var(--white);
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    border-top: 1px solid #2c3e50;
    padding-top: 30px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        margin: 0 auto 30px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background-color: var(--primary);
        padding: 20px;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }
    
    .step-card {
        margin-top: 20px;
    }
}