/* Estilos para el hero section con carrusel */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Ocupa toda la altura de la ventana */
    min-height: 600px;
    overflow: hidden;
    margin: 0;
    padding: 0; /* Eliminamos cualquier padding */
    background-color: var(--brand-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Fix para dispositivos móviles */
    height: -webkit-fill-available;
    height: 100vh;
    /* Eliminar cualquier espacio entre secciones */
    margin-bottom: -1px;
    border-bottom: 0;
}

/* Contenedor del carrusel */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    margin-bottom: -5px; /* Eliminar cualquier espacio entre el carrusel y el siguiente elemento */
}

/* Estilos para el carrusel */
.carousel {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.carousel-inner {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.carousel-item {
    height: 100% !important;
    background-color: var(--brand-dark);
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

/* Solución para imágenes de diferentes tamaños */
.carousel-image-container {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-dark); /* Asegura que no haya espacios en blanco */
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important; /* Eliminar espacios en blanco */
    line-height: 0 !important; /* Eliminar espacios en blanco */
}

.carousel-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Cubre todo el contenedor manteniendo la proporción */
    object-position: center !important; /* Centra la imagen */
    transition: opacity 0.8s ease;
    display: block !important; /* Ensure block display */
    margin: 0 !important; /* Remove any margins */
    padding: 0 !important; /* Remove any padding */
    max-width: none !important; /* Prevent any max-width constraints */
}

/* Transición ultra suave entre imágenes con cross-fade */
.carousel-inner {
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1.5s ease-in-out;
    opacity: 0;
    z-index: 1;
}

.carousel-item.active {
    position: relative;
    opacity: 1;
    z-index: 2;
}

/* Eliminar transiciones predeterminadas de Bootstrap */
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
    transition: opacity 1.5s;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
    transition: opacity 1.5s;
}

/* Asegurar que no haya movimiento horizontal */
.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev,
.carousel-fade .carousel-item.active,
.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-prev {
    transform: translateX(0);
    transform: translate3d(0, 0, 0);
}

/* Ajuste para asegurar que las imágenes se superpongan durante la transición */
.carousel-inner .carousel-item {
    display: block;
}

/* Overlay para mejorar la legibilidad del texto */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Overlay oscuro para mejorar legibilidad del texto */
    z-index: 1;
    /* Asegura que el overlay cubra toda la pantalla */
    min-height: 100vh;
}

/* Contenido del hero */
.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 5;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-text-container {
    position: absolute;
    bottom: 20%;
    left: 10%;
    max-width: 600px;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Contenedor para el título con estilo minimalista */
.hero-tagline-wrapper {
    position: relative;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.hero-tagline {
    font-size: 3.2rem; /* Tamaño más pequeño */
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Sombra más sutil */
    line-height: 1.1;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px; /* Espaciado más compacto para un look moderno */
    text-transform: uppercase; /* Mantener mayúsculas para consistencia */
}

/* Color para ALUMINIO con estilo minimalista pero moderno */
.highlight-blue {
    color: #8a88ff; /* Mantener el color morado brillante */
    text-shadow: 0 0 10px rgba(138, 136, 255, 0.4); /* Sombra más sutil */
    position: relative;
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0px; /* Sin espaciado adicional para mantener coherencia */
}

/* Eliminar efectos excesivos para un look minimalista */
.highlight-blue::after {
    display: none; /* Eliminar el resplandor de fondo */
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.2s forwards;
    margin-top: 1.5rem; /* Aumentar el espacio vertical */
    width: 100%; /* Asegurar que ocupe todo el ancho disponible */
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-blue);
    color: white;
    font-weight: 500;
    padding: 0.7rem 1.8rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    text-transform: none; /* Quitar mayúsculas para mejor legibilidad */
    box-shadow: 0 4px 10px rgba(50, 50, 117, 0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Futura Medium', sans-serif; /* Asegurar la fuente correcta */
    min-width: 160px; /* Ancho mínimo para consistencia */
    text-align: center; /* Centrar texto */
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.hero-btn:hover {
    background-color: #3e3e8c; /* Un tono más oscuro de brand-blue */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(50, 50, 117, 0.4);
}

.hero-btn:hover::before {
    left: 100%;
}

.video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 160px; /* Mismo ancho mínimo que el botón principal */
    text-align: center; /* Centrar texto */
    font-family: 'Futura Medium', sans-serif; /* Misma fuente que el botón principal */
}

.video-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(138, 136, 255, 0.1), rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-btn i {
    margin-right: 0.8rem;
    font-size: 0.9rem;
    background-color: var(--brand-blue);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(138, 136, 255, 0.5);
    animation: pulse-light 2s infinite;
}

@keyframes pulse-light {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 136, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(138, 136, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(138, 136, 255, 0);
    }
}

.video-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.video-btn:hover::before {
    opacity: 1;
}

.video-btn:hover i {
    transform: scale(1.1) rotate(360deg);
    background-color: #8a88ff;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-logo {
    position: absolute; /* Cambio a absolute para que solo aparezca en el hero */
    bottom: 2rem; /* Aumentamos la distancia desde abajo para evitar que se corte */
    right: 1rem;
    width: 180px;
    height: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.6s forwards;
    z-index: 20; /* Aseguramos que esté por encima de los elementos del hero */
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)); /* Sombra para mejorar visibilidad */
}

/* Controles del carrusel */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators {
    z-index: 10;
    margin-bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--brand-silver);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    opacity: 1;
    background-color: var(--brand-red);
    transform: scale(1.2);
}

/* Animaciones */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para el modal de video */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.show {
    display: flex;
    opacity: 1;
}

.video-container {
    position: relative;
    width: 80%;
    max-width: 900px;
    padding-top: 56.25%; /* Proporción 16:9 */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.close-video {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

.close-video:hover {
    transform: scale(1.1);
}

/* Estilos responsivos */
@media (max-width: 1200px) {
    .hero-text-container {
        left: 8%;
        max-width: 500px;
    }
    
    .hero-tagline {
        font-size: 3rem;
    }
    
    .hero-logo {
        width: 160px;
    }
}

@media (max-width: 991px) {
    .hero-text-container {
        left: 6%;
        bottom: 15%;
        max-width: 450px;
    }
    
    .hero-tagline {
        font-size: 2.8rem;
    }
    
    .hero-logo {
        width: 140px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        height: 100vh;
        min-height: 100vh; /* Asegurar que ocupe toda la altura de la pantalla */
        max-height: -webkit-fill-available; /* Solución para iOS */
    }
    
    .hero-text-container {
        left: 5%;
        bottom: 20%;
        max-width: 400px;
    }
    
    .hero-tagline {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }
    
    .hero-btn, .video-btn {
        width: 100%; /* Ocupar todo el ancho disponible */
        max-width: 220px; /* Limitar el ancho máximo */
        justify-content: flex-start; /* Alinear texto a la izquierda */
    }
    
    .hero-logo {
        width: 120px;
        bottom: 30px;
        right: 30px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 100vh;
        min-height: 100vh;
        max-height: -webkit-fill-available; /* Solución para iOS */
        margin: 0;
        padding: 0;
    }
    
    .hero-text-container {
        left: 5%;
        bottom: 25%;
        max-width: 90%;
    }
    
    .hero-tagline {
        font-size: 2rem;
    }
    
    .hero-buttons {
        gap: 12px;
        width: 100%;
    }
    
    .hero-btn, .video-btn {
        width: 100%;
        max-width: 200px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .video-btn i {
        width: 22px;
        height: 22px;
        margin-right: 0.6rem;
    }
    
    .hero-logo {
        width: 100px;
        bottom: 10px; /* Moved up to avoid any gap */
        right: 15px;
        z-index: 30; /* Ensure it's above any other elements */
    }
    
    .video-container {
        width: 90%;
    }
    
    .decorative-line {
        display: none; /* Ocultar líneas en pantallas muy pequeñas */
    }
}
