/*
 * Tolintema S.L. - Sistema visual global
 * Tema hijo Kadence. Mantener clases prefijadas con .tol- para evitar conflictos.
 */

:root {
  --tol-red: #C32026;
  --tol-red-dark: #9F171D;
  --tol-ink: #1F2937;
  --tol-ink-dark: #111827;
  --tol-muted: #4B5563;
  --tol-muted-light: #6B7280;
  --tol-soft: #F7F8FA;
  --tol-border: #E5E7EB;
  --tol-white: #FFFFFF;
  --tol-dark: #0B1120;
  --tol-dark-2: #111827;
  --tol-radius: 16px;
  --tol-radius-lg: 20px;
  --tol-shadow-soft: 0 18px 45px rgba(31, 41, 55, 0.08);
  --tol-shadow-card: 0 24px 48px rgba(31, 41, 55, 0.10);
  --tol-container: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--tol-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--tol-ink);
  letter-spacing: -0.035em;
}

.entry-content p {
  color: var(--tol-muted);
}

.entry-content a {
  text-underline-offset: 0.18em;
}

/* Utilidades base */
.tol-container {
  width: min(var(--tol-container), calc(100% - 40px));
  margin-inline: auto;
}

.tol-full-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.tol-section {
  padding-block: clamp(70px, 8vw, 118px);
}

.tol-section-soft {
  background: var(--tol-soft);
}

.tol-card {
  background: var(--tol-white);
  border: 1px solid var(--tol-border);
  border-radius: var(--tol-radius);
  box-shadow: var(--tol-shadow-soft);
}

.tol-kicker,
.tol-kicker-center,
.tol-kicker-left {
  margin: 0 0 18px;
  color: var(--tol-red);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tol-kicker-center {
  text-align: center;
}

.tol-kicker-center::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin: 16px auto 0;
  background: var(--tol-red);
}

.tol-kicker-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tol-kicker-left::after {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--tol-red);
  opacity: 0.78;
}

.tol-heading-xl {
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.tol-text-lead {
  color: var(--tol-muted);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.62;
}

.tol-link-arrow,
.entry-content a.tol-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tol-red);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(195, 32, 38, 0.36);
  padding-bottom: 8px;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tol-link-arrow:hover,
.entry-content a.tol-link-arrow:hover {
  color: var(--tol-red-dark);
  border-color: var(--tol-red-dark);
  transform: translateY(-1px);
}

.tol-btn,
.entry-content a.tol-btn {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 28px;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1;
  font-weight: 850;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.tol-btn-primary,
.entry-content a.tol-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--tol-red) 0%, var(--tol-red-dark) 100%);
  border: 1px solid rgba(195, 32, 38, 0.42);
  box-shadow: 0 18px 36px rgba(195, 32, 38, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.tol-btn-primary:hover,
.entry-content a.tol-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(195, 32, 38, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tol-btn-secondary,
.entry-content a.tol-btn-secondary {
  color: var(--tol-ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(31, 41, 55, 0.28);
}

.tol-btn-secondary:hover,
.entry-content a.tol-btn-secondary:hover {
  color: var(--tol-ink);
  background: #fff;
  border-color: rgba(31, 41, 55, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.10);
}

/* Home / Capacidad integral: numeración roja por clases de tarjeta */
.tol-step-card :is(h2, h3, h4)::before {
  color: var(--tol-red);
  margin-right: 0.25em;
  font-weight: 700;
}

.tol-step-01 :is(h2, h3, h4)::before { content: "01."; }
.tol-step-02 :is(h2, h3, h4)::before { content: "02."; }
.tol-step-03 :is(h2, h3, h4)::before { content: "03."; }
.tol-step-04 :is(h2, h3, h4)::before { content: "04."; }
.tol-step-05 :is(h2, h3, h4)::before { content: "05."; }
.tol-step-06 :is(h2, h3, h4)::before { content: "06."; }

/* Tarjetas índice de soluciones */
.tol-solution-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tol-solution-card:hover {
  transform: translateY(-4px);
  border-color: rgba(195, 32, 38, 0.32) !important;
  box-shadow: var(--tol-shadow-card) !important;
}

.tol-solution-link,
.entry-content a.tol-solution-link {
  color: var(--tol-red);
  font-weight: 800;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.tol-solution-link:hover,
.entry-content a.tol-solution-link:hover {
  color: var(--tol-red-dark);
  transform: translateX(3px);
}

/* Ajustes para bloques premium HTML */
.tol-premium-block,
.tol-premium-block * {
  box-sizing: border-box;
}

.tol-dark-surface {
  color: #F9FAFB;
  background: radial-gradient(circle at 14% 18%, rgba(195, 32, 38, 0.24) 0, rgba(195, 32, 38, 0) 34%), linear-gradient(135deg, #070B13 0%, #111827 54%, #080D19 100%);
}

/* Contact Form 7 base, si se usa en Contacto */
.tol-form .wpcf7-form {
  display: grid;
  gap: 18px;
}

.tol-form .wpcf7-form-control-wrap {
  display: block;
}

.tol-form input:not([type="submit"]),
.tol-form textarea,
.tol-form select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--tol-border);
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  color: var(--tol-ink);
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tol-form textarea {
  min-height: 150px;
  resize: vertical;
}

.tol-form input:focus,
.tol-form textarea:focus,
.tol-form select:focus {
  outline: none;
  border-color: rgba(195, 32, 38, 0.45);
  box-shadow: 0 0 0 4px rgba(195, 32, 38, 0.10);
}

.tol-form input[type="submit"] {
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid rgba(195, 32, 38, 0.42);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--tol-red) 0%, var(--tol-red-dark) 100%);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(195, 32, 38, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tol-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(195, 32, 38, 0.28);
}

@media (max-width: 760px) {
  .tol-container {
    width: calc(100% - 36px);
  }

  .tol-btn,
  .entry-content a.tol-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tol-link-arrow,
  .entry-content a.tol-link-arrow,
  .tol-btn,
  .entry-content a.tol-btn,
  .tol-solution-card,
  .tol-solution-link,
  .entry-content a.tol-solution-link,
  .tol-form input[type="submit"] {
    transition: none;
  }
}
