/* =========================================
   1. VARIABLES & GLOBALES
   ========================================= */
:root {
    --primary-color: #004aad;
    /* Azul Royal */
    --secondary-color: #d32f2f;
    /* Rojo */
    --text-color: #333;
    --bg-light: #f8faff;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* AQUÍ AÑADIMOS EL SCROLL SUAVE */
html {
    scroll-behavior: smooth;
    /* Esto es vital: deja 100px de espacio arriba al hacer scroll 
       para que el menú no tape los títulos */
    scroll-padding-top: 100px; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
/* =========================================
   2. NAVBAR (Alineación Logo Izq / Menú Der)
   ========================================= */
.navbar {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
}

/* El contenedor interno es el que manda la alineación */
.navbar-container {
    display: flex;
    justify-content: space-between; /* Empuja el logo a la izq y el menú a la der */
    align-items: center;
    height: 70px;
    /* La clase 'container' (ya incluida en el HTML) controla el ancho máximo */
}

/* Estilo del Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
}

.logo img {
    height: 40px; /* Tamaño profesional */
    width: auto;
}

.logo span {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

/* Estilo de los Enlaces (Menú Derecha) */
.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.hamburger {
    display: none; /* OCULTO POR DEFECTO EN PC */
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
}
/* =========================================
   RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 900px) {
    .hamburger {
        display: block; /* APARECE SOLO EN MÓVIL */
    }

    .nav-links {
        display: none; /* OCULTAMOS EL MENÚ DE TEXTO EN MÓVIL */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex; /* Se muestra al pulsar la hamburguesa */
    }
}
/* =========================================
   3. HERO SECTION (Pantalla Dividida)
   ========================================= */
.hero {
    padding: 40px 0 60px; /* Un poco más de aire arriba y abajo */
    background: radial-gradient(circle at top right, #eef5ff, transparent);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center; /* Centra verticalmente texto e imagen */
    justify-content: space-between;
    gap: 40px; /* Espacio entre texto e imagen */
    
    /* IMPORTANTE: Esto permite que baje la imagen si no caben */
    flex-wrap: wrap; 
}

/* --- IZQUIERDA: TEXTO --- */
.hero-content {
    flex: 1; 
    min-width: 300px; 
}

.hero h1 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block; 
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(0, 74, 173, 0.1);
    z-index: -1;
    border-radius: 5px;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    max-width: 550px; 
}

/* --- DERECHA: IMAGEN --- */
.hero-image {
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; 
    min-width: 300px; 
}

.hero-image img {
    max-width: 100%; 
    height: auto;
}

/* --- BOTONES --- */
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* Ajuste de altura base para botones en escritorio */
.hero-buttons img {
    height: 55px;
    width: auto;
    border-radius: 8px;
    display: block;
}

/* OPACIDAD APPLE AL 75% */
#btn-app-store {
    opacity: 0.75;
}

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column; 
        text-align: center;
    }

    .hero-content {
        width: 100%; 
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons {
        justify-content: center; 
        width: 100%;
        flex-direction: column; /* Apilamos para permitir el crecimiento lateral */
        align-items: center;
        gap: 20px;
    }

    /* BOTONES UN 30% MÁS ANCHOS */
    .hero-buttons a {
        width: 80%; /* Ocupan la mayor parte del ancho disponible */
        max-width: 420px; /* Un 30% más que el estándar normal de 320px */
        display: block;
    }

    .hero-buttons img {
        width: 100% !important; /* La imagen se estira para llenar el contenedor */
        height: auto !important; /* Mantiene la proporción al ensancharse */
    }
    
    .hero-image {
        width: 100%;
        margin-top: 30px;
    }
    
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
}
/* =========================================
   4. SECCIÓN CÓMO FUNCIONA (FEATURES)
   ========================================= */
.features {
    padding: 60px 0; /* Aumentamos un poco el aire */
    background: #fff;
}

.feature-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* Permite que baje en móvil */
    gap: 60px;
}

.feature-image,
.feature-content {
    flex: 1;
    min-width: 300px; /* Evita que se compriman demasiado */
}

.feature-image img {
    max-width: 100%;
    height: auto;
    /* Aplicamos la sombra que tenías en .app-screen-2 directamente aquí */
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
}

.feature-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.feature-list {
    list-style: none; /* Quitamos los puntos de la lista */
    padding: 0;
    margin-top: 30px;
}

.feature-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: #eef5ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* RESPONSIVE: Forzamos el orden en móvil */
@media (max-width: 900px) {
    .feature-container {
        flex-direction: column-reverse; /* En móvil: Texto arriba e Imagen abajo */
        text-align: center;
    }
    
    .feature-list li {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature-content {
        width: 100%;
    }
}
/* =========================================
   5. SECCIÓN CATEGORÍAS
   ========================================= */
.categories {
    padding: 60px 0;
}
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    text-align: center;
    height: 100%;
}
.card:hover {
    transform: translateY(-10px);
}
.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    
    /* --- LÍNEAS NUEVAS PARA CENTRAR EL ZORRO --- */
    display: flex;           /* Activamos el modo flexible */
    justify-content: center; /* Centrado horizontal (izquierda-derecha) */
    align-items: center;     /* Centrado vertical (arriba-abajo) */
    width: 100%;             /* Nos aseguramos de que ocupe todo el ancho */
}
.card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.card-highlight {
    background: linear-gradient(135deg, var(--primary-color), #0066ff);
    color: white;
}
.card-highlight .card-icon {
    color: white;
}
/* =========================================
   6. FOOTER (ALINEADO ARRIBA Y ORDENADO)
   ========================================= */
.footer-primary {
    background: linear-gradient(to bottom, #0056cc 0%, #000000 60%) !important;
    color: #ffffff;
    padding: 30px 0 20px;
    margin-top: auto;
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    
    /* CLAVE PARA TU PROBLEMA 1: */
    /* Alineamos todo al inicio (arriba), así no quedan escalonados */
    align-items: flex-start; 
    
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

/* Clase común para todas las columnas para que tengan "el mismo formato" */
.footer-column {
    flex: 1;
    min-width: 200px;
    text-align: left; /* Todo alineado a la izquierda para que se vea ordenado */
}

/* --- BLOQUE 1: MARCA --- */
.footer-brand img {
    margin-bottom: 15px;
    display: block;
}
.footer-brand p { 
    color: rgba(255, 255, 255, 0.9); 
    max-width: 300px; /* Evita que el texto se estire demasiado */
}

/* --- BLOQUE 2 y 3: TÍTULOS --- */
.footer-column h4 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase; /* Un toque más profesional */
    letter-spacing: 1px;
}

/* --- BLOQUE 2: CONTACTO --- */
.contact-link {
    color: #ffffff;
    font-size: 1rem;
    display: flex; 
    align-items: center; 
    gap: 10px;
    transition: opacity 0.3s;
}
.contact-link:hover { opacity: 0.8; }

/* --- BLOQUE 3: COLABORADORES --- */
.colab-list {
    display: flex;
    flex-direction: column; 
    gap: 15px; /* Separación entre logos */
    align-items: flex-start; /* Alineados a la izquierda igual que el contacto */
}

.colab-link img {
    /* CORRECCIÓN DE TAMAÑO */
    width: 130px !important; /* Tamaño controlado, ni muy grande ni muy pequeño */
    height: auto;
    display: block;
   
    padding: 5px;      /* Un pequeño marco para que se vea bien */
    border-radius: 4px;

    /* HE QUITADO EL FILTRO 'INVERT' PORQUE HACÍA DESAPARECER TUS IMÁGENES */
    /* Ahora se verán con sus colores originales sobre un fondo blanco */
}

.colab-link:hover img {
    opacity: 0.9;
    transform: translateY(-5px); /* Animación sutil a la derecha */
}

/* --- ZONA INFERIOR --- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}
.bottom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7); 
    font-size: 0.9rem;
}
.legal-links a { color: rgba(255,255,255,0.9); margin: 0 10px; }
.separator { color: rgba(255,255,255,0.4); }

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 900px) {
    .footer-container {
        flex-direction: column; 
        align-items: center; /* En móvil sí queremos todo centrado */
    }
    .footer-column {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-brand p { max-width: 100%; }
    .colab-list { align-items: center; } /* En móvil centramos los logos */
}
/* =========================================
   TOAST NOTIFICATION (Mensaje emergente)
   ========================================= */
#toast {
    visibility: hidden; /* Oculto por defecto */
    min-width: 250px;
    background-color: #333; /* Fondo oscuro */
    color: #fff; /* Texto blanco */
    text-align: center;
    border-radius: 50px; /* Bordes muy redondos */
    padding: 16px;
    position: fixed; /* Fijo en la pantalla */
    z-index: 9999; /* Por encima de todo */
    left: 50%;
    bottom: 30px; /* A 30px del suelo */
    transform: translateX(-50%); /* Centrado horizontal perfecto */
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}

/* Esta clase se añade con JS para mostrarlo */
#toast.show {
    visibility: visible !important; 
    opacity: 1 !important;
    bottom: 50px;
}


/* --- ESTILOS PÁGINAS LEGALES --- */
.legal-page {
    padding: 60px 0;
    line-height: 1.8;
    color: #444;
    /* Si aquí tienes text-align: justify, los títulos intentarán heredar eso */
}

.legal-page h1, 
.legal-page h2, 
.legal-page h3 {
    color: var(--primary-color);
    text-align: left !important;
    /* EVITA EL JUSTIFICADO EN VARIAS LÍNEAS */
    text-align-last: left !important; 
    text-justify: none !important;
    hyphens: none !important;
    word-break: normal;
}

.legal-page h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.legal-page h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.last-update {
    color: #888;
    font-style: italic;
    margin-bottom: 40px;
    text-align: left;
}