/* ==========================================================================
   LAI — Laboratorio de Análisis Industriales Nora Sabbag
   Rediseño 2026 — sistema propio, sin Bootstrap/jQuery
   ========================================================================== */

:root {
  --navy-900: #0f2a3d;
  --navy-800: #173648;
  --navy-700: #204357;
  --blue-accent: #00b1dc;
  --blue-accent-dark: #0091b4;
  --bg-page: #ffffff;
  --bg-alt: #f4f7f9;
  --bg-alt-2: #eef3f6;
  --text-body: #3e3e3e;
  --text-muted: #6b7680;
  --text-on-dark: #ffffff;
  --border-soft: rgba(15, 42, 61, 0.1);

  --font-heading: 'Roboto', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;

  --container-w: 1180px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-card: 0 10px 30px rgba(15, 42, 61, 0.08);
  --shadow-cta: 0 8px 22px rgba(0, 177, 220, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-page);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-800); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blue-accent); }
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  font-weight: 700;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 96px 0;
}
.section--alt { background: var(--bg-alt); }
.section--nosotros {
  background:
    linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)),
    url('../img/fondo_nosotros.jpg') center/cover no-repeat;
}
.section-heading {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-heading h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: .2px;
}
.section-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--blue-accent-dark);
  margin-bottom: 12px;
}
.section-dec {
  width: 56px;
  height: 3px;
  background: var(--blue-accent);
  margin: 18px auto 0;
  border-radius: 3px;
}
.section-heading p {
  color: var(--text-muted);
  font-size: 17px;
  margin-top: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  transition: background-color .2s ease, box-shadow .2s ease, color .2s ease, transform .15s ease;
}
.btn-primary {
  background: var(--blue-accent);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover {
  background: var(--blue-accent-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(15, 42, 61, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  transition: background-color .25s ease;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img { height: 46px; width: auto; }
.brand-text {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  max-width: 220px;
}
.main-nav ul {
  display: flex;
  gap: 34px;
}
.main-nav a {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--blue-accent); border-color: var(--blue-accent); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy-900);
  color: #fff;
  text-align: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,42,61,.88), rgba(15,42,61,.82));
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo { width: min(320px, 70vw); margin-bottom: 22px; }
.hero-tagline {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 300;
  max-width: 560px;
  color: rgba(255,255,255,.92);
  margin-bottom: 34px;
}
.hero-actions { margin-bottom: 0; }

/* ---------- Certificaciones ---------- */
.certifications {
  background: var(--navy-900);
  padding: 88px 0;
}
.section-heading--dark h2 { color: #fff; }
.section-heading--dark .section-kicker { color: var(--blue-accent); }
.section-heading--dark p { color: rgba(255,255,255,.65); }

.cert-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}
.cert-track {
  position: relative;
  flex: 1;
  min-height: 320px;
}
.cert-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.cert-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  position: relative;
}
.cert-slide img {
  height: 64px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  margin-bottom: 26px;
}
.cert-slide .cert-code {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--blue-accent);
  background: rgba(0, 177, 220, 0.1);
  border: 1px solid rgba(0, 177, 220, 0.3);
  border-radius: 999px;
  padding: 8px 20px;
  margin: 0 0 32px;
  line-height: 1.5;
}
.cert-code a { color: var(--blue-accent); text-decoration: underline; }
.cert-code a:hover { color: #fff; }
.cert-code-fine { font-weight: 400; opacity: .7; font-size: 11px; }
.cert-code--plain {
  display: block;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-weight: 400;
  font-style: italic;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255,.55);
  max-width: 480px;
}
.cert-slide h3 {
  color: #fff;
  font-size: 21px;
  margin-bottom: 14px;
}
.cert-slide p {
  color: rgba(255,255,255,.72);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}
.cert-nav {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-nav svg { width: 20px; height: 20px; }
.cert-nav:hover { background: var(--blue-accent); }
.cert-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.cert-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.25);
  padding: 0;
}
.cert-dot.active { background: var(--blue-accent); width: 24px; border-radius: 5px; }

/* ---------- Nosotros ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.about-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}
.about-card .icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--bg-alt-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--blue-accent-dark);
}
.about-card .icon svg { width: 28px; height: 28px; }
.about-card h4 { font-size: 18px; }
.about-card p {
  color: var(--text-muted);
  font-size: 15px;
  flex: 1;
}
.about-card .card-link {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--blue-accent-dark);
}
.about-card .card-link:hover { color: var(--navy-900); }

/* ---------- Servicios ---------- */
.services-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}
.service-family {
  border-bottom: 1px solid var(--border-soft);
}
.service-family:first-child { border-top: 1px solid var(--border-soft); }
.family-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 18px 2px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--navy-900);
  text-align: left;
}
.family-toggle .plus {
  font-size: 22px;
  font-weight: 300;
  color: var(--blue-accent-dark);
  transition: transform .2s ease;
}
.service-family.open .family-toggle { color: var(--blue-accent-dark); }
.service-family.open .family-toggle .plus { transform: rotate(45deg); }
.service-tabs {
  display: none;
  padding-bottom: 18px;
}
.service-family.open .service-tabs { display: block; }
.service-tabs li a {
  display: block;
  padding: 10px 0 10px 18px;
  font-size: 14.5px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
}
.service-tabs li a:hover { color: var(--navy-900); }
.service-tabs li a.active {
  color: var(--blue-accent-dark);
  border-left-color: var(--blue-accent);
  font-weight: 600;
}

.service-panel { display: none; }
.service-panel.active { display: block; animation: fadeIn .3s ease; }
.service-panel img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}
.service-panel h4 { font-size: 24px; margin-bottom: 18px; }
.service-panel p { color: var(--text-body); font-size: 15.5px; }
.service-panel span a {
  display: inline-block;
  margin: 18px 0 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy-800);
  pointer-events: none;
}
.service-cta-wrap { margin-top: 26px; }
.service-cta { background: var(--blue-accent); color: #fff; box-shadow: var(--shadow-cta); }
.service-cta:hover { background: var(--blue-accent-dark); color: #fff; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Galería ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--bg-alt-2);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15,42,61,.55));
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover::after { opacity: 1; }

.gallery-item--hidden { display: none; }

.gallery-item--more img { filter: brightness(0.45); }
.gallery-more-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .3px;
  background: rgba(15, 42, 61, 0.25);
  pointer-events: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 22, 32, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close svg, .lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Contacto ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info-box {
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
}
.contact-info-box h4 { color: #fff; font-size: 20px; margin-top: 22px; }
.contact-info-box h4:first-child { margin-top: 0; }
.contact-info-box p, .contact-info-box li { color: rgba(255,255,255,.8); font-size: 15px; }
.contact-info-box .divider { height: 1px; background: rgba(255,255,255,.15); margin: 22px 0; }

.form-grid { display: grid; gap: 16px; }
.field {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-body);
}
.field:focus {
  outline: none;
  border-color: var(--blue-accent);
  background: #fff;
}
textarea.field { resize: vertical; min-height: 130px; }
.form-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  display: none;
}
.form-note.visible { display: block; }

/* ---------- Mapa ---------- */
.map-section iframe { width: 100%; height: 420px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.75);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-grid h4 {
  color: #fff;
  font-size: 15px;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-brand { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: #fff; }
.footer-grid li { margin-bottom: 10px; font-size: 14.5px; }
.footer-grid a { color: rgba(255,255,255,.75); }
.footer-grid a:hover { color: var(--blue-accent); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 18px; height: 18px; fill: #fff; }
.footer-social a:hover { background: var(--blue-accent); }
.footer-dev-credit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.footer-dev-credit img { height: 16px; opacity: .9; }
.footer-dev-credit a:hover img { opacity: 1; }
.footer-dev-credit .dev-tagline {
  font-size: 11px;
  letter-spacing: .3px;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
}
.footer-bottom {
  padding-top: 22px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  text-align: center;
}
.footer-bottom p { margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .services-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .main-nav {
    position: fixed;
    inset: 84px 0 auto 0;
    background: var(--navy-900);
    padding: 12px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 12px 0; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .service-panel img { height: 200px; }
  .certifications { padding: 56px 0; }
  .cert-carousel { gap: 8px; }
  .cert-nav { width: 34px; height: 34px; }
  .cert-nav svg { width: 16px; height: 16px; }
  .cert-slide img { height: 48px; margin-bottom: 18px; }
  .cert-slide h3 { font-size: 18px; }
  .cert-slide p { font-size: 14px; }
}
