@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f7f7ff;
  --bg-soft: #eef0ff;
  --card: #ffffff;
  --accent: #4f46e5;
  --accent-soft: #6366f1;
  --accent-alt: #06b6d4;
  --text: #111827;
  --text-soft: #6b7280;
  --border-subtle: #e5e7eb;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: radial-gradient(circle at top left, #e0e7ff 0, #f7f7ff 28%, #ffffff 55%);
  color: var(--text);
}

/* ===== LAYOUT ===== */

.page-sub main {
  padding: 24px 5vw 60px;
}

/* ===== TOPBAR ===== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(247,247,255,0.96), rgba(247,247,255,0.85));
  border-bottom: 1px solid rgba(226,232,240,0.6);
  padding: 10px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #e0e7ff;
}

.topbar-title {
  display: flex;
  flex-direction: column;
}

.topbar-small {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.topbar-main {
  font-size: 0.95rem;
  font-weight: 600;
}

.topbar-nav {
  display: flex;
  gap: 18px;
}

.topbar-nav a {
  text-decoration: none;
  color: var(--text-soft);
}

.topbar-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

/* ===== SUB HERO ===== */

.sub-hero {
  margin-top: 26px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(59,130,246,0.06));
  border: 1px solid rgba(199,210,254,0.9);
}

.sub-hero h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.sub-hero-sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ===== ABOUT ===== */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 30px;
  margin-top: 26px;
}

.about-text,
.about-team {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-lg);
  padding: 20px 22px 22px;
  box-shadow: 0 16px 40px rgba(148,163,184,0.3);
  border: 1px solid rgba(226,232,240,0.9);
}

/* 🔥 CLAVE: la mesa ocupa TODO el ancho */
.about-layout .about-team {
  grid-column: 1 / -1;
}

/* ===== TEAM GRID (BASE) ===== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* ===== TEAM CARD ===== */

.team-card {
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: rgba(248,250,252,0.95);
  border: 1px solid rgba(226,232,240,0.9);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: white;
}

.team-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.team-role {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ===== MESA: 3 COLUMNAS ===== */

.team-grid.team-grid-mesa {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

/* Tablet */
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
  }

  .team-grid.team-grid-mesa {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

/* Móvil */
@media (max-width: 520px) {
  .team-grid.team-grid-mesa {
    grid-template-columns: 1fr;
  }
}

/* ===== COLORES POR GRADO ===== */

.team-card.psicologia .avatar-circle { background: #a246e5; }
.team-card.logopedia .avatar-circle  { background: #5e15b3; }
.team-card.master .avatar-circle     { background: #d69bf9; }

/* ===== FOOTER ===== */

.site-footer {
  text-align: center;
  padding: 18px 5vw 26px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.team-grid-mesa {
  margin-bottom: 18px;
}
