/* style.css - IoTMonitoreo */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

/* Navbar azul oscuro */
.navbar-dark {
    background-color: #0A2540 !important;
}

/* Botones verdes tecnológicos */
.btn-primary {
    background-color: #1ABC9C;
    border: none;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background-color: #16a085;
}

/* Títulos */
h1, h2, h3, h4 {
    color: #0A2540;
    font-weight: 600;
}

/* Hero section (azul principal) */
.bg-primary {
    background-color: #1ABC9C !important;
}

/* Texto justificado mejorado */
.text-justify {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.6;
    hyphens: auto;
}

/* Carrusel mejorado para responsive */
.carousel-item img {
    border-radius: 8px;
    object-fit: cover;
}

.carousel-caption {
    border-radius: 6px;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    margin: 0;
    width: 100%;
    bottom: 0;
    left: 0;
    right: 0;
}

.carousel-caption h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.carousel-caption p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Listas y espaciado */
.list-group-item {
    background: none;
    border: none;
    padding: 0.5rem 0;
}

/* Footer */
footer {
    background-color: #0A2540;
}

/* ================================
   CHATBOT - BOTÓN MEJORADO
================================ */

/* Contenedor fijo: sigue al hacer scroll */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: end;
}

/* Botón del búho - FONDO OSCURO MEJORADO */
.logo-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    /* Fondo oscuro que combina con tu web */
    background: linear-gradient(135deg, #0A2540 0%, #1a3a52 100%);
    /* Borde verde de tu marca */
    border: 3px solid #1ABC9C;
    box-shadow: 
        0 6px 20px rgba(10, 37, 64, 0.6),
        0 0 25px rgba(26, 188, 156, 0.4);
    transition: all 0.3s ease;
}

.logo-button:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 
        0 10px 30px rgba(10, 37, 64, 0.8),
        0 0 35px rgba(26, 188, 156, 0.6);
    border-color: #16a085;
}

.logo-button-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(26, 188, 156, 0.5));
}

/* Ventana del chat - posicionada respecto al contenedor fijo */
.chatbot-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 350px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 
        0 8px 30px rgba(10, 37, 64, 0.25),
        0 0 0 1px rgba(26, 188, 156, 0.1);
    display: none;
    flex-direction: column;
    height: 450px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* Header del chat - usando tu azul oscuro */
.chatbot-header {
    background: linear-gradient(135deg, #0A2540 0%, #0d2f47 100%);
    color: white;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 2px solid #1ABC9C;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Mensajes - FONDO MEJORADO */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    /* Fondo gris muy claro que combina mejor */
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    padding: 11px 15px;
    border-radius: 12px;
    max-width: 82%;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Mensaje del bot - GRIS CLARO PROFESIONAL */
.bot-message {
    background: #ffffff;
    color: #2d3748;
    margin-right: auto;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #1ABC9C;
}

/* Mensaje del usuario - TU VERDE */
.user-message {
    background: linear-gradient(135deg, #1ABC9C 0%, #16a085 100%);
    color: white;
    margin-left: auto;
    border: none;
}

/* Input */
.chatbot-input {
    display: flex;
    padding: 14px;
    border-top: 2px solid #e2e8f0;
    background: white;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.chatbot-input input:focus {
    border-color: #1ABC9C;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.chatbot-input button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #1ABC9C 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
}

.chatbot-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.4);
}

.chatbot-input button:active {
    transform: translateY(0);
}

/* Scrollbar personalizado */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #1ABC9C;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #16a085;
}

/* === HERO SECTION CON VIDEO DE FONDO - RESPONSIVE MEJORADO === */
.hero-video-section-full {
    position: relative;
    min-height: 100vh;
    background-color: #0A2540;
    color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 56px;
}

.hero-content-full {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 1100px;
    transform: translateY(0%);
}

/* Título principal - Escalable */
.hero-content-full h1 {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow:
        0 0 10px rgba(26, 188, 156, 0.8),
        0 0 20px rgba(26, 188, 156, 0.6),
        2px 2px 8px rgba(0, 0, 0, 0.8);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Subtítulo - Escalable */
.hero-content-full p {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    line-height: 1.6;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === EFECTO LED MEJORADO === */
.led-effect {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow:
        0 0 8px #fff,
        0 0 15px #fff,
        0 0 25px #1ABC9C,
        0 0 35px #1ABC9C;
    animation: led-blink 2.5s ease-in-out infinite alternate;
    text-transform: uppercase;
}

@keyframes led-blink {
    0% {
        opacity: 0.85;
        text-shadow:
            0 0 8px #fff,
            0 0 15px #fff,
            0 0 25px #1ABC9C,
            0 0 35px #1ABC9C;
    }
    100% {
        opacity: 1;
        text-shadow:
            0 0 12px #fff,
            0 0 25px #fff,
            0 0 40px #1ABC9C,
            0 0 55px #1ABC9C,
            0 0 70px #1ABC9C;
    }
}

/* LED effect en navbar - tamaño fijo */
.navbar-brand .led-effect {
    font-size: 1.3rem;
    font-weight: 600;
}

/* === MEDIA QUERIES PARA RESPONSIVE === */
/* Tablets y pantallas medianas */
@media (max-width: 992px) {
    .hero-content-full {
        padding: 1.5rem 1.25rem;
    }

    .hero-content-full h1 {
        margin-bottom: 1.25rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    /* Oculta el contenedor del video para evitar su descarga en móvil */
    .video-container {
        display: none;
    }

    /* Usa la imagen de poster como background estático */
    .hero-video-section-full {
        min-height: 70vh;
        padding-top: 60px;
        background-image: url('../movies/iot-poster.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    /* Capa de sombra para contraste sobre la imagen estática */
    .hero-video-section-full::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1;
    }

    .hero-content-full {
        z-index: 2;
        padding: 1.5rem 1rem;
    }

    .hero-content-full h1 {
        margin-bottom: 1rem;
        letter-spacing: 0.3px;
    }

    .hero-content-full p {
        margin-top: 0.75rem;
    }

    /* Navbar logo en móviles */
    .navbar-brand .led-effect {
        font-size: 1.1rem;
    }

    /* Chatbot responsive */
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        max-width: 340px;
        height: 420px;
        bottom: 80px;
    }

    .logo-button {
        width: 62px;
        height: 62px;
        border-width: 2px;
    }

    .logo-button-img {
        width: 40px;
        height: 40px;
    }

    .chatbot-header {
        padding: 14px 16px;
        font-size: 14px;
    }

    .chatbot-messages {
        padding: 12px;
        gap: 10px;
    }

    .message {
        font-size: 13px;
        padding: 10px 13px;
    }

    .chatbot-input {
        padding: 12px;
        gap: 8px;
    }

    .chatbot-input input {
        padding: 9px 12px;
        font-size: 13px;
    }

    .chatbot-input button {
        padding: 9px 16px;
        font-size: 13px;
    }

    .carousel-caption h5, .carousel-caption p {
        font-size: 0.9rem;
    }

    /* Corrección para que el carrusel muestre el texto en móviles */
    .carousel-caption.d-none.d-md-block {
        display: block !important;
    }

    /* Aceleración de la animación de logos en móvil */
    .logo-carousel-track {
        animation: scroll-logos 15s linear infinite;
        transform: translate3d(0, 0, 0);
    }

    .logo-slide {
        width: 150px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .hero-video-section-full {
        min-height: 60vh;
    }

    .hero-content-full {
        padding: 1rem 0.75rem;
    }

    .hero-content-full h1 {
        margin-bottom: 0.875rem;
    }

    .navbar-brand .led-effect {
        font-size: 1rem;
    }
}

/* === CARRUSEL DE LOGOS EN "NOSOTROS" === */
#carouselAliados {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#carouselAliados .carousel-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

#carouselAliados .carousel-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#carouselAliados .carousel-item img {
    max-height: 60px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    border-radius: 4px;
    background: white;
    padding: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#carouselAliados .carousel-item img:hover {
    opacity: 1;
}

#carouselAliados .carousel-control-prev,
#carouselAliados .carousel-control-next {
    width: 36px;
    height: 36px;
    background-color: rgba(10, 37, 64, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

#carouselAliados .carousel-control-prev-icon,
#carouselAliados .carousel-control-next-icon {
    width: 16px;
    height: 16px;
    background-color: white;
}

#carouselAliados .carousel-indicators {
    display: none;
}

/* ================================
   BANNER DE LOGOS (Carrusel Continuo)
================================ */
.logo-carousel-container {
    overflow: hidden;
    white-space: nowrap;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.logo-carousel-track {
    display: flex;
    animation: scroll-logos 30s linear infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.logo-slide {
    display: inline-block;
    flex-shrink: 0;
    width: 200px;
    height: 100px;
    padding: 10px 20px;
    margin: 0 15px;
    line-height: 100px;
    text-align: center;
    box-sizing: border-box;
}

.logo-img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: opacity 0.3s, filter 0.3s;
}

.logo-img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ================================
   ESTILOS ESPECÍFICOS DE LA SECCIÓN SERVICIOS
================================ */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd !important;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    border-color: #1ABC9C !important;
}

.service-icon-box {
    width: 100px;
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e6fffb;
    border-radius: 8px;
    padding: 5px;
}

.service-icon-box img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.service-card h3 {
    color: #0A2540;
    font-size: 1.4rem;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .service-card {
        flex-direction: column !important;
        text-align: center;
    }

    .service-icon-box {
        margin: 0 auto 15px auto !important;
    }

    .service-content h3 {
        margin-top: 0;
    }

    .service-content p {
        text-align: center !important;
    }
}

/* ================================
   Botón 5G Satelital en Navbar
================================ */
.nav-link-sateliot {
    background-color: #1ABC9C;
    color: white !important;
    border-radius: 20px;
    padding: 8px 15px !important;
    margin-left: 15px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-link-sateliot:hover {
    background-color: #16a085;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 991.98px) {
    .nav-link-sateliot {
        margin-left: 0;
        margin-top: 10px;
        width: fit-content;
        padding: 6px 12px !important;
        font-size: 0.9rem;
    }
}