/* Variables de Colores */
:root {
    --primary-color: #FFC107; /* Amarillo Industrial Estándar */
    --primary-hover: #FFA000;
    --dark-bg: #1a1a1a;
    --darker-bg: #111111;
    --light-bg: #f4f4f4;
    --text-color: #333;
    --text-light: #e0e0e0;
    --white: #ffffff;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Ajustado a la altura exacta del header */
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--dark-bg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    background-color: var(--dark-bg);
    color: var(--primary-color);
    margin-top: 10px;
}

.full-width { width: 100%; }

/* Header */
#header {
    background-color: var(--darker-bg);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.logo span { color: var(--primary-color);}

.logo-img {
    max-height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--primary-color); }

.btn-nav {
    background-color: var(--primary-color);
    color: var(--dark-bg) !important;
    padding: 8px 16px;
    border-radius: 4px;
}

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; }

/* Hero Section */
.hero {
    min-height: 100vh; /* Asegura pantalla completa en móviles */
    background-color: var(--darker-bg); /* Evita el flash blanco mientras carga la imagen */
    background-image: url('../assets/img/fondo-portada.jpeg'); /* Imagen genérica auto/minería */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin-top: -80px; /* Sube el contenido para evitar superposición con los autos */
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Sombra elegante para resaltar */
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-benefits {
    margin-bottom: 30px;
}

.hero-benefits li {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.hero-benefits i {
    color: var(--primary-color);
    margin-right: 10px;
}

.hero-buttons { display: flex; gap: 15px; }

/* General Sections */
.section { padding: 80px 0; }
.bg-dark { background-color: var(--dark-bg); color: var(--text-light); }
.bg-gray { background-color: var(--light-bg); }
.text-white { color: var(--white); }

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto 20px;
}

/* Estilos alternativos de Título (Integrados) */
.title-block {
    text-align: center;
    margin-bottom: 60px;
}

.title-block h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.bar { width: 70px; height: 4px; background-color: #ccc; margin: 0 auto; border-radius: 2px; }
.bar-yellow { background-color: var(--primary-color); }

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

/* Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.value-card {
    padding: 30px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.value-card:hover { transform: translateY(-5px); }
.value-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.service-item {
    background: var(--white);
    padding: 30px;
    border: 1px solid #eee;
    text-align: center;
    transition: 0.3s;
}

.service-item:hover { border-color: var(--primary-color); }
.service-item i { font-size: 2rem; color: var(--dark-bg); margin-bottom: 15px; }
.service-item h4 { margin-bottom: 10px; }

/* Grid de 3 Columnas (Servicios Principales) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-box {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.service-box:hover { transform: translateY(-10px); background-color: rgba(255, 255, 255, 0.1); }
.service-box i { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.service-box h4 { font-size: 1.5rem; font-weight: 600; margin-bottom: 15px; }
.service-box p { font-size: 1rem; line-height: 1.6; color: var(--text-light); }

/* Security & Zones Split */
.split-section {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.compliance-box, .zones-box { flex: 1; min-width: 300px; }
.compliance-box h3, .zones-box h3 { margin-bottom: 20px; }
.compliance-box i, .zones-box i { color: var(--primary-color); margin-right: 10px; }

.check-list li { margin-bottom: 10px; display: flex; align-items: center; }
.check-list i { color: green; margin-right: 10px; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.tag {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Process */
.process-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.step { flex: 1; min-width: 200px; }
.step-number {
    width: 50px; height: 50px;
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    margin: 0 auto 15px;
    font-size: 1.2rem;
}

/* Contacto */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info { flex: 1; min-width: 300px; }
.info-item { display: flex; align-items: center; margin-bottom: 20px; margin-top: 20px;}
.info-item i { width: 40px; height: 40px; background: var(--primary-color); color: var(--dark-bg); display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-right: 15px; }

.contact-form { flex: 1; min-width: 300px; background: var(--light-bg); padding: 30px; border-radius: 8px; }
.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }

label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--darker-bg);
    color: #777;
    padding: 30px 0;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left h3 { color: var(--primary-color); margin-bottom: 5px; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: absolute;
        top: 80px; /* altura del header */
        left: 0;
        width: 100%;
        background-color: var(--darker-bg);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active { transform: translateY(0); }
    
    .hero h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .btn { text-align: center; }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .title-block h2 {
        font-size: 2rem;
    }
}

/* Animaciones de Entrada (Scroll) */
.section-title, .title-block, .value-card, .service-box, .service-item, .step,
.hero h1, .hero .subtitle, .hero-benefits, .hero-buttons {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-title.visible, .title-block.visible, .value-card.visible, .service-box.visible, .service-item.visible, .step.visible,
.hero h1.visible, .hero .subtitle.visible, .hero-benefits.visible, .hero-buttons.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Retraso escalonado para PC (Efecto Cascada) */
@media (min-width: 769px) {
    .value-card:nth-child(2), .service-box:nth-child(2), .service-item:nth-child(2), .step:nth-child(2) {
        transition-delay: 0.2s;
    }
    .value-card:nth-child(3), .service-box:nth-child(3), .service-item:nth-child(3), .step:nth-child(3) {
        transition-delay: 0.4s;
    }
    .value-card:nth-child(4), .service-item:nth-child(4), .step:nth-child(4) {
        transition-delay: 0.6s;
    }

    /* Secuencia de entrada para la Portada (Hero) */
    .hero h1 { transition-delay: 0.1s; }
    .hero .subtitle { transition-delay: 0.3s; }
    .hero-benefits { transition-delay: 0.5s; }
    .hero-buttons { transition-delay: 0.7s; }
}
