/* =========================================
   1. VARIABLES Y BASE
   ========================================= */
:root {
    --primary-color: #d32e12; /* Naranja industrial */
    --dark-bg: #1a1a1a;
    --light-bg: #ffffff;
    --text-light: #f0f0f0;
    --text-dark: #333333;
    --nav-transition: all 0.4s ease-in-out;
    --overlay-color: rgba(0, 0, 0, 0.3); 
    
    --nav-transition: all 0.4s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    scroll-behavior: smooth;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    

}

/* =========================================
   2. NAVBAR & NAVEGACIÓN (Escritorio)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between; /* Distribuye Logo (izq) y Controles (der) */
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(0, 0, 0, 0);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(168, 55, 55, 0.808);
    padding: 15px 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}


.logo {
    display: flex;
    align-items: center;
    z-index: 1006; /* Por encima del menú móvil */
}

.logo-img {
    height: 100px;
    width: auto;
    transition: transform 0.3s ease;
}

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

.navbar.scrolled .logo-img {
    height: 75px;
}

.nav-links {
    display: flex;
    gap: 30px;
    margin-left: auto; /* Empuja los links a la derecha junto al selector */
    margin-right: 30px; /* Separación con el selector de idioma */
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding-top: 25px;
    position: relative;
    transition: color 0.3s;
}

 
.nav-link.active { 
    color: var(--primary-color) ; 
}

.navbar.scrolled .nav-link { 
    color: rgb(255, 255, 255) ; 

}
.navbar.scrolled .nav-link:hover{ 
    color: black ; 
    
}
.navbar.scrolled .lang-select {
    color: rgb(255, 255, 255);
    border-color: rgba(255, 255, 255, 0.3);
}
/* --- SECCIÓN EXCLUSIVA DE MATERIALES --- */
.materials-container {
    margin: 100px auto;
    padding: 0 20px;
    max-width: 1000px;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.material-card {
    background: linear-gradient(145deg, #1f1f1f, #141414);
    border: 1px solid rgba(255, 140, 0, 0.15);
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Transición suave para el hover */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Estado inicial para la animación de scroll */
    opacity: 0;
    transform: translateY(50px);
}

/* Clase que añade el Javascript al hacer scroll */
.material-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Línea decorativa animada en la parte superior */
.material-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: #ff8c00;
    transition: all 0.5s ease;
}

/* Animaciones al pasar el ratón (Hover) */
.material-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 140, 0, 0.1);
    border-color: rgba(255, 140, 0, 0.5);
    background: linear-gradient(145deg, #252525, #1a1a1a);
}

.material-card:hover::before {
    left: 0; /* Desliza la línea naranja */
}

.material-icon {
    font-size: 3.5rem;
    color: #ff8c00;
    margin-bottom: 25px;
    display: inline-block;
    transition: transform 0.5s ease;
}

.material-card:hover .material-icon {
    transform: scale(1.15) rotate(5deg);
}

.material-card h4 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.material-card p {
    color: #ccc;
    line-height: 1.8;
    font-size: 1.1rem;
    font-family: 'Courier New', Courier, monospace; /* Fuente técnica para los tipos de acero */
    font-weight: bold;
}
/* Línea animada bajo enlaces */
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* Dropdowns (Escritorio) */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu, .dropdown-menu-nested {
    display: none;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.95);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    padding: 10px 0;
    list-style: none;
    border-radius: 4px;
    margin: 0;
}

.dropdown-menu { top: 100%; left: 0; }
.dropdown-menu-nested { top: 0; left: 100%; margin-left: 2px; }

.dropdown:hover .dropdown-menu,
.dropdown-submenu:hover .dropdown-menu-nested {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-item {
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-submenu { position: relative; }

/* Selector de Idioma */
.lang-form {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

.lang-select {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 5px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 20px;
}

.lang-select:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.lang-select option { background-color: black;color: var(--primary-color); }

/* Botón Hamburguesa (Oculto en escritorio) */
.menu-toggle { display: none; }

/* =========================================
   3. HERO & CARRUSEL
   ========================================= */
.hero {
    height: 100vh;
    width: 100%;
    background-image: url('https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero.hero-small {
    height: 50vh;
    min-height: 350px;
}

.hero::before, .carousel-overlay {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--overlay-color);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    position: relative;
    animation: fadeInUp 1.2s ease-out forwards;
    max-width: 800px;
    padding: 0 20px;
    padding-top: 6%;
    
}

h1.main-title {
    font-size: 5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 5px;
    line-height: 1.1;
}

.hero.hero-small h1.main-title { font-size: 3.5rem; }

p.subtitle {
    font-size: 1.5rem;
    margin-top: 10px;
    color: #ddd;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    z-index: 2;
    animation: bounce 2s infinite;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Carrusel Hero */
.hero-carousel {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.carousel-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s linear;
    z-index: 1;
    transform: scale(1);
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1.05);
}

.highlight-text { color: var(--primary-color); }

.hero-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-hero {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-hero.primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}
.btn-hero.primary:hover { background-color: #e55c00; }

.btn-hero.outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}
.btn-hero.outline:hover { background-color: white; color: #111; }

.carousel-dots {
    position: absolute;
    bottom: 80px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px; height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}
.dot.active { background-color: var(--primary-color); transform: scale(1.2); }

/* =========================================
   4. SECCIONES COMUNES (Resumen, Features)
   ========================================= */
.summary-section {
    background-color: var(--light-bg);
    color: var(--text-dark);
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    width: 300px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-top: 5px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-top: 5px solid var(--primary-color);
}

.card-icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.card h3 { margin: 10px 0; font-size: 1.5rem; text-transform: uppercase; }
.card p { color: #666; line-height: 1.6; }

.card-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--dark-bg);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}
.card-link:hover { background-color: var(--primary-color); }

.why-us-section {
    background-color: #111;
    color: white;
    padding: 100px 0;
    position: relative;
    border-top: 1px solid #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: transform 0.3s, background 0.3s;
    border: 1px solid transparent;
}

.feature-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: inline-block;
    transition: transform 0.5s;
}

.feature-item:hover .feature-icon { transform: rotateY(360deg); }
.feature-item h4 { font-size: 1.25rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.feature-item p { color: #bbb; line-height: 1.6; font-size: 0.95rem; }

/* =========================================
   5. PÁGINA EMPRESA
   ========================================= */
.company-page-container {
    padding-bottom: 50px;
    background-color: var(--dark-bg);
    min-height: 100vh;
    
}

.section-title {
    font-size: 2.2rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    color: #fff;
}

.section-title .highlight { color: var(--primary-color); }
.section-title::after {
    content: ''; display: block; width: 50px; height: 3px;
    background: var(--primary-color); margin-top: 5px;
}

.center-title { text-align: center; display: block; margin: 0 auto 40px; }
.center-title::after { margin: 10px auto 0; }

.company-intro { display: flex; gap: 50px; align-items: center; }
.intro-text { flex: 1; color: #ccc; line-height: 1.8; font-size: 1.1rem; }
.intro-image { flex: 1; position: relative; }
.intro-image img { 
    width: 100%; border-radius: 4px; 
    box-shadow: 15px 15px 0 rgba(211, 46, 18, 0.15); 
    filter: brightness(0.9); 
}

.exp-badge {
    position: absolute; bottom: -20px; left: -20px;
    background: var(--primary-color); color: white;
    padding: 15px 25px; text-align: center; font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.exp-badge .years { display: block; font-size: 2rem; line-height: 1; }

/* Tarjetas 3D */
.mvv-section-dark { background-color: #111; padding: 80px 0; border-top: 1px solid #333; border-bottom: 1px solid #333; }
.mvv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.flip-card { background: transparent; height: 320px; perspective: 1000px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s; transform-style: preserve-3d; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 8px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 20px; border: 1px solid #333;
}
.flip-card-front { background: #222; border-bottom: 4px solid var(--primary-color); }
.flip-card-back { background: var(--primary-color); color: white; transform: rotateY(180deg); }
.icon-large { font-size: 3.5rem; color: var(--primary-color); margin-bottom: 20px; }
.values-list { list-style: none; padding: 0; text-align: left; }
.values-list li { margin-bottom: 8px; }

/* Planta Operativa & Stats */
.plant-parallax {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-attachment: fixed; background-size: cover; background-position: center;
    padding: 100px 0; color: white; text-align: center;
}
.overlay-dark { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.8); z-index: 1; }
.relative-z { position: relative; z-index: 2; }
.stats-grid { display: flex; justify-content: space-around; flex-wrap: wrap; margin-top: 50px; gap: 30px; }
.stat-item i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; }
.stat-item .number { display: block; font-size: 3rem; font-weight: bold; font-family: monospace; }

.certs-container { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
.cert-box {
    background: #222; padding: 30px; width: 220px; border-radius: 8px; border: 1px solid #333;
    transition: transform 0.3s;
}
.cert-box:hover { transform: translateY(-10px); border-color: var(--primary-color); }
.cert-icon { font-size: 2.5rem; color: #888; margin-bottom: 15px; display: block;}
.cert-box:hover .cert-icon { color: var(--primary-color); }

/* =========================================
   6. SECCIÓN SECTORES (Galería)
   ========================================= */
.sectors-section { padding: 100px 0; background-color: var(--dark-bg); }
.sectors-header { text-align: center; margin-bottom: 60px; max-width: 700px; margin: 0 auto 60px auto; }
.sectors-gallery { display: flex; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; 
    flex-wrap: wrap;justify-content: center; }


.sector-card {
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    flex: 0 1 calc(33.333% - 30px); 
    min-width: 280px;
}

.sector-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: all 0.4s ease;
}

.sector-overlay i, .sector-overlay h3 {
    transform: translateY(20px); opacity: 0; transition: all 0.4s ease;
}
.sector-overlay i { font-size: 3rem; color: white; margin-bottom: 10px; }
.sector-overlay h3 { color: white; text-transform: uppercase; font-size: 1.5rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }

.sector-card:hover .sector-overlay { background: rgba(211, 46, 18, 0.85); }
.sector-card:hover i, .sector-card:hover h3 { transform: translateY(0); opacity: 1; }

/* =========================================
   7. PÁGINA CONTACTO Y FORMULARIOS
   ========================================= */
.contact-page-container { background-color: var(--dark-bg); padding-bottom: 50px; min-height: 100vh; }
.contact-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 50px; }

.info-card {
    background-color: #222;
    padding: 40px 20px; text-align: center; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); border-bottom: 4px solid transparent;
    transition: transform 0.3s, border-color 0.3s;
}
.info-card:hover { transform: translateY(-10px); border-bottom-color: var(--primary-color); }

.icon-circle {
    width: 70px; height: 70px; background-color: rgba(211, 46, 18, 0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; color: var(--primary-color); font-size: 1.8rem;
    transition: background 0.3s, color 0.3s;
}
.info-card:hover .icon-circle { background-color: var(--primary-color); color: white; }
.info-card h3 { color: white; margin-bottom: 10px; text-transform: uppercase; font-size: 1.2rem; }
.info-card p { color: #bbb; line-height: 1.6; }

.contact-split-layout { display: flex; gap: 50px; align-items: stretch; }

/* Formulario Industrial */
.contact-form-wrapper { flex: 1; background-color: #1e1e1e; padding: 40px; border-radius: 8px; border: 1px solid #333; }
.form-subtitle { color: #888; margin-bottom: 30px; }
.industrial-form .form-row { display: flex; gap: 20px; }
.industrial-form .half { flex: 1; }
.industrial-form .form-group { margin-bottom: 20px; }

.industrial-form label {
    display: block; color: #aaa; margin-bottom: 8px;
    font-size: 0.9rem; font-weight: 500;
}

.industrial-form input[type="text"],
.industrial-form input[type="email"],
.industrial-form textarea {
    width: 100%; background-color: #2a2a2a; border: 1px solid #444;
    color: #ffffff; padding: 12px 15px; border-radius: 4px;
    font-size: 1rem; font-family: inherit; transition: all 0.3s ease;
}

.industrial-form input:focus, .industrial-form textarea:focus {
    outline: none; border-color: var(--primary-color);
    background-color: #333; box-shadow: 0 0 0 3px rgba(211, 46, 18, 0.15);
}

.btn-submit-industrial {
    background-color: var(--primary-color); color: white; border: none;
    padding: 15px 30px; font-size: 1rem; font-weight: bold; text-transform: uppercase;
    cursor: pointer; width: 100%; margin-top: 20px; border-radius: 4px;
    transition: background 0.3s, transform 0.2s; text-decoration: none !important;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.btn-submit-industrial:hover { background-color: #e55c00; transform: translateY(-2px); }

/* Checkbox Personalizado */
.checkbox-group {
    display: flex; align-items: center; gap: 12px; margin: 25px 0; padding: 10px;
    background-color: rgba(255, 255, 255, 0.03); border-radius: 4px; cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; width: 22px; height: 22px;
    background-color: #2a2a2a; border: 2px solid #555; border-radius: 4px;
    cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.checkbox-group input[type="checkbox"]:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.checkbox-group input[type="checkbox"]:checked::after { content: '\2714'; font-size: 14px; color: white; font-weight: bold; }
.checkbox-group label { margin: 0; color: #ccc; font-size: 0.95rem; line-height: 1.4; cursor: pointer; }
.checkbox-group a { color: var(--primary-color); text-decoration: none; border-bottom: 1px dashed var(--primary-color); }

/* Mapa */
.map-wrapper {
    flex: 1; position: relative; min-height: 500px;
    border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.map-frame { width: 100%; height: 100%; filter: grayscale(20%) contrast(1.1); }
.map-overlay-card {
    position: absolute; bottom: 20px; left: 20px;
    background-color: rgba(34, 34, 34, 0.95); padding: 20px;
    border-left: 4px solid var(--primary-color); border-radius: 4px;
    max-width: 250px; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.map-overlay-card h4 { margin: 0 0 10px 0; color: var(--primary-color); font-size: 0.95rem; text-transform: uppercase; }
.map-overlay-card p { margin: 5px 0; color: #ccc; font-size: 0.85rem; }

/* =========================================
   8. FOOTER, COOKIES Y NOTIFICACIONES
   ========================================= */
.site-footer {
    background-color: #111; color: #bbb;
    padding: 60px 0 20px 0; border-top: 3px solid var(--primary-color);
    margin-top: auto;
}
.footer-content { display: flex; justify-content: space-around; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 0 20px; gap: 40px; }
.footer-section { flex: 1; min-width: 250px; }
.footer-section h3 { color: white; font-size: 1.5rem; margin-bottom: 20px; text-transform: uppercase; }
.footer-section.brand h3 span { color: var(--primary-color); }
.footer-section.contact-info p { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; line-height: 1.5; }
.footer-section.contact-info i { color: var(--primary-color); font-size: 1.2rem; width: 20px; }
.footer-section.links ul { list-style: none; padding: 0; }
.footer-section.links li { margin-bottom: 10px; }
.footer-section.links a { color: #bbb; text-decoration: none; transition: color 0.3s; }
.footer-section.links a:hover { color: var(--primary-color); padding-left: 5px; }
.footer-logo { max-width: 180px; width: 150px; height: auto; margin-bottom: 15px; display: block; }

.footer-bottom { text-align: center; margin-top: 50px; padding-top: 20px; border-top: 1px solid #333; font-size: 0.9rem; color: #666; }
.legal-links { margin-bottom: 10px; }
.legal-links a { color: #888; text-decoration: none; font-size: 0.85rem; margin: 0 5px; transition: color 0.3s; }
.legal-links a:hover { color: var(--primary-color); }

/* Notificaciones */
.notification-container {
    position: fixed; top: 100px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.notification-toast {
    background-color: #333; color: white; padding: 15px 20px; border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 15px;
    min-width: 300px; max-width: 400px; animation: slideInRight 0.5s ease-out forwards;
    transition: opacity 0.3s ease; border-left: 5px solid #ccc;
}
.notification-toast.success { border-left-color: #28a745; }
.notification-toast.success .icon { color: #28a745; }
.notification-toast.error { border-left-color: #dc3545; }
.notification-toast.error .icon { color: #dc3545; }
.notification-toast .close-btn { background: none; border: none; color: #999; font-size: 1.2rem; cursor: pointer; margin-left: auto; padding: 0 5px; }
.notification-toast .close-btn:hover { color: white; }

/* Cookies */
.cookie-banner {
    position: fixed; bottom: -200px; left: 0; width: 100%;
    background-color: #222; border-top: 3px solid var(--primary-color);
    color: #f0f0f0; padding: 20px; z-index: 10000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5); transition: bottom 0.5s ease-in-out;
    display: flex; justify-content: center;
}
.cookie-banner.show { bottom: 0; }
.cookie-content { max-width: 1200px; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-content p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.cookie-content a { color: var(--primary-color); text-decoration: none; font-weight: bold; }
.cookie-content a:hover { text-decoration: underline; }
.cookie-buttons { display: flex; gap: 15px; }
.btn-accept {
    background-color: var(--primary-color); color: white; border: none; padding: 10px 20px;
    font-size: 0.95rem; cursor: pointer; border-radius: 4px; font-weight: bold; transition: background 0.3s;
}
.btn-accept:hover { background-color: #e55c00; }
.btn-reject {
    background-color: transparent; color: #ccc; border: 2px solid #555; padding: 10px 20px;
    font-size: 0.95rem; cursor: pointer; border-radius: 4px; font-weight: bold; transition: all 0.3s;
}
.btn-reject:hover { border-color: #fff; color: #fff; }

/* Animaciones Generales */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: 1s; }
.reveal-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   9. MEDIA QUERIES (RESPONSIVE & MOBILE)
   ========================================= */
@media (max-width: 900px) {
    .contact-split-layout { flex-direction: column; }
    .map-wrapper { min-height: 400px; }
    .industrial-form .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 768px) {
    /* --- AJUSTES GENERALES (Texto y Espacios) --- */
    h1.main-title { font-size: 3rem; }
    .hero.hero-small { height: 45vh; }
    .hero.hero-small h1.main-title { font-size: 2.5rem; }
    .hero-carousel h1.main-title { font-size: 3rem; }
    .hero-buttons { flex-direction: column; gap: 15px; }
    
    .company-intro { flex-direction: column; }
    .exp-badge { right: 0; left: auto; }
    .cookie-content { flex-direction: column; text-align: center; }

    .hero-content {
        padding-top: 80px; /* Ajuste para evitar solapamiento con navbar */
    }

    /* --- 1. NAVBAR: LOGO (Izq) - CONTROLES (Der) --- */
    #navbar, .navbar {
        height: 80px !important;
        padding: 0 20px !important;
        /* Fondo oscuro para mejor contraste con letras blancas */
        background-color: rgba(183, 11, 11, 0.793); 
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important; /* CLAVE: Logo izq, Controles der */
    }

    /* --- 2. LOGO --- */
    .logo {
        margin-right: 0 !important; /* Quitamos el auto para que no empuje solo */
        flex-shrink: 0;
        z-index: 1006;
    }
    .logo-img { max-height: 65px; width: auto; }

    /* --- 3. CONTENEDOR DE CONTROLES (IDIOMA + MENU) --- */
    

    /* Aseguramos que el selector se vea en móvil */
    .language-selector {
        display: block ;
    }

    /* --- 4. BOTÓN HAMBURGUESA --- */
    .menu-toggle {
        display: block !important;
        cursor: pointer;
        width: 30px;
        height: 25px;
    }
    .menu-toggle .bar {
        width: 100%; height: 3px; margin: 5px 0;
        background-color: white; display: block;
        transition: all 0.3s ease-in-out;
    }
    /* Animación Toggle */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* --- 5. MENÚ DESPLEGABLE (PANTALLA COMPLETA) --- */
    .nav-links {
        position: fixed !important;
        top: 80px; /* Justo debajo de la navbar */
        
        /* CAMBIO: Inicia escondido al 50% */
        right: -50%; 
        
        /* CAMBIO: Ancho del 50% (la mitad) */
        width: 50% !important; 
        
        height: calc(100vh - 80px); 
        background-color: #1a1a1a;
        margin: 0;
        padding: 0;
        
        display: flex;
        flex-direction: column;
        
        transition: right 0.4s ease;
        z-index: 1004;
        
        /* AÑADIDO: Sombra fuerte para separar el menú del fondo */
        box-shadow: -5px 0 20px rgba(0,0,0,0.7);
    }

    .nav-links.active { right: 0; }
    .nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1006; /* Asegura que esté por encima del menú desplegable */
}
    /* --- DISTRIBUCIÓN EQUITATIVA (CLAVE PARA LOS 5 ELEMENTOS) --- */
    /* Selecciona tanto los enlaces directos (<a>) como el div del dropdown */
    .nav-links > a, 
    .nav-links > .dropdown {
        flex: 1; /* CLAVE: Se reparten el espacio vertical equitativamente */
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        max-height: none; /* Eliminamos restricciones de altura */
        
        font-size: 1.3rem;
        margin: 0;
        padding: 0;
    }

    /* --- DROPDOWNS EN MÓVIL (SERVICIOS) --- */
    /* Enlace dentro del dropdown */
    .dropdown:hover .dropdown-menu,
    .dropdown-menu {
        display: none !important;
    }

    /* 2. Ocultar la flechita hacia abajo para que parezca un enlace normal */
    .dropdown .fa-chevron-down {
        display: none;
    }

    /* 3. Ajustar el enlace para que ocupe todo el espacio (igual que los otros) */
    .nav-links .dropdown {
        display: flex; /* Asegura que se comporte como flex container */
        flex-direction: column;
        justify-content: center;
    }

    .nav-links .dropdown .nav-link {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0; /* Reseteamos padding extra si lo hubiera */
        font-size: 1.3rem ;
    }
    .nav-links > :last-child {
        color: #D32E12;
    font-weight: bold; }
    .dropdown-menu {
        position: static;
        width: 100%;
        text-align: center;
        background-color: #111;
        display: none;
        padding: 0;
        border-top: 1px solid #333;
    }
    
    .dropdown-item {
        padding: 15px;
        font-size: 1rem;
        color: #bbb;
        border-bottom: 1px solid #222;
        display: block;
        justify-content: center;
    }

    /* Comportamiento al interactuar con Servicios */
    .dropdown:hover {
        flex-direction: column; /* Cambia a columna para desplegar abajo */
        justify-content: flex-start; /* Alinea al principio */
    }
    
    .dropdown:hover > .nav-link {
        flex: 0 0 auto; /* El título toma solo el espacio necesario */
        padding: 20px 0;
        background-color: #222;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
        flex: 1; /* El submenú ocupa el resto del espacio de ese bloque */
        overflow-y: auto;
    }
}

/* =========================================
   MENÚ INFERIOR MÓVIL
   ========================================= */

/* 1. Ocultar por defecto en ordenadores de escritorio */
.bottom-nav-mobile {
    display: none;
}
.mobile-dropdown-menu {
    display: none; /* Oculto por defecto, se muestra solo en móvil */
}

/* 2. Mostrar solo cuando la pantalla es pequeña (móviles) */
@media (max-width: 768px) {
    /* ... (Mantén tus estilos existentes para la navbar, logo y menu-toggle) ... */

    /* Ocultamos los enlaces de escritorio */
    .nav-links {
        display: none !important;
    }

    /* ESTILOS DEL NUEVO MENÚ DESPLEGABLE TIPO ACORDEÓN */
    .mobile-dropdown-menu {
        display: block;
        position: fixed;
        top: 80px; /* Ajusta esto a la altura real de tu navbar */
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #f7f7f7; /* Fondo gris claro como en la foto */
        z-index: 1005;
        overflow-y: auto;
        
        /* Oculto por defecto, se mueve hacia abajo o aparece con opacidad */
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    .split-interface{
        padding: 15px 20px;
    }
    .mobile-dropdown-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .mobile-menu-item {
        border-bottom: 1px solid #e0e0e0; /* Línea divisoria suave */
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 20px;
        background-color: transparent;
        transition: background-color 0.2s;
    }

    .mobile-menu-header a {
        text-decoration: none;
        color: #333; /* Texto oscuro */
        font-family: 'Montserrat', sans-serif; /* Intenta usar una fuente limpia */
        font-size: 1.1rem;
        font-weight: 300; /* Letra fina como en tu imagen */
        letter-spacing: 0.5px;
        width: 100%; /* Para que el área clicable sea mayor */
    }

    .accordion-icon {
        color: #888;
        font-size: 0.9rem;
        cursor: pointer;
        padding: 10px; /* Área clicable más grande para el icono */
        transition: transform 0.3s ease;
    }

    /* Estilos para el submenú (por si decides poner opciones dentro de Soluciones, etc.) */
    .mobile-submenu {
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: #ececec; /* Un poco más oscuro para diferenciar */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .mobile-submenu li a {
        display: block;
        padding: 15px 40px;
        color: #555;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 400;
        border-bottom: 1px solid #e0e0e0;
    }
}
/* =========================================
   ESTILOS Y ANIMACIONES: BLOQUE REBARBADO
   ========================================= */
.rebarbado-intro-section {
    padding: 60px 0;
    margin-bottom: 50px;
}

.intro-content-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    background: rgba(255, 255, 255, 0.02); /* Fondo sutil sobre el negro */
    border-radius: 12px;
    padding: 40px;
    border: 1px solid rgba(211, 46, 18, 0.2); /* Borde naranja transparente */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo rotatorio en el fondo (Oculto detrás del texto) */
.intro-content-wrapper::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(211, 46, 18, 0.05) 0%, transparent 50%);
    animation: rotateGlow 15s linear infinite;
    z-index: 0;
}

.intro-text, .intro-visual {
    position: relative;
    z-index: 1; /* Para que quede por encima del brillo */
}

.intro-text {
    flex: 2;
}

.intro-text p {
    color: #bbb;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

/* Lista Animada */
.animated-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.animated-list li {
    font-size: 1.05rem;
    color: #e0e0e0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    /* Estado inicial invisible y desplazado para la animación */
    transform: translateX(-30px);
    opacity: 0;
    animation: slideInRightItem 0.6s ease forwards;
}

/* Retraso para que aparezcan uno por uno (Efecto cascada) */
.animated-list li:nth-child(1) { animation-delay: 0.3s; }
.animated-list li:nth-child(2) { animation-delay: 0.6s; }
.animated-list li:nth-child(3) { animation-delay: 0.9s; }

.animated-list i {
    color: var(--primary-color); /* Usa tu naranja industrial */
    font-size: 1.3rem;
}

/* Gráfico / Icono interactivo */
.intro-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glowing-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(211, 46, 18, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--primary-color);
    animation: pulseBorder 3s infinite; /* El borde late */
}

.glowing-circle i {
    font-size: 4.5rem;
    color: var(--primary-color);
    animation: spinGear 12s linear infinite; /* Engranaje rotando */
}

/* =========================================
   KEYFRAMES (Las animaciones puras)
   ========================================= */
@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(211, 46, 18, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(211, 46, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 46, 18, 0); }
}

@keyframes spinGear {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInRightItem {
    to { transform: translateX(0); opacity: 1; }
}

/* =========================================
   ADAPTACIÓN PARA MÓVILES
   ========================================= */
@media (max-width: 900px) {
    .intro-content-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .animated-list li {
        justify-content: center;
        text-align: left;
    }
    
    .intro-visual {
        margin-top: 20px;
    }
}
/* =========================================
   GALERÍA MOSAICO DE 7 PIEZAS (GRANALLADO)
   ========================================= */
.piezas-gallery-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

/* Usamos un sistema de 12 columnas para cuadrar perfectamente 7 elementos */
.gallery-grid-7 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* Fila 1: 3 Elementos (Ocupan 4 columnas cada uno: 4x3=12) */
.gallery-grid-7 .gallery-item:nth-child(1),
.gallery-grid-7 .gallery-item:nth-child(2),
.gallery-grid-7 .gallery-item:nth-child(3) {
    grid-column: span 4;
}

/* Fila 2: 4 Elementos (Ocupan 3 columnas cada uno: 3x4=12) */
.gallery-grid-7 .gallery-item:nth-child(4),
.gallery-grid-7 .gallery-item:nth-child(5),
.gallery-grid-7 .gallery-item:nth-child(6),
.gallery-grid-7 .gallery-item:nth-child(7) {
    grid-column: span 3;
}

/* Tarjeta individual de la pieza */
.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #111; /* Fondo por si la imagen tarda en cargar */
    aspect-ratio: 4/3; /* Mantiene una proporción uniforme para todas las fotos */
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-bottom-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
}

/* Imagen de la pieza */
.pieza-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen limpiamente si no tiene la proporción exacta */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .pieza-img {
    transform: scale(1.15); /* Efecto zoom al pasar el ratón */
}

/* Texto superpuesto (Nombre de la pieza) */
.pieza-overlay {
    position: absolute;
    bottom: 0; 
    left: 0; 
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    padding: 30px 15px 15px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transform: translateY(100%); /* Oculto por defecto hacia abajo */
    transition: transform 0.4s ease;
    display: flex;
    align-items: flex-end;
}

.pieza-overlay span {
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.gallery-item:hover .pieza-overlay {
    transform: translateY(0); /* Aparece desde abajo al pasar el ratón */
}

/* =========================================
   ADAPTACIÓN PARA MÓVILES (GALERÍA 7 PIEZAS)
   ========================================= */
@media (max-width: 900px) {
    /* En tablets, mostramos 2 imágenes por fila */
    .gallery-grid-7 .gallery-item {
        grid-column: span 6 !important; 
    }
}

@media (max-width: 600px) {
    /* En móviles, mostramos 1 imagen por fila y forzamos que el texto sea siempre visible */
    .gallery-grid-7 .gallery-item {
        grid-column: span 12 !important; 
    }
    
    .pieza-overlay {
        transform: translateY(0); 
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    }
}
input[type="file"] {
    color: #fff;
    padding: 10px 0;
    cursor: pointer;
}

#cv-upload-container {
    margin: 20px 0;
    transition: all 0.3s ease;
}
/* =========================================================
   FIX: ELEMENTOS NO CLICABLES EN MÓVIL
   ========================================================= */

/* 1. Evitar que el menú móvil invisible bloquee los clics de la pantalla */
.mobile-dropdown-menu {
    pointer-events: none;
    visibility: hidden;
}

.mobile-dropdown-menu.active {
    pointer-events: auto;
    visibility: visible;
}



