/* === UNISUR · Estilo claro, elegante y moderno === */

:root {
  --bg-page: #f1f5f9;
  --bg-soft: #eff3fb;
  --bg-card: #ffffff;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --accent: #2563eb;
  --accent-soft: #e0ebff;
  --accent-strong: #1d4ed8;
  --accent-stronger: #1e40af;
  --accent-muted: #93c5fd;
  --accent-green: #16a34a;
  --accent-green-soft: #bbf7d0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --shadow-soft: 0 18px 45px rgba(148, 163, 184, 0.3);
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.18);
  --radius-card: 24px;
  --radius-pill: 999px;
  --max-width: 1120px;
}

/* Reset básico */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #e5edff 0, #f9fafb 40%, #eff3fb 100%);
}

/* Layout base */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section.bg-soft {
  background: linear-gradient(180deg, #f1f5f9 0, #eff6ff 50%, #e5edff 100%);
}

.section-header {
  text-align: left;
  margin-bottom: 2.2rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 640px;
}

/* Barra de contacto superior (WhatsApp + email) */

.contact-strip {
  background: #16a34a;
  color: #ecfdf5;
  font-size: 0.85rem;
}

.contact-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.3rem 0.45rem;
}

.contact-strip a {
  color: #ecfdf5;
  font-weight: 600;
  text-decoration: none;
}

.contact-strip a:hover {
  text-decoration: underline;
}

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Hero */

.hero {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2.8rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.8rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
}

.hero-sub {
  margin-top: 0.8rem;
  max-width: 640px;
  color: var(--text-main);
}

/* Pastillas debajo del título */

.hero-pills {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.hero-pills span {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-muted);
}

.hero-pills span.pill-highlight {
  background: #1d4ed8;
  color: #eff6ff;
  border-color: #1d4ed8;
}

/* Pastilla que va arriba del slider (ya NO encima de la foto) */

.slider-pill {
  /* se comporta como un chip normal encima de la foto */
  position: relative;
  align-self: flex-start;
  margin-top: 0.6rem;
  margin-bottom: 0.9rem; /* distancia entre la pastilla y la imagen */
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}

/* Botones */

.hero-actions {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-strip {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-strip span {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.hero-note {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.6);
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-main);
  background: #f8fafc;
}

.btn-outline:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  background: #eef2ff;
}

/* Hero media & slider */

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.slider {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #000;
  height: 280px;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.slide.active {
  opacity: 1;
}

.slide-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  font-size: 0.8rem;
}

/* (opcional, si usas otra pastilla sobre foto) */
.hero-photo-pill {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.92);
  color: #ecfdf5;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.45);
}

/* Hero stats */

.hero-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat {
  flex: 1 1 0;
  min-width: 130px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.25);
}

.stat-number {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sección tipo WhatsApp */

.section-whatsapp {
  background: radial-gradient(circle at top, #dbeafe 0, #f8fafc 45%, #eef2ff 100%);
}

.whatsapp-box {
  max-width: 720px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.whatsapp-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 0.82rem;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.dot-green {
  background: #22c55e;
}

.whatsapp-body {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.whatsapp-body p {
  margin: 0.2rem 0;
}

.whatsapp-footer {
  padding: 0.7rem 1rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #f9fafb;
}

/* Tarjetas genéricas */

.card {
  border-radius: var(--radius-card);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 1.4rem 1.5rem;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.card p {
  margin-top: 0;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Universidades */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.uni-card {
  padding: 0;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.uni-card h3 {
  padding: 1rem 1.3rem 0.4rem;
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.uni-card p {
  padding: 0 1.3rem 1.2rem;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Programas & tarjetas destacadas */

.program-card .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.highlight-card ul {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.highlight-card ul li + li {
  margin-top: 0.25rem;
}

/* Financiamiento */

.finance-card h3 {
  margin-bottom: 0.4rem;
}

.note-box {
  margin-top: 1.6rem;
  padding: 1rem 1.3rem;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: #f9fafb;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Sedes */

.sede-card p {
  margin-bottom: 0;
}

/* Contacto */

.contact-section {
  background: radial-gradient(circle at top, #e0f2fe 0, #f9fafb 50%, #e5edff 100%);
}

.grid-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.contact-info ul {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-info ul li + li {
  margin-top: 0.3rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

label {
  font-size: 0.83rem;
  color: var(--text-soft);
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.6rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* Footer */

.footer {
  border-top: 1px solid rgba(203, 213, 225, 0.8);
  background: #0f172a;
  color: #e5e7eb;
  padding: 1.1rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 0.8rem;
}

.footer a {
  color: #cbd5f5;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 960px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .slider {
    height: 240px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-contact {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .slider {
    height: 220px;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-text h1 {
    font-size: 2.1rem;
  }
}
