/* css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Rajdhani:wght@500;600;700;800&display=swap');

:root {
    /* Paleta Industrial Premium */
    --clr-main-bg: #040914;
    --clr-deep-blue: #040914;
    --clr-accent: #E21C23;
    --clr-accent-hover: #ff2a31;
    --clr-text-main: #ffffff;
    --clr-text-muted: #a0aec0;
    
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background-color: var(--clr-main-bg); }
body {
    background-color: var(--clr-main-bg);
    background-image: 
        url("data:image/svg+xml,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 8 L8 0 M-2 2 L2 -2 M6 10 L10 6' stroke='rgba(255,255,255,0.025)' stroke-width='0.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='800' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(255,255,255,0.02)' text-anchor='middle' font-family='Arial, sans-serif'%3E%3Ctext x='400' y='280' font-size='120' font-weight='900' letter-spacing='15'%3EC%26D%3C/text%3E%3Ctext x='400' y='350' font-size='30' font-weight='700' letter-spacing='26'%3ECONSTRUCCI%C3%93N%3C/text%3E%3C/g%3E%3C/svg%3E");
    background-size: 8px 8px, 800px 600px;
    background-position: center center, center center;
    background-attachment: fixed, fixed;
    color: var(--clr-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    animation: fadeInBody 1s forwards ease-in-out;
}

@keyframes fadeInBody { to { opacity: 1; } }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Botones Premium */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading); text-transform: uppercase; font-weight: 700; letter-spacing: 1px;
    background-color: var(--clr-accent); color: #fff;
    border: none; cursor: pointer; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-size: 14px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(226, 28, 35, 0.4);
}
.btn-primary.large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* Header */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: transparent;
    transition: all 0.5s ease;
}
.navbar.scrolled {
    background: rgba(4, 9, 20, 0.95);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.navbar-container {
    display: flex; justify-content: space-between; align-items: center;
    height: 96px; transition: height 0.4s ease;
}
.navbar.scrolled .navbar-container { height: 75px; }

.logo a { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; }
.logo-main { font-family: var(--font-heading); font-size: 42px; font-weight: 800; letter-spacing: 1px; color: #fff; line-height: 1;}
.logo-sub { font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--clr-text-muted); letter-spacing: 1px; text-transform: uppercase; line-height: 1.2;}

.nav-container { display: flex; align-items: center; }
.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-links a:not(.btn-primary) {
    font-family: var(--font-body);
    font-size: 14px; font-weight: 500; letter-spacing: 1px;
    color: var(--clr-text-main); position: relative; padding: 5px 0; transition: color 0.3s;
}
.nav-links a:not(.btn-primary):hover, .nav-links a:not(.btn-primary).active { color: var(--clr-accent); }
.nav-links a:not(.btn-primary)::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background-color: var(--clr-accent); transition: width 0.3s ease;
}
.nav-links a:not(.btn-primary):hover::after, .nav-links a:not(.btn-primary).active::after { width: 100%; box-shadow: 0 0 8px rgba(226, 28, 35, 0.5); }

.desktop-cta { display: block; }
.mobile-cta { display: none; }

.mobile-menu-btn { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1001; }
.mobile-menu-btn span { width: 30px; height: 2px; background: #fff; transition: 0.3s; }

/* Hero */
.hero {
    position: relative; min-height: 100vh;
    padding-top: 96px; /* Altura del header para evitar superposición */
    display: flex; align-items: center; overflow: hidden;
}
.hero-parallax-wrapper { position: absolute; top: -5%; left: -5%; width: 110%; height: 110%; z-index: 0; }
.hero-bg {
    width: 100%; height: 100%;
    background-image: url('../assets/images/hero-home.webp');
    background-size: cover; background-position: center;
    transition: transform 0.1s linear;
}
.hero-overlay-dark {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    background: linear-gradient(90deg, rgba(4,9,20,0.8) 0%, rgba(4,9,20,0.4) 50%, transparent),
                linear-gradient(0deg, rgba(4,9,20,0.5) 0%, transparent 30%);
}

/* Branding Premium Superior Izquierdo */
.hero-brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
}

.hero-brand-main {
    font-family: var(--font-heading);
    font-size: clamp(80px, 8vw, 130px);
    font-weight: 900;
    line-height: 0.85;
    color: rgba(240, 240, 245, 0.95); /* Blanco humo industrial */
    letter-spacing: -3px;
    text-shadow: 2px 4px 15px rgba(226, 28, 35, 0.15), 0px 0px 40px rgba(255, 255, 255, 0.05); /* Sombra roja muy sutil y leve resplandor blanco */
}

.hero-brand-sub {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.2vw, 20px);
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 6px;
    margin-top: 12px;
    text-transform: uppercase;
}

.hero-brand-line {
    width: 60px;
    height: 3px;
    background-color: var(--clr-accent);
    margin-top: 15px;
    box-shadow: 0 0 10px rgba(226, 28, 35, 0.5);
}
@media (max-width: 1024px) {
}

.hero-content { position: relative; z-index: 10; max-width: 560px; padding-top: 2rem; padding-bottom: 2rem; text-align: left; }

@media (min-width: 1025px) {
    .hero-content {
        position: absolute;
        left: 64px;
        top: 120px; /* Debajo visual del header (96px + gap) */
        transform: none;
        margin: 0;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    color: #fff; margin-bottom: 1.5rem; text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    font-weight: 800; letter-spacing: -1px; text-transform: none; line-height: 1.05;
    max-width: 560px;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: #cbd5e1; max-width: 520px; margin-bottom: 3rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.6); font-weight: 400; line-height: 1.7;
}

/* Scroll Indicator */
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 10; opacity: 0.6; }
.mouse { width: 26px; height: 40px; border: 2px solid rgba(255,255,255,0.6); border-radius: 15px; position: relative; }
.mouse::before {
    content: ''; width: 4px; height: 8px; background: rgba(255,255,255,0.6);
    position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    border-radius: 2px; animation: scroll 2s infinite;
}

/* Quick Access Cards */
.quick-access {
    background-color: transparent;
    padding: 6rem 0 2rem 0;
    position: relative;
    z-index: 10;
}
@media (min-width: 1025px) {
    .quick-access .container {
        max-width: 1360px; /* Expandir ancho visual en desktop */
    }
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; /* Gap ajustado para mayor horizontalidad */
}
.quick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 240px; /* Menos altura para look más cinematográfico/panorámico */
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--clr-deep-blue);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.quick-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    z-index: 1;
}
.quick-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(1, 2, 4, 0.95) 0%, rgba(1, 2, 4, 0.4) 60%, transparent 100%);
    z-index: 2;
    transition: background 0.4s ease;
}
.quick-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quick-title {
    font-size: 1.4rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.5px;
    transform: translateY(0);
    transition: transform 0.3s ease;
    line-height: 1.1;
}
.quick-text {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    margin: 0;
    line-height: 1.4;
}
.quick-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Hover Effects */
.quick-card:hover {
    border-color: rgba(226, 28, 35, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(226, 28, 35, 0.1);
    transform: translateY(-5px);
}
.quick-card:hover .quick-bg {
    transform: scale(1.05);
}
.quick-card:hover .quick-overlay {
    background: linear-gradient(to top, rgba(1, 2, 4, 0.98) 0%, rgba(1, 2, 4, 0.6) 60%, rgba(226, 28, 35, 0.15) 100%);
}
.quick-card:hover .quick-title {
    color: #fff;
    transform: translateY(-2px);
}
.quick-card:hover .quick-link {
    opacity: 1;
    transform: translateY(0);
}

/* Cinematic Section - Atención Inmediata */
.cinematic-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: transparent;
    margin-bottom: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.cinematic-bg {
    position: absolute;
    top: -2.5%; left: -5%;
    width: 110%; height: 105%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: transform 0.1s linear, opacity 0.5s ease;
    opacity: 0; /* Starts hidden until lazy loaded */
}
.cinematic-bg.loaded {
    opacity: 1;
}
.cinematic-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Más transparente para revelar la imagen industrial */
    background: linear-gradient(90deg, rgba(4, 9, 20, 0.5) 0%, rgba(4, 9, 20, 0.15) 50%, transparent 100%);
    z-index: 1;
}
.cinematic-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    padding: 0 2rem;
}
.cinematic-panel {
    background: rgba(4, 9, 20, 0.25); /* Transparencia elegante premium */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--clr-accent);
    padding: 3rem;
    max-width: 560px; /* Alineado al peso del Hero */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

/* Ajustes de visibilidad específicos para imágenes oscuras (Fabricación y Mantenimiento) */
#fabricacion-metalmecanica .cinematic-bg,
#mantenimiento-industrial .cinematic-bg,
#nosotros .cinematic-bg,
#contacto .cinematic-bg {
    filter: brightness(1.2) contrast(1.15) saturate(1.05); /* Recupera luces y estructuras metálicas */
}
#fabricacion-metalmecanica .cinematic-overlay,
#mantenimiento-industrial .cinematic-overlay,
#nosotros .cinematic-overlay,
#contacto .cinematic-overlay {
    background: linear-gradient(90deg, rgba(4, 9, 20, 0.2) 0%, transparent 40%);
}
#fabricacion-metalmecanica .cinematic-panel,
#mantenimiento-industrial .cinematic-panel,
#nosotros .cinematic-panel,
#contacto .cinematic-panel {
    background: rgba(4, 9, 20, 0.06); /* Opacidad reducida para un cristal ultra-puro */
    backdrop-filter: blur(5px); /* Desenfoque reducido para eliminar la pesadez "lechosa" */
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.03);
}

@media (min-width: 1025px) {
    .cinematic-container {
        padding-left: 64px; /* Alineación visual exacta con el texto y logo del Hero */
    }
}
.cinematic-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    color: #fff;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    line-height: 1.1;
    font-weight: 800;
}
.cinematic-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--clr-accent);
    margin-bottom: 2rem;
    font-weight: 600;
    line-height: 1.4;
}
.cinematic-text {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.6;
}
.cinematic-list {
    list-style: none;
    margin-bottom: 2.5rem;
}
.cinematic-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #e2e8f0;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.cinematic-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 6px; height: 6px;
    background-color: var(--clr-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(226, 28, 35, 0.8);
}
.cinematic-cta {
    width: 100%;
}

/* Animations */
.reveal-item { opacity: 0; transform: translateY(30px); animation: fadeUp 1s forwards cubic-bezier(0.165, 0.84, 0.44, 1); }
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.5s; }
.delay-3 { animation-delay: 0.7s; }
.delay-4 { animation-delay: 1s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes scroll { 0% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, 15px); opacity: 0; } }

/* Mobile Responsive Premium */
@media (max-width: 1024px) {
    .desktop-cta { display: none; }
    .mobile-cta { display: block; margin-top: 1rem; width: 100%; }
    .mobile-cta .btn-primary { width: 100%; }
    
    .nav-links {
        position: fixed; top: 0; left: -100%; width: 100%; height: 100vh;
        background: rgba(4, 9, 20, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; transition: left 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        gap: 2rem; padding: 0 2rem;
    }
    .nav-links.active { left: 0; }
    .nav-links a:not(.btn-primary) { font-size: 1.4rem; }
    
    .mobile-menu-btn { display: flex; }
    .mobile-menu-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .hero-title { font-size: 3rem; }
    .hero-title br { display: none; }
    
    .hero-brand-block {
        margin-top: 2rem;
        align-items: flex-start;
    }
    
    .hero-brand-sub { letter-spacing: 4px; }
    
    .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-brand-main { font-size: 60px; }
    .hero-brand-sub { font-size: 11px; letter-spacing: 3px; }
    .btn-primary.large { width: 100%; font-size: 1rem; padding: 1rem; }
    .logo-main { font-size: 1.8rem; }
    .logo-sub { font-size: 0.65rem; }
    
    .quick-access { padding: 4rem 0; }
    .quick-grid { grid-template-columns: 1fr; gap: 1rem; }
    .quick-card { height: 240px; }
    .quick-link { opacity: 1; transform: translateY(0); }
    
    .cinematic-panel {
        padding: 2rem;
        border-left: 3px solid var(--clr-accent);
    }
    .cinematic-overlay {
        background: linear-gradient(0deg, rgba(1, 2, 4, 0.98) 0%, rgba(1, 2, 4, 0.8) 100%);
    }
}

/* Footer Cinematográfico Premium */
.cinematic-footer {
    position: relative;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    padding-top: 6rem;
}

.footer-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(4, 9, 20, 0.98) 0%, rgba(4, 9, 20, 0.8) 100%);
    z-index: 1;
}

.footer-container {
    position: relative;
    z-index: 2;
}

.footer-cta-section {
    position: relative;
    background: linear-gradient(135deg, rgba(4, 9, 20, 0.6) 0%, rgba(4, 9, 20, 0.2) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--clr-accent);
    padding: 5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 4px;
    margin-bottom: 6rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 20px rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.footer-cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: -4px; width: 4px; height: 100%;
    background-color: transparent;
    box-shadow: 0 0 30px 5px rgba(226, 28, 35, 0.4);
    z-index: -1;
}

.footer-cta-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #fff;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.footer-cta-text {
    font-size: 1.15rem;
    color: #cbd5e1;
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.footer-btn {
    box-shadow: 0 10px 30px rgba(226, 28, 35, 0.3);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-description {
    font-size: 0.95rem;
    color: #a0aec0;
    line-height: 1.6;
    max-width: 350px;
}

.footer-heading {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--clr-accent);
}

.footer-links, .footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a, .footer-contact a, .footer-contact span:not(.contact-label) {
    color: #a0aec0;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover, .footer-contact a:hover {
    color: #fff;
}

.contact-label {
    color: var(--clr-accent);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 8px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.developer-plate {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.developer-plate .dev-line {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.developer-plate .dev-brand {
    color: var(--clr-accent);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
}

.developer-plate .dev-link {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    font-family: var(--font-body);
    transition: color 0.3s;
}

.developer-plate .dev-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .footer-cta-section {
        padding: 4rem 2rem;
    }
}