/* ============================================================
   CLB Ingeniería — 2. Componentes
   ============================================================ */

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  background: var(--navy-dark);
  color: #cdd3e8;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--topbar-h);
  gap: 16px;
}
.topbar a { color: #cdd3e8; }
.topbar a:hover { color: var(--green-soft); }
.topbar .tb-right { display: flex; gap: 22px; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow-nav);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 56px; width: auto; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu > li { list-style: none; }

.nav-menu a {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .2px;
  position: relative;
  padding: 6px 0;
}
.nav-menu a:hover { color: var(--green); }

.nav-menu a.active { color: var(--green); }
.nav-menu a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

.nav-menu .nav-cta { margin-left: 4px; }
.nav-menu .nav-cta a,
a.nav-cta-btn {
  background: var(--green);
  color: var(--white);
  padding: 13px 26px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14.5px;
}
.nav-menu .nav-cta a:hover,
a.nav-cta-btn:hover { background: var(--green-light); color: var(--white); }
.nav-menu .nav-cta a.active::after { display: none; }

/* Hamburguesa */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
}
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
  margin: 0 auto;
}
.mobile-menu-toggle.is-open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-open .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 32, 64, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  z-index: 98;
}
.mobile-menu-overlay.is-open { opacity: 1; visibility: visible; }

/* ── Hero (home) ──────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(100deg, rgba(26,32,64,.95) 0%, rgba(37,45,87,.82) 45%, rgba(37,45,87,.22) 100%),
    var(--hero-img, none) right 28% / cover no-repeat;
  background-color: var(--navy);
  color: var(--white);
  padding: 110px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }

.hero-deco {
  position: absolute;
  right: -140px; top: -120px;
  width: 560px; height: 560px;
  border-radius: 50%;
  border: 80px solid rgba(10, 114, 62, .18);
  z-index: 1;
  pointer-events: none;
}

.hero .kicker {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--green-soft);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--white);
  font-size: 46px;
  line-height: 1.18;
  font-weight: 800;
  max-width: 720px;
  margin-bottom: 22px;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: #d7dcef;
  max-width: 640px;
  margin-bottom: 36px;
}

.hero .cta-row { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── Hero de páginas internas ─────────────────────────────── */
.page-hero {
  background: linear-gradient(100deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: var(--white);
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero.has-image {
  background:
    linear-gradient(100deg, rgba(26,32,64,.94) 0%, rgba(37,45,87,.86) 55%, rgba(37,45,87,.45) 100%),
    var(--hero-img, none) center 45% / cover no-repeat;
  background-color: var(--navy);
}
.page-hero .hero-deco { width: 460px; height: 460px; border-width: 66px; }
.page-hero-content { position: relative; z-index: 2; max-width: 760px; }
.page-hero .kicker {
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700; letter-spacing: 3px;
  color: var(--green-soft); text-transform: uppercase; margin-bottom: 14px;
}
.page-hero h1 { color: var(--white); font-size: 40px; margin-bottom: 16px; }
.page-hero-lead { font-size: 17px; color: #d7dcef; line-height: 1.65; max-width: 660px; }

/* ── Stats flotantes ──────────────────────────────────────── */
.stats {
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  padding: 38px 50px;
  margin-top: -58px;
  position: relative;
  z-index: 5;
}
.stat {
  text-align: center;
  flex: 1;
  border-right: 1px solid var(--border);
  padding: 0 14px;
}
.stat:last-child { border-right: 0; }
.stat b {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 800;
  color: var(--green);
  display: block;
  line-height: 1.1;
}
.stat span { font-size: 14px; color: var(--muted); }

/* ── Tarjetas de especialidad ─────────────────────────────── */
.esp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.esp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.esp-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.esp-img {
  height: 190px;
  position: relative;
  background-color: var(--navy);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.esp-body {
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.esp-body h3 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.esp-body ul { margin-bottom: 22px; flex: 1; }
.esp-body ul li {
  font-size: 14.5px;
  color: var(--text);
  padding: 7px 0 7px 26px;
  position: relative;
  line-height: 1.45;
}
.esp-body ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 13px;
  width: 9px; height: 9px;
  background: var(--green);
  border-radius: 2px;
}

.esp-link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--green);
  letter-spacing: .3px;
}
.esp-link:hover { color: var(--navy); }

/* ── Sectores ─────────────────────────────────────────────── */
.sectores { background: var(--gray-bg); padding: 70px 0; }

.sect-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.sect {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 24px 10px 20px;
  transition: transform .2s, border-color .2s;
}
.sect:hover { transform: translateY(-4px); border-color: var(--green); }
.sect svg {
  width: 38px; height: 38px;
  stroke: var(--navy); fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  margin: 0 auto 10px;
}
.sect span {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: block;
  line-height: 1.3;
}

/* ── Proyectos ────────────────────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 44px;
}

.proj-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.proj-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.proj-img {
  height: 210px;
  position: relative;
  background-color: var(--navy);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.proj-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 5px 12px;
  border-radius: 3px;
  text-transform: uppercase;
}

.proj-body { padding: 22px 24px 26px; }
.proj-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.proj-body p { font-size: 14px; color: var(--muted); line-height: 1.55; }

.proj-meta {
  display: block;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 10px;
  letter-spacing: .3px;
}

.proj-detalles { margin-top: 16px; }
.proj-detalles li {
  font-size: 13.5px;
  color: var(--text);
  padding: 5px 0 5px 22px;
  position: relative;
  line-height: 1.45;
}
.proj-detalles li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 2px;
}

/* ── Galería de obra ──────────────────────────────────────── */
.gal { background: var(--white); padding: 80px 0; border-bottom: 1px solid var(--border); }

.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gal-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 230px;
  border: 1px solid var(--border);
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
}
.gal-item:hover .gal-cap { background: rgba(10, 114, 62, .92); }

.gal-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(26, 32, 64, .82);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 8px 14px;
  transition: background .2s;
}

/* ── Nosotros ─────────────────────────────────────────────── */
.nosotros { background: var(--gray-bg); }

.nos-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}

.nos-visual {
  border-radius: var(--radius);
  height: 400px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  overflow: hidden;
}
.nos-visual > div {
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background-color: var(--navy);
  background-size: cover;
  background-repeat: no-repeat;
}
.nv-tall { grid-row: 1 / 3; }

.nv-tag {
  position: absolute;
  left: 10px; bottom: 10px;
  background: rgba(26, 32, 64, .78);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: 3px;
  text-transform: uppercase;
}

.nos-txt .sec-kicker,
.nos-txt .sec-title { text-align: left; }
.nos-txt .sec-title { margin-bottom: 18px; }
.nos-txt p { font-size: 15.5px; line-height: 1.7; color: var(--text); margin-bottom: 16px; }

.badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
}
.badge {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 14px 16px;
}
.badge b {
  font-family: var(--font-head);
  font-size: 13.5px;
  color: var(--navy);
  display: block;
  margin-bottom: 3px;
}
.badge span { font-size: 13px; color: var(--muted); }

/* ── Valores / proceso ────────────────────────────────────── */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.value-card h3 { font-size: 18px; margin-bottom: 10px; }
.value-card p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.value-num {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 12px;
}

.process-list { counter-reset: step; display: grid; gap: 14px; }
.process-list li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14.5px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
}
.process-list li::before {
  content: counter(step);
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}

/* ── Detalle de especialidad (página servicios) ───────────── */
.spec-block { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.spec-block + .spec-block { margin-top: 80px; }
.spec-block.reverse .spec-media { order: 2; }

.spec-media {
  height: 380px;
  border-radius: var(--radius);
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
}
.spec-txt h2 { font-size: 28px; margin-bottom: 14px; }
.spec-txt > p { font-size: 15.5px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }
.spec-txt ul { margin-bottom: 24px; }
.spec-txt ul li {
  font-size: 14.5px;
  padding: 7px 0 7px 26px;
  position: relative;
  line-height: 1.45;
}
.spec-txt ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 13px;
  width: 9px; height: 9px;
  background: var(--green);
  border-radius: 2px;
}

/* ── Clientes ─────────────────────────────────────────────── */
.cli-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.cli {
  height: 110px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  padding: 14px 20px;
}
.cli img { max-height: 70px; max-width: 100%; object-fit: contain; }

/* ── Banda CTA ────────────────────────────────────────────── */
.cta-band {
  background:
    linear-gradient(100deg, rgba(26,32,64,.92), rgba(37,45,87,.82) 55%, rgba(37,45,87,.55)),
    var(--cta-img, none) center 65% / cover no-repeat;
  background-color: var(--navy);
  padding: 70px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-inner h2 { color: var(--white); font-size: 30px; font-weight: 800; max-width: 640px; line-height: 1.3; }
.cta-inner p { color: #c6cce4; margin-top: 8px; font-size: 15.5px; }

/* ── Contacto ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 44px;
  align-items: start;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 40px;
  box-shadow: var(--shadow-sm);
}
.form-card h3 { font-size: 20px; margin-bottom: 24px; }

.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.f-full { grid-column: 1 / -1; }

.f-field label {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.f-field .req { color: #d92d20; }

.f-field input,
.f-field select,
.f-field textarea {
  width: 100%;
  border: 1px solid var(--border-form);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  background: #fdfdfe;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.f-field input:focus,
.f-field select:focus,
.f-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 114, 62, .10);
}
.f-field input.has-error,
.f-field select.has-error,
.f-field textarea.has-error { border-color: #d92d20; }

.f-error {
  display: block;
  font-size: 12.5px;
  color: #d92d20;
  margin-top: 5px;
  font-family: var(--font-head);
  font-weight: 600;
}

.f-field textarea { resize: vertical; min-height: 110px; }

.f-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; line-height: 1.5; }

.info-col { display: flex; flex-direction: column; gap: 18px; }

.info-card {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-card svg {
  width: 26px; height: 26px;
  stroke: var(--green); fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; margin-top: 2px;
}
.info-card b {
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.info-card span { font-size: 14px; color: var(--muted); line-height: 1.55; }
.info-card a { color: var(--muted); }
.info-card a:hover { color: var(--green); }

.map-embed {
  border: 0;
  border-radius: var(--radius);
  width: 100%;
  min-height: 280px;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px 54px 18px 22px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  position: relative;
}
.faq-q::after {
  content: "+";
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--green);
  line-height: 1;
}
.faq-item.is-open .faq-q::after { content: "−"; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-a p { padding: 0 22px 20px; font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.faq-item.is-open .faq-a { max-height: 400px; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: #b9c0da;
  padding: 64px 0 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 44px;
  padding-bottom: 46px;
}
.foot-grid h4 {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: .4px;
}
.site-footer p,
.site-footer a { font-size: 14px; line-height: 1.7; color: #b9c0da; }
.site-footer a:hover { color: var(--green-soft); }

.foot-logo {
  background: var(--white);
  border-radius: 6px;
  padding: 10px 14px;
  display: inline-block;
  margin-bottom: 16px;
}
.foot-logo img { height: 44px; width: auto; }

.foot-list li { margin-bottom: 9px; }

.social { display: flex; gap: 12px; margin-top: 16px; }
.social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #3d4674;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-family: var(--font-head);
  font-weight: 700;
}
.social a:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.foot-bottom {
  border-top: 1px solid #323b6b;
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: #8a92b5;
}

/* ── Botón flotante WhatsApp ──────────────────────────────── */
.wsp {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  transition: transform .2s;
}
.wsp:hover { transform: scale(1.07); }
.wsp svg { width: 32px; height: 32px; fill: var(--white); }

/* ── Back to top ──────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  right: 30px; bottom: 100px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s, background .2s;
  z-index: 150;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--green); color: var(--white); }
