/* --- VARIABLES Y RESET --- */
:root {
    --primary-color: #003366; /* Azul Ingeniería */
    --accent-color: #ff6600;  /* Naranja Seguridad */
    --text-dark: #333;
    --text-light: #f4f4f4;
    --bg-light: #f9f9f9;
    --whatsapp-green: #25d366;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- HEADER & NAV --- */
header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a:hover {
    color: var(--accent-color);
    transition: var(--transition);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- HERO SECTION --- */


/* --- HERO SECTION (Actualizado) --- */
.hero {
    height: 100vh;
    /* Cambiamos la URL por la imagen local que acabas de guardar */
    /* Se mantiene el degradado oscuro para que el texto blanco se lea bien */
    background: linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 51, 102, 0.85)), url('assets/images/fondo-inicio.png'); 
    background-size: cover;
    background-position: center;
    /* El resto sigue igual... */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 60px;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: #e65c00;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

/* --- SECCIONES GENERALES --- */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title .line {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
}

.section-title p {
    margin-top: 15px;
    color: #666;
}

/* --- SERVICIOS (GRID) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.highlight-card {
    border-top: 4px solid var(--accent-color);
    background: #fffdf9;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* --- BANCO DE PRUEBAS --- */
.test-bench {
    background: var(--bg-light);
}

.test-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.test-content, .test-image {
    flex: 1;
    min-width: 300px;
}

.test-content ul {
    margin: 20px 0;
}

.test-content li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.test-content li::before {
    content: "✓";
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 10px;
}

.test-placeholder {
    width: 100%;
    height: 350px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- INDUSTRIAS --- */
.industries {
    background: var(--primary-color);
    color: white;
}

.industry-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.industry-item {
    background: rgba(255,255,255,0.1);
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2);
}

/* --- CONTACTO & FORMULARIO --- */
.contact-section {
    background: white;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.info-item a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Estilos de inputs */
.form-group {
    margin-bottom: 15px;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--whatsapp-green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* --- FOOTER --- */
footer {
    background: #222;
    color: #aaa;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {

    .hero {
        /* Cambiamos la URL por la versión vertical */
        background: linear-gradient(rgba(0, 51, 102, 0.85), rgba(0, 51, 102, 0.85)), url('assets/images/fondo-inicio-mobile.png');
        background-position: center top; /* Ajustamos la posición si es necesario */
    }
    .hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
    .nav-links {
        position: absolute;
        right: 0;
        top: 60px;
        background: var(--primary-color);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .contact-wrapper {
        flex-direction: column-reverse;
    }
}

/*///////////////////////////////////////////////////////////////////////////////////////////*/

/* --- ESTILOS DEL CATÁLOGO --- */

/* Hero más pequeño para páginas internas */
.hero-small {
    background: var(--primary-color);
    color: white;
    padding: 100px 0 40px 0; /* Padding top alto para compensar el header fijo */
    text-align: center;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Asegura que la imagen llene el espacio sin deformarse */
    background: #f4f4f4;
    border-bottom: 1px solid #eee;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-ref {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.product-desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-catalog {
    background: var(--whatsapp-green); /* Usamos el verde de WhatsApp */
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-catalog:hover {
    background: #1ebc57;
}

/* --- ESTILOS PARA EL MODAL DE IMAGEN --- */

/* El fondo del modal */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed; /* Permanece fijo en la pantalla */
    z-index: 9999; /* Se superpone a todo */
    padding-top: 50px; /* Espacio desde arriba */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; /* Habilita el desplazamiento si es necesario */
    background-color: rgb(0,0,0); /* Fondo Negro */
    background-color: rgba(0,0,0,0.9); /* Negro con opacidad */
}

/* El contenido (la imagen dentro del modal) */
.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    height: auto; /* Ajuste automático de altura */
    max-height: 90vh; /* Máximo 90% de la altura del viewport */
}

/* El texto de pie de foto (referencia del producto) */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Animaciones (opcional, pero hace que se vea mejor) */
.modal-content, #caption {  
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Botón de cierre */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Ajustes para pantallas pequeñas */
@media only screen and (max-width: 700px){
    .modal-content {
        width: 100%;
    }
}