:root {
    --primary-red: #D62828;
    --primary-dark: #0f1014;
    --secondary-dark: #1b1e26;
    --text-main: #f0f0f0;
    --text-muted: #a0aec0;
    --border-color: #2d3748;
}

body {
    background-color: var(--primary-dark);
    color: var(--text-main);
    font-family: 'Rubik', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal indeseado */
}

/* --- ESTILOS CRÍTICOS PARA SWIPER (Agregado) --- */
.gallery-container {
    background-color: #000;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden; /* Vital */
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    background: #000;
    /* Centrado de imagen */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Evita colapso */
    width: 100%; 
    height: 100%;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Resto de tus estilos (Navbar, Hero, Textos) --- */
h1, h2, h3 { color: #fff; text-transform: uppercase; letter-spacing: 1px; text-align: center; margin: 0;}
.text-highlight { color: var(--primary-red); }

/* HERO SLIDER */
.hero-slider { position: relative; width: 100%; height: 100vh; overflow: hidden; background-color: #000; }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out; display: flex; align-items: center; justify-content: center; z-index: 1; }
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.8)); z-index: 1; }
.hero-content { position: relative; z-index: 3; text-align: center; max-width: 900px; padding: 20px; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; text-shadow: 0 4px 10px rgba(0,0,0,0.8); }
.hero-content p { font-size: 1.4rem; color: #f0f0f0; margin-bottom: 30px; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }

/* Flechas Hero */
.slider-nav button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; font-size: 2rem; padding: 15px; cursor: pointer; z-index: 10; transition: 0.3s; }
.slider-nav button:hover { background: var(--primary-red); }
.slider-nav button:first-child { left: 20px; }
.slider-nav button:last-child { right: 20px; }

/* Botones y Nav */
.btn-ht { background-color: var(--primary-red); color: #fff; padding: 12px 30px; border: none; text-transform: uppercase; font-weight: bold; cursor: pointer; transition: all 0.3s ease; border-radius: 2px; text-decoration: none; display: inline-block;}
.btn-ht:hover { background-color: #b01e1e; box-shadow: 0 0 15px rgba(214, 40, 40, 0.4); }

.navbar { background-color: rgba(15, 16, 20, 0.95); border-bottom: 1px solid var(--border-color); position: fixed; width: 100%; top: 0; z-index: 1000; padding: 10px 0; backdrop-filter: blur(10px); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-logo { height: 50px; width: auto; display: block; }
.nav-menu { display: flex; list-style: none; gap: 25px; margin: 0; padding: 0; align-items: center; }
.nav-link { color: #fff; text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.3s ease; }
.nav-link:hover { color: var(--primary-red); }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: #fff; transition: all 0.3s ease-in-out; }

/* Responsive Nav */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu { position: fixed; left: -100%; top: 70px; flex-direction: column; background-color: var(--primary-dark); width: 100%; text-align: center; transition: 0.3s; padding: 20px 0; border-bottom: 2px solid var(--primary-red); box-shadow: 0 10px 15px rgba(0,0,0,0.5); }
    .nav-menu.active { left: 0; }
    .hero-content h1 { font-size: 2.2rem; }
    .modal-grid-project { grid-template-columns: 1fr; height: auto; }
    .gallery-container { height: 300px; }
}

/* Modales */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(5px); animation: fadeIn 0.3s ease; }
.modal-content { background-color: #1a1d24; margin: 5% auto; border: 1px solid var(--primary-red); width: 90%; max-width: 1000px; border-radius: 8px; position: relative; animation: slideUp 0.3s ease; padding: 0; overflow: hidden; }
.close-modal { position: absolute; top: 15px; right: 20px; color: #fff; z-index: 500; font-size: 40px; font-weight: bold; cursor: pointer; text-shadow: 0 0 5px #000; line-height: 1;}
.close-modal:hover { color: var(--primary-red); }

/* Grids */
.project-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; width: 100%; }
.project-card { background-color: var(--secondary-dark); border: 1px solid #2d3748; border-radius: 4px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease; }
.project-card:hover { transform: translateY(-5px); border-color: var(--primary-red); }
.project-img { height: 200px; width: 100%; background-size: cover; background-position: center; filter: grayscale(100%); transition: filter 0.3s ease; }
.project-card:hover .project-img { filter: grayscale(0%); }
.project-content { padding: 25px; }
.project-tag { background-color: var(--primary-red); color: white; font-size: 0.7rem; padding: 4px 8px; border-radius: 2px; font-weight: bold; }
.client-name { color: #fff; font-weight: bold; border-bottom: 1px solid #444; padding-bottom: 10px; display: inline-block; }

.modal-grid-project { display: grid; grid-template-columns: 1.5fr 1fr; min-height: 500px; }
.project-info { padding: 40px; overflow-y: auto; max-height: 600px; }

/* Swiper Arrows */
.swiper-button-next, .swiper-button-prev { color: var(--primary-red) !important; font-weight: bold; text-shadow: 0 0 5px #000; }
.swiper-pagination-bullet-active { background: var(--primary-red) !important; }

/* Animaciones Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Sliders Infinitos Clientes */
.slider-area { height: 100px; margin: auto; overflow: hidden; position: relative; width: 100%; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.slide-track { display: flex; width: calc(250px * 16); animation: scroll 40s linear infinite; }
.slide { height: 100px; width: 250px; display: flex; align-items: center; justify-content: center; padding: 15px; }
.slide img { max-width: 160px; max-height: 70px; filter: grayscale(100%) opacity(0.5); transition: all 0.3s ease; }
.slide img:hover { filter: grayscale(0%) opacity(1); transform: scale(1.1); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-250px * 8)); } }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (min-width: 1400px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* RESPONSIVE: En tablets y celulares, volvemos a 1 columna */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
.service-card { position: relative; height: 350px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 1px solid #333; background-size: cover; background-position: center; transition: transform 0.3s ease; }
.bg-mineria { background-image: url('../img/services/mineria-card.jpg'); }
.bg-gas { background-image: url('../img/services/gas-card.jpg'); }
.bg-drone { background-image: url('../img/services/drone-card.jpg'); }
.bg-civil { background-image: url('../img/services/civil-card.jpg'); }
.card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(10,10,10,0.95) 80%); transition: background 0.3s ease; }
.service-card:hover .card-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(214, 40, 40, 0.1) 50%, rgba(0,0,0,1) 100%); }
.card-content { position: absolute; bottom: 0; padding: 25px; z-index: 2; width: 100%; box-sizing: border-box; }
.read-more { color: var(--primary-red); font-size: 0.85rem; font-weight: bold; text-transform: uppercase; }

/* Contacto y Footer */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.tech-form input, .tech-form select, .tech-form textarea { width: 100%; padding: 12px; background: var(--primary-dark); border: 1px solid #2d3748; color: #fff; border-radius: 4px; }
.tech-form input:focus { border-color: var(--primary-red); outline: none; }