/* =========================================
   ESTILOS GENERALES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif; 
}

body {
    background-color: #FFFFFF; 
    color: #444444;
}

/* =========================================
   BARRA DE NAVEGACIÓN (NAVBAR) - ESCRITORIO
   ========================================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    height: 100px; 
    background-color: #444444; 
    padding-right: 40px; 
    position: relative; /* Necesario para que el menú móvil caiga exactamente debajo */
}

/* Sección del logo (Lado Izquierdo) */
.logo-container {
    background-color: #f1f1f1; 
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 45px;
}

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

/* --- ESTILOS DEL BOTÓN HAMBURGUESA (Oculto en escritorio) --- */
.hamburger-btn {
    display: none;
    font-size: 35px;
    background: none;
    border: none;
    cursor: pointer;
    color: #FFFFFF; /* Blanco para resaltar sobre el fondo #444444 */
}

/* Menú de enlaces centrales */
.nav-links {
    display: flex;
    list-style: none;
    gap: 35px; 
}

.nav-links a {
    text-decoration: none;
    color: #FFFFFF; 
    font-size: 0.9rem;
    font-weight: 300; 
    letter-spacing: 2px; 
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Hover general y estado activo para los enlaces */
.nav-links a:hover,
.nav-links a.active {
    color: #B65A32; 
    font-weight: 400; 
    text-shadow: 0px 4px 10px rgba(182, 90, 50, 0.4); 
}

/* Estilo del Botón de Contacto base */
.btn-contact {
    display: inline-block;
    text-decoration: none;
    background-color: #B65A32; 
    color: #FFFFFF; 
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 400; 
    letter-spacing: 1.5px;
    border: 2px solid #B65A32;
    border-radius: 4px; 
    transition: all 0.2s ease; 
    cursor: pointer;
}

/* Efecto HOVER y estado ACTIVE compartidos del Botón Contacto */
.btn-contact:hover,
.btn-contact.active {
    transform: translateY(-3px); 
    box-shadow: 0 6px 15px rgba(182, 90, 50, 0.4); 
}

/* Animación al hacer el clic físico */
.btn-contact:active:not(.active) {
    transform: translateY(0) scale(0.95); 
    box-shadow: 0 2px 5px rgba(182, 90, 50, 0.4); 
}

/* =========================================
   BARRA DE NAVEGACIÓN - DISEÑO MÓVIL (RESPONSIVE)
   ========================================= */
@media (max-width: 900px) { /* Se activa antes (900px) porque el logo e items ocupan bastante espacio */
    .navbar {
        padding-right: 20px;
    }
    
    .logo-container {
        padding: 0 20px;
    }

    /* Mostramos la hamburguesa */
    .hamburger-btn {
        display: block;
    }

    /* Ocultamos el botón de contacto en móviles para mantenerlo limpio */
    .contact-container {
        display: none; 
    }

    /* Convertimos la lista en un menú desplegable estilo colapsable */
    .nav-links {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100px; /* Mismo tamaño que la altura (height) de tu navbar */
        left: 0;
        width: 100%;
        background-color: #444444; /* Mantenemos tu color oscuro */
        box-shadow: 0px 10px 20px rgba(0,0,0,0.3);
        padding: 30px 0;
        text-align: center;
        z-index: 999;
    }

    .nav-links li {
        margin: 20px 0; /* Mayor espacio entre enlaces para pulsarlos fácil con el dedo */
    }

    .nav-links a {
        font-size: 1.1rem; /* Ligeramente más grande en móviles */
    }

    /* Clase inyectada por JS para mostrar el menú */
    .nav-links.show {
        display: flex;
    }
}

/* =========================================
   SECCIÓN ABOUT US (ESTILO HERO CON BLUR DE FONDO)
   ========================================= */

.about-split {
    position: relative; /* Necesario para posicionar elementos dentro */
    width: 100%;
    height: 600px; /* Altura fija de la sección. Ajusta según gustes */
    overflow: hidden; /* Oculta el desborde del blur y las imágenes */
    background-color: #333; /* Color de fondo de seguridad */
    display: flex;
    align-items: center; /* Centrado vertical para el bloque de texto */
    justify-content: center; /* Centrado horizontal para el bloque de texto */
}

/* --- Capa de Superposición Oscura (Overlay) --- */
/* Esto va ENTRE la imagen y el texto para garantizar legibilidad */
.about-split::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Color negro con 50% de transparencia */
    z-index: 2; /* Por encima de la imagen, por debajo del texto */
}

/* --- Contenedor de Imágenes de Fondo (con Blur) --- */
.about-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Al fondo de todo */
    
    /* Aplicamos el desenfoque */
    filter: blur(2px); /* Ajusta la cantidad de blur aquí */
    
    /* Escalamos un poco la imagen para que el blur no deje bordes blancos */
    transform: scale(1.1); 
}

.about-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantiene proporción y cubre todo el espacio */
    object-position: center; /* Centra la foto */
    opacity: 0; 
    
    /* Mantenemos tu lógica de animación existente */
    animation: fadeSlide 15s infinite;
}

/* Ajustamos los delays para que coincidan con la opacidad inicial correcta */
.about-image img:nth-child(1) { animation-delay: 0s; opacity: 1; }
.about-image img:nth-child(2) { animation-delay: 5s; }
.about-image img:nth-child(3) { animation-delay: 10s; }

/* Mantenemos tus keyframes originales */
@keyframes fadeSlide {
    0%, 25% { opacity: 1; }      
    33%, 92% { opacity: 0; }     
    100% { opacity: 1; }         
}

/* --- Bloque de Texto (Encima de la imagen) --- */
.about-text {
    position: relative; /* Importante para usar z-index */
    z-index: 3; /* Por encima de la capa oscura y la imagen */
    max-width: 800px; /* Limitamos el ancho para que no se pegue a los bordes */
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;     /* Centra contenido horizontalmente */
    text-align: center;      /* Centra los párrafos */
    
    /* Cambiamos el color base del texto a blanco para contraste */
    color: #FFFFFF; 
}

.about-text h2 {
    color: #ffffff; /* Título blanco */
    font-size: 3.5rem; /* Grande y llamativo */
    font-weight: 200; /* Fino y elegante */
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Línea decorativa minimalista bajo el título */
.about-text h2::after {
    content: '';
    display: block;
    width: 150px;
    height: 2px;
    background-color: #B65A32; /* Tu color Terra como acento */
    margin: 15px auto 0 auto;
}

.about-text p {
    color: #eeeeee; /* Blanco ligeramente grisáceo para el párrafo */
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 1.2rem;
    font-weight: 300;
}

/* --- Estilo del Botón Terra (Adaptado para fondo oscuro) --- */
.btn-terra {
    display: inline-block;
    background-color: #B65A32; /* Tu color Terra */
    color: #FFFFFF;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent; /* Para el efecto hover */
}

.btn-terra:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background-color: transparent; /* Se vuelve transparente */
    border-color: #FFFFFF; /* Borde blanco al pasar el mouse */
    color: #FFFFFF;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .about-split {
        height: auto; /* Altura automática en móviles */
        padding: 80px 0; /* Padding vertical para que no colapse */
    }
    
    .about-text h2 {
        font-size: 2.5rem;
    }
    
    .about-text p {
        font-size: 1.1rem;
    }
}


/* ================= SERVICES ACCORDION ================= */
/* ================= OUR EXPERTISE (SPLIT LAYOUT) ================= */
.expertise-split-section {
    background-color: #FFFFFF; /* Mantenemos fondo blanco limpio */
    padding: 80px 5%;
    text-align: center;
}

.expertise-header h2 {
    color: #444444; 
    font-size: 2.5rem; 
    font-weight: 300;
}

.subtitle {
    color: #B65A32;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.expertise-container {
    display: flex;
    position: relative;
    max-width: 1200px;
    margin: 60px auto 0;
    justify-content: space-between;
}

/* La línea Terra que divide la pantalla */
.center-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #B65A32;
}

.expertise-column {
    width: 45%; /* Deja un 10% de espacio en el medio para la línea */
    text-align: left;
}

.column-title {
    text-align: center;
    color: #444444;
    font-weight: 400;
    letter-spacing: 3px;
    margin-bottom: 40px;
    font-size: 1.5rem;
}

/* Cajas de cada servicio */
.expertise-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    background: #f9f9f9; /* Un gris muy tenue para resaltar la caja */
    padding: 20px;
    border-radius: 4px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

/* Efecto hover en la caja */
.expertise-item:hover {
    transform: translateX(5px); /* Se mueve un poco hacia el centro */
    box-shadow: 0 6px 15px rgba(68, 68, 68, 0.1);
    border-left: 3px solid #B65A32;
}

/* Los Círculos */
.circle {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background-color: transparent;
    color: #B65A32; /* Número Terra */
    border: 2px solid #B65A32; /* Borde Terra */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 400;
    margin-right: 20px;
    transition: all 0.3s ease;
}

/* Inversión de color del círculo al pasar el ratón */
.expertise-item:hover .circle {
    background-color: #B65A32;
    color: #FFFFFF;
}

.text h4 {
    color: #444444;
    margin-bottom: 5px;
    font-weight: 400;
    letter-spacing: 1px;
}

.text p {
    color: #666666;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.5;
}

/* Diseño responsivo para móviles (quita la línea y apila todo) */
@media (max-width: 768px) {
    .expertise-container { flex-direction: column; }
    .center-line { display: none; }
    .expertise-column { width: 100%; margin-bottom: 50px; }
    .expertise-item:hover { transform: translateY(-5px); }
}


/* ================= PORTFOLIO GALLERY ================= */
.portfolio-section {
    padding: 80px 0;
    text-align: center;
    background-color: #FFFFFF;
}

.portfolio-section h2 {
    color: #B65A32;
    margin-bottom: 40px;
    font-weight: 300;
    font-size: 2.5rem;
}

.gallery-slider {
    width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
}

.gallery-track {
    display: flex;
    width: calc(400px * 6); /* Ancho de imagen por cantidad */
    animation: scroll-gallery 20s linear infinite;
}

.gallery-track img {
    width: 400px;
    height: 300px;
    object-fit: cover;
    margin: 0 10px;
}

@keyframes scroll-gallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-400px * 3)); } /* Mitad del track para bucle infinito */
}

/* ================= CLIENTS MARQUEE ================= */
.clients-section {
    background-color: #444444;
    color: #FFFFFF;
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
}

.clients-section h2 {
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 20px;
}

.marquee-track {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    color: #f1f1f1;
}

.marquee-track span {
    margin: 0 40px;
}
.btn-primary {
    display: inline-block;
    background-color: #B65A32;
    color: #FFFFFF;
    padding: 12px 35px;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.track-left { animation: marquee-left 25s linear infinite; }
.track-right { animation: marquee-right 25s linear infinite; }

@keyframes marquee-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ================= REVIEWS ================= */
.reviews-section {
    padding: 80px 5%;
    background-color: #f9f9f9;
    text-align: center;
}

.reviews-section h2 { color: #B65A32; font-weight: 300; font-size: 2.5rem; margin-bottom: 40px; }

.reviews-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.review-card {
    background-color: #FFFFFF;
    border-left: 4px solid #B65A32;
    padding: 30px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.review-card p { font-style: italic; color: #444444; margin-bottom: 20px; line-height: 1.6; }
.review-card h4 { color: #B65A32; font-weight: 400; }

/* ================= BLOG & VLOGS ================= */
/* ================= BLOG & VLOGS ================= */
.blog-section {
    padding: 80px 5%;
    text-align: center;
    background-color: #FFFFFF;
}

.blog-section h2 { 
    color: #444444; 
    font-weight: 300; 
    font-size: 2.5rem; 
    margin-bottom: 50px; 
}

.blog-grid {
    display: flex;
    justify-content: center;
    gap: 30px; /* Reduje un poco el gap para que quepan 3 bien en pantallas normales */
    flex-wrap: wrap;
}

.blog-card {
    background-color: #FFFFFF;
    border: 1px solid #eeeeee;
    padding: 25px;
    width: 100%;
    max-width: 350px; /* Ajustado para que 3 tarjetas formen una fila perfecta */
    text-align: left;
    border-radius: 6px; /* Bordes ligeramente redondeados */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* Sombra muy sutil */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto al pasar el mouse sobre la tarjeta entera */
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* El recuadro que contiene la imagen o el emoji */
.blog-img { 
    width: 100%; 
    height: 220px; /* Altura estricta para que todas las fotos queden cuadradas iguales */
    overflow: hidden; /* Esto corta cualquier parte de la foto que intente salirse */
    margin-bottom: 20px; 
    background-color: #f9f9f9; /* Fondo tenue por si es un emoji o la foto tarda en cargar */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem; /* Tamaño del emoji si no hay foto */
    border-radius: 4px;
}

/* Comportamiento estricto de la foto dentro del recuadro */
.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esta es la magia: llena el recuadro sin deformar ni aplastar la foto */
    display: block;
    transition: transform 0.5s ease; /* Para un pequeño efecto zoom */
}

/* Efecto zoom en la foto al pasar el mouse por la tarjeta */
.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

/* Textos de la tarjeta */
.blog-card h3 { 
    color: #B65A32; 
    margin-bottom: 15px; 
    font-weight: 400; 
    font-size: 1.3rem;
}

.blog-card p { 
    color: #666666; 
    margin-bottom: 25px; 
    line-height: 1.6; 
    font-size: 0.95rem;
}

.blog-card a { 
    color: #444444; 
    font-weight: 400; 
    text-decoration: none; 
    border-bottom: 2px solid #B65A32; /* Línea inferior un poco más gruesa */
    padding-bottom: 3px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.blog-card a:hover { 
    color: #B65A32; 
}


/* =========================================
   SERVICES OVERVIEW (Residencial & Comercial)
   ========================================= */
/* =========================================
   PÁGINA DE SERVICIOS - GRID DE CATEGORÍAS
   ========================================= */
/* =========================================
   PÁGINA DE SERVICIOS - GRID DE CATEGORÍAS
   ========================================= */
.services-comprehensive {
    padding: 80px 5%;
    background-color: #f9f9f9;
    text-align: center;
}

.services-header {
    margin-bottom: 80px; /* Aumentamos el espacio para separarlo de los bloques */
}

.services-header p {
    color: #666666;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.header-line {
    width: 80px;
    height: 3px;
    background-color: #B65A32;
    margin: 25px auto 0 auto;
}

.services-grid-large {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1300px;
    margin: 0 auto;
}

/* --- FIX DE SIMETRÍA --- */
.service-box {
    background-color: #FFFFFF;
    flex: 1 1 280px; 
    max-width: 350px;
    padding: 40px 20px;
    border-radius: 6px;
    border: 1px solid #eeeeee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* Convertimos la caja en Flex para alinear su contenido interno */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.service-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(182, 90, 50, 0.1);
    border-color: #B65A32;
}

.service-box-icon {
    font-size: 2.5rem;
    color: #B65A32;
    margin-bottom: 20px;
}

.service-box h3 {
    color: #444444;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.btn-open-modal {
    /* Esta línea es la magia: empuja el botón siempre hasta abajo */
    margin-top: auto; 
    background: transparent;
    border: 1px solid #B65A32;
    color: #B65A32;
    padding: 8px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-box:hover .btn-open-modal {
    background-color: #B65A32;
    color: #FFFFFF;
}

/* Tarjeta especial para "Industries Served" */
.highlight-box { background-color: #444444; }
.highlight-box h3, .highlight-box .service-box-icon { color: #FFFFFF; }
.highlight-btn { border-color: #FFFFFF; color: #FFFFFF; }
.highlight-box:hover .highlight-btn { background-color: #FFFFFF; color: #444444; }
.hidden-modal-content { display: none; }

/* =========================================
   DISEÑO DEL MODAL (VENTANA EMERGENTE)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: 9999;
    display: none; 
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-window {
    background-color: #FFFFFF;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* Ajuste para que los elementos no se desborden en celular */
    max-height: 90vh;
    overflow-y: auto; 
}

.modal-overlay.active .modal-window {
    transform: scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #aaaaaa;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal-btn:hover { color: #B65A32; }

.modal-window h3 {
    color: #B65A32;
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 10px;
    padding-right: 20px; /* Evita que el título choque con la "X" */
}

.modal-line {
    width: 50px;
    height: 3px;
    background-color: #444444;
    margin-bottom: 25px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.modal-body ul li {
    color: #444444;
    font-size: 1rem;
    font-weight: 300;
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
    position: relative;
    padding-left: 25px;
    transition: transform 0.3s ease, color 0.3s ease; /* Transición suave */
}

.modal-body ul li:last-child {
    border-bottom: none;
}

.modal-body ul li::before {
    content: '→';
    color: #B65A32;
    position: absolute;
    left: 0;
    font-weight: bold;
    transition: transform 0.3s ease;
}

/* =========================================
   NUEVO BOTÓN DEL MODAL (VIEW PROJECTS)
   ========================================= */
.modal-footer {
    margin-top: 30px;
    text-align: center;
}

.btn-view-projects {
    display: inline-block;
    background-color: #B65A32;
    color: #FFFFFF;
    padding: 12px 30px;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%; /* El botón ocupa todo el ancho en el modal */
    box-sizing: border-box;
}

.btn-view-projects:hover {
    background-color: #a04f2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(182, 90, 50, 0.3);
}

/* =========================================
   DISEÑO RESPONSIVO Y ANIMACIONES (ESCRITORIO VS MÓVIL)
   ========================================= */

/* Solo para pantallas grandes (Laptops y Escritorio) aplicamos la animación Hover */
@media (min-width: 769px) {
    .modal-body ul li:hover {
        color: #B65A32;
        transform: translateX(8px); /* Desliza el texto hacia la derecha */
    }
    
    .modal-body ul li:hover::before {
        transform: scale(1.2); /* Hace la flechita más grande */
    }
}

/* Solo para celulares (Pantallas pequeñas) */
@media (max-width: 768px) {
    .modal-window {
        padding: 30px 20px; /* Reducimos el relleno interno para aprovechar espacio */
        width: 95%;
    }
    
    .modal-window h3 {
        font-size: 1.5rem; /* Título un poco más pequeño */
    }

    .modal-body ul li {
        font-size: 0.95rem; /* Texto de la lista ligeramente menor */
        padding: 10px 0 10px 20px;
    }

    .btn-view-projects {
        padding: 10px 20px;
    }
}
/* =========================================
   ACTUALIZACIÓN ESTÉTICA DEL FOOTER
   ========================================= */
.main-footer {
    background-color: #444444;
    color: #FFFFFF;
    padding: 60px 5% 20px 5%;
    border-top: 5px solid #B65A32;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    gap: 30px;
}

.footer-logo img {
    height: 200px; /* Tamaño ajustado para que no robe demasiada atención */
    width: auto;
}

.footer-social {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-social a {
    color: #B65A32;
    font-size: 1.6rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid #B65A32;
}

.footer-social a:hover {
    color: #FFFFFF;
    background-color: #B65A32;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(182, 90, 50, 0.4);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: #aaaaaa;
}

/* Responsivo para el footer en celulares */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   PÁGINA DE PORTAFOLIO (PROYECTOS)
   ========================================= */
.portfolio-page {
    padding: 80px 5%;
    background-color: #FFFFFF;
}

/* Encabezado igual al de Servicios para mantener consistencia */
.portfolio-header {
    text-align: center;
    margin-bottom: 70px;
}

.portfolio-header h2 {
    color: #444444;
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.portfolio-header p {
    color: #666666;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px; /* Separación entre cada proyecto */
}

/* --- FILA DEL PROYECTO --- */
.project-row {
    display: flex;
    align-items: center;
    background-color: #f9f9f9; /* Recuadro tenue */
    border-radius: 8px;
    overflow: hidden; /* Mantiene la imagen dentro de los bordes curvos */
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* Invierte el orden para el diseño alterno */
.project-row.reverse {
    flex-direction: row-reverse;
}

/* --- RECUADRO DE TEXTO (IZQUIERDA) --- */
.project-info {
    flex: 0 0 40%; /* Ocupa el 40% del ancho */
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.project-category {
    color: #B65A32;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.project-info h3 {
    color: #444444;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.2;
}

.project-info p {
    color: #666666;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 35px;
}

/* --- IMAGEN (DERECHA) --- */
.project-image {
    flex: 0 0 60%; /* Ocupa el 60% del ancho */
    height: 450px; /* Altura fija para que todas se vean igual de ordenadas */
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto se deforme */
    transition: transform 0.6s ease; /* Efecto zoom al pasar el ratón */
}

.project-row:hover .project-image img {
    transform: scale(1.05); /* Zoom sutil a la foto */
}


/* =========================================
   DISEÑO RESPONSIVO (MÓVILES Y TABLETS)
   ========================================= */
@media (max-width: 900px) {
    .project-row, 
    .project-row.reverse {
        /* En pantallas pequeñas, apilamos la imagen arriba y el texto abajo */
        flex-direction: column-reverse; 
    }

    .project-info {
        flex: 1 1 auto;
        width: 100%;
        padding: 40px 25px;
        text-align: center; /* Centramos el texto en celular */
        align-items: center;
    }

    .project-image {
        flex: 1 1 auto;
        width: 100%;
        height: 300px; /* Reducimos la altura de la foto en celular */
    }
}

/* =========================================
   PÁGINA DE CAREERS (BOLSA DE TRABAJO)
   ========================================= */
.careers-page {
    padding: 80px 5%;
    background-color: #FFFFFF;
}

/* Encabezado */
.careers-header {
    text-align: center;
    margin-bottom: 60px;
}

.careers-header h2 {
    color: #444444;
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.careers-header p {
    color: #666666;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- SECCIÓN DE BENEFICIOS --- */
.benefits-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto 80px auto;
}

.benefit-item {
    flex: 1 1 250px;
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-item i {
    font-size: 2.5rem;
    color: #B65A32;
    margin-bottom: 20px;
}

.benefit-item h4 {
    color: #444444;
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.benefit-item p {
    color: #666666;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}

/* --- SECCIÓN DE VACANTES (JOB OPENINGS) --- */
.job-openings-section {
    max-width: 1000px;
    margin: 0 auto;
}

.openings-title {
    color: #444444;
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tarjeta individual de vacante */
.job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FFFFFF;
    border: 1px solid #eeeeee;
    border-left: 4px solid #B65A32; /* Línea decorativa Terra */
    padding: 35px 40px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.job-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-left: 8px solid #B65A32; /* Se engrosa al pasar el ratón */
    transform: translateX(5px); /* Se mueve un poquito a la derecha */
}

/* Información de la vacante (Izquierda) */
.job-details {
    flex: 1;
    padding-right: 40px; /* Separación entre el texto y el botón */
}

.job-details h3 {
    color: #444444;
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.job-meta {
    display: inline-block;
    color: #B65A32;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.job-meta i {
    margin-right: 5px;
}

.job-details p {
    color: #666666;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}

/* Botón de acción (Derecha) */
.job-action {
    flex: 0 0 auto; /* Evita que el botón se estire o encoja */
}

/* --- DISEÑO RESPONSIVO PARA CAREERS --- */
@media (max-width: 768px) {
    .job-card {
        flex-direction: column; /* Apila el título y el botón */
        align-items: flex-start;
        padding: 25px;
    }

    .job-details {
        padding-right: 0;
        margin-bottom: 25px; /* Espacio antes del botón en celular */
    }

    .job-action {
        width: 100%;
    }

    .job-action .btn-terra {
        display: block;
        text-align: center;
        width: 100%; /* Botón ocupa todo el ancho en celular */
    }
}

/* =========================================
   PÁGINA DE NEWS & MEDIA (BLOGS Y VIDEOS)
   ========================================= */
.news-page {
    padding: 80px 5%;
    background-color: #FFFFFF;
}

/* Encabezado */
.news-header {
    text-align: center;
    margin-bottom: 60px;
}

.news-header h2 {
    color: #444444;
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.news-header p {
    color: #666666;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- SECCIÓN DESTACADA (FEATURED) --- */
.featured-media-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto 80px auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.featured-video {
    flex: 1 1 55%;
    width: 100%;
}

/* Truco CSS para que el Iframe de YouTube sea 100% responsivo */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Proporción 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.featured-info {
    flex: 1 1 45%;
}

.featured-info h3 {
    color: #444444;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.3;
}

.featured-info p {
    color: #666666;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 35px;
}

/* Etiquetas visuales para diferenciar el tipo de contenido */
.media-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.video-tag { background-color: #ffebee; color: #d32f2f; } /* Rojo suave para YouTube */
.article-tag { background-color: #e3f2fd; color: #1976d2; } /* Azul suave para industria */
.company-tag { background-color: #fdf3eb; color: #B65A32; } /* Terra para la empresa */

/* --- CUADRÍCULA DE BLOGS (LATEST UPDATES) --- */
.latest-updates-section {
    max-width: 1200px;
    margin: 0 auto;
}

.updates-title {
    color: #444444;
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 2px;
}

.news-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.news-card {
    flex: 1 1 320px;
    max-width: 380px;
    background-color: #FFFFFF;
    border: 1px solid #eeeeee;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.news-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

/* Overlay para miniaturas de video */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(182, 90, 50, 0.9); /* Color Terra translúcido */
    color: #FFFFFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.news-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.news-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-content h4 {
    color: #444444;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-content p {
    color: #666666;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 25px;
}

.read-more-link {
    margin-top: auto; /* Empuja el enlace al fondo */
    color: #B65A32;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.read-more-link span {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more-link:hover {
    color: #444444;
}

.read-more-link:hover span {
    transform: translateX(5px); /* Desliza la flechita */
}

/* --- DISEÑO RESPONSIVO --- */
@media (max-width: 900px) {
    .featured-media-container {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }

    .featured-info {
        text-align: center;
    }
}

/* =========================================
   PÁGINA DE CONTACTO (CONTACT US)
   ========================================= */
.contact-page {
    padding: 80px 5%;
    background-color: #FFFFFF;
}

/* Encabezado de Contacto */
.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-header h2 {
    color: #444444;
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.contact-header p {
    color: #666666;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Contenedor Principal (Formulario + Info) 
   Nota: Se especifica .contact-page para no chocar con el .contact-container del Navbar */
.contact-page .contact-container {
    display: flex;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

/* --- FORMULARIO DE CONTACTO --- */
.contact-form {
    flex: 1 1 60%;
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row input, 
.form-row select {
    flex: 1;
}

/* Estilos para etiquetas (labels) */
.contact-form label {
    color: #444444;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Estilos para inputs, selects y textareas */
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    color: #444444;
    font-size: 0.95rem;
    background-color: #FFFFFF;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Asegura que el padding no rompa el ancho */
}

.contact-form textarea {
    resize: vertical; /* Solo permite hacer más alto el cuadro, no más ancho */
    margin-bottom: 20px;
}

/* Efecto al hacer clic en los campos de texto */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #B65A32;
    box-shadow: 0 0 8px rgba(182, 90, 50, 0.15);
}

/* Botón de Enviar */
.btn-terra {
    display: inline-block;
    background-color: #B65A32;
    color: #FFFFFF;
    padding: 16px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.btn-terra:hover {
    background-color: #9c4b28;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(182, 90, 50, 0.3);
}

/* --- INFORMACIÓN DE CONTACTO Y MAPA --- */
.contact-info {
    flex: 1 1 40%;
}

.contact-info h3 {
    color: #444444;
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 15px;
}

.contact-info p {
    color: #666666;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 30px;
}

.map-container {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.map-container iframe {
    display: block; /* Elimina un pequeño espacio en blanco que dejan los iframes por defecto */
}

/* --- DISEÑO RESPONSIVO PARA CONTACTO --- */
@media (max-width: 900px) {
    .contact-page .contact-container {
        flex-direction: column-reverse; /* Pone la info arriba y el formulario abajo en tablets */
        gap: 40px;
    }

    .contact-info {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column; /* Apila los inputs (Nombre y Apellido) en celulares */
        gap: 20px;
        margin-bottom: 0;
    }

    .form-row input, 
    .form-row select {
        margin-bottom: 20px;
    }

    .contact-form {
        padding: 25px 20px;
    }
    
    .contact-page {
        padding: 60px 5%;
    }
}