/* ==========================================================================
   SENOVA — Design system
   Ingeniería Civil · Eléctrica · Contra Incendios · Seguridad Electrónica
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #0a1440;
  --navy-800: #101c54;
  --navy-700: #182864;
  --blue-600: #0057e0;
  --blue-500: #1f6bff;
  --blue-100: #e8f0ff;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f6f7f9;
  --gray-100: #eef0f3;
  --gray-200: #e2e5ea;
  --gray-400: #9aa1ae;
  --gray-600: #5b6270;
  --gray-800: #2a2f3a;

  /* Semantic */
  --text-primary: var(--navy-900);
  --text-secondary: var(--gray-600);
  --bg-page: var(--white);
  --bg-section: var(--gray-50);
  --border: var(--gray-200);

  /* Type */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(10, 20, 64, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 20, 64, 0.10);
  --shadow-lg: 0 20px 48px rgba(10, 20, 64, 0.16);

  --header-height: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

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

section { padding: 88px 0; }
@media (max-width: 768px) {
  section { padding: 56px 0; }
}

.section-alt { background: var(--bg-section); }
.section-navy { background: var(--navy-900); color: var(--white); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 14px;
}
.section-navy .eyebrow { color: var(--blue-500); }

h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.lede { font-size: 19px; color: var(--text-secondary); line-height: 1.6; }
.section-navy .lede { color: rgba(255,255,255,0.72); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: var(--blue-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-outline-navy { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn-outline-navy:hover { background: var(--navy-900); color: var(--white); }

.btn-whatsapp { background: #25D366; color: #06210f; }
.btn-whatsapp:hover { background: #2fe374; }

.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 42px; width: auto; }

.nav-primary { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-primary > li { position: relative; }
.nav-primary > li > a, .nav-primary > li > button.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  white-space: nowrap;
}
.nav-primary > li > a:hover, .nav-primary > li > button.nav-link:hover { background: var(--gray-100); }
.nav-primary .caret { font-size: 10px; opacity: 0.6; transition: transform .15s ease; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.nav-primary > li:hover .nav-dropdown,
.nav-primary > li.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.nav-dropdown a:hover { background: var(--blue-100); color: var(--blue-600); }
.nav-dropdown .dd-note { padding: 4px 12px 8px; font-size: 12px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

.header-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-cta .btn { padding: 11px 18px; font-size: 14px; }

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

@media (max-width: 980px) {
  .nav-primary, .header-cta .btn-outline-navy-desktop { display: none; }
  .nav-toggle { display: block; }
  .header-cta .btn-primary { padding: 9px 14px; font-size: 13px; }

  body.nav-open .nav-primary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    padding: 12px;
    overflow-y: auto;
    gap: 2px;
  }
  body.nav-open .nav-primary > li > a,
  body.nav-open .nav-primary > li > button.nav-link { width: 100%; justify-content: space-between; padding: 14px 12px; font-size: 16px; }
  body.nav-open .nav-dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    display: none;
    width: 100%;
    padding: 0 0 8px 12px;
  }
  body.nav-open .nav-primary > li.open .nav-dropdown { display: block; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 20%, rgba(0,87,224,0.35), transparent 55%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; padding-top: 76px; padding-bottom: 76px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero p.lede { color: rgba(255,255,255,0.75); margin-top: 18px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.12); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat-num { font-size: 28px; font-weight: 800; color: var(--white); }
.hero-stats .stat-label { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* Sub-page hero (smaller) */
.page-hero {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  padding: 56px 0;
}
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--white); }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 44px); }
.page-hero .lede { color: rgba(255,255,255,0.75); margin-top: 14px; max-width: 640px; }
.line-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 24px;
  margin-bottom: 20px;
}

/* ---------- Lines grid (home) ---------- */
.lines-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1000px) { .lines-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .lines-grid { grid-template-columns: 1fr; } }

.line-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.line-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.line-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.line-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.line-card:hover .thumb img { transform: scale(1.06); }
.line-card .body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.line-card .icon { font-size: 26px; margin-bottom: 10px; }
.line-card h3 { font-size: 18px; margin-bottom: 8px; }
.line-card p { color: var(--text-secondary); font-size: 14.5px; flex: 1; }
.line-card .card-link { margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--blue-600); display: flex; align-items: center; gap: 6px; }
.line-card .card-link .arrow { transition: transform .15s ease; }
.line-card:hover .card-link .arrow { transform: translateX(3px); }

/* ---------- Industry cards ---------- */
.industry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
@media (max-width: 560px) { .industry-grid { grid-template-columns: 1fr; } }
.industry-card {
  padding: 26px 22px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease;
}
.industry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.industry-card .icon { font-size: 28px; margin-bottom: 12px; }
.industry-card h3 { font-size: 17px; margin-bottom: 6px; }
.industry-card p { font-size: 13.5px; color: var(--text-secondary); }

/* ---------- Mission / Vision ---------- */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .mv-grid { grid-template-columns: 1fr; } }
.mv-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.mv-card .mv-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.mv-card h3 { font-size: 20px; margin-bottom: 12px; }
.mv-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.65; }

/* ---------- Trust / social proof ---------- */
.trust-bar { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding: 28px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-bar .trust-label { font-size: 13px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.trust-logos { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1px dashed var(--gray-400);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}

.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cert-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cert-card .cert-icon { font-size: 22px; flex-shrink: 0; }
.cert-card h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.cert-card p { font-size: 13px; color: var(--text-secondary); }

/* ---------- Placeholder note (transparent about missing assets) ---------- */
.placeholder-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: #fff8e6;
  border: 1px solid #f0d98c;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: #6b5410;
}

/* ---------- Sub-service anchors / accordion ---------- */
.subservice-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 0;
  margin-bottom: 8px;
}
.subservice-nav a {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.subservice-nav a:hover { border-color: var(--blue-600); color: var(--blue-600); }

.subservice-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.subservice-block:first-of-type { border-top: none; }
.subservice-block.reverse { direction: rtl; }
.subservice-block.reverse > * { direction: ltr; }
.subservice-block .media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--gray-100); aspect-ratio: 4/3; }
.subservice-block .media img { width: 100%; height: 100%; object-fit: cover; }
.subservice-block .media.media-portrait { aspect-ratio: 9/16; max-width: 420px; margin: 0 auto; }
.subservice-block ul.feature-list { margin-top: 16px; }
.subservice-block ul.feature-list li { padding-left: 26px; position: relative; margin-bottom: 10px; font-size: 14.5px; color: var(--text-secondary); }
.subservice-block ul.feature-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--blue-600); font-weight: 800; }

@media (max-width: 800px) {
  .subservice-block { grid-template-columns: 1fr; gap: 22px; }
  .subservice-block.reverse { direction: ltr; }
}

.subservice-block.full { grid-template-columns: 1fr; }
.subservice-block.full > div { max-width: 640px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-grid a { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; background: var(--gray-100); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid a:hover img { transform: scale(1.07); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Two-column feature ---------- */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .feature-split { grid-template-columns: 1fr; } }

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 700px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stats-strip .stat-num { font-size: 36px; font-weight: 800; color: var(--blue-500); }
.stats-strip .stat-label { font-size: 13.5px; color: rgba(255,255,255,0.65); margin-top: 6px; }

/* ---------- Contact / lead form ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }

.lead-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  background: var(--gray-50);
  color: var(--text-primary);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  background: var(--white);
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: var(--gray-400); margin-top: 12px; }

.contact-info-card { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-info-card:last-child { border-bottom: none; }
.contact-info-card .ci-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.contact-info-card h4 { font-size: 15px; margin-bottom: 3px; }
.contact-info-card p, .contact-info-card a { font-size: 14px; color: var(--text-secondary); }
.contact-info-card a:hover { color: var(--blue-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 42px; margin-bottom: 10px; }
.footer-brand .tagline { display: block; font-size: 13.5px; font-weight: 700; color: var(--blue-500); margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,0.5); max-width: 280px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.85); }
.footer-col a:hover { color: var(--blue-500); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.footer-social a:hover { background: var(--blue-600); border-color: var(--blue-600); }

/* ---------- WhatsApp float button ---------- */
.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 400;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-size: 26px;
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.badge-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: .04em;
}
