/* =========================================================
   SEIN Seguridad e Innovación — hoja de estilos base
   Mobile-first. Sin frameworks, sin build step.
   ========================================================= */

:root {
  /* Marca */
  --color-primary: #17A6B8;
  --color-primary-dark: #0F2A4A;
  --color-primary-light: #E5F6F8;

  /* Semánticos (petición del cliente: amarillo = riesgo, verde = alivio/solución) */
  --color-risk: #F5B914;
  --color-risk-bg: #FFF8E6;
  --color-resolve: #22C55E;
  --color-resolve-bg: #EAFBF1;
  --color-urgent: #E3342F;

  /* Neutros */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F4F6F8;
  --color-text: #1F2937;
  --color-text-muted: #5B6770;
  --color-border: #E2E6EA;

  /* Tipografía */
  --font-heading: 'Poppins', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(15, 42, 74, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; margin-bottom: .75rem; }
h3 { font-size: 1.2rem; }

p { color: var(--color-text-muted); }

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

.section {
  padding: 3.5rem 0;
}

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

.section-head {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.tagline {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--color-resolve);
  color: #fff;
}
.btn--primary:hover { background: #1ba14a; box-shadow: 0 6px 16px rgba(34,197,94,.3); }

.btn--outline {
  background: transparent;
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
}
.btn--outline:hover { background: var(--color-primary-dark); color: #fff; }

.btn--light {
  background: #fff;
  color: var(--color-primary-dark);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

/* Logotipo tipográfico */
.logo {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.logo__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: .04em;
  color: var(--color-primary-dark);
}
.logo__name b { color: var(--color-primary); font-weight: 700; }
.logo__tag {
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: .18rem;
}

.navbar__toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  margin: 5px 0;
}

.navbar__menu {
  position: fixed;
  inset: 72px 0 0 0;
  background: #fff;
  padding: 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.navbar__menu.is-open { display: flex; }

.navbar__links {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-weight: 600;
}

.navbar__links .has-dropdown > a::after { content: " ▾"; }

.navbar__dropdown {
  margin-top: .75rem;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  font-weight: 500;
  font-size: .95rem;
}

.navbar__actions { display: flex; }
.navbar__actions .btn { width: 100%; }

@media (min-width: 960px) {
  .navbar__toggle { display: none; }

  .navbar__menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    padding: 0;
    inset: auto;
    overflow: visible;
  }

  .navbar__links {
    flex-direction: row;
    gap: 2rem;
    font-size: .95rem;
  }

  .navbar__links .has-dropdown { position: relative; }

  .navbar__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: .75rem;
    min-width: 220px;
    display: none;
    margin-top: 0;
    padding-top: 1.25rem;
  }

  /* puente invisible que cubre el hueco entre el link y el menú, para que el :hover no se pierda al bajar el mouse */
  .navbar__links .has-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: .5rem;
  }

  .navbar__links .has-dropdown:hover .navbar__dropdown,
  .navbar__links .has-dropdown:focus-within .navbar__dropdown {
    display: flex;
  }

  .navbar__actions .btn { width: auto; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 3rem 0;
  background: linear-gradient(180deg, var(--color-primary-light) 0%, #fff 100%);
}

.hero .container {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 1.5rem;
}

.hero__text p { font-size: 1.05rem; margin-top: 1rem; }

.hero__image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.75rem; }
}

/* ---------- Grid de tarjetas (features / industrias) ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card img { height: 170px; object-fit: cover; width: 100%; }

.card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.card__body h3 { margin-bottom: .4rem; }

.card__body p { font-size: .92rem; flex: 1; }

.card__link {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  font-size: .9rem;
}

/* Tarjeta de icono simple (sin imagen) */
.icon-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}
.icon-card .icon { font-size: 1.8rem; margin-bottom: .75rem; display: block; }
.icon-card h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.icon-card p { font-size: .9rem; }

/* Variante riesgo (amarillo) y solución (verde) */
.icon-card--risk { background: var(--color-risk-bg); border-left: 4px solid var(--color-risk); }
.icon-card--resolve { background: var(--color-resolve-bg); border-left: 4px solid var(--color-resolve); }

/* ---------- Bloque texto + imagen ---------- */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.split img { border-radius: var(--radius); }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__image { order: 2; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe3ea; margin-bottom: 1.5rem; }
.cta-band__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- FAQ (details/summary, sin JS) ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-left: 1rem;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: .75rem; font-size: .95rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--color-primary-dark);
  color: #cfe3ea;
  padding: 3rem 0 1.5rem;
}
.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer__logo { margin-bottom: .75rem; }
.footer__logo .logo__name { color: #fff; }
.footer__logo .logo__name b { color: var(--color-primary); }
.footer__logo .logo__tag { color: #7fd3de; }
.footer__about p { font-size: .9rem; color: #a9c2cc; }
.footer__title { color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 1rem; margin-bottom: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: .6rem; font-size: .9rem; }
.footer__links a:hover { color: #fff; }
.footer__contact { font-size: .9rem; display: flex; flex-direction: column; gap: .6rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: .85rem;
  color: #a9c2cc;
}

/* ---------- WhatsApp botón flotante ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: #25D366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  z-index: 90;
  font-size: 1.6rem;
}

/* ---------- Page header (páginas internas) ---------- */
.page-header {
  background: linear-gradient(180deg, var(--color-primary-light) 0%, #fff 100%);
  padding: 2.5rem 0 3rem;
}
.page-header h1 { margin: .3rem 0 .75rem; }
.page-header p { font-size: 1.05rem; max-width: 680px; }
.page-header .hero__actions { margin-top: 1.5rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding-top: 1rem;
  padding-bottom: 0;
  font-size: .85rem;
  color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Lista con palomita ---------- */
.checklist { margin-top: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--color-text);
  font-size: .95rem;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-resolve);
  font-weight: 700;
}

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }
.contact-list { display: flex; flex-direction: column; gap: 1.1rem; margin: 1.25rem 0; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; min-width: 0; }
.contact-list li > div { overflow-wrap: anywhere; min-width: 0; }
.contact-ic { font-size: 1.3rem; line-height: 1.4; }
.contact-list a { color: var(--color-primary); }
.contact-list a:hover { text-decoration: underline; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; color: var(--color-primary-dark); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  padding: .7rem .8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: #fff;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary);
}
.contact-form button { margin-top: .5rem; }
.contact-form-wrap {
  background: var(--color-bg-alt);
  padding: 1.75rem;
  border-radius: var(--radius);
  min-width: 0;
}
.contact-info { min-width: 0; }

/* ---------- Tabla comparativa ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th,
.compare-table td {
  padding: .85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  font-size: .92rem;
}
.compare-table thead th {
  background: var(--color-primary-dark);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .9rem;
}
.compare-table thead th:last-child { background: var(--color-primary); }
.compare-table tbody th[scope="row"] {
  text-align: left;
  color: var(--color-primary-dark);
  font-weight: 600;
  background: var(--color-bg-alt);
}
.compare-table td:last-child { background: rgba(23,166,184,.06); font-weight: 600; }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.ct-yes { color: var(--color-resolve); font-weight: 700; font-size: 1.1rem; }
.ct-no { color: #c0392b; font-weight: 700; font-size: 1.1rem; }
.ct-warn { color: #b7791f; background: var(--color-risk-bg) !important; font-weight: 600; }
.ct-ok { color: #157a3a; background: var(--color-resolve-bg) !important; font-weight: 700; }

/* ---------- Página legal / aviso de privacidad ---------- */
.legal { max-width: 820px; }
.legal h2 {
  font-size: 1.25rem;
  margin: 2rem 0 .6rem;
  color: var(--color-primary-dark);
}
.legal p { margin-bottom: .9rem; color: var(--color-text); }
.legal ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.legal li { margin-bottom: .4rem; color: var(--color-text); }
.legal a { color: var(--color-primary); text-decoration: underline; }

/* ---------- Imán de leads (descarga de checklist) ---------- */
.lead-band {
  background: var(--color-primary-light);
  border: 1px solid #cbe9ee;
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 860px) { .lead-band { grid-template-columns: 1.1fr 1fr; padding: 2.5rem; } }
.lead-band__text h2 { margin-bottom: .5rem; }
.lead-band__text p { color: var(--color-text); }
.lead-form { display: flex; flex-direction: column; gap: .7rem; }
.lead-form input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .75rem .85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.lead-form input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
.lead-form button { width: 100%; }
.lead-cta { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; justify-content: center; }
.lead-cta .btn { font-size: 1.05rem; }
.lead-form__note { font-size: .78rem; color: var(--color-text-muted); margin: 0; }
.lead-form__note a { color: var(--color-primary); text-decoration: underline; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
