/* --- VARIABLES Y CONFIGURACIÓN GLOBAL --- */
:root {
    --color-primary: #3498db; /* Azul */
    --color-secondary: #2ecc71; /* Verde para éxito */
    --color-text: #2c3e50; /* Gris oscuro */
    --color-background: #ffffff;
    --color-light-gray: #f4f7f9;
    --font-family: 'Poppins', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.4rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title h2 {
    margin-bottom: 1rem;
}
.section-title p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #555;
}

/* --- BOTONES --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid #ddd;
}
.btn-secondary:hover {
    background-color: var(--color-light-gray);
    border-color: #ccc;
}


/* --- HEADER Y NAVEGACIÓN --- */
.header {
    background-color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 50px;
}

/* --- SECCIÓN HERO --- */
.hero-section {
    padding: 6rem 0;
    background-color: var(--color-light-gray);
}
.hero-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.hero-content { flex: 1; }
.hero-content h1 { margin-bottom: 1rem; }
.hero-content p { font-size: 1.1rem; margin-bottom: 2rem; color: #555;}
.hero-image { flex: 1; }
.hero-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- SECCIÓN PROBLEMA/SOLUCIÓN --- */
.problem-solution-section {
    padding: 6rem 0;
}
.solution-box {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    gap: 2rem;
    align-items: center;
}
.solution-content { flex: 1; padding: 2rem; }
.solution-image { flex: 1; }
.solution-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- SECCIÓN QUIÉNES SOMOS --- */
.about-section {
    padding: 6rem 0;
    background-color: var(--color-background);
}
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.about-content {
    flex: 1;
}
.about-content h2 {
    margin-bottom: 1.5rem;
}
.about-content p {
    color: #555;
    margin-bottom: 1.5rem;
}
.about-image {
    flex: 1;
}
.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- SECCIÓN FUNCIONALIDADES --- */
.features-section {
    padding: 6rem 0;
    background-color: var(--color-light-gray);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: #fff;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.feature-card i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}
.feature-card h3 {
    margin-bottom: 0.5rem;
}

/* --- SECCIÓN BENEFICIOS --- */
.benefits-section {
    padding: 6rem 0;
}
.benefits-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.benefits-content { flex: 1; }
.benefits-content ul {
    list-style: none;
    padding: 0;
}
.benefits-content li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}
.benefits-content li i {
    color: var(--color-secondary);
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.1rem;
}
.benefits-image { flex: 1; }
.benefits-image img {
    width: 100%;
    border-radius: 8px;
}


/* --- SECCIÓN AUDIENCIA --- */
.audience-section {
    padding: 5rem 0;
    background: var(--color-text);
    color: #fff;
    text-align: center;
}
.audience-section h2 { margin-bottom: 1rem; }
.audience-section p { color: #ccc; }
.audience-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.audience-tags span {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}


/* --- SECCIÓN CONTACTO --- */
.contact-section {
    padding: 6rem 0;
}
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 1.5rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1rem;
}
.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}
.contact-form button {
    width: 100%;
    font-size: 1.1rem;
}
.contact-info {
    text-align: center;
    margin-top: 2rem;
    color: #777;
}

/* MODIFICACIÓN AQUÍ: Se añade la transición de opacidad */
.form-success, .form-error {
    text-align: center;
    padding: 1rem;
    border-radius: 5px;
    margin: 0 auto 2rem auto;
    max-width: 600px;
    opacity: 1; /* Inicia visible */
    transition: opacity 0.5s ease-out; /* Animación suave de 0.5 segundos */
}
.form-success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}
.form-error {
    background-color: #fce4e4;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* NUEVA CLASE AÑADIDA: Para ocultar el mensaje */
.form-success.fade-out,
.form-error.fade-out {
    opacity: 0; /* Lo hace invisible */
}


/* --- FOOTER --- */
.footer {
    padding: 2rem 0;
    background-color: var(--color-light-gray);
    text-align: center;
    color: #777;
    border-top: 1px solid #e0e0e0;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    
    .hero-container, .benefits-container, .about-container {
        flex-direction: column;
        text-align: center;
    }
    .hero-image, .benefits-image, .about-image {
        margin-top: 2rem;
    }
    .benefits-content ul, .about-content {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .solution-box {
        flex-direction: column;
    }
    .solution-content { padding: 2rem 1.5rem; }
    
    .navbar {
      flex-direction: column;
      gap: 1rem;
    }
}