@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #00a8ff; 
    --secondary-color: #007bff;
    --dark-bg: #0f172a; /* Azul noche profundo */
    --light-bg: #1e293b;
    --text-color: #e2e8f0;
    --text-secondary: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.7;
}

.page-wrapper {
    max-width: 1400px; /* Ancho máximo para el layout boxed */
    margin: 0 auto; /* Centrar el contenedor */
    background-color: var(--dark-bg); /* Asegurar que el fondo del wrapper sea el mismo */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* Sombra para el efecto boxed */
}

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

section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h2 span {
    color: var(--primary-color);
}

.section-lead {
    max-width: 750px;
    margin: 0 auto 4rem auto;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* Header y Navegación */
header {
    background: white; /* Fondo blanco */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    max-width: 1400px; /* Limitar al ancho del page-wrapper */
    left: 50%; /* Centrar */
    transform: translateX(-50%); /* Centrar */
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: black; /* Color de texto negro para el logo */
}

.logo img {
    height: 45px;
    margin-right: 12px;
}

.logo .text-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinea el texto a la izquierda */
}

.logo .text-logo .tagline {
    font-size: 0.8rem; /* Tamaño más pequeño para el tagline */
    font-weight: 400;
    color: #555; /* Un color más suave para el tagline */
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li a {
    color: black; /* Color de texto negro para los enlaces */
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color); /* Color azul al pasar el ratón o activo */
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: black;
    margin: 4px 0;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 1120px) {
    nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: white;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    nav.active {
        display: flex;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    nav ul li a {
        padding: 15px;
        display: block;
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    header .container {
        justify-content: space-between;
    }
}

/* Hero Section con Video Background */
#hero {
    position: relative;
    height: 100vh;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden; /* Asegura que el video no se desborde */
}

#hero-video {
    position: absolute;
    top: 90%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2; /* Detrás del contenido y del overlay */
    transform: translateX(-50%) translateY(-50%);
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8); /* Fondo oscuro con 50% de opacidad */
    z-index: -1; /* Entre el video y el contenido */
}

.hero-content {
    position: relative; /* Para que el contenido esté sobre el overlay */
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    color: var(--text-secondary);
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.2);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.3);
}

@media (max-width: 768px) {
    #hero {
        height: 80vh;
        max-height: 600px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Features Grid (Por qué elegirnos) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid transparent;
    transition: transform 0.3s, border-color 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-secondary);
}

/* Carrusel Hexa en Acción */
.carousel-wrapper {
    position: relative;
}

.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.carousel {
    display: flex;
    width: 100%;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* para un scroll suave en iOS */
}

.carousel-item {
    flex: 0 0 80%;
    margin: 0 1rem;
    scroll-snap-align: center;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding-top: 35px;
}

@media (min-width: 769px) {
    .carousel-item {
        flex: 0 0 30%; /* Show more items on larger screens */
    }
}

.carousel-item img {
    width: 80%; /* Reducido el tamaño de la imagen en un 20% */
    height: auto;
}

.carousel-item h3 {
    margin-top: 1rem;
    color: var(--primary-color);
}

.carousel-item p {
    padding: 0 1rem 1rem 1rem;
    color: var(--text-secondary);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 100;
}

.prev {
    left: -20px;
}

.next {
    right: -20px;
}

@media (max-width: 768px) {
    .carousel-button {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .prev {
        left: 5px;
    }

    .next {
        right: 5px;
    }
}

/* Video Section */
#video-section {
    text-align: center;
}

#video-section video {
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Clientes */
#clients {
    padding: 4rem 0;
    background: var(--dark-bg);
}

.clients-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.clients-grid img {
    height: 120px; 
    opacity: 0.9; 
    transition: opacity 0.3s;
    background-color: white; 
    padding: 25px; 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
}

/* Reincorporando las reglas para .client-logo-div */
.client-logo-div {
    flex: 1 1 150px; /* Flexibilidad para que los logos se ajusten */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: white;
}

.clients-grid img:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .clients-grid img {
        height: 80px; /* Smaller height for mobile */
        padding: 15px; /* Adjust padding */
    }
}

/* Estilos para la sección #features */
.features-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.features-content {
    flex: 1;
    min-width: 300px;
}

.features-content p {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.features-content ul {
    list-style: none;
    margin-top: 1.5rem;
}

.features-content ul li {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.8rem;
    color: var(--text-color);
}

.features-content ul li::before {
    content: '\f00c'; /* Icono de checkmark de Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0;
}

.features-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.features-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Media Queries para la sección #features */
@media (max-width: 992px) {
    .features-layout {
        flex-direction: column;
        text-align: center;
    }

    .features-content ul {
        text-align: left;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
}
