/* =========================================
   SISTEMA DE DISEÑO KONECTA (Estilo Adquio + Efectos Apple)
   ========================================= */

:root {
    --color-primary: #0066cc;       
    --color-primary-dark: #004c99;  
    --color-secondary: #f4f7f9;     
    --color-text-dark: #1a202c;     
    --color-text-light: #4a5568;    
    --color-white: #ffffff;
    
    --shadow-soft: 0 4px 20px rgba(0, 102, 204, 0.08);
    --shadow-hover: 0 12px 30px rgba(0, 102, 204, 0.15);
    --border-radius: 10px;
    --font-main: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* NAVEGACIÓN (Efecto Cristal de Apple) */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; 
    background-color: rgba(255, 255, 255, 0.8); /* Blanco transparente */
    backdrop-filter: blur(12px); /* Magia del cristal empañado */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0; z-index: 1000; 
}
.nav-brand { display: flex; align-items: center; gap: 15px; font-weight: 700; font-size: 1.2rem; color: var(--color-text-dark); text-decoration: none; }
.nav-brand img { height: 80px; /* Auméntalo a 60px, 65px o 70px según te guste */
    transition: height 0.3s ease;}
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--color-text-dark); font-weight: 500; font-size: 15px; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--color-primary); }
.nav-links a.active { color: var(--color-primary); font-weight: 700; }

/* HERO SECTION */
.hero {
    /* Aquí está la magia: Un degradado azul semi-transparente SOBRE la imagen */
    background: linear-gradient(rgba(10, 37, 64, 0.85), rgba(0, 102, 204, 0.75)), 
                url('../images/hero-fondo.webp') center center / cover no-repeat;
    color: var(--color-white); 
    text-align: center; 
    padding: 120px 5%;
}

/* BOTONES */
.btn { display: inline-block; padding: 16px 32px; border-radius: var(--border-radius); text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
.btn-white { background-color: var(--color-white); color: var(--color-primary); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-white:hover { background-color: #f8fafc; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); color: var(--color-primary-dark); }
.btn-primary { background-color: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background-color: var(--color-primary-dark); transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* SECCIONES */
.section-padding { padding: 100px 5%; background-color: var(--color-secondary); }
.section-white { padding: 100px 5%; background-color: var(--color-white); }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 50px; font-weight: 700; color: var(--color-text-dark); }

/* IMÁGENES ESTILO APPLE (Banners gigantes) */
.apple-banner {
    padding: 60px 5%;
    background-color: var(--color-white);
    text-align: center;
}
.apple-rounded-img {
    width: 100%;
    max-width: 1000px; /* Para que no se estire demasiado en pantallas gigantes */
    border-radius: 24px; /* Bordes bien curvos */
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); /* Sombra que da profundidad */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.apple-rounded-img:hover {
    transform: scale(1.02); /* Efecto de acercamiento suave */
}

/* TARJETAS (Efecto elevación Apple) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.card {
    background: #ffffff; padding: 40px 30px; 
    border-radius: 18px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03); /* Sombra inicial invisible */
    border-top: 5px solid var(--color-primary); /* Toque Konecta/Adquio */
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Transición súper suave */
    text-align: center; display: flex; flex-direction: column; align-items: center;
}
.card:hover { 
    transform: translateY(-10px) scale(1.01); /* Sube y crece un poquito */
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.12); /* Brillo azulado elegante */
    border-top-color: var(--color-primary-dark); 
}
.card img { max-width: 180px; height: auto; margin-bottom: 25px; mix-blend-mode: multiply; }
.card h3 { margin-bottom: 15px; font-size: 1.4rem; color: var(--color-text-dark); }
.card p { color: var(--color-text-light); font-size: 1rem; margin-bottom: 25px; flex-grow: 1; }

.card-link {
    display: inline-block; color: var(--color-primary); font-weight: 600; text-decoration: none;
    padding: 8px 16px; border-radius: 6px; background-color: rgba(0, 102, 204, 0.05);
    transition: all 0.2s; margin-top: auto;
}
.card-link:hover { background-color: var(--color-primary); color: var(--color-white); }

/* FOOTER */
.footer { background-color: #0a2540; color: #fff; padding: 50px 5%; text-align: center; font-size: 0.95rem; }
.footer p { color: #cbd5e1; margin-top: 10px; }

/* =========================================
   ANIMACIONES JS (Fade + Scale Up estilo Apple)
   ========================================= */
.hidden {
    opacity: 0;
    transform: translateY(50px) scale(0.95); /* Empieza más abajo y encogido al 95% */
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.visible {
    opacity: 1;
    transform: translateY(0) scale(1); /* Vuelve a su estado perfecto */
}

/* =========================================
   RESPONSIVE DESIGN (Adaptación a Móviles)
   ========================================= */

/* Tablets y Teléfonos Grandes (Menos de 768px) */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column; /* Logo arriba, menú abajo */
        padding: 15px;
    }

    .nav-links {
        margin-top: 15px;
        gap: 15px;
        flex-wrap: wrap; /* Si no caben, se ponen en dos filas */
        justify-content: center;
    }

    .nav-links a {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 2.2rem; /* Título más pequeño en móvil */
    }

    .hero p {
        font-size: 1rem;
    }

    .section-padding {
        padding: 60px 5%;
    }

    .grid-cards {
        grid-template-columns: 1fr; /* Una sola tarjeta por fila */
    }
    
    .feature-row {
        flex-direction: column !important; /* Imagen y texto uno sobre otro */
        padding: 20px;
        text-align: center;
    }
}

/* Teléfonos Pequeños (Menos de 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%; /* Botones a lo ancho del teléfono */
        text-align: center;
    }

    .nav-brand {
        font-size: 1rem;
    }

    .nav-brand img {
        height: 35px;
    }
}
/* =========================================
   GRILLA DE LOGOS (Marcas y Protocolos)
   ========================================= */
.logos-grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.logo-item {
    width: 150px; /* Tamaño ideal para protocolos */
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* TRUCO MAGICO: invert(1) vuelve lo blanco negro. */
    filter: invert(1) grayscale(100%); 
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.logo-item img:hover {
    /* Al pasar el mouse, le quitamos la escala de grises */
    filter: invert(1) grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}
