:root {
    --bg-primary: #0a0f1d;
    --bg-secondary: #111827;
    --accent-orange: #ff6b00;
    --accent-green: #10b981;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; scroll-behavior: smooth; }
body { background-color: var(--bg-primary); color: var(--text-light); overflow-x: hidden; }

/* --- NAV BAR --- */
nav { position: fixed; top: 0; left: 0; width: 100%; padding: 20px 8%; display: flex; justify-content: center; z-index: 1000; background: transparent; transition: padding 0.3s ease; }
nav.scrolled { padding: 10px 8%; }
.nav-panel {
    margin: 0 auto; width: 100%; max-width: 1200px; padding: 15px 40px; 
    background: linear-gradient(85deg, #ffffff, transparent); backdrop-filter: blur(20px) saturate(180%);
    border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.15); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); transition: all 0.3s ease; position: relative;
}
nav.scrolled .nav-panel { background: linear-gradient(85deg, #ffffff, rgba(10, 15, 29, 0.85)); padding: 12px 40px; }
.logo { display: flex; align-items: center; }
.logo a { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 30px; width: auto; max-width: 250px; transition: transform 0.3s ease; }
.logo img:hover { transform: scale(1.05); }

/* Menú Hamburguesa (Oculto en Desktop) */
.menu-toggle { display: none; color: var(--text-light); font-size: 1.8rem; cursor: pointer; transition: color 0.3s; }
.menu-toggle:hover { color: var(--accent-orange); }

.nav-links { display: flex; list-style: none; gap: 15px; align-items: center; transition: all 0.3s ease; }
.nav-links a { color: #ffffff; text-decoration: none; font-size: 0.88rem; font-weight: 600; padding: 8px 16px; transition: color 0.3s; position: relative; display: block; }
.nav-links .nav-item:not(.active):not(.contact) a:hover { color: var(--accent-orange); }
li.nav-item.active a { color: #ffffff; background: rgba(255, 255, 255, 0.12); border-radius: 30px; }
li.nav-item.active a:hover { color: var(--accent-orange); }
li.nav-item.contact { border: 2px solid transparent; background: linear-gradient(rgba(10, 15, 29, 0.6), rgba(10, 15, 29, 0.6)) padding-box, linear-gradient(45deg, var(--accent-orange), #ff9e00) border-box; border-radius: 30px; transition: all 0.3s ease; }
li.nav-item.contact a { padding: 6px 18px; }
li.nav-item.contact:hover { background: linear-gradient(45deg, var(--accent-orange), #ff9e00) border-box; box-shadow: 0 0 15px rgba(255, 107, 0, 0.5); }

/* --- HERO BANNER --- */
.hero { min-height: 100vh; background: radial-gradient(circle at 30% 50%, #111827 0%, #060a14 100%); display: flex; align-items: center; padding: 120px 8% 60px; position: relative; overflow: hidden; }
.hero-grid { display: flex; align-items: center; width: 100%; height: 100%; position: relative; }
.hero-text-wrapper { width: 50%; position: relative; min-height: 280px; z-index: 3; }
.hero-text-slide { position: absolute; top: 0; left: 0; opacity: 0; transform: translateY(20px); transition: all 0.6s ease; pointer-events: none; width: 100%; }
.hero-text-slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.hero-text-slide h1 { font-size: 2.6rem; font-weight: 700; line-height: 1.2; margin-bottom: 15px; color: #ffffff; }
.hero-text-slide h1 span { color: var(--accent-orange); }
.hero-text-slide p { color: var(--text-muted); font-size: 1rem; margin-bottom: 25px; line-height: 1.6; max-width: 90%; }
.btn { display: inline-block; padding: 12px 35px; background: linear-gradient(45deg, var(--accent-orange), #ff9e00); color: white; text-decoration: none; font-weight: 600; border-radius: 50px; transition: transform 0.3s, box-shadow 0.3s; box-shadow: 0 10px 20px rgba(255, 107, 0, 0.3); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(255, 107, 0, 0.5); }
.hero-controls { position: absolute; bottom: -60px; left: 0; display: flex; gap: 15px; z-index: 10; }
.hero-controls button { background: var(--bg-primary); color: white; border: 1px solid var(--accent-orange); border-radius: 50%; width: 45px; height: 45px; cursor: pointer; font-size: 1.2rem; transition: all 0.3s; display: flex; justify-content: center; align-items: center; }
.hero-controls button:hover { background: var(--accent-orange); transform: scale(1.1); }
.circular-slider-container { position: absolute; right: -15%; top: 50%; transform: translateY(-50%); width: 750px; height: 750px; z-index: 2; }
.rotating-ring { position: absolute; width: 810px; height: 810px; border: 2px dashed rgba(255, 107, 0, 0.4); border-radius: 50%; animation: spinRing 25s linear infinite; z-index: 1; top: -30px; left: -30px; }
@keyframes spinRing { 100% { transform: rotate(360deg); } }
.circle-mask { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; position: relative; z-index: 2; box-shadow: 0 0 60px rgba(255, 107, 0, 0.15); border: 4px solid var(--glass-border); }
.circle-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(0.8) rotate(-45deg); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.circle-img.active { opacity: 1; transform: scale(1) rotate(0deg); }

/* --- SECCIÓN SERVICIOS --- */
.services-section { padding: 100px 8%; background-color: var(--bg-secondary); position: relative; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 60px; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent-orange); margin: 15px auto 0; }
.slider-container { position: relative; width: 100%; overflow: hidden; padding: 20px 0; }
.slider-track { display: flex; gap: 30px; transition: transform 0.5s ease-in-out; width: 100%; }
.service-card { min-width: calc(33.333% - 20px); background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 40px 30px; backdrop-filter: blur(10px); transition: transform 0.3s, border-color 0.3s; display: flex; flex-direction: column; justify-content: space-between; }
.service-card:hover { transform: translateY(-10px); border-color: var(--accent-orange); background: rgba(255,255,255, 0.05); }
.service-icon { font-size: 2.5rem; color: var(--accent-orange); margin-bottom: 25px; }
.service-card h3 { font-size: 1.4rem; margin-bottom: 15px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.slider-nav { display: flex; justify-content: center; gap: 15px; margin-top: 40px; }
.slider-dot { width: 12px; height: 12px; background: var(--glass-border); border-radius: 50%; cursor: pointer; transition: background 0.3s; }
.slider-dot.active { background: var(--accent-orange); width: 30px; border-radius: 10px; }

/* --- PROYECTOS --- */
.projects-section { padding: 100px 8%; background: var(--bg-primary); }
.projects-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 60px; }
.project-card { position: relative; border-radius: 20px; overflow: hidden; height: 300px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-card:hover img { transform: scale(1.1); }
.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(transparent, rgba(10,15,29,0.9)); display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; transition: background 0.3s; }
.project-overlay h4 { font-size: 1.5rem; margin-bottom: 5px; }
.project-overlay p { color: var(--accent-orange); font-size: 0.9rem; }

/* --- CLIENTES (SLIDER INFINITO) --- */
.clients-section { background: var(--bg-secondary); padding: 60px 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); overflow: hidden; }
.clients-title { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 2px; }
.clients-slider { width: 100%; position: relative; display: flex; overflow: hidden; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.clients-track { display: flex; align-items: center; gap: 80px; width: calc(200px * 10); animation: scrollLogos 20s linear infinite; }
.client-logo-wrapper { min-width: 150px; display: flex; justify-content: center; }
.client-logo-wrapper img { max-height: 50px; width: auto; filter: grayscale(100%) brightness(200%); opacity: 0.6; transition: all 0.3s ease; }
.client-logo-wrapper img:hover { filter: grayscale(0%) brightness(100%); opacity: 1; }
@keyframes scrollLogos { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-150px * 5 - 80px * 5)); } }

/* --- CONTACTO Y PQRSF --- */
.contact-section { padding: 100px 8%; background: var(--bg-primary); }
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: start; }
.contact-form-container { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 40px; border-radius: 20px; }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-light); }
.form-control { width: 100%; padding: 15px; background: rgba(10, 15, 29, 0.7); border: 1px solid var(--glass-border); border-radius: 10px; color: white; font-size: 1rem; transition: border-color 0.3s; }
.form-control:focus { outline: none; border-color: var(--accent-orange); }
select.form-control option { background: var(--bg-primary); color: white; }
textarea.form-control { resize: vertical; height: 150px; }
.info-panel { padding: 20px; }
.info-item { display: flex; align-items: center; gap: 20px; margin-bottom: 35px; }
.info-icon { width: 50px; height: 50px; min-width: 50px; background: rgba(255, 107, 0, 0.1); border: 1px solid var(--accent-orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent-orange); font-size: 1.2rem; }
.info-text h4 { font-size: 1.1rem; margin-bottom: 5px; }
.info-text p { color: var(--text-muted); font-size: 0.95rem; }

/* ESTILOS DE ALERTAS FORMULARIO */
.form-status { padding: 15px; border-radius: 10px; margin-bottom: 20px; display: none; font-size: 0.95rem; font-weight: 500; }
.form-status.success { display: block; background: rgba(16, 185, 129, 0.1); border: 1px solid var(--accent-green); color: var(--accent-green); }
.form-status.error { display: block; background: rgba(239, 68, 68, 0.1); border: 1px solid #ef4444; color: #ef4444; }

/* --- FOOTER --- */
footer { background: #060a14; padding: 40px 8%; text-align: center; border-top: 1px solid var(--glass-border); font-size: 0.9rem; color: var(--text-muted); }
footer a { color: var(--accent-green); text-decoration: none; margin-left: 15px; }

/* --- HERO PARA PÁGINAS INTERNAS --- */
.hero-inner { height: 50vh; min-height: 400px; background: linear-gradient(rgba(10, 15, 29, 0.8), rgba(10, 15, 29, 0.95)), url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&q=80&w=1920') no-repeat center center/cover; display: flex; justify-content: center; align-items: center; text-align: center; padding-top: 100px; border-bottom: 1px solid var(--glass-border); }
.hero-inner-content h1 { font-size: 3.5rem; font-weight: 700; color: #ffffff; margin-bottom: 15px; }
.hero-inner-content h1 span { color: var(--accent-orange); }
.hero-inner-content p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }
.page-content { padding: 80px 8%; background: var(--bg-primary); }

/* --- MISIÓN Y VISIÓN --- */
.mv-container { display: flex; gap: 30px; min-height: 480px; height: auto; margin-bottom: 100px; }
.mv-panel { flex: 1; position: relative; border-radius: 20px; overflow: hidden; transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); background: var(--glass-bg); border: 1px solid var(--glass-border); cursor: pointer; display: flex; flex-direction: column; justify-content: flex-start; padding: 50px 60px; }
.mv-panel:hover { flex: 1.6; background: rgba(255, 255, 255, 0.05); border-color: var(--accent-orange); box-shadow: 0 10px 40px rgba(255, 107, 0, 0.15); }
.mv-container:hover .mv-panel:not(:hover) { filter: brightness(0.4) grayscale(0.5); }
.mv-panel-icon { font-size: 3.5rem; color: var(--accent-orange); margin-bottom: 25px; transition: transform 0.4s ease; }
.mv-panel:hover .mv-panel-icon { transform: scale(1.1) translateY(-10px); }
.mv-panel h3 { font-size: 2.2rem; color: #ffffff; margin-bottom: 20px; white-space: nowrap; }
.mv-panel-content { opacity: 0.6; transition: opacity 0.6s ease; max-width: 650px; }
.mv-panel:hover .mv-panel-content { opacity: 1; }
.mv-panel-content p { color: var(--text-muted); line-height: 1.7; font-size: 1.05rem; margin-bottom: 15px; }
.mv-panel.vision:hover { border-color: var(--accent-green); box-shadow: 0 10px 40px rgba(16, 185, 129, 0.15); }
.mv-panel.vision .mv-panel-icon { color: var(--accent-green); }

/* --- SLIDER CIRCULAR DE VALORES --- */
.values-circular-wrapper { position: relative; width: 600px; height: 600px; margin: 0 auto 100px; }
.values-wheel { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.2); transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1); }
.value-node { position: absolute; top: 50%; left: 50%; width: 65px; height: 65px; margin-top: -32.5px; margin-left: -32.5px; background: var(--bg-secondary); border: 2px solid var(--glass-border); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease; }
.value-node i { transition: transform 0.3s ease; }
.value-node:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
.value-node:hover i { transform: scale(1.25); }
.value-node.active { background: linear-gradient(45deg, var(--accent-orange), #ff9e00); border-color: var(--accent-orange); color: #ffffff; box-shadow: 0 0 25px rgba(255, 107, 0, 0.6); }
.value-center-display { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 380px; height: 380px; background: rgba(10, 15, 29, 0.9); border-radius: 50%; box-shadow: inset 0 0 40px rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; text-align: center; padding: 40px; z-index: 10; }
.value-text-item { position: absolute; opacity: 0; transform: translateY(20px) scale(0.95); transition: all 0.5s ease; pointer-events: none; }
.value-text-item.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.value-text-item h4 { font-size: 1.5rem; color: var(--accent-orange); margin-bottom: 15px; }
.value-text-item p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* --- DOCUMENTO FORMAL --- */
.document-glass { max-width: 850px; margin: 80px auto 0; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1); border-top: 5px solid var(--accent-orange); border-radius: 8px; padding: 70px 80px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); position: relative; overflow: hidden; }
.document-glass::before { content: '\f56e'; font-family: 'FontAwesome'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 20rem; color: rgba(255, 255, 255, 0.015); z-index: 0; pointer-events: none; }
.doc-title { text-align: center; font-size: 1.15rem; font-weight: 700; color: #ffffff; margin-bottom: 60px; line-height: 1.6; letter-spacing: 0.5px; position: relative; z-index: 1; }
.doc-body { position: relative; z-index: 1; }
.doc-body p { color: var(--text-light); font-size: 1.05rem; line-height: 1.9; text-align: justify; margin-bottom: 20px; }
.doc-footer { margin-top: 60px; }
.doc-signature { margin-top: 50px; border-top: 1px solid rgba(255, 255, 255, 0.3); padding-top: 15px; display: inline-block; min-width: 280px; color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* =========================================
   DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================= */

/* Laptops y Tablets Grandes */
@media (max-width: 1200px) {
    .nav-panel { max-width: 95%; padding: 12px 25px; }
    .nav-links { gap: 10px; }
    .hero-text-slide h1 { font-size: 2.2rem; }
}

/* Tablets (iPad, iPad Pro) */
@media (max-width: 968px) {
    /* Navbar a Menú Hamburguesa */
    nav { padding: 15px 4%; }
    .nav-panel { border-radius: 20px; padding: 15px 25px; background: rgba(255,255,255, 0.95); }
    nav.scrolled .nav-panel { padding: 10px 25px; background: rgba(255,255,255, 0.98); }
    .menu-toggle { display: block; color: var(--bg-primary); }
    
    .nav-links {
        position: absolute; top: 110%; left: 0; width: 100%;
        background: rgba(10, 15, 29, 0.98); backdrop-filter: blur(15px);
        flex-direction: column; padding: 25px; border-radius: 15px;
        border: 1px solid var(--glass-border); display: none; gap: 15px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.5); text-align: center;
    }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 1.1rem; padding: 12px; }
    li.nav-item.active a { background: transparent; color: var(--accent-orange); border-radius: 0; }
    li.nav-item.contact { border: none; background: transparent; }
    li.nav-item.contact a { background: linear-gradient(45deg, var(--accent-orange), #ff9e00); border-radius: 30px; }

    /* Hero Principal Ajustado */
    .hero { padding-top: 110px; padding-bottom: 40px; flex-direction: column; justify-content: center; }
    .hero-grid { flex-direction: column; width: 100%; height: auto; }
    .hero-text-wrapper { width: 100%; min-height: 280px; text-align: center; margin-bottom: 20px; position: relative; }
    .hero-text-slide p { max-width: 100%; margin: 0 auto 20px; }
    /* Controles anclados estrictamente al fondo del wrapper */
    .hero-controls { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); margin-top: 0; }
    
    .circular-slider-container { position: relative; right: auto; top: auto; transform: none; width: 350px; height: 350px; margin: 0 auto; }
    .rotating-ring { width: 380px; height: 380px; top: -15px; left: -15px; }
    
    /* Grids generales */
    .about-grid, .contact-grid, .projects-container { grid-template-columns: 1fr; }
    .service-card { min-width: calc(100% - 10px); }
    
    /* Empresa */
    .mv-container { flex-direction: column; height: auto; gap: 20px; margin-bottom: 60px; }
    .mv-panel { padding: 40px 30px; }
    .mv-panel:hover { flex: auto; transform: translateY(-5px); }
    
    .values-circular-wrapper { width: 400px; height: 400px; }
    .value-center-display { width: 250px; height: 250px; padding: 25px; }
}

/* Teléfonos Móviles (Smartphones) */
@media (max-width: 576px) {
    .section-title { font-size: 2rem; margin-bottom: 40px; }
    .page-content, .services-section, .projects-section, .contact-section { padding: 60px 5%; }
    
    /* Hero Principal Móvil - CORRECCIÓN DE ESPACIOS Y SOLAPAMIENTO */
    .hero { padding: 100px 5% 30px; } /* Menos padding superior e inferior */
    .hero-text-wrapper { min-height: 350px; margin-bottom: 10px; } /* Más altura para el texto y botones */
    .hero-text-slide h1 { font-size: 1.8rem; margin-bottom: 15px; }
    .hero-text-slide p { font-size: 0.95rem; margin-bottom: 20px; }
    .hero-controls { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
    
    /* Círculo Hero adaptado */
    .circular-slider-container { width: 260px; height: 260px; margin: 0 auto; }
    .rotating-ring { width: 290px; height: 290px; top: -15px; left: -15px; }
    
    /* Formulario / Contacto */
    .contact-form-container { padding: 25px 20px; }
    .info-item { flex-direction: column; text-align: center; gap: 10px; }
    .map-container { height: 250px; }
    
    /* Empresa / Valores Móvil */
    .hero-inner-content h1 { font-size: 2.2rem; }
    .values-circular-wrapper { width: 280px; height: 280px; margin-bottom: 60px; }
    .value-node { width: 45px; height: 45px; margin-top: -22.5px; margin-left: -22.5px; font-size: 1.1rem; }
    .value-center-display { width: 180px; height: 180px; padding: 15px; }
    .value-text-item h4 { font-size: 1rem; margin-bottom: 5px; }
    .value-text-item p { font-size: 0.75rem; line-height: 1.4; }
    
    /* Documento Legal */
    .document-glass { padding: 30px 20px; border-top-width: 3px; margin-top: 50px; }
    .doc-title { font-size: 0.95rem; margin-bottom: 30px; }
    .doc-body p { font-size: 0.95rem; text-align: left; }
    .document-glass::before { font-size: 12rem; }
    .doc-signature { min-width: 100%; text-align: center; }
}