/* ===================================== */
/* 0. Variables CSS (Fácil personalización) */
/* ===================================== */
:root {
    /* Colores */
    --primary-color: #6C5CE7; /* Violeta principal */
    --secondary-color: #00B894; /* Verde de acento */
    --text-dark: #2d3436; /* Texto oscuro principal */
    --text-light: #636e72; /* Texto gris secundario */
    --background-light: #f7f9fc; /* Fondo claro general */
    --background-dark: #34495e; /* Fondo oscuro para secciones */
    --white: #ffffff;
    --gray-light: #dfe6e9;
    --gray-medium: #b2bec3;

    /* Fuentes */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Sombras */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);

    /* Otros */
    --border-radius-card: 12px;
    --spacing-unit: 1rem;
}

/* ===================================== */
/* 1. Reset Básico y Estilos Globales */
/* ===================================== */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Poppins:wght@400;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    overflow-x: hidden; /* Evita scroll horizontal no deseado */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: var(--spacing-unit);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: var(--spacing-unit);
}

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

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

/* Botones */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

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

.btn-primary:hover {
    background-color: #5a4cb3; /* Tono más oscuro de primary */
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-whatsapp {
    background-color: #25D366; /* Color de WhatsApp */
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-whatsapp:hover {
    background-color: #1DA851; /* Tono más oscuro de WhatsApp */
    box-shadow: var(--shadow-medium);
}

.full-width {
    width: 100%;
}

/* ===================================== */
/* 2. Header y Navegación */
/* ===================================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--text-light);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.nav-cta {
    display: none; /* Se mostrará en pantallas más grandes */
}


/* ===================================== */
/* 3. Sección Hero (Inicio) */
/* ===================================== */
.hero {
    padding: 6rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    /* NOTA: Si quieres un fondo de color en vez de imagen, descomenta la siguiente línea */
    /* background-color: #f0f2f5; */ 
}

.hero-container {
    display: flex;
    flex-direction: column; /* Diseño para móvil por defecto */
    align-items: center;
    gap: 2rem;
    text-align: center;

    /* --- ESTA ES LA PARTE CLAVE PARA CENTRAR --- */
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.hero-content {
    max-width: 550px;
}

.hero-title {
    font-size: 2.8rem; /* Tamaño ajustado */
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    max-width: 500px;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-medium);
    display: block;
}

/* ===================================== */
/* 4. Estilos Generales de Sección */
/* ===================================== */
section {
    padding: 5rem 0; /* Espaciado vertical para todas las secciones */
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}


/* ===================================== */
/* 5. Sección Cómo Funciona */
/* ===================================== */
.features-section {
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 2rem;
}

.feature-card {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius-card);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}


/* ===================================== */
/* 6. Sección Galería (Ejemplos) */
/* ===================================== */
.gallery-section {
    background-color: var(--background-dark);
    color: var(--white);
}

.gallery-section .section-tag {
    background-color: var(--secondary-color);
}

.gallery-section .section-title {
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 1.5rem;
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
}

/* ===================================== */
/* 7. Sección Planes */
/* ===================================== */
.plans-section {
    background-color: var(--background-light);
}

.plans-container {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 2.5rem;
    justify-content: center;
    align-items: flex-start; /* Alinea las tarjetas arriba */
}

.plan-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-light);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent; /* Para el featured plan */
    transition: all 0.3s ease;
}

.plan-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.plan-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05); /* Destaca un poco más */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.plan-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
}

.plan-header h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.plan-price span {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-light);
}

.plan-features ul {
    list-style: none; /* Quitamos los puntos por defecto */
    margin-bottom: 2rem;
    padding-left: 0; /* Controlamos el espaciado nosotros mismos */
    text-align: left; /* Aseguramos alineación a la izquierda */
}

.plan-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex; /* Usamos Flexbox para alinear el ícono y el texto */
    align-items: center;
    gap: 10px; /* Espacio entre el ícono y el texto */
}

/* Creamos el ícono de check con CSS */
.plan-features li::before {
    content: '✔'; /* Símbolo de check */
    color: var(--secondary-color, #25D366); /* Color verde de acento */
    font-weight: bold;
    font-size: 1.2rem;
}

/* Añade estos nuevos estilos para la galería */

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 columna por defecto para móviles */
    gap: 1.5rem; /* Espacio entre imágenes */
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: 12px; /* Bordes redondeados */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    /* ... otros estilos que ya tienes ... */
    .hero {
        flex-direction: column;
        text-align: center;
        /* Añade un poco más de espacio superior en móvil */
        padding-top: 8rem; 
    }
}

/* Media Query para que se vean 2 columnas en pantallas más grandes */
@media (min-width: 992px) {
    .hero-container { /* Si estás usando mi nueva estructura */
        flex-direction: row;
    }
    .hero-content {
        flex-basis: 55%; /* Le da más espacio al texto */
    }
    .hero-image, .hero-image-wrapper {
        flex-basis: 45%; /* Le da un poco menos a la imagen */
    }
}
/* ===================================== */
/* 8. Sección CTA Final */
/* ===================================== */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.cta-title {
    font-size: 2.8rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    color: var(--gray-light);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


/* ===================================== */
/* 9. Footer */
/* ===================================== */
.footer {
    background-color: var(--text-dark);
    color: var(--gray-light);
    padding: 4rem 0 1.5rem 0;
    font-size: 0.9rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.footer-logo {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1rem;
    display: block;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-about p {
    max-width: 300px;
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--gray-light);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}


/* ===================================== */
/* 10. Media Queries (Diseño Responsivo) */
/* ===================================== */

/* Para tablets y pantallas medianas (768px y más) */
@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    .nav-cta {
        display: inline-block; /* Muestra el botón en el header */
    }

    .hero-container {
        flex-direction: row; /* Diseño de fila para escritorio */
        text-align: left; /* Alinea el texto a la izquierda */
    }

    .hero-content {
        flex: 1; /* Ocupa el espacio disponible */
    }

    .hero-image-wrapper {
        flex: 1;
        display: flex; /* Para centrar la imagen en su contenedor */
        justify-content: center;
        align-items: center;
    }

    .hero-buttons {
        justify-content: flex-start; /* Alinea los botones a la izquierda */
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 2 o 3 columnas */
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    }

    .plans-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 2 columnas */
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr; /* Diseño de 3 columnas para el footer */
        text-align: left;
    }
}

/* Para escritorios grandes (1024px y más) */
@media (min-width: 1024px) {
    h1 { font-size: 4rem; }
    h2 { font-size: 3rem; }

    .hero {
        padding: 8rem 0;
    }

   /* Dentro de: @media (min-width: 768px) */

.hero-container {
    flex-direction: row; /* Pasa a diseño de fila (dos columnas) */
    text-align: left;
    gap: 3rem;
}

.hero-buttons {
    justify-content: flex-start; /* Alinea los botones a la izquierda */
}
    .hero-content {
        padding-right: 2rem;
    }

    .nav-menu {
        gap: 3rem; /* Más espacio en el menú */
    }
}

/* ===================================== */
/* 11. Estilos para Animaciones JS       */
/* ===================================== */

/* Estilo para el header cuando se hace scroll */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px); /* Efecto de vidrio esmerilado para navegadores compatibles */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0; /* Un poco más compacto */
}

/* Estilos para la animación de "fade-in" */
.feature-card, .plan-card, .gallery-image, .hero-content, .hero-image-wrapper {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.feature-card.visible, .plan-card.visible, .gallery-image.visible, .hero-content.visible, .hero-image-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}