/* ================================================================
   MOVIMIENTO DE TIERRA - INGENIERÍA Y LOGÍSTICA PREMIUM
   ================================================================ */

/* Localiza esta parte en tu CSS y asegúrate de que tenga el background */
.subpage-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-blue); /* Fallback */
    /* AGREGA ESTO: */
    background: linear-gradient(rgba(10, 35, 66, 0.7), rgba(10, 35, 66, 0.7)), 
                url('../img/movimiento-hero.jpg') no-repeat center center;
    background-size: cover;
}

/* El pseudo-elemento para el oscurecimiento del fondo */
.subpage-hero .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 35, 66, 0.7); /* Tu azul profundo con opacidad */
    z-index: 1;
}

.subpage-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-subtitle {
    font-family: var(--body-font);
    color: var(--white);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 35px;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.earthworks-info {
    padding: 100px 0;
}

.earthworks-info .about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.earthworks-info .text-highlight {
    font-size: 1.25rem;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
}

.earthworks-info p {
    color: var(--white);
    opacity: 0.9;
    margin-bottom: 25px;
}

.earthworks-info .about-list {
    list-style: none;
    padding: 0;
}

.earthworks-info .about-list li {
    color: var(--white);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.earthworks-info .about-list li i {
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.services-catalog {
    padding: 100px 0;
}

.earth-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra tarjetas huérfanas */
    gap: 30px;
}

.earth-card {
    background: var(--white);
    border-bottom: 4px solid var(--accent-blue);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: calc(33.333% - 20px);
    min-width: 300px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.earth-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(10, 35, 66, 0.15);
}

.earth-icon-box {
    margin-bottom: 25px;
}

.earth-icon-box i {
    font-size: 3rem;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}

.earth-card:hover .earth-icon-box i {
    transform: scale(1.1);
}

.earth-content h3 {
    font-family: var(--title-font);
    font-size: 1.4rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.earth-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .earthworks-info .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .earth-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 650px) {
    .earth-card {
        width: 100%;
        max-width: 100%;
    }
    
    .subpage-hero {
        min-height: 50vh;
    }
}

/* --- Ajustes de Alineación y Botones (Añadir aquí) --- */

.services-catalog .categories-intro {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services-catalog .gold-line {
    margin: 0 auto 15px;
}

.earth-card .btn-main {
    margin-top: 25px;
    padding: 12px 25px;
    background-color: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    font-family: var(--title-font);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid transparent;
}

.earth-card .btn-main:hover {
    background-color: var(--accent-blue);
    
    transform: translateY(-2px);
}
/* --- Fin de ajustes --- */

/* ================================================================
   LOGÍSTICA Y EQUIPO ESPECIALIZADO - MOVIMIENTO DE TIERRA
   ================================================================ */

.earthworks-equipment {
    padding: 100px 0;
    background-color: var(--primary-blue); /* Asegura el fondo oscuro */
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.equipment-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03); /* Un toque sutil de luz sobre el fondo oscuro */
    border-left: 2px solid var(--accent-blue);
    transition: background 0.3s ease;
}

.equipment-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.equipment-icon {
    font-size: 2.2rem;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.equipment-text h3 {
    font-family: var(--title-font);
    color: var(--white);
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.equipment-text p {
    font-size: 0.9rem;
    color: var(--white);
    opacity: 0.8;
    line-height: 1.6;
}

/* Ajuste específico para dispositivos móviles en este bloque */
@media (max-width: 992px) {
    .equipment-grid {
        grid-template-columns: 1fr; /* Una columna en tablets y móviles */
        gap: 25px;
    }
}

/* ================================================================
   SEGURIDAD Y GARANTÍA OPERATIVA
   ================================================================ */

.safety-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.safety-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 20px 20px 0px var(--primary-blue); /* Efecto decorativo industrial */
}

.safety-content .text-highlight {
    font-size: 1.2rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin: 20px 0;
}

.badges-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: #f4f7fa;
    border: 1px solid #e1e8f0;
    border-radius: 4px;
}

.badge-item i {
    font-size: 1.8rem;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.badge-item span {
    font-size: 0.85rem;
    font-family: var(--title-font);
    text-transform: uppercase;
    color: var(--primary-blue);
    font-weight: 700;
}

/* Ajuste móvil para seguridad */
@media (max-width: 992px) {
    .safety-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .safety-image {
        order: 2; /* Pasa la imagen abajo en móviles */
    }
    
    .safety-image img {
        box-shadow: 10px 10px 0px var(--primary-blue);
    }
}

/* ================================================================
   SECCIÓN DE CLIENTES - DISEÑO EDITORIAL INTERCALADO (IMAGEN TOTAL)
   ================================================================ */

.our-clients.section-dark {
    padding: 120px 0;
    background-color: var(--primary-blue);
}

.clients-editorial-grid {
    display: flex;
    flex-direction: column;
    
    gap: 60px; /* Mayor espacio para que el zig-zag respire */
    margin-top: 60px;
}

.client-card-visual {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 450px; /* Un poco más alta para mayor impacto visual de la foto */
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden; /* Crucial para que la imagen respete los bordes de la tarjeta */
}

/* --- LÓGICA DE INTERCALADO (ZIG-ZAG) --- */
.client-card-visual:nth-child(even) {
    flex-direction: row-reverse;
}

.client-card-visual:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-blue);
    transform: translateY(-5px); /* Efecto sutil de elevación */
}

.client-work-image {
    flex: 0 0 50%; /* Ocupa exactamente la mitad */
    overflow: hidden; /* Para el efecto de zoom */
    position: relative; /* Por si añadimos overlays luego */
}

.client-work-image img {
    width: 100%;
    height: 100%;
    /* PROPIEDAD CLAVE: La imagen CUBRE todo el contenedor sin deformarse */
    object-fit: cover; 
    filter: grayscale(30%) brightness(0.8);
    transition: all 0.8s ease;
}

.client-card-visual:hover .client-work-image img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1); /* Zoom cinematográfico al hover */
}

.client-content {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Alineación de texto para los elementos invertidos */
.client-card-visual:nth-child(even) .client-content {
    text-align: right;
    align-items: flex-end;
}

.client-label {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    font-weight: 700;
}

.client-name {
    font-family: var(--title-font);
    color: var(--white);
    font-size: 2rem;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.client-desc {
    color: var(--white);
    opacity: 0.7;
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 550px; /* Limitamos ancho para lectura */
}

/* Responsive: En móvil volvemos al orden normal para legibilidad */
@media (max-width: 992px) {
    .client-card-visual, 
    .client-card-visual:nth-child(even) {
        flex-direction: column;
        min-height: auto;
    }
    
    .client-card-visual:nth-child(even) .client-content {
        text-align: left;
        align-items: flex-start;
    }

    .client-work-image {
        flex: 0 0 350px; /* Altura fija impactante en móvil */
        width: 100%;
    }
    
    .client-content {
        padding: 40px 30px;
    }

    .client-name {
        font-size: 1.6rem;
    }
}

/* ================================================================
   GALERÍA MASONRY - ESTILO EDITORIAL
   ================================================================ */

.projects-gallery {
    padding: 100px 0;
}

.masonry-wrapper {
    column-count: 3; /* Número de columnas en desktop */
    column-gap: 15px; /* Espacio entre columnas */
    margin-top: 50px;
}

.masonry-item {
    display: inline-block; /* Evita que el item se rompa entre columnas */
    width: 100%;
    margin-bottom: 15px; /* Espacio vertical entre fotos */
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: var(--primary-blue);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.9);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.6s ease;
}

.masonry-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 35, 66, 0.8) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.masonry-overlay span {
    color: var(--white);
    font-family: var(--title-font);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 2px solid var(--accent-blue);
    padding-left: 10px;
}

/* Hover Effects */
.masonry-item:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

/* Responsive Masonry */
@media (max-width: 992px) {
    .masonry-wrapper {
        column-count: 2; /* 2 columnas en tablets */
    }
}

@media (max-width: 600px) {
    .masonry-wrapper {
        column-count: 1; /* 1 columna en móviles */
    }
}