/* =========================================
   1. VARIABLES Y RESET
========================================= */
:root {
    /* Paleta de Colores Industrial */
    --color-primary: #0f172a; /* Azul Navy oscuro (Seriedad) */
    --color-accent: #f97316;  /* Naranja Seguridad (Acción) */
    --color-text: #334155;    /* Gris Pizarra (Texto legible) */
    --color-light: #f1f5f9;   /* Gris Claro (Fondos) */
    --color-white: #ffffff;
    
    /* Tipografía */
    --font-stack: 'Roboto', sans-serif;
}
html {
    scroll-behavior: smooth; /* Esto hace la magia del deslizamiento */
scroll-padding-top: 100px; 
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Crucial para que los bordes no rompan el diseño */
}

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   NUEVO ESTILO DE HEADER (Clean & Sticky)
========================================= */

/* Hacemos que el header se quede fijo al bajar */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Siempre por encima de todo */
    background-color: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08); /* Sombra elegante */
}

/* --- Barra Superior Oscura --- */
.top-bar {
    background-color: var(--color-primary); /* Azul oscuro */
    color: #e2e8f0;
    font-size: 0.8rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--color-accent); /* Naranja */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    transition: opacity 0.3s;
}

.top-bar a:hover { opacity: 0.8; }

/* --- Barra Principal Blanca --- */
.main-header {
    padding: 15px 0;
    background-color: white; /* Fondo blanco limpio */
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Imagen */
.logo-img {
    height: 55px; /* Tamaño controlado */
    width: auto;
    display: block;
}

/* Logo Texto (Por si acaso no carga la imagen) */
.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
}

/* Navegación */
.desktop-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
}

/* Efecto de linea naranja al pasar el mouse */
.desktop-nav a:not(.btn-nav):after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

.desktop-nav a:not(.btn-nav):hover:after {
    width: 100%;
}

/* Botón Cotizar en el menú (Más destacado) */
.btn-nav {
    background-color: var(--color-accent);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px; /* Bordes redondos estilo moderno */
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.3); /* Sombra naranja suave */
    transition: transform 0.2s, background-color 0.2s;
}

.btn-nav:hover {
    background-color: #ea580c;
    transform: translateY(-2px); /* Se eleva un poco */
}

/* Ajuste rápido para móviles */
@media (max-width: 768px) {
    .top-bar { display: none; } /* Ocultamos la barra de arriba en celular para ahorrar espacio */
    .header-flex { flex-direction: column; gap: 15px; }
    .desktop-nav ul { gap: 15px; flex-wrap: wrap; justify-content: center; }
}

/* =========================================
   3. HERO SECTION (PORTADA)
========================================= */
.hero {
    position: relative;
    /* Asegúrate de tener la imagen en la carpeta correcta */
    background: url('../assets/images/taller-fondo.jpg'); 
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding: 8rem 0;
    text-align: center;
}

/* Capa oscura sobre la imagen para que se lea el texto */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.75);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Texto por encima de la capa oscura */
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: #cbd5e1;
}

/* Botones Generales */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    border: 2px solid var(--color-accent);
}

.btn-primary:hover {
    background-color: #ea580c; /* Un naranja más oscuro */
    border-color: #ea580c;
}

.btn-outline {
    border: 2px solid var(--color-white);
    color: var(--color-white);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* =========================================
   4. SECCIÓN DE SERVICIOS (GRID)
========================================= */
.services-section {
    padding: 5rem 0;
    background-color: var(--color-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h3 {
    font-size: 2rem;
    color: var(--color-primary);
    text-transform: uppercase;
}

.line {
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 10px auto;
}

.services-grid {
    display: grid;
    /* Rejilla inteligente: columnas mínimas de 250px */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--color-white);
    padding: 2rem;
    border-bottom: 4px solid var(--color-primary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--color-accent);
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h4 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.25rem;
}

/* =========================================
   5. SECCIÓN DE CONTACTO
========================================= */
.contact-section {
    padding: 5rem 0;
    background-color: var(--color-white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 1 parte info, 1.5 partes formulario */
    gap: 40px;
    background: var(--color-white);
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Info Contacto */
.info-item {
    margin-bottom: 2rem;
}

.info-item h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Formulario Industrial */
.industrial-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.industrial-form input, 
.industrial-form select, 
.industrial-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s, background-color 0.3s;
}

.industrial-form input:focus,
.industrial-form select:focus, 
.industrial-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1); /* Resplandor naranja suave */
}

/* Filas dobles en formulario */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-block {
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   6. FOOTER
========================================= */
footer {
    background-color: #1f2937;
    color: var(--color-white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 0;
    border-top: 5px solid var(--color-accent);
}

/* =========================================
   7. RESPONSIVE (MÓVILES)
========================================= */
@media (max-width: 768px) {
    /* Header Stackeado */
    .header-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Hero Text */
    .hero h2 {
        font-size: 2rem;
    }

    /* Contacto en una sola columna */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ESTILOS DEL LOGO (IMAGEN)
========================================= */
.logo-container a {
    display: flex; /* Centra la imagen verticalmente */
    align-items: center;
    text-decoration: none;
}

.logo-img {
    /* Altura fija: Esto es lo más importante. 
       Controla el tamaño del logo sin deformarlo. */
    height: 70px; 
    width: auto; /* Mantiene la proporción original */
    
    /* Evita que se vea borroso si se estira */
    object-fit: contain;
    
    /* Pequeña transición suave si quieres animarlo luego */
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05); /* Efecto sutil de zoom al pasar el mouse */
}

/* --- Ajuste para Celulares (Responsive) --- */
@media (max-width: 768px) {
    .logo-img {
        height: 50px; /* Más pequeño en pantallas chicas */
    }
}
/* --- PEGAR AL FINAL DEL ARCHIVO STYLE.CSS --- */

.map-container {
    width: 100%;
    height: 300px;       /* Altura del mapa */
    border-radius: 8px;  /* Bordes redondeados */
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Sombra suave */
    border: 2px solid #e2e8f0; /* Borde gris claro */
    margin-top: 15px;    /* Espacio arriba del mapa */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Esto ajusta el mapa si ven la web en un celular */
@media (max-width: 768px) {
    .map-container {
        height: 250px; 
    }
}
/* =========================================
   ESTILOS DE LA GALERÍA
========================================= */
.gallery-section {
    padding: 5rem 0;
    background-color: var(--color-white);
}

.gallery-grid {
    display: grid;
    /* Cuadrícula automática: se ajusta a móviles y PC sola */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden; /* Importante para el efecto zoom */
    border-radius: 8px;
    height: 250px; /* Altura fija para que todas se vean iguales */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el cuadro sin deformar */
    transition: transform 0.5s ease;
}

/* Efecto al pasar el mouse (Hover) */
.gallery-item:hover img {
    transform: scale(1.1); /* La imagen crece un 10% */
}

/* Texto sobre la imagen (Overlay) */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    opacity: 0; /* Invisible por defecto */
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.gallery-item:hover .overlay {
    opacity: 1; /* Visible al pasar el mouse */
}

.overlay span {
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px black;
}

/* =========================================
   ESTILOS DEL FOOTER MEJORADO
========================================= */
footer {
    background-color: #1f2937; /* Gris muy oscuro */
    color: #cbd5e1;            /* Texto gris claro */
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 5px solid var(--color-accent);
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--color-accent); /* Naranja al pasar el mouse */
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .footer-grid {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}