@import url("botones.css");
@import url('footer.css');
@import url("dialogos.css");

/* --- VARIABLES DE COLOR (Tu Paleta) --- */
:root {
    --negro-puro: #000000;
    --negro-suave: #121212;
    --gris-oscuro: #1e1e1e;
    --verde-tecnologico: #00FF66; /* Verde vibrante/neón */
    --verde-hover: #00CC52;
    --blanco: #ffffff;
    --text-light: #e2e8f0;      /* Blanco grisáceo para texto */
    --texto-oscuro: #333333;
    --neon-glow: rgba(57, 255, 20, 0.2);
    --gris-claro: #faf5f5;
    --gris: rgb(84, 81, 81);
}

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

html {
    scroll-behavior: smooth;    /* hace que se desplace suave y no de brinco y se vea mas fluido cuando se preciona boton descargar app */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--blanco);
    color: var(--texto-oscuro);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

header {                            /* Navegación */
    background: var(--negro-puro); 
    padding: 10px 20px;
    position: sticky;               /* fija el header, no se desplace cuando se hace scroll */
    top: 0; 
    z-index: 1000;
    border-bottom: 0.5px solid var(--gris-claro);
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 0 15px var(--neon-glow);
}

header h1 { 
    font-size: 1.4rem; 
    color: var(--blanco); 
    font-weight: 700;
    letter-spacing: 1px;
}

.imagen-header{
    height: 60px; 
    width: auto;
}
        
header h1 span {
    color: var(--blanco);
    /*text-shadow: 0 0 8px var(--neon-green);*/
}

.logo-container{
    display: flex;
    flex-direction: column;     /* Apila el nombre y el subtítulo verticalmente */
    align-items: center;        /* Esto centra horizontalmente el título y el subtítulo entre sí */
}
.logo-container span{
    color: var(--blanco);
    font-size: 1rem; 
}

nav a { 
    color: var(--blanco); 
    text-decoration: none; 
    margin-left: 20px; 
    font-weight: 500; 
    transition: 0.3s;
}
        
nav a:hover { 
    color: var(--verde-hover); 
    text-shadow: 0 0 5px var(--verde-hover);
}

.hero {                 /* --- SECCIÓN HERO (Filtro Principal) --- */
    background-color: var(--negro-suave);
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('../imagenes/circuit_1.jpg'); /* Imagen de fondo tecnológica abstracta */
    background-size: cover;
    background-position: center;
    color: var(--blanco);
    padding: 50px 0;
    text-align: center;
    width: 100%;          /* Ocupa todo el contenedor */
    
}

.hero h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 1px;
}

.hero h1 span {
    color: var(--verde-tecnologico);
}

.hero p {
    font-size: 18px;
    color: #ccc;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.span_2{
    color: var(--verde-tecnologico) !important; 
    font-size: 1.2rem;    
}

.engineering {              /* --- SECCIÓN INGENIERÍA (B2B) --- */
    background-color: var(--gris-oscuro);
    color: var(--blanco);
    padding: 80px 0;
    border-top: 1px solid var(--verde-tecnologico);
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    position: relative;
}

.section-title span {
    color: var(--verde-tecnologico);
}

.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--negro-suave);
    padding: 40px 30px;
    border-radius: 8px;
    border-left: 4px solid var(--verde-tecnologico);
    box-shadow: 0 0 10px var(--neon-glow);
    transition: transform 0.3s;

    width: 100%;          /* Ocupa todo el contenedor */
    max-width: 500px;     /* Ancho máximo para que no crezca demasiado en PC */
    min-height: 250px;    /* Altura mínima para que todas tengan un tamaño base similar */
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
}

.card p {
    color: #aaa;
    font-size: 14px;
}

.card:active{                   /* cambiar color cuando se presiona una card*/
    background-color: var(--negro-puro);   
    box-shadow: 0 0 40px var(--neon-glow);
    transform: scale(0.98); 
}

.home-cctv {                    /* --- SECCIÓN CCTV --- */
    background-color: var(--negro-puro);
    color: var(--text-light);
    padding: 80px 0;
    border-top: 1px solid var(--verde-tecnologico);
    border-bottom: 2px solid var(--verde-tecnologico);
}

.cctv-flex {
    display: flex;
    flex-direction: row;         /* Coloca los elementos uno al lado del otro */
    align-items: center;
    justify-content: space-between;
}

.cctv-text,
.cctv-img {
    width: 50%;                     /* Ocupan todo el ancho disponible en celulares */
}

.cctv-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.cctv-text p {
    margin-bottom: 30px;
    color: #b1adad;
}

.cctv-img {
    flex: 1;
    background-color: #ddd;
    min-height: 450px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #777;
    background-image: url('../imagenes/cctv.jpg');
    background-size: cover;
    background-position: center;
}

.home-appliances {              /* --- SECCIÓN LÍNEA BLANCA (B2C) --- */
    background-color: var(--text-light);
    color: var(--texto-oscuro);
    padding: 80px 0;
}

.appliance-flex {
    display: flex;
    flex-direction: row;         /* Coloca los elementos uno al lado del otro */
    align-items: center;
    justify-content: space-between;
}

.appliance-text,
.appliance-img {
    width: 50%;                     /* Ocupan todo el ancho disponible en celulares */
}

.appliance-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.appliance-text p {
    margin-bottom: 30px;
    color: #555;
}

.appliance-img {
    flex: 1;
    background-color: #ddd;
    min-height: 450px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #777;
    background-image: url('../imagenes/lineablanca.jpg');
    background-size: cover;
    background-position: center;
}

/* --- SECCIÓN PROMOCIÓN APP --- */
.app-promo {
    background-color: var(--negro-puro);
    color: var(--blanco);
    padding: 80px 0;
    border-top: 2px solid var(--verde-tecnologico);
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;

    width: 90%;
    max-width: 1000px;                  /* Redúceme este valor (por ejemplo a 900px u 800px) para hacerla más angosta */
    margin: 0 auto;
}

.app-info h2 {
    font-size: 32px;
    margin-bottom: 25px;
}

.app-info h2 span {
    color: var(--verde-tecnologico);
}

.app-features {
    list-style: none;
    margin-bottom: 40px;
}

.app-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.app-features li::before {
    content: "✓";
    color: var(--verde-tecnologico);
    font-weight: bold;
    margin-right: 15px;
    font-size: 18px;
}

.app-download-zone {
    display: flex;
    align-items: center;
    gap: 30px;
}

.qr-code {
    width: 120px;
    height: 120px;
    background-color: var(--blanco);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--verde-tecnologico);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 12px;
    text-align: center;
    font-weight: bold;
}

.imag-app-container {          /* Contenedor que simula el marco del teléfono */
    display: flex;
    width: 300px;
    height: 600px;
    border: 1px solid var(--verde-tecnologico);
    border-radius: 8px;
    box-shadow: 0 0 15px var(--verde-tecnologico);
    justify-content: center;
    align-items: center;
    margin: 0 auto;             /* Centra el bloque horizontalmente si es necesario */
    overflow: hidden;           /* Evita que la imagen sobresalga del borde redondeado */
}

.imag-app {                     /* Estilo para la imagen dentro del marco */
    width: 100%;
    height: 100%;
    object-fit: cover;          /* Asegura que la imagen llene el espacio sin deformarse */
}

.texto-enlace {
    color: #0000EE;               /* O también puedes usar: color: blue; */
    text-decoration: underline;     /* Opcional: le añade la línea abajo típica del enlace */
    cursor: pointer;                /* Cambia el cursor a una manita al pasar por encima */
}

@media (max-width: 768px) {         /* --- RESPONSIVO (Celulares) --- */
    header { 
        position: static;           /* hace que el header se desplace (que desaparezca) al hacer scroll */ 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    nav a {
         margin: 0 10px; 
    }
    .container{
        padding: 15px;
    }
    .hero{
        padding: 10px;
    }
    .hero-buttons {
        flex-direction: column;
    }

    .card {
        width: 90%;          /* Ocupa todo el contenedor */
        max-width: 400px;     /* Ancho máximo para que no crezca demasiado en PC */
        min-height: 250px;    /* Altura mínima para que todas tengan un tamaño base similar */
        margin: 0 auto;
        align-items: center;
    }
    .hero h1 {
        font-size: 28px;
    }
    .cctv-text h2 {
        font-size: 28px;
        text-align: center;
    }
    .appliance-text h2 {
        font-size: 28px;
        text-align: center;
    }
    .app-info h2 {
        font-size: 28px;
        margin-bottom: 25px;
        text-align: center;
    }
    .nav-btn {
        display: block;
        margin: 15px auto !important; 
        width: 90%;
    }

    .cctv-flex {
        flex-direction: column; 
        justify-content: space-between;
        align-items: center;
    }
    .cctv-flex, .app-grid { 
        grid-template-columns: 1fr; 
        flex-direction: column;
    }
    .cctv-text,
    .cctv-img {
        width: 90%;        
    }
    .cctv-img {
        min-height: 200px;              /* Asegura que la caja de la imagen tenga espacio para mostrarse */
    }

    .appliance-flex {
        flex-direction: column; 
        justify-content: space-between;
        align-items: center;
    }
    .appliance-flex, .app-grid { 
        grid-template-columns: 1fr; 
        flex-direction: column;
    }
    .appliance-text,
    .appliance-img {
        width: 90%;        
    }
    .appliance-img {
        min-height: 200px;              /* Asegura que la caja de la imagen tenga espacio para mostrarse */
        margin-top: 20px;
    }
    
    .app-download-zone {
        flex-direction: column; 
        align-items: flex-start;
    }
    
    .btn-line, .btn-verde{              /* Oculta botones en pantallas pequeñas */
        display: none;
    }
    
    .btn-verde_2, .btn-negro{           /* Muestra boton en pantallas pequeñas */
        display: block;
        width: 60%;        
        margin: 0 auto;                 /* Esto es lo que centra el bloque horizontalmente */
        text-align: center;             /* Centra el texto dentro del botón */
    }

    .btn-negro{
        margin-bottom: 20px;
    }
    
    .qr-code{
        display: none;                  /* oculta el codigo QR */
    }
    .dialog[open]{
        width: 90vw;                    /* Ocupa el 90% del ancho de la ventana en el celular*/
        height: 90vh;                   /* Ocupa el 90% del alto de la ventana en el celular*/
    }
}