// 03 — Sobre la Cátedra (con mapa interactivo integrado)
function CAbout() {
  const [, t] = window.useLang();
  const Map = window.CMap;
  return (
    <section className="cgclm-about">
      <style>{`
        .cgclm-about {
          padding: 80px 40px;
          background: var(--c-cream);
        }
        .cgclm-about .ca-grid {
          display: grid;
          grid-template-columns: 1fr 1.2fr;
          gap: 64px;
          align-items: start;
        }
        .cgclm-about .ca-kicker {
          font: 500 11px var(--font-body);
          letter-spacing: 0.18em;
          text-transform: uppercase;
          color: var(--c-green-deep);
          margin-bottom: 16px;
        }
        .cgclm-about .ca-title {
          font-family: var(--font-display);
          font-weight: 600;
          font-size: clamp(28px, 3.4vw, 44px);
          line-height: 1.1;
          letter-spacing: -0.02em;
          margin: 0 0 8px;
          color: var(--c-ink);
          max-width: 14ch;
          text-wrap: balance;
        }
        .cgclm-about .ca-rule {
          width: 56px; height: 2px; background: var(--c-red);
          margin: 24px 0;
        }
        .cgclm-about .ca-body p {
          font-family: var(--font-body);
          font-size: 16px;
          line-height: 1.7;
          color: var(--c-ink);
          margin: 0 0 18px;
          text-wrap: pretty;
        }
        .cgclm-about .ca-stats-wrap {
          margin-top: 32px;
          display: grid;
          grid-template-columns: auto 1fr;
          align-items: stretch;
          gap: 0;
          border: 1px solid var(--c-line);
          border-radius: 14px;
          overflow: hidden;
          background: var(--c-cream-deep);
        }
        .cgclm-about .ca-uclm-icon {
          background: var(--c-cream);
          padding: 22px 26px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-right: 1px solid var(--c-line);
          min-width: 130px;
        }
        .cgclm-about .ca-uclm-icon img {
          height: 86px;
          width: auto;
          display: block;
        }
        .cgclm-about .ca-stats {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 1px;
          background: var(--c-line);
        }
        .cgclm-about .ca-stat {
          background: var(--c-cream);
          padding: 24px 22px;
          transition: background .3s;
        }
        .cgclm-about .ca-stat:hover { background: var(--c-cream-deep); }
        .cgclm-about .ca-stat-n {
          font-family: var(--font-display);
          font-weight: 600;
          font-size: 44px;
          line-height: 1;
          color: var(--c-red);
          letter-spacing: -0.03em;
        }
        .cgclm-about .ca-stat-l {
          font: 500 13px var(--font-body);
          color: var(--c-ink-soft);
          margin-top: 6px;
          letter-spacing: 0.01em;
        }
        .cgclm-about .ca-uclm {
          margin-top: 24px;
          padding: 18px 22px;
          background: var(--c-cream);
          border: 1px solid var(--c-line);
          border-radius: 12px;
          display: flex; align-items: center; gap: 16px;
        }
        .cgclm-about .ca-uclm img {
          height: 44px;
          width: auto;
          display: block;
        }
        .cgclm-about .ca-uclm-meta {
          font: 500 11px var(--font-body);
          letter-spacing: 0.14em;
          text-transform: uppercase;
          color: var(--c-ink-soft);
          line-height: 1.4;
          padding-left: 16px;
          border-left: 1px solid var(--c-line);
        }
        .cgclm-about .ca-uclm-meta b {
          display: block;
          font-family: var(--font-display);
          font-weight: 600;
          font-size: 14px;
          letter-spacing: -0.01em;
          color: var(--c-ink);
          text-transform: none;
          margin-top: 2px;
        }
        @media (max-width: 880px) {
          .cgclm-about { padding: 56px 22px; }
          .cgclm-about .ca-grid { grid-template-columns: 1fr; gap: 32px; }
          .cgclm-about .ca-stats-wrap { grid-template-columns: 1fr; }
          .cgclm-about .ca-uclm-icon { border-right: none; border-bottom: 1px solid var(--c-line); padding: 18px; }
          .cgclm-about .ca-uclm-icon img { height: 56px; }
        }
      `}</style>

      <div className="ca-grid">
        <div>
          <div className="ca-kicker">{t.about.kicker}</div>
          <h2 className="ca-title">{t.about.title}</h2>
          <div className="ca-rule"></div>
          <div className="ca-stats-wrap">
            <div className="ca-uclm-icon" aria-label="Universidad de Castilla-La Mancha">
              <img src="assets/icono-uclm.png" alt="UCLM" />
            </div>
            <div className="ca-stats">
              {t.about.stats.map((s, i) => (
                <div key={i} className="ca-stat">
                  <div className="ca-stat-n">{s.n}</div>
                  <div className="ca-stat-l">{s.l}</div>
                </div>
              ))}
            </div>
          </div>
        </div>
        <div className="ca-body">
          <p>{t.about.p1}</p>
          <p>{t.about.p2}</p>
        </div>
      </div>

      <div className="ca-map-slot">
        {Map ? <Map /> : null}
      </div>

      <style>{`
        .cgclm-about .ca-map-slot { margin-top: 24px; }
        /* Map dentro de About: sin doble padding superior */
        .cgclm-about .ca-map-slot .cgclm-map { padding-top: 24px; padding-bottom: 0; background: transparent; }
      `}</style>
    </section>
  );
}

window.CAbout = CAbout;
