/* ==========================================================================
   Plantilla web administrable — hoja de estilos del sitio público
   Los colores/tamaños marcados con var(--...) se configuran por empresa
   desde el panel de administración (ver index.php, bloque <style> dinámico).
   ========================================================================== */

:root {
  --primary: #2454FF;
  --header-bg: #ffffff;
  --footer-bg: #14161f;
  --footer-text: #c9cbd6;
  --menu-font-size: 16px;

  --ink: #12141c;
  --ink-soft: #565b6b;
  --line: #e7e8ee;
  --surface: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(18, 20, 28, 0.08);
  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
a  { color: var(--primary); }

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

/* ---------------------------------- Header / menú ---------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.site-logo img { display: block; height: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: var(--menu-font-size);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.is-active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

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

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 8px; border-radius: 8px; }
}

/* ---------------------------------- Secciones --------------------------- */

.site-section {
  padding: 72px 24px;
  background-size: cover;
  background-position: center;
  scroll-margin-top: 72px;
}

.section-inner {
  max-width: 1160px;
  margin: 0 auto;
}

/* ---------------------------------- Utilidades para el HTML editable ---- */

.container { max-width: 1160px; margin: 0 auto; padding: 0 8px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); color: #fff; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .site-section { padding: 48px 20px; }
}

.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:40px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:40px}

/* ---------------------------------- Footer ------------------------------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px 24px;
}
.site-footer a { color: var(--footer-text); text-decoration: underline; }
.site-footer .section-inner p:last-child { margin-bottom: 0; }

.site-credit {
  text-align: center;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  opacity: 0.75;
}

/* ---------------------------------- WhatsApp flotante --------------------- */

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.07); color: #fff; }

@media (max-width: 480px) {
  .whatsapp-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

/* ---------------------------------- Formulario de contacto ---------------- */

.contact-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button.btn { border: none; cursor: pointer; font: inherit; }

/* Campo trampa para robots (honeypot): oculto para personas, visible para bots simples */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-notice {
  margin: 0 auto 24px;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  text-align: center;
}
.form-notice--success { background: #e6f5ee; color: #1b8a5a; border: 1px solid #bfe6d3; }
.form-notice--error { background: #fceceb; color: #c53a33; border: 1px solid #f6cac6; }
