:root {
    --primary-color: #336600;
    /* Azul Industrial */
    --secondary-color: #ff6600;
    /* Naranja Seguridad (Acción) */
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --bg-light: #ffffff;
    --bg-grey: #e9ecef;
    --font-heading: 'Arial', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.highlight {
    color: var(--secondary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary-color);
}

.btn-primary {
    background: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
}

.btn-primary:hover {
    background: #e65c00;
}

/* Hero Section */
.hero {
    background: url('https://images.unsplash.com/photo-1565043589221-1a6fd4971030?auto=format&fit=crop&q=80');
    /* Imagen de stock industrial */
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-light);
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--secondary-color);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Projects (Portafolio) */
.project-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-grey);
    border-radius: 8px;
    overflow: hidden;
}

.project-content {
    padding: 1.5rem;
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Contact Form */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-grey);
    padding: 2rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button[type="submit"] {
    width: 100%;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    padding: 15px;
    background: var(--primary-color);
}

footer {
    background: #222;
    color: #888;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* ... (Estilos previos base se mantienen) ... */

/* --- CARRUSEL HERO (Fade Effect) --- */
.hero-carousel {
    position: relative;
    height: 80vh;
    /* Altura de la pantalla principal */
    overflow: hidden;
    background: #000;
    /* Fondo negro por si la imagen tarda en cargar */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide::before {
    content: '';
    /* Capa oscura para que se lea el texto */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 30, 60, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* --- CARRUSEL PROYECTOS (Slide Effect) --- */
.projects-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-slide {
    display: none;
    /* Ocultos por defecto */
    padding: 0;
    animation: fadeEffect 0.5s;
}

.project-slide.active {
    display: block;
}

.project-layout {
    display: flex;
    flex-wrap: wrap;
}

.project-img {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background-size: cover;
    background-position: center;
}

.project-info {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #f9f9f9;
}

/* Controles del Carrusel de Proyectos */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: 0.3s;
}

.carousel-btn:hover {
    background: var(--secondary-color);
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

/* --- MAPA UBICACIÓN --- */
.location-section {
    background: #f4f4f4;
    padding: 4rem 0;
}

.map-wrapper {
    width: 100%;
    height: 400px;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ... Tu CSS anterior ... */

/* --- ESTILOS BASE PARA EL BOTÓN DE MENÚ (Oculto en PC) --- */
.hamburger-menu {
    display: none;
    /* En PC no se ve */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- MEDIA QUERIES (La Magia Responsiva) --- */
@media screen and (max-width: 768px) {

    /* 1. NAVEGACIÓN MÓVIL */
    .hamburger-menu {
        display: block;
        /* Aparece en móvil */
    }

    nav ul {
        display: none;
        /* Ocultamos el menú por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        /* Justo debajo del header */
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    nav ul.active {
        display: flex;
        /* Se muestra al dar click */
    }

    nav ul li {
        margin: 1rem 0;
    }

    /* 2. HERO / CARRUSEL PRINCIPAL */
    .hero-carousel {
        height: 60vh;
        /* Menos altura en móvil para ver contenido rápido */
    }

    .hero-content h1 {
        font-size: 1.8rem;
        /* Texto más pequeño */
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* 3. SERVICIOS (GRID) */
    .services-grid {
        grid-template-columns: 1fr;
        /* Una sola columna */
        padding: 0 1rem;
    }

    /* 4. PROYECTOS (CARRUSEL COMPLEJO) */
    .project-layout {
        flex-direction: column;
        /* Imagen arriba, texto abajo */
    }

    .project-img {
        height: 200px;
        /* Altura fija para la imagen */
        width: 100%;
    }

    .project-info {
        padding: 1.5rem;
        /* Menos padding */
    }

    .carousel-btn {
        padding: 10px;
        /* Botones un poco más pequeños */
        background: rgba(0, 0, 0, 0.7);
        /* Más oscuros para contraste */
    }

    /* Ubicamos los botones abajo en la imagen para que no estorben el texto */
    .prev,
    .next {
        top: 25%;
        /* A la altura de la imagen aproximadamente */
    }

    /* 5. FORMULARIO Y MAPA */
    .contact-container {
        padding: 1rem;
    }

    .map-wrapper {
        height: 300px;
    }
}