/* =========================================================================
   Proelium v2
   Paleta tomada del sitio v1: colores del logo + acentos de team/assets/css/color/proelium.css
   ========================================================================= */
:root {
  /* Marca */
  --proelium-slate:      #4E606C; /* texto del logo */
  --proelium-blue:       #60849C; /* isotipo, cara azul */
  --proelium-green-soft: #B4D8A2; /* isotipo, cara verde claro */
  --proelium-aqua:       #96D2C6; /* isotipo, cara aqua */
  --proelium-green:      #21B868; /* acento "verde" del v1 */
  --proelium-teal:       #41AD96; /* acento "verde azulado" del v1 */
  --proelium-gradient:   linear-gradient(120deg, #21B868 0%, #41AD96 100%);

  /* Uso en la interfaz (contraste AA verificado) */
  --ink:        #23303a;  /* texto principal y fondos oscuros */
  --ink-soft:   #2f3d46;
  --text:       #2b3740;
  --muted:      #5b6b75;
  --link:       #3E6680;
  --bg:         #ffffff;
  --bg-alt:     #f3f7f6;
  --line:       #dde5e8;
  --on-primary: #0f2a1c;  /* texto sobre verde */
  --danger:     #b42318;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(35,48,58,.06), 0 8px 24px rgba(35,48,58,.07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--proelium-teal); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.narrow { max-width: 820px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 720px; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--proelium-green-soft); margin-bottom: 1rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Botones */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .7em 1.25em; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background-color .15s; font-family: inherit; }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-lg { padding: .85em 1.6em; font-size: 1.05rem; }
.btn-primary { background: var(--proelium-green); color: var(--on-primary); }
.btn-primary:hover { color: var(--on-primary); background: #2bc876; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(33,184,104,.3); }
.btn-ghost { color: inherit; border-color: currentColor; }
.btn-ghost:hover { color: inherit; background: rgba(255,255,255,.08); }
.btn-outline { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-outline:hover { border-color: var(--proelium-teal); color: var(--ink); }

/* ---------- Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand img { width: 160px; height: auto; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; place-content: center; gap: 5px; padding: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.main-nav a[aria-current="page"] { color: var(--link); }

@media (max-width: 959px) {
  .js .nav-toggle { display: grid; }
  .js .main-nav { display: none; }
  .js.nav-open .main-nav { display: block; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .main-nav { position: static; box-shadow: none; width: 100%; }
  .main-nav { position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 20px; box-shadow: var(--shadow); max-height: calc(100vh - 72px); overflow-y: auto; }
  .main-nav > ul > li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .main-nav .sub { padding-left: 14px; }
  .main-nav .sub a { display: block; padding: 8px 0; font-size: .95rem; color: var(--muted); }
  .nav-cta { margin-top: 16px; width: 100%; justify-content: center; }
}
@media (min-width: 960px) {
  .main-nav { display: flex; align-items: center; gap: 28px; }
  .main-nav > ul { display: flex; gap: 28px; }
  .has-sub { position: relative; }
  .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); }
  .sub { position: absolute; top: 100%; left: -16px; min-width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
  .sub a { display: block; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
  .sub a:hover { background: var(--bg-alt); }
  .has-sub::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
}

/* ---------- Hero */
.hero { background: radial-gradient(1000px 500px at 85% 20%, rgba(65,173,150,.25), transparent 60%), var(--ink); color: #dbe4e8; padding: clamp(64px, 10vw, 120px) 0; overflow: hidden; }
.hero h1 { color: #fff; max-width: 15em; }
.hero .lead { color: #c9d4da; }
.hero-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.5fr 1fr; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-actions-center { justify-content: center; }
.hero-art { display: none; justify-content: center; }
.hero-art img { width: 100%; max-width: 300px; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
@media (min-width: 900px) { .hero-art { display: flex; } }

.page-hero { background: var(--bg-alt); padding: clamp(40px, 7vw, 80px) 0; border-bottom: 1px solid var(--line); }
.page-hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .page-hero-grid { grid-template-columns: 1fr auto; } }
.page-hero .hero-actions .btn-ghost { color: var(--ink); }
.page-hero-icon { display: inline-grid; place-items: center; width: 160px; height: 160px; border-radius: 40px; background: var(--proelium-gradient); color: var(--on-primary); }
.page-hero-icon .icon { width: 72px; height: 72px; }
@media (max-width: 899px) { .page-hero-grid .page-hero-icon { display: none; } }
.page-hero-center { text-align: center; }
.page-hero-center .lead { margin-inline: auto; }
.page-hero-center .page-hero-icon { width: 88px; height: 88px; border-radius: 50%; margin-bottom: 20px; }
.page-hero-center .page-hero-icon .icon { width: 44px; height: 44px; }
.breadcrumbs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs span { margin: 0 4px; }

/* ---------- Tarjetas */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--muted); margin: 0; }
.card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--proelium-aqua); }
.card-link p { flex: 1; }
.card-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--proelium-green-soft), var(--proelium-aqua)); color: var(--ink); margin-bottom: 18px; flex: none; }
.card-icon .icon { width: 26px; height: 26px; }
.card-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; color: var(--link); }
.card-more .icon { width: 18px; height: 18px; transition: transform .15s; }
.card-link:hover .card-more .icon { transform: translateX(4px); }

/* ---------- Especialidades */
.eyebrow-dark { color: #23805a; }
.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card-feature { padding: 32px; position: relative; overflow: hidden; }
.card-feature::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--proelium-gradient); }
.card-feature h3 { font-size: 1.3rem; }
.card-feature .mini-list { margin-top: 16px; flex-direction: column; gap: 4px; }
.card-feature .card-icon { width: 60px; height: 60px; background: var(--proelium-gradient); }
.card-feature .card-icon .icon { width: 30px; height: 30px; }

/* ---------- Listas */
.split { display: grid; gap: 40px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { width: 24px; height: 24px; flex: none; margin-top: 2px; color: var(--proelium-green); }
.checklist-pain .icon { color: var(--proelium-blue); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tags li { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .92rem; color: var(--ink); }
.tech-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tech-col h3 { display: flex; align-items: center; gap: 10px; }
.tech-col h3 .icon { width: 24px; height: 24px; color: var(--proelium-teal); }
.mini-list { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.mini-list li::before { content: "• "; color: var(--proelium-teal); }
.link-list { columns: 2 240px; padding-left: 1.2em; }
.link-list li { margin-bottom: .5em; }

/* ---------- Pasos */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { counter-increment: step; position: relative; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; margin-bottom: 14px; background: var(--proelium-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps p { color: var(--muted); margin: 0; }

/* ---------- Listado de servicios */
.service-list { display: grid; gap: 18px; }
.service-row { display: grid; gap: 18px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.service-row h2 { font-size: 1.35rem; margin-bottom: .35em; }
.service-row h2 a { color: var(--ink); text-decoration: none; }
.service-row h2 a:hover { color: var(--link); }
.service-row .card-icon { margin: 0; }
@media (min-width: 800px) { .service-row { grid-template-columns: auto 1fr auto; gap: 28px; } }

/* ---------- FAQ */
.faq { display: grid; gap: 12px; margin-top: 28px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.faq summary { cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--proelium-teal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

/* ---------- CTA */
.cta-band { background: var(--proelium-gradient); color: var(--on-primary); padding: clamp(48px, 7vw, 80px) 0; }
.cta-band h2 { color: var(--on-primary); }
.cta-band p { margin: 0; max-width: 620px; }
.cta-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1fr auto; gap: 48px; } }
.cta-band .btn-primary { background: var(--ink); color: #fff; }
.cta-band .btn-primary:hover { background: #111a20; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); }

/* ---------- Formulario */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.6fr 1fr; gap: 56px; } }
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; color: var(--ink); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #c3cfd5; border-radius: 10px; background: #fff; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--proelium-teal); box-shadow: 0 0 0 3px rgba(65,173,150,.25); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field-check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--proelium-green); }
.field-error { color: var(--danger); font-size: .9rem; margin: 6px 0 0; }
.alert { background: #fdecea; color: var(--danger); padding: 12px 16px; border-radius: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.contact-aside h2 { font-size: 1.25rem; }
.mini-steps { padding-left: 1.2em; margin: 0 0 32px; color: var(--muted); }
.mini-steps li { margin-bottom: 8px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 10px; align-items: center; }
.contact-list .icon { width: 22px; height: 22px; color: var(--proelium-teal); }

.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* ---------- Pie */
.site-footer { background: var(--ink); color: #c9d4da; padding: 64px 0 0; font-size: .95rem; }
.site-footer a { color: #dbe4e8; text-decoration: none; }
.site-footer a:hover { color: var(--proelium-green-soft); text-decoration: underline; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); padding-bottom: 48px; }
.footer-logo { width: 160px; margin-bottom: 16px; background: #fff; padding: 8px 12px; border-radius: 10px; box-sizing: content-box; }
.footer-title { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; padding-bottom: 24px; }

/* Botón flotante de WhatsApp (verde oficial para que se reconozca al instante) */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 16px; border-radius: 999px; background: #25D366; color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .15s, box-shadow .15s; }
.wa-float:hover { color: #fff; transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 28px rgba(0,0,0,.3); }
.wa-float svg { width: 30px; height: 30px; flex: none; }
.wa-label { color: #0b3d20; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(37,211,102,.55); animation: wa-pulse 2.4s infinite; }
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } }
@media (max-width: 599px) { .wa-float { width: 60px; padding: 0; justify-content: center; } .wa-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .wa-float::before { animation: none; } }

/* ---------- Panel admin */
.admin h1 small { color: var(--muted); font-weight: 400; font-size: 1rem; }
.table-wrap { overflow-x: auto; }
.leads { width: 100%; border-collapse: collapse; font-size: .92rem; }
.leads th, .leads td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); }
.leads th { background: var(--bg-alt); }
.leads .msg { max-width: 360px; }

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

/* ---------- Nuestro equipo (/team) ---------- */
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-member { display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform .15s, box-shadow .15s, border-color .15s; }
.team-member:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--proelium-aqua); }
.team-avatar { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--proelium-green-soft), var(--proelium-aqua)); color: var(--ink); font-size: 2.2rem; font-weight: 700;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--line); }
.team-member h2 { font-size: 1.3rem; margin: 20px 0 .2em; }
.team-member h2 a { color: var(--ink); text-decoration: none; }
.team-member h2 a:hover { color: var(--link); }
.card .team-role { color: #2f8c78; font-weight: 600; }
.card .team-bio { margin-top: 12px; font-size: .95rem; }
.team-actions { display: flex; gap: 10px; justify-content: center; margin-top: auto; padding-top: 22px; }
.btn-square { padding: .7em; }
.btn-square .icon { width: 1.25em; height: 1.25em; }
