/* ==========================================================================
   1. VARIABLES & BASE
   ========================================================================== */
:root {
  --brand-cyan: #2BC4F3;
  --brand-cyan-dark: #009dff;
  --bg-dark-blue: #0B1E2D;
  --bg-dark-card: #08141f;
  --text-dark: #111827;
  --text-white: #ffffff;
  --text-muted-light: #9ca3af;
  --font-family: 'Montserrat', sans-serif;
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-family);
  overflow-x: hidden;
  line-height: 1.7;
  color: var(--text-dark);
}

section { scroll-margin-top: 90px; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

/* --- Utilidades Generales --- */
.section-padding-compact { padding: 5rem 0; }

.overflow-visible { overflow: visible !important; }

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--brand-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.title-divider {
  width: 3.75rem; height: 0.25rem; background-color: var(--brand-cyan); border-radius: 2px;
}

.text-cyan { color: var(--brand-cyan) !important; }
.text-light-muted { color: var(--text-muted-light) !important; }

/* ==========================================================================
   2. NAVBAR
   ========================================================================== */
.navbar {
  padding: 1.2rem 0;
  background: transparent;
  transition: var(--transition);
}

.navbar-scrolled {
  background: rgba(11, 30, 45, 0.98) !important;
  padding: 0.8rem 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.brand-img { height: 4.5rem; width: auto; }

.nav-link {
  color: rgba(255,255,255,0.95) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.5rem 1.2rem !important;
  letter-spacing: 1px;
}

.nav-link:hover, .nav-link.active { color: var(--brand-cyan) !important; }

.btn-contact-nav {
  border: 2px solid var(--brand-cyan);
  color: var(--brand-cyan);
  padding: 0.5rem 1.8rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-contact-nav:hover {
  background: var(--brand-cyan);
  color: #0B1E2D;
  box-shadow: 0 0 15px rgba(43, 196, 243, 0.4);
}

.dropdown-menu { border: none !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.dropdown-item { color: #cbd5e1; padding: 0.5rem 0; }
.dropdown-item:hover { color: white; background: transparent; padding-left: 5px; }

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero {
  background: url('Imagenes/Background.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex; align-items: center; position: relative;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(4, 13, 20, 0.9) 0%, rgba(11, 30, 45, 0.6) 100%);
}

.hero-content { position: relative; z-index: 5; margin-top: 3rem; }

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: white;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-title span { color: var(--brand-cyan); }
.hero-desc { font-size: 1.1rem; color: rgba(255,255,255,0.85); max-width: 600px; }

.btn-primary-custom, .btn-outline-custom {
  font-weight: 700; padding: 0.8rem 2rem; border-radius: 4px; transition: var(--transition);
}

.btn-primary-custom { background: var(--brand-cyan); color: #0B1E2D; border: none; }
.btn-primary-custom:hover { background: #ffffff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(43, 196, 243, 0.3); }

.btn-outline-custom {
  background: rgba(255,255,255,0.1) !important; color: #fff !important;
  border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(5px);
}
.btn-outline-custom:hover { background: #fff !important; color: #0B1E2D !important; transform: translateY(-2px); }

/* ==========================================================================
   4. NOSOTROS (Cards Híbridas)
   ========================================================================== */
.section-bg-nosotros {
  position: relative;
  background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
              url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=1920');
  background-size: cover; background-position: center; background-attachment: fixed;
}

.card-sitlab-hybrid {
  background: #ffffff; padding: 3rem 2rem; border-radius: 12px;
  position: relative; z-index: 2; transition: all 0.4s ease;
  border: 1px solid #e2e8f0; border-bottom: 6px solid #0b1e2d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); height: 100%;
}

.card-sitlab-hybrid::before {
  content: ""; position: absolute; top: 0; left: 0; width: 0%; height: 100%;
  background: #0b1e2d; transition: all 0.5s ease; z-index: -1;
}

.card-sitlab-hybrid:hover { transform: translateY(-10px); border-bottom-color: var(--brand-cyan); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); }
.card-sitlab-hybrid:hover::before { width: 100%; }
.card-sitlab-hybrid:hover h4 { color: #fff !important; }
.card-sitlab-hybrid:hover p { color: #cbd5e1 !important; }

.icon-box {
  font-size: 2.5rem; color: var(--brand-cyan); margin-bottom: 1.5rem;
  background: #45484a; width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; transition: 0.4s;
}
.card-sitlab-hybrid:hover .icon-box { background: rgba(255,255,255,0.1); color: #fff; transform: rotate(10deg); }

/* ==========================================================================
   5. ENSAYOS (Service Items Premium)
   ========================================================================== */
.section-dark-blue { background-color: var(--bg-dark-blue); color: white; position: relative; }

#ensayos .container { overflow: visible !important; }

.swiperEnsayos {
  margin-top: 0.1rem !important;
  padding-top: 20px !important;
  padding-bottom: 60px !important;
  overflow: visible !important;
}

.service-item-premium {
  position: relative; border: none; border-radius: 20px; overflow: hidden;
  text-align: center; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 110%; min-height: 26rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background-size: cover; background-position: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.service-item-premium::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11, 30, 45, 0.88), rgba(11, 30, 45, 0.98));
  z-index: 1; transition: all 0.4s ease;
}

.service-item-premium:hover::before { background: linear-gradient(to bottom, rgba(11, 30, 45, 0.5), rgba(11, 30, 45, 0.8)); }
.service-item-premium:hover { transform: translateY(-15px); box-shadow: 0 0 0 2px var(--bg-dark-blue), 0 20px 40px rgba(0,0,0,0.5); }

.card-content-wrap { position: relative; z-index: 2; padding: 2rem; width: 100%; }

/* Fondos Ensayos */
.bg-electrico { background-image: url('https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?auto=format&fit=crop&q=80&w=500'); }
.bg-seguridad { background-image: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?auto=format&fit=crop&q=80&w=500'); }
.bg-dimensional { background-image: url('https://images.unsplash.com/photo-1581092160607-ee22621dd758?auto=format&fit=crop&q=80&w=500'); }
.bg-termico { background-image: url('https://images.unsplash.com/photo-1517999144091-3d9dca6d1e43?auto=format&fit=crop&q=80&w=500'); }
.bg-mecanico { background-image: url('https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?auto=format&fit=crop&q=80&w=500'); }
.bg-quimico { background-image: url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&q=80&w=500'); }

.icon-main { font-size: 3.5rem; color: var(--brand-cyan); margin-bottom: 1.5rem; filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.3)); }
.card-line { width: 50px; height: 3px; background: var(--brand-cyan); margin: 0 auto 1.5rem auto; transition: width 0.3s ease; }
.service-item-premium:hover .card-line { width: 80px; }

/* Swiper Arrows */
.nav-arrow-custom::after, .nav-arrow-dark::after { font-size: 1.5rem; font-weight: 800; }
.nav-arrow-custom {
  background: rgba(255,255,255,0.05); width: 3rem; height: 3rem; border-radius: 50%;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2);
}
.nav-arrow-custom:hover { background: var(--brand-cyan); border-color: var(--brand-cyan); }
.nav-arrow-custom:hover::after { color: #0B1E2D; }
.nav-arrow-custom::after { color: var(--brand-cyan); }

/* ==========================================================================
   6. RESPALDO (Catálogo Compacto)
   ========================================================================== */
.section-bg-respaldo {
  position: relative;
  background: linear-gradient(rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.90)),
              url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=1920');
  background-size: cover; background-attachment: fixed; padding-bottom: 2rem;
}

.product-card-compact {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 0.8rem 0.5rem; text-align: center; height: 100%;
  min-height: 5.5rem; display: flex; flex-direction: column;
  justify-content: center; align-items: center; transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.product-card-compact i { font-size: 1.5rem; margin-bottom: 0.3rem; }
.product-card-compact span { font-weight: 700; color: #334155; font-size: 0.75rem; line-height: 1.2; }

.product-card-compact:hover {
  border-color: var(--brand-cyan); transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08); background: #f8fdff;
}

/* ==========================================================================
   7. ECOSISTEMA DE CALIDAD (Pro Cards)
   ========================================================================== */
.quality-card-pro {
  background: #ffffff; border-radius: 12px; overflow: hidden;
  border: 1px solid #e9ecef; box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  text-align: center; transition: var(--transition); height: 100%;
  position: relative; padding-bottom: 1.5rem; margin-top: 1rem;
}

.card-top-accent { height: 4px; width: 100%; }
.accent-blue { background: #0056b3; }
.accent-cyan { background: #17a2b8; }
.accent-green { background: #28a745; }
.accent-orange { background: #fd7e14; }

.logo-circle-wrapper { position: relative; width: 100px; height: 100px; margin: 1.5rem auto 1rem; }
.logo-circle {
  width: 100%; height: 100%; border-radius: 50%; background-color: #fff;
  background-size: cover; background-position: center; border: 1px solid #dee2e6;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.badge-pill {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  padding: 3px 10px; border-radius: 20px; font-size: 0.65rem; font-weight: 800;
  text-transform: uppercase; color: white; white-space: nowrap; z-index: 2;
}

.badge-accredited { background: #0056b3; }
.badge-recognized { background: #17a2b8; }
.badge-certified { background: #28a745; }

.code-text { font-family: monospace; color: #64748b; font-size: 0.8rem; font-weight: 600; }
.desc-text { color: #64748b; padding: 0 1rem; line-height: 1.4; font-size: 0.9rem; }

/* ==========================================================================
   8. CONTACTO & FOOTER
   ========================================================================== */
.contact-form-wrapper {
  background: var(--bg-dark-card); padding: 2.5rem;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.form-control {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: white; padding: 0.8rem; border-radius: 6px;
}

.form-control:focus {
  background: rgba(255,255,255,0.1); border-color: var(--brand-cyan);
  color: white; box-shadow: 0 0 0 0.2rem rgba(43, 196, 243, 0.25);
}

.map-container {
  height: 100%; min-height: 350px; border-radius: 12px;
  overflow: hidden; border: 4px solid rgba(255,255,255,0.1);
}

.main-footer { background-color: #050e14; padding-top: 5rem; border-top: 3px solid var(--brand-cyan); color: white; }

.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; background: rgba(255,255,255,0.05);
  color: white; border-radius: 50%; margin-right: 0.75rem;
  transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.social-link:hover { background: var(--brand-cyan); color: #000; transform: scale(1.1); }

/* ==========================================================================
   9. WHATSAPP & ANIMACIONES
   ========================================================================== */
.whatsapp-btn {
  position: fixed; bottom: 30px; right: 30px;
  width: 60px; height: 60px; background-color: #25d366;
  color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 30px; z-index: 9999;
  animation: pulse-green 2s infinite, fadeInUp 1s ease;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
  .hero-title { font-size: 3rem; }
  .ps-lg-5 { padding-left: 0 !important; }
}

@media (max-width: 767px) {
  .section-padding-compact { padding: 3.5rem 0; }
  .hero-title { font-size: 2.2rem; }
  .nav-arrow-custom, .nav-arrow-dark { display: none; }
  .whatsapp-btn { width: 50px; height: 50px; bottom: 20px; right: 20px; animation: fadeInUp 1s ease; }
  .service-item-premium { min-height: 22rem; }
}