/* Historia y Tradición — mismo lenguaje gráfico que Fundamentos (theme claro) */

.historia-page {
  --fund-bg: #f5f7f9;
  --fund-bg-elevated: #ffffff;
  --fund-bg-card: #ffffff;
  --fund-border: rgba(13, 59, 102, 0.12);
  --fund-accent: rgb(72, 148, 179);
  --fund-accent-soft: rgba(72, 148, 179, 0.12);
  --fund-text: #1e2430;
  --fund-muted: #5c6570;
  --fund-radius: 14px;

  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background:
    radial-gradient(120% 80% at 10% -10%, rgba(72, 148, 179, 0.12), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, rgba(13, 59, 102, 0.06), transparent 50%),
    var(--fund-bg);
  color: var(--fund-text);
  padding: 1.25rem 0 3.5rem;
  min-height: 70vh;
}

.historia-page * {
  box-sizing: border-box;
}

.historia-inner {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
}

.historia-hero {
  margin-bottom: 1.5rem;
  padding: 0.5rem 0 0.25rem;
}

.historia-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fund-accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.historia-hero h1 {
  font-size: clamp(1.85rem, 6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
  color: #0d3b66;
}

.historia-blocks {
  display: grid;
  gap: 1rem;
}

.historia-card {
  position: relative;
  display: grid;
  gap: 1.15rem;
  padding: 1.2rem 1.15rem 1.25rem;
  border-radius: var(--fund-radius);
  background: var(--fund-bg-card);
  border: 1px solid var(--fund-border);
  box-shadow: 0 6px 18px rgba(13, 59, 102, 0.06);
  overflow: hidden;
}

.historia-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--fund-accent), transparent 85%);
}

.historia-card h2 {
  font-size: clamp(1.2rem, 3.8vw, 1.45rem);
  font-weight: 700;
  margin: 0 0 0.85rem;
  line-height: 1.3;
  color: #0d3b66;
}

.historia-card p {
  margin: 0 0 0.85rem;
  color: var(--fund-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: justify;
}

.historia-card p:last-child {
  margin-bottom: 0;
}

.historia-card .fst-italic {
  color: var(--fund-text);
}

.historia-figure {
  margin: 0;
  text-align: center;
}

.historia-figure img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(13, 59, 102, 0.1);
  background: var(--fund-bg);
}

.historia-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--fund-muted);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .historia-page {
    padding: 2rem 0 4.5rem;
  }

  .historia-inner {
    width: min(1100px, calc(100% - 2.5rem));
  }

  .historia-blocks {
    gap: 1.25rem;
  }

  .historia-card {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 1.35rem 1.45rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .historia-card:nth-child(even) {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .historia-card:nth-child(even) .historia-body {
    order: 2;
  }

  .historia-card:nth-child(even) .historia-figure {
    order: 1;
  }

  .historia-card:hover {
    border-color: rgba(72, 148, 179, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 59, 102, 0.1);
  }

  .historia-figure img {
    max-height: 360px;
  }
}

@media (min-width: 992px) {
  .historia-card {
    gap: 1.75rem;
    padding: 1.6rem 1.6rem 1.7rem;
  }
}
