/* ============ RESET & VARIABLES ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-deep: #075985;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --success: #10b981;
    --warning: #f59e0b;
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-soft: #f1f5f9;
    --bg-blue-50: #f0f9ff;
    --bg-blue-100: #e0f2fe;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-hero: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}
/* ============ PÁRRAFOS JUSTIFICADOS ============ */
p {
    text-align: justify;
    text-justify: inter-word; /* Distribuye mejor los espacios entre palabras */
    hyphens: auto; /* Permite cortar palabras con guión en móviles para evitar huecos feos */
    -webkit-hyphens: auto; /* Soporte para Safari/iOS */
    -moz-hyphens: auto;    /* Soporte para Firefox */
}

/* EXCEPCIONES: Elementos que NO deben justificarse para mantener el diseño */
.hero-subtitle,
.section-subtitle,
.stat-label,
.card-title,
.modal-caption,
.footer-bottom p,
.info-card p,
.hero-badge,
.section-badge {
    text-align: center; /* O 'left' según el diseño original */
    hyphens: none;
    text-justify: none;
}

/* Asegurar que los textos de las tarjetas de características queden bien */
.feature-item p,
.mv-content p,
.proyecto-info p,
.industria-card p,
.calidad-item p,
.panel-text > p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============ NAVBAR ============ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1240px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    width: 40px; height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--text-dark); letter-spacing: -0.02em; }
.logo-tag { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-menu { display: flex; list-style: none; gap: 6px; align-items: center; }
.nav-link {
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.nav-link:hover { color: var(--primary); background: var(--bg-blue-50); }
.nav-cta {
    background: var(--gradient-primary);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}
.nav-cta:hover { background: var(--gradient-primary) !important; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35); }

.menu-toggle { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text-dark); border-radius: 2px; transition: all 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO CON FONDO ANIMADO E IMAGEN REAL ============ */
.hero {
    position: relative;
    min-height: 85vh;  /* Reducido de 100vh a 85vh */
    padding: 10px 0 40px;  /* Reducido de 120px 0 60px */
    overflow: hidden;
    background: var(--bg-white);
    display: flex;
    align-items: center;
}

/* Imagen de fondo REAL de refrigeración industrial con animación Ken Burns */
.hero-bg-image {
    position: absolute;
    inset: -20px;
    background-image: url('https://images.unsplash.com/photo-1513828583688-c52646db42da?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8aW5kdXN0cmlhbCUyMHJlZnJpZ2VyYXRpb258ZW58MHx8MHx8fDA%3D');
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: kenBurns 25s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-1%, -1%); }
}

/* Canvas de partículas de frío/vapor */
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Overlay degradado CLARO para mantener legibilidad y estética limpia */
.hero-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(
        90deg, 
        rgba(240, 249, 255, 0.96) 0%, 
        rgba(240, 249, 255, 0.88) 35%, 
        rgba(224, 242, 254, 0.70) 65%, 
        rgba(224, 242, 254, 0.45) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero-text { 
    color: var(--text-dark);
    max-width: 720px;  /* Reducido de 780px para que el título sea más compacto */
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border);
    padding: 6px 14px;  /* Reducido de 8px 16px */
    border-radius: 100px;
    font-size: 0.8rem;  /* Reducido de 0.85rem */
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1px;  /* Reducido de 24px */
    box-shadow: var(--shadow-sm);
}
.badge-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.2); } }

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);  /* Reducido de clamp(2.4rem, 5vw, 4.2rem) */
    line-height: 1.1;  /* Aumentado ligeramente de 1.05 */
    margin-bottom: 18px;  /* Reducido de 24px */
    letter-spacing: -0.02em;
}
.hero-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero-subtitle {
    font-size: 1.05rem;  /* Reducido de 1.15rem */
    color: var(--text-body);
    margin-bottom: 28px;  /* Reducido de 36px */
    max-width: 580px;  /* Reducido de 620px */
    line-height: 1.5;  /* Reducido de 1.6 */
}
.hero-buttons { 
    display: flex; 
    gap: 12px;  /* Reducido de 14px */
    flex-wrap: wrap; 
    margin-bottom: 40px;  /* Reducido de 56px */
}

/* Botones globales */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;  /* Reducido de 14px 26px */
    border-radius: var(--radius);
    font-size: 0.9rem;  /* Reducido de 0.95rem */
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35); }
.btn-ghost {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;  /* Reducido de 28px */
    background: white;
    padding: 16px 28px;  /* Reducido de 20px 32px */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}
.hero-stat { text-align: center; }
.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.7rem;  /* Reducido de 2rem */
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.hero-stat-divider { width: 1px; height: 36px; background: var(--border); }

.hero-scroll {
    position: absolute;
    bottom: 20px;  /* Reducido de 30px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.hero-scroll a {
    width: 40px; height: 40px;  /* Reducido de 42px */
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    background: white;
    box-shadow: var(--shadow-sm);
    animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ============ SECTIONS - ESPACIOS REDUCIDOS ============ */
.section { padding: 60px 0; }
.section-header { 
    text-align: center; 
    max-width: 800px;  /* Aumentado de 680px */
    margin: 0 auto 40px; 
}
.section-badge {
    display: inline-block;
    background: var(--bg-blue-50);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid var(--bg-blue-100);
}
.section-badge.light { background: rgba(255,255,255,0.15); color: white; border-color: rgba(255,255,255,0.25); }
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);  /* Reducido ligeramente */
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.section-title.light { color: white; }
.title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.title-accent-light { color: var(--accent); }
.section-subtitle { 
    font-size: 1rem; 
    color: var(--text-muted); 
    max-width: 650px; 
    margin: 0 auto;
    line-height: 1.5;
}
.section-subtitle.light { color: rgba(255,255,255,0.75); }
.section-description { font-size: 1.02rem; color: var(--text-body); margin-bottom: 28px; }


/* ============ NOSOTROS ============ */
.nosotros { background: var(--bg-white); }
.nosotros-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: center; }
.nosotros-visual { position: relative; }
.nosotros-img-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/5;
}
.nosotros-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.nosotros-experience {
    position: absolute;
    bottom: -30px; right: -30px;
    background: var(--gradient-primary);
    color: white;
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.experience-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.experience-text { font-size: 0.85rem; font-weight: 500; line-height: 1.3; }

.nosotros-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
    width: 44px; height: 44px;
    background: var(--bg-blue-50);
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.feature-item h4 { font-size: 0.95rem; margin-bottom: 4px; color: var(--text-dark); }
.feature-item p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* ============ MISIÓN Y VISIÓN ============ */
.mision-vision { background: var(--bg-soft); }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.mv-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.mv-image { position: relative; height: 260px; overflow: hidden; }
.mv-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.mv-card:hover .mv-image img { transform: scale(1.06); }
.mv-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(15,23,42,0.5)); }
.mv-icon-wrap {
    position: absolute;
    top: 20px; left: 20px;
    width: 52px; height: 52px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
}
.mv-content { padding: 28px; }
.mv-content h3 { font-size: 1.4rem; margin-bottom: 12px; color: var(--text-dark); }
.mv-content p { color: var(--text-body); line-height: 1.7; }

/* ============ SERVICIOS ============ */
.servicios { background: var(--bg-white); }
.servicios-tabs {
    display: flex;
    gap: 8px;  /* Reducido de 10px */
    justify-content: center;
    flex-wrap: nowrap;  /* Forzar una sola línea */
    margin-bottom: 40px;
    padding: 6px;  /* Reducido de 8px */
    background: var(--bg-soft);
    border-radius: 100px;
    max-width: 900px;  /* Aumentado de 800px */
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;  /* Scroll si es necesario en móvil */
    -webkit-overflow-scrolling: touch;
}
.tab-btn {
    padding: 10px 18px;  /* Reducido de 12px 22px */
    border-radius: 100px;
    font-size: 0.82rem;  /* Reducido de 0.88rem */
    font-weight: 600;
    color: var(--text-body);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;  /* Reducido de 8px */
    white-space: nowrap;  /* Evitar que el texto se parta */
    flex-shrink: 0;  /* No encoger */
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
.tab-btn i { font-size: 0.85rem; }

.servicios-content { min-height: 400px; }
.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.panel-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; }
.panel-text h3 { font-size: 1.8rem; margin-bottom: 16px; color: var(--text-dark); }
.panel-text > p { font-size: 1rem; color: var(--text-body); margin-bottom: 24px; line-height: 1.7; }
.panel-list { list-style: none; margin-bottom: 30px; }
.panel-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-body);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
}
.panel-list li i { color: var(--success); font-size: 0.95rem; }
.panel-list li:last-child { border-bottom: none; }
.panel-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
}
.panel-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.panel-image:hover img { transform: scale(1.05); }

/* ============ PROCESO ============ */
.proceso { background: var(--gradient-dark); color: white; }
.proceso-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
    position: relative;
}
.proceso-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}
.proceso-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-6px); }
.proceso-number {
    position: absolute;
    top: 14px; right: 18px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.08);
    line-height: 1;
}
.proceso-icon {
    width: 64px; height: 64px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}
.proceso-card h4 { color: white; font-size: 1.15rem; margin-bottom: 10px; }
.proceso-card p { font-size: 0.88rem; color: rgba(255,255,255,0.7); line-height: 1.6; }
.proceso-connector { display: none; }

/* ============ PROYECTOS ============ */
.proyectos { background: var(--bg-soft); }
.proyectos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.proyecto-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.proyecto-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.proyecto-image { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.proyecto-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.proyecto-card:hover .proyecto-image img { transform: scale(1.08); }
.proyecto-tag {
    position: absolute;
    top: 16px; left: 16px;
    background: white;
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.proyecto-info { padding: 24px; }
.proyecto-info h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-dark); }
.proyecto-info p { font-size: 0.9rem; color: var(--text-body); line-height: 1.6; margin-bottom: 16px; }
.proyecto-meta { display: flex; gap: 18px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.proyecto-meta span { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.proyecto-meta i { color: var(--primary); font-size: 0.85rem; }

/* ============ INDUSTRIAS ============ */
.industrias { background: var(--bg-white); }
.industrias-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.industria-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all 0.3s ease;
    text-align: center;
}
.industria-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.industria-icon {
    width: 72px; height: 72px;
    background: var(--bg-blue-50);
    color: var(--primary);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}
.industria-card:hover .industria-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
}
.industria-card h4 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-dark); }
.industria-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ============ GALERÍA ============ */
.galeria { background: var(--bg-soft); }

.galeria-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.filter-btn {
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-body);
    background: white;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* Contenedor del carrusel */
.galeria-carousel {
    position: relative;
    width: 100%;
    padding: 0 60px; /* Espacio para las flechas */
}

/* Grid scrollable horizontal */
.galeria-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px;
    height: 320px; /* Altura fija */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--border);
}

/* Scrollbar personalizada */
.galeria-grid::-webkit-scrollbar {
    height: 8px;
}
.galeria-grid::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 10px;
}
.galeria-grid::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}
.galeria-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Item uniforme */
.galeria-item {
    flex: 0 0 280px; /* Ancho fijo */
    height: 280px; /* Alto fijo = cuadrado perfecto */
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: var(--shadow-sm);
}
.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.galeria-item:hover img {
    transform: scale(1.08);
}
.galeria-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(14, 165, 233, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}
.galeria-item:hover .galeria-overlay { opacity: 1; }
.galeria-overlay i {
    font-size: 2rem;
    background: white;
    color: var(--primary);
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
}
.galeria-overlay.video i { color: var(--primary); }
.galeria-overlay span { 
    font-size: 0.88rem; 
    font-weight: 600; 
    text-align: center; 
    padding: 0 10px;
}

/* Flechas de navegación */
.galeria-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    z-index: 10;
}
.galeria-arrow:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
}
.galeria-arrow-left {
    left: 0;
}
.galeria-arrow-right {
    right: 0;
}
.galeria-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Indicador de posición */
.galeria-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}
#galeriaCounter {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: white;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
}
.galeria-dots {
    display: flex;
    gap: 6px;
}
.galeria-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}
.galeria-dot.active {
    background: var(--gradient-primary);
    width: 24px;
    border-radius: 4px;
}

/* Preview de videos en la galería */
.galeria-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
    transition: transform 0.5s ease;
}
.galeria-item:hover video {
    transform: scale(1.08);
}

/* Modal galería */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 40px 20px;
    align-items: center;
    justify-content: center;
}
.modal.open { display: flex; animation: fadeIn 0.3s ease; }
.modal-content {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    animation: scaleIn 0.3s ease;
}
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 40px; height: 40px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    z-index: 2;
    transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-soft); transform: rotate(90deg); }
.modal-body { width: 100%; aspect-ratio: 16/9; background: black; }
.modal-body img, .modal-body iframe, .modal-body video { width: 100%; height: 100%; object-fit: contain; display: block; }
.modal-caption { padding: 20px 24px; font-size: 0.95rem; color: var(--text-body); }


/* ============ CALIDAD ============ */
.calidad { background: var(--bg-white); }
.calidad-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.calidad-items { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.calidad-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--bg-soft); border-radius: var(--radius); border-left: 3px solid var(--primary); }
.calidad-check {
    width: 44px; height: 44px;
    background: var(--bg-blue-50);
    color: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.calidad-item h4 { font-size: 1.02rem; margin-bottom: 6px; color: var(--text-dark); }
.calidad-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

.calidad-visual { position: relative; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.calidad-visual img { width: 100%; height: 100%; aspect-ratio: 4/5; object-fit: cover; }
.calidad-badge {
    position: absolute;
    bottom: 24px; right: 24px;
    background: white;
    color: var(--primary-dark);
    padding: 14px 22px;
    border-radius: 100px;
    display: flex; align-items: center; gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-lg);
}
.calidad-badge i { font-size: 1.3rem; color: var(--warning); }

/* ============ CONTACTO ============ */
.contacto { background: var(--gradient-dark); color: white; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.contacto-info .section-title { text-align: left; }
.contacto-info .section-subtitle { text-align: left; margin-left: 0; }
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.info-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: all 0.3s ease;
}
.info-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-3px); }
.info-icon {
    width: 44px; height: 44px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.info-card h4 { color: rgba(255,255,255,0.7); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; font-family: 'Inter', sans-serif; }
.info-card p { color: white; font-size: 0.95rem; font-weight: 500; }

.contacto-form-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}
.contact-form h3 { font-size: 1.4rem; margin-bottom: 24px; color: var(--text-dark); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 16px; }
.form-group label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 6px;
}
.form-group label i { color: var(--primary); font-size: 0.85rem; }
.form-group input, .form-group select, .form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-alert {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-alert.success { background: #d1fae5; color: #065f46; }

/* ============ FOOTER ============ */
.footer { background: #0a1628; color: white; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.footer-logo .logo-icon { background: var(--gradient-primary); }
.footer-logo .logo-name { color: white; }
.footer-logo .logo-tag { color: rgba(255,255,255,0.6); }
.footer-col p { color: rgba(255,255,255,0.6); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
}
.social-links a:hover { background: var(--gradient-primary); color: white; transform: translateY(-2px); }
.footer-col h4 { color: white; font-size: 1rem; margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.88rem; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-col ul li i { color: var(--primary); font-size: 0.85rem; }

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* ============ WHATSAPP ============ */
.whatsapp-float {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 60px; height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .hero-content, .nosotros-grid, .calidad-grid, .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
    .proyectos-grid, .industrias-grid { grid-template-columns: repeat(2, 1fr); }
    .proceso-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .galeria-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
    .panel-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nosotros-features { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .menu-toggle { display: flex; }
    .nav-menu {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 6px;
        box-shadow: var(--shadow-md);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        align-items: stretch;
    }
    .nav-menu.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-link { width: 100%; padding: 12px 16px; }
    .nav-cta { text-align: center; }

    /* HERO MOBILE */
    .hero { min-height: auto; padding: 100px 0 60px; }
    .hero-bg-image { inset: -10px; }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(240, 249, 255, 0.97) 0%, rgba(240, 249, 255, 0.92) 100%);
    }
    .hero-content { text-align: center; }
    .hero-text { max-width: 100%; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats { 
        width: 100%; 
        justify-content: center; 
        flex-wrap: wrap;
        padding: 16px 20px;
        gap: 20px;
    }
    .hero-stat-divider { display: none; }
    .stat-number { font-size: 1.6rem; }

    .mv-grid, .proyectos-grid, .industrias-grid, .contacto-grid { grid-template-columns: 1fr; }
    .proceso-grid { grid-template-columns: 1fr; }
    .galeria-carousel { padding: 0 40px; }
    .galeria-grid { height: 260px; }
    .galeria-item { flex: 0 0 220px; height: 220px; }
    .galeria-arrow { width: 40px; height: 40px; font-size: 0.95rem; }
    .galeria-indicator { gap: 12px; }

    .nosotros-experience { bottom: -20px; right: -10px; padding: 18px 22px; }
    .experience-number { font-size: 2.2rem; }

    .info-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .contacto-form-wrapper { padding: 24px; }
	
	.servicios-tabs {
        gap: 6px;
        padding: 6px;
        max-width: 100%;
    }
    .tab-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero {
        padding: 80px 0 25px;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-stats {
        width: 100%;
        justify-content: space-around;
        padding: 14px 20px;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .hero-stat-divider { width: 40px; height: 1px; }
    .galeria-carousel { padding: 0 30px; }
    .galeria-grid { height: 220px; }
    .galeria-item { flex: 0 0 180px; height: 180px; }
    .galeria-arrow { width: 36px; height: 36px; font-size: 0.85rem; }
    .btn { padding: 12px 20px; font-size: 0.88rem; }
    .servicios-tabs { padding: 6px; }
    .tab-btn { padding: 10px 16px; font-size: 0.82rem; }
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding: 90px 0 30px;
    }
    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }
}

/* ============ VENTAJA COMPETITIVA ============ */
.ventaja-competitiva {
    background: var(--bg-blue-50);
    border-top: 1px solid var(--bg-blue-100);
    border-bottom: 1px solid var(--bg-blue-100);
}
.ventaja-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
.ventaja-card {
    background: white;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}
.ventaja-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.ventaja-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}
.ventaja-card h3 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    color: var(--text-dark);
}
.ventaja-card p {
    color: var(--text-body);
    line-height: 1.6;
    font-size: 0.95rem;
}
.ventaja-card p strong {
    color: var(--primary-dark);
    font-weight: 700;
}

/* Responsive para Ventaja Competitiva */
@media (max-width: 768px) {
    .ventaja-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ventaja-card {
        padding: 28px 24px;
    }
}