:root {
    --marron-oscuro: #4f2000;
    --marron-fade: rgba(110, 60, 30, 0.85);
    --marron-claro: #ffaf66;
    --blanco: #ffffff;
    --negro-pro: #111111;
    --gris-oscuro: #1a1a1a;
    --wpp-green: #25D366;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background-color: var(--negro-pro); color: var(--blanco); overflow-x: hidden; }

/* --- ANIMACIONES --- */
.anim-down { opacity: 0; transform: translateY(-30px); animation: moveDown 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-expand { opacity: 0; letter-spacing: 0px; filter: blur(8px); animation: expandText 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-sub { opacity: 0; animation: fadeIn 1.2s ease forwards; animation-delay: 1.2s; }
.reveal { opacity: 0; transform: translateY(30px); transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.visible { opacity: 1; transform: translateY(0); }

@keyframes moveDown { to { opacity: 1; transform: translateY(0); } }
@keyframes expandText { to { opacity: 1; letter-spacing: 18px; filter: blur(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes pulse-wpp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- HEADER --- */
header {
    position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between;
    align-items: center; padding: 35px 8%; z-index: 1000; transition: all 0.5s ease;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}
header.scrolled { padding: 18px 8%; background-color: var(--marron-fade); backdrop-filter: blur(12px); }

/* Logo Index: Oculto por defecto, aparece al scrollear */
.logo { 
    color: var(--blanco); 
    font-weight: 300; 
    font-size: 1.1rem; 
    text-decoration: none; 
    letter-spacing: 6px; 
    text-transform: uppercase;
    opacity: 0; 
    visibility: hidden;
    transition: all 0.5s ease;
    transform: translateX(-10px);
}
header.scrolled .logo { opacity: 1; visibility: visible; transform: translateX(0); }

/* ESTA REGLA ES PARA LAS OTRAS PÁGINAS: Logo visible siempre */
body.interna .logo { opacity: 1 !important; visibility: visible !important; transform: translateX(0); }

nav ul { list-style: none; display: flex; gap: 35px; }
nav a { 
    position: relative; color: var(--blanco); text-decoration: none; font-size: 0.7rem; 
    font-weight: 300; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; transition: 0.3s;
    padding-bottom: 4px;
}
nav a::after {
    content: ''; position: absolute; width: 0; height: 1px; bottom: 0; left: 50%;
    background-color: var(--marron-claro); transition: 0.4s; transform: translateX(-50%);
}
nav a:hover { opacity: 1; color: var(--marron-claro); }
nav a:hover::after { width: 100%; }

/* --- HERO --- */
.hero {
    height: 100vh; width: 100%;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../images/heros/hero-fegma.webp'); 
    background-size: cover; background-position: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.hero-content h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 100; text-transform: uppercase; margin: 0; line-height: 1; }
.hero-content p { font-size: 0.8rem; font-weight: 300; letter-spacing: 8px; text-transform: uppercase; margin-top: 25px; color: var(--marron-claro); }

/* --- SECCIÓN INTRO --- */
.intro-fegma { padding: 120px 10%; background: var(--negro-pro); display: flex; justify-content: center; }
.intro-container { max-width: 1200px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
.intro-text { text-align: left; }
.sub-intro { font-size: 0.7rem; letter-spacing: 4px; color: var(--marron-claro); text-transform: uppercase; margin-bottom: 20px; display: block; }
.intro-text h2 { font-size: 2.2rem; font-weight: 100; letter-spacing: 5px; line-height: 1.3; margin-bottom: 10px; }
.intro-text p { font-weight: 300; line-height: 1.8; opacity: 0.8; margin-bottom: 40px; font-size: 0.95rem; }
.intro-image { position: relative; display: inline-block; justify-self: center; }
.intro-image img { display: block; width: 320px; height: auto; border: 1px solid rgba(255, 175, 102, 0.2); transition: 0.4s ease; }
.intro-image .image-overlay-border { position: absolute; top: 12px; right: -12px; width: 100%; height: 100%; border: 1px solid var(--marron-claro); z-index: -1; opacity: 0.3; }
.intro-image:hover img { border-color: var(--marron-claro); transform: translateY(-5px); }

/* --- SERVICIOS --- */
section { padding: 100px 10%; text-align: center; width: 100%; }
.titulo-sec { font-size: 2.2rem; font-weight: 300; letter-spacing: 4px; text-transform: uppercase; color: var(--marron-claro); margin-bottom: 50px; text-align: center; line-height: 1.2; }
.servicios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; width: 100%; max-width: 1200px; margin: 0 auto; }
.pilar-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.pilar-card { padding: 60px 30px; background: var(--gris-oscuro); border: 1px solid rgba(255,255,255,0.03); transition: 0.5s; position: relative; overflow: hidden; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.pilar-card::before { content: ''; position: absolute; bottom: -100%; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, var(--marron-oscuro), transparent); transition: 0.5s ease; z-index: 1; opacity: 0.4; }
.pilar-card:hover::before { bottom: 0; }
.pilar-card:hover { transform: translateY(-10px); border-color: var(--marron-claro); }
.pilar-card h3 { position: relative; z-index: 2; font-weight: 300; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 20px; font-size: 1.1rem; }
.pilar-card p { position: relative; z-index: 2; font-weight: 100; font-size: 0.85rem; color: rgba(255,255,255,1); line-height: 1.7; }
.btn-general { display: inline-block; margin-top: 50px; padding: 14px 40px; border: 1px solid var(--marron-claro); color: var(--marron-claro); text-decoration: none; font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase; transition: 0.3s; font-weight: 300; }
.btn-general:hover { background: var(--marron-claro); color: var(--marron-oscuro); }

/* --- CARRUSEL --- */
.proyectos-home { padding: 40px 0 80px; background: var(--negro-pro); overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%); mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%); }
.proyectos-track { display: flex; width: calc(450px * 26); animation: scroll-proyectos 60s linear infinite; }
.proyectos-track img { width: 450px; height: 300px; object-fit: cover; margin-right: 20px; border: 1px solid rgba(255,255,255,0.05); transition: 0.5s ease; }
@keyframes scroll-proyectos { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-450px * 13)); } }

/* --- RESUMEN --- */
.resumen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 100px 8%; background: var(--negro-pro); text-align: center; align-items: start; max-width: 1300px; margin: 0 auto; }
.resumen-item { padding: 20px; }
.resumen-item .dato { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 100; color: var(--marron-claro); display: block; margin-bottom: 10px; }
.resumen-item h4 { font-size: 0.85rem; font-weight: 400; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 10px; }
.resumen-item p { font-size: 0.8rem; font-weight: 300; opacity: 0.6; line-height: 1.5; }

/* --- CLIENTES --- */
.clientes-muro { background-color: var(--gris-oscuro); padding: 120px 5%; overflow: hidden; }
.muro-container { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.muro-fila { display: flex; gap: 15px; justify-content: center; width: 100%; }
.muro-fila:nth-child(even) { transform: translateX(0); }
.ladrillo { flex: 0 0 180px; height: 100px; background: rgba(255, 255, 255, 1); border: 1px solid rgba(255, 255, 255, 0.6); display: flex; align-items: center; justify-content: center; padding: 15px; transition: 0.3s ease; }
.ladrillo:hover { transform: scale(1.05); background: rgba(255, 255, 255, 0.6); border-color: var(--marron-claro); z-index: 10; }
.ladrillo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: brightness(1.1); }

/* --- FOOTER --- */
.main-footer { background: #080808; padding: 100px 10% 40px; border-top: 1px solid rgba(255,175,102,0.1); width: 100%; position: relative; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; margin-bottom: 50px; }
.footer-brand { flex: 2; min-width: 300px; display: flex; align-items: center; gap: 30px; }
.footer-logo-img { width: 140px; height: auto; border: 1px solid rgba(255,255,255,0.05); padding: 10px; flex-shrink: 0; }
.footer-brand h2 { font-weight: 300; letter-spacing: 5px; font-size: 1.4rem; text-transform: uppercase; margin-bottom: 15px; color: var(--blanco); }
.footer-brand p { font-size: 0.8rem; font-weight: 100; opacity: 1; line-height: 1.8; max-width: 400px; color: var(--blanco); }
.footer-socials { display: flex; gap: 15px; margin-top: 25px; align-items: center; }
.footer-socials a { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; text-decoration: none; }
.footer-socials a img { width: 55px; height: 55px; object-fit: contain; transition: all 0.4s; opacity: 0.9; }
.footer-socials a:hover img { transform: scale(1.2); filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 175, 102, 0.5)); opacity: 1; }
.footer-links-col { flex: 1; min-width: 180px; }
.footer-links-col span { display: block; font-size: 0.7rem; text-transform: uppercase; color: var(--marron-claro); letter-spacing: 3px; margin-bottom: 25px; }
.footer-links-col p { font-size: 0.85rem; font-weight: 300; opacity: 0.8; line-height: 2; margin-bottom: 10px; }
.footer-links-col a { color: #fff; text-decoration: none; transition: 0.3s; }
.footer-links-col a:hover { color: var(--marron-claro); padding-left: 5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; text-align: center; }
.footer-copy { font-size: 0.6rem; letter-spacing: 2px; opacity: 0.5; color: var(--blanco); text-transform: uppercase; }

/* --- MAPA & WHATSAPP --- */
.wpp-float { position: fixed; bottom: 40px; right: 40px; width: 60px; height: 60px; background-color: var(--wpp-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.4); z-index: 2000; animation: pulse-wpp 2s infinite; }
.wpp-float img { width: 32px; }
#map.active { border-color: var(--marron-claro); opacity: 1 !important; }

/* --- RESPONSIVE MOBILE (AL FINAL PARA NO PISAR) --- */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1100; }
.menu-toggle span { width: 25px; height: 2px; background: #fff; transition: 0.3s; }

/* --- RESPONSIVE MOBILE FINAL --- */
@media (max-width: 768px) {
    /* 1. Header desplegable pantalla completa y centrado */
    .menu-toggle { display: flex !important; }
    header { padding: 15px 5%; }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #111111; /* Negro sólido para mobile */
        transition: 0.4s ease-in-out;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1050;
    }
    nav.open { right: 0; }
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 35px;
    }
    nav a { font-size: 1.3rem; letter-spacing: 3px; }

    /* 2. Primera sección: Foto arriba del texto y chiquita */
    .intro-fegma { padding: 60px 8%; }
    .intro-container {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }
    .intro-image { order: 1; }
    .intro-text { order: 2; text-align: center; }
    .intro-image img { width: 160px; } /* Más chica para pantallas pequeñas */
    .intro-image .image-overlay-border { display: none; }

    /* 3. Servicios: Uno encima del otro */
    .servicios-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 20px;
    }
    .pilar-card { padding: 40px 20px; }

    /* 4. Contadores: Uno encima del otro */
    .resumen-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 40px;
        padding: 60px 8%;
    }

    /* 5. Pared de Marcas: Forzado de hileras de a 3 */
    .muro-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    .muro-fila { 
        display: contents !important; /* Esto anula los divs de las filas */
    }

    .ladrillo {
        /* El cálculo para que entren 3 exactas restando los espacios (gap) */
        flex: 0 0 calc(33.33% - 10px) !important; 
        height: 70px !important; /* Altura controlada */
        padding: 8px !important;
        background: #fff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 4px !important;
    }

    .ladrillo img {
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important; /* Evita que la imagen se estire o se agrande más que el ladrillo */
    }

    /* Para pantallas MUY chicas (menos de 400px), pasamos a 2 hileras para que no sean hormigas */
    @media (max-width: 400px) {
        .ladrillo {
            flex: 0 0 calc(50% - 10px) !important;
        }
    }

    /* 6. Footer: Logo oculto SOLO en mobile */
    .footer-logo-img {
        display: none; /* Desaparece en mobile */
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 40px;
    }
    .footer-brand-text, .footer-socials {
        align-items: center;
        justify-content: center;
    }
}
/*------------------------------------------------------*/
/*------------------------------------------------------*/
/*------------------------------------------------------*/
/*------------------------------------------------------*/
/*------------------------------------------------------*/
/*------------------------------------------------------*/
/* --- ESTADOS INICIALES PARA ANIMACIONES (Reveal) --- */
.reveal, .reveal-left, .reveal-right, .reveal-up, .zoom-settle {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

.reveal { transform: translateY(30px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-up { transform: translateY(40px); }
.zoom-settle { transform: scale(1.05); }

/* Estado cuando se hacen visibles al scrollear */
.visible {
    opacity: 1 !important;
    transform: translateX(0) translateY(0) scale(1) !important;
}

/* --- PAGINA NOSOTROS --- */
.hero-small {
    height: 50vh; width: 100%; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; background-color: #000;
}
.hero-small::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../images/heros/hero-prueba.webp'); 
    background-size: cover; background-position: center; filter: brightness(0.2); z-index: 1;
}
.hero-small h1 { position: relative; z-index: 2; font-size: clamp(2rem, 5vw, 3rem); font-weight: 100; text-transform: uppercase; letter-spacing: 15px; text-shadow: 0 0 15px rgba(0,0,0,0.6); }

.historia-container { padding: 80px 8%; max-width: 1300px; margin: 0 auto; }
.historia-row { display: flex; align-items: center; gap: 80px; margin-bottom: 100px; }
.historia-row:nth-child(even) { flex-direction: row-reverse; }
.historia-text { flex: 1.2; }
.historia-text h2 { font-size: 2.2rem; font-weight: 300; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 30px; color: var(--marron-claro); }
.historia-text p { 
    font-size: 1rem; 
    font-weight: 300; 
    line-height: 1.8; 
    opacity: 0.95; 
    margin-bottom: 25px; 
    color: #fff; 
}

.historia-text p strong {
    font-weight: 700;
    color: var(--blanco);
}
.historia-img { flex: 0.8; height: 480px; border: 1px solid rgba(255,175,102,0.1); overflow: hidden; }
.historia-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.2s ease; filter: grayscale(40%); }
.historia-img:hover img {filter: grayscale(0%); transform: scale(1.05);}

.team-section { padding: 20px 8% 100px; background: var(--negro-pro); text-align: center; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; max-width: 1200px; margin-left: auto; margin-right: auto; }
.team-card { 
    background: var(--gris-oscuro); 
    padding: 60px 35px;
    border: 1px solid rgba(255,255,255,0.03); 
    transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.team-card::before {
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 2px;
    background: var(--marron-claro); 
    transform: scaleX(0); 
    transition: 0.5s;
}

.team-card:hover::before { 
    transform: scaleX(1); 
}

.team-card:hover { 
    border-color: rgba(255,175,102,0.2); 
    transform: translateY(-10px); 
    background: #1d1d1d; 
}
.team-card p {
    font-size: 0.85rem;
    font-weight: 100; 
    line-height: 2;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.9; 
}
.team-card h3 {
    font-weight: 400; 
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--marron-claro);
}
.resumen-nosotros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 80px 10%; background: #0c0c0c; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
.resumen-item .dato-wrapper {
    font-size: 4rem; 
    font-weight: 100;
    color: var(--marron-claro);
    display: block;
    margin-bottom: 10px;
    line-height: 1;
}

@media (max-width: 768px) {
    .resumen-item .dato-wrapper {
        font-size: 3.5rem; 
    }
    
    .resumen-nosotros {
        padding: 40px 10%;
        gap: 50px; 
    }
}

@media (max-width: 768px) {
    .historia-row { flex-direction: column !important; gap: 40px; text-align: center; }
    .historia-img { height: 300px; width: 100%; order: 1; } 
    .historia-text { order: 2; }
    .team-grid, .resumen-nosotros { grid-template-columns: 1fr; }
    .hero-small h1 { letter-spacing: 8px; font-size: 1.8rem; }
}

/* --- PAGINA SERVICIOS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 100px 8%; }
.servicio-row { display: flex; align-items: center; gap: 80px; margin-bottom: 120px; padding-top: 80px; }
.servicio-row:nth-child(even) { flex-direction: row-reverse; }

.servicio-gallery { flex: 1; position: relative; height: 420px; border: 1px solid rgba(255,175,102,0.1); overflow: hidden; cursor: pointer; }
.servicio-gallery .main-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease; }

.servicio-gallery:hover .main-img { transform: scale(1.05); }

.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.3); color: white; border: none;
    width: 40px; height: 40px; cursor: pointer; z-index: 11;
    font-size: 1.2rem; transition: 0.3s; opacity: 0;
    display: flex; align-items: center; justify-content: center;
}
.servicio-gallery:hover .nav-arrow { opacity: 1; }
.nav-arrow:hover { background: var(--marron-claro); color: var(--marron-oscuro); }
.arrow-prev { left: 10px; }
.arrow-next { right: 10px; }

.gallery-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: 0.3s; border: none; }
.dot.active { background: var(--marron-claro); transform: scale(1.3); }

.servicio-text { flex: 1; }
.servicio-text span { color: var(--marron-claro); font-size: 0.65rem; letter-spacing: 4px; text-transform: uppercase; display: block; margin-bottom: 15px; }
.servicio-text h2 { font-size: 2rem; font-weight: 300; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 20px; }
.servicio-text p { font-size: 0.9rem; font-weight: 300; line-height: 1.8; opacity: 0.8; margin-bottom: 30px; color: #fff; }

.list-servicios { list-style: none; margin-bottom: 35px; }
.list-servicios li { font-size: 0.75rem; font-weight: 300; letter-spacing: 1px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; opacity: 0.8; }
.list-servicios li::before { content: ''; width: 12px; height: 1px; background: var(--marron-claro); display: block; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-serv {
    display: inline-block; padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.2); color: var(--blanco);
    text-decoration: none; font-size: 0.6rem; letter-spacing: 2px;
    text-transform: uppercase; transition: 0.4s; font-weight: 300;
    cursor: pointer; background: transparent;
}
.btn-serv.primary { border-color: var(--marron-claro); color: var(--marron-claro); }
.btn-serv:hover { background: var(--marron-claro); color: var(--marron-oscuro); border-color: var(--marron-claro); }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(12px); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 40px; }
.modal-content { background: var(--gris-oscuro); width: 100%; max-width: 1000px; display: flex; height: 70vh; border: 1px solid rgba(255,175,102,0.2); transform: scale(0.85); opacity: 0; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal.active .modal-content { transform: scale(1); opacity: 1; }
.modal-gallery { flex: 1.2; position: relative; background: #000; overflow: hidden; }
.modal-info { flex: 1; padding: 50px; overflow-y: auto; }
.close-modal { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2.5rem; cursor: pointer; z-index: 2100; transition: 0.3s; }
.close-modal:hover { color: var(--marron-claro); transform: rotate(90deg); }
.modal-img { width: 100%; height: 100%; object-fit: cover; }

.modal-info h2 { font-weight: 300 !important; text-transform: uppercase; letter-spacing: 3px; font-size: 1.5rem; color: var(--marron-claro); margin-bottom: 20px; }
.modal-info p { font-weight: 100 !important; line-height: 1.8; opacity: 0.9; color: #fff; font-size: 0.95rem; }

@media (max-width: 768px) {
    .servicio-row, .servicio-row:nth-child(even) { flex-direction: column; gap: 25px; text-align: center; padding-top: 40px; margin-bottom: 80px; }
    .servicio-gallery { height: 250px; width: 90%; margin: 0 auto; order: 1; } 
    .servicio-text { order: 2; }
    .list-servicios li { justify-content: center; }
    .btn-group { justify-content: center; }
    .modal-content { flex-direction: column; height: 85vh; }
}


/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/


/* --- PAGINA PROYECTOS --- */
.section-header { 
    padding: 80px 8% 0; 
    text-align: left; /* Corrección 1: Alineación a la izquierda */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.section-header .titulo-sec::after, 
.filter-container .titulo-sec::after {
    content: ''; display: block; width: 40px; height: 2px; background: var(--marron-claro); margin-top: 15px; opacity: 0.6;
}

.featured-section { padding: 40px 8%; }
.featured-card {
    width: 100%; height: 500px; position: relative; overflow: hidden;
    display: flex; align-items: flex-end; padding: 60px 8%; /* Padding lateral para el texto */
    border: 1px solid rgba(255,255,255,0.05); margin-bottom: 40px; cursor: pointer;
}
.featured-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; transition: 1.5s ease; z-index: 1; }
.featured-card:hover .featured-bg { transform: scale(1.05); }
.featured-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9) 10%, transparent 70%); z-index: 2; }

/* Corrección 2: Títulos estirados en su contenedor */
.featured-content { 
    position: relative; 
    z-index: 3; 
    max-width: 100%; 
    width: 100%; 
}
.featured-content span { color: var(--marron-claro); font-size: 0.7rem; letter-spacing: 4px; text-transform: uppercase; }
.featured-content h2 { 
    font-size: 2.8rem; 
    font-weight: 300; 
    margin: 15px 0; 
    letter-spacing: 3px; 
    text-transform: uppercase;
    width: 100%;
    display: block;
}
.featured-content p { font-weight: 100; opacity: 0.7; line-height: 1.8; font-size: 1rem; max-width: 800px; }

.filter-container { padding: 40px 8%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.filter-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--blanco);
    padding: 10px 25px; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: 0.4s;
}
.filter-btn.active { border-color: var(--marron-claro); color: var(--marron-claro); background: rgba(255,175,102,0.05); }

.projects-grid { padding: 0 8% 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 35px; }
.project-item { position: relative; height: 400px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.project-item img { width: 100%; height: 100%; object-fit: cover; transition: 1s ease; }
.project-item:hover img { transform: scale(1.1); }
.project-info-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 50px 30px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%); z-index: 5;
}
.project-info-overlay h4 { font-weight: 400; letter-spacing: 2px; text-transform: uppercase; font-size: 1rem; margin-bottom: 6px; }
.project-info-overlay p { font-size: 0.7rem; font-weight: 300; color: var(--marron-claro); letter-spacing: 2px; text-transform: uppercase; }

.modal-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); border: none; color: #fff;
    width: 50px; height: 50px; cursor: pointer; font-size: 1.2rem; z-index: 10;
}
.modal-arrow:hover { background: var(--marron-claro); color: var(--marron-oscuro); }
.m-prev { left: 0; } .m-next { right: 0; }

.tech-info { margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; }
.tech-info div { margin-bottom: 14px; display: flex; flex-direction: column; }
.tech-info label { font-size: 0.6rem; text-transform: uppercase; color: var(--marron-claro); letter-spacing: 2px; margin-bottom: 4px; }
.tech-info p { font-size: 0.85rem; font-weight: 300; opacity: 0.9; }

.btn-modal-contact {
    display: inline-block; width: 100%; text-align: center; padding: 15px; margin-top: 20px;
    background: transparent; border: 1px solid var(--marron-claro); color: var(--marron-claro);
    text-decoration: none; font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
    transition: 0.4s; font-weight: 400;
}
.btn-modal-contact:hover { background: var(--marron-claro); color: var(--marron-oscuro); }

/* --- RESPONSIVE PROYECTOS --- */
@media (max-width: 768px) {
    .featured-card { height: auto; padding: 40px 20px; text-align: center; flex-direction: column; justify-content: flex-end; }
    .featured-content h2 { font-size: 1.8rem; }
    .projects-grid { grid-template-columns: 1fr; padding: 0 5% 80px; }
    .filter-container { flex-direction: column; text-align: center; }
    .filter-buttons { justify-content: center; }
    .modal-gallery { height: 40% !important; }
}


/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/



/* --- PAGINA CONTACTO --- */
/* --- PAGINA CONTACTO --- */
.contacto-container { padding: 100px 8%; max-width: 1300px; margin: 0 auto; display: flex; gap: 80px; }
.info-col { flex: 1; }
.info-col h2 { font-size: 2.2rem; font-weight: 300; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 45px; color: var(--marron-claro); }

.contacto-item { margin-bottom: 40px; }
.contacto-item span { 
    display: block; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    color: var(--marron-claro); 
    margin-bottom: 12px; 
    opacity: 1; /* Máxima nitidez */
    font-weight: 400; 
}
.contacto-item p { 
    font-size: 1rem; 
    font-weight: 300; 
    opacity: 1; /* Máxima nitidez */
    line-height: 1.6; 
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}
.contacto-item a { color: var(--blanco); text-decoration: none; transition: 0.3s; font-weight: 400; }
.contacto-item a:hover { color: var(--marron-claro); }

.form-col { flex: 1.5; background: var(--gris-oscuro); padding: 50px; border: 1px solid rgba(255,255,255,0.03); position: relative; }
.form-col::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--marron-claro); }

.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; opacity: 0.6; }
.form-control { width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.1); color: var(--blanco); padding: 10px 0; font-family: 'Montserrat'; font-weight: 300; font-size: 0.9rem; transition: 0.4s; }
.form-control:focus { outline: none; border-color: var(--marron-claro); background: rgba(255,175,102,0.02); }
textarea.form-control { height: 120px; resize: none; }

.btn-enviar { background: transparent; border: 1px solid var(--marron-claro); color: var(--marron-claro); padding: 15px 45px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 3px; cursor: pointer; transition: 0.4s; font-family: 'Montserrat'; margin-top: 20px; font-weight: 400; }
.btn-enviar:hover { background: var(--marron-claro); color: var(--marron-oscuro); }

/* --- ANTI-SPAM FIELD (Honeypot) --- */
.hp-field { display: none !important; visibility: hidden !important; }

/* --- RESPONSIVE CONTACTO --- */
@media (max-width: 900px) {
    .contacto-container { flex-direction: column; gap: 60px; padding: 60px 8%; text-align: center; }
    .info-col h2 { font-size: 1.8rem; margin-bottom: 30px; }
    .form-col { padding: 40px 25px; }
    .form-col::before { width: 100%; height: 3px; top: 0; left: 0; }
}