:root {
  --navy: #0b2545;
  --navy-700: #13315c;
  --navy-500: #1a4480;
  --accent: #2a6fb3;
  --white: #ffffff;
  --gray-50: #f7f9fc;
  --gray-100: #eef2f7;
  --gray-200: #dde3ec;
  --gray-400: #9aa6b6;
  --gray-600: #5b6777;
  --gray-800: #2a323d;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 18px 40px rgba(11, 37, 69, 0.18);
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--gray-600); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--navy);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--navy);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
}
.brand-word { font-size: 18px; color: var(--navy); }

.primary-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.primary-nav a {
  color: var(--gray-800);
  font-weight: 500;
  font-size: 15px;
}
.primary-nav a:hover { color: var(--navy); text-decoration: none; }
.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 8px 14px;
  border-radius: 8px;
}
.nav-cta:hover { background: var(--navy-700); }

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/imagenes/sistema-contra-incendios.jpg');
  background-size: cover;
  background-position: center;*/
  transform: scale(1.02);
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,37,69,0.82) 0%, rgba(11,37,69,0.72) 50%, rgba(11,37,69,0.85) 100%);
  z-index: -1;
}
.hero-content { padding: 88px 20px; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 0 0 28px;
  color: #e6eefc;
  max-width: 640px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, transform .1s ease;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--navy-500); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--gray-50); }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.section-head-left { text-align: left; margin: 0 0 20px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  color: var(--navy);
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
.section-head p { color: var(--gray-600); margin: 0; }

/* Services */
.services-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gray-100);
}
.service-ico {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 12px;
}
.service-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--navy);
}
.service-card p { margin: 0; color: var(--gray-600); font-size: .96rem; }

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-media {
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  background: var(--gray-100);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: block;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project-media:hover img { transform: scale(1.04); }
.project-body { padding: 18px 20px 22px; }
.project-body h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.15rem; }
.project-system {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
  background: #eaf2fb;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 0 0 10px;
}
.project-desc { margin: 0 0 8px; color: var(--gray-800); }
.project-impact { margin: 0; color: var(--gray-600); font-size: .94rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-text p { margin: 0 0 14px; color: var(--gray-800); }
.about-bullets {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--gray-600);
}
.about-bullets li { margin-bottom: 6px; }
.about-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.about-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}
.about-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.about-card p { margin: 0 0 4px; color: #dbe5f4; }
.about-card .muted { color: #aab9d1; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  margin: 18px 0 0;
}
.contact-line .ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}
.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow);
}
.contact-form label { display: grid; gap: 6px; font-size: .92rem; color: var(--gray-800); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font: inherit;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42,111,179,0.18);
}
.contact-form .hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 20px; font-size: .92rem; }
.form-status.success { color: #0a7d3c; }
.form-status.error { color: #b02a2a; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #cfd8e7;
  padding: 28px 0;
}
.site-footer p { margin: 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer .muted { color: #9aa9c2; }

/* WhatsApp float */
.wa-float {
  /* BASE PARA TODAS LAS REDES FLOTANTES */
.social-float {
  position: fixed;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  transition: transform .15s ease;
}

.social-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.06); text-decoration: none; }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 18, 36, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255,255,255,0.12); }
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.12);
}

/* 👇 PEGAR AQUÍ TODO LO NUEVO */

/* ===================== */
/* BOTONES FLOTANTES BASE */
/* ===================== */

.social-float {
  position: fixed;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  transition: transform .15s ease;
}

/* ICONOS */
.social-float svg {
  width: 26px;
  height: 26px;
  fill: white;
}

/* POSICIONES */
.linkedin {
  bottom: 90px;
  background: #0077b5;
}

.instagram {
  bottom: 150px;
  background: #e1306c;
}

/* HOVER */
.social-float:hover {
  transform: scale(1.06);
}
/* ===================== */
/* Responsive */
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .primary-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 10px 6px; border-radius: 6px; }
  .primary-nav .nav-cta { text-align: center; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { min-height: 60vh; }
  .hero-content { padding: 64px 20px; }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
