/* style.css */

/* ===== Base + Theme Variables ===== */
:root {
  --primary: #ea2a33;
  --primary-dark: #c91e26;

  --bg: #fcf8f8;
  --surface: #ffffff;

  --text: #1b0e0e;
  --muted: #6b5859;

  --border: #f3e7e8;
  --border-dark: #3a2020;

  --shadow-soft: 0 4px 20px -2px rgba(27, 14, 14, 0.05);
  --shadow-hover: 0 10px 25px -5px rgba(234, 42, 51, 0.15);

  --radius: 1rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
}

html.dark {
  --bg: #211111;
  --surface: #2d1a1a;

  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);

  --border: #3a2020;
}

/* ===== Global ===== */
body {
  font-family: "Public Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.py-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-surface {
  background: var(--surface);
}

.border-bottom,
.border-top {
  border-color: var(--border) !important;
}

/* ===== Navbar ===== */
.nav-blur {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-toggler {
  border: none !important;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.navbar-toggler .material-symbols-outlined {
  font-size: 26px;
}

.brand-text {
  color: var(--text);
}

.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.icon-badge-sm {
  width: 32px;
  height: 32px;
}

.navlink {
  color: var(--text);
  font-weight: 600;
}
.navlink:hover {
  color: var(--primary);
}
.navlink.active {
  color: var(--primary) !important;
  position: relative;
}
.navlink.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 35%, transparent);
}

/* ===== Buttons ===== */
.btn-primary-custom {
  background: var(--primary);
  border: 0;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  box-shadow: var(--shadow-hover);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary-custom:hover {
  background: var(--primary-dark);
  transform: translateY(-1px) scale(1.01);
  color: #fff;
}

.btn-lg-custom {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
}

.btn-outline-custom {
  border: 2px solid color-mix(in srgb, var(--border) 75%, transparent);
  color: var(--text);
  font-weight: 800;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  background: transparent;
}
.btn-outline-custom:hover {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--text);
}

.btn-theme {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.btn-theme:hover {
  transform: scale(1.03);
}

.btn-contrast-pill {
  border-radius: 999px;
  font-weight: 900;
  padding: 0.85rem 1.2rem;
  background: var(--text);
  color: var(--bg);
  border: 0;
}
html.dark .btn-contrast-pill {
  background: #fff;
  color: #1b0e0e;
}
.btn-contrast-pill:hover {
  opacity: 0.92;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
}

.display-title {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin: 0;
}

.text-primary-brand {
  color: var(--primary);
}

.lead-muted {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.65;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.pill-primary {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.pill-muted {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--muted);
  font-weight: 700;
}

.text-muted-small {
  color: color-mix(in srgb, var(--muted) 90%, transparent);
  font-size: 0.95rem;
}

.avatar-stack {
  display: inline-flex;
  align-items: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid #fff;
  background-size: cover;
  background-position: center;
  margin-left: -10px;
}
.avatar:first-child {
  margin-left: 0;
}
html.dark .avatar {
  border-color: var(--bg);
}

/* Right media */
.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
}
@media (min-width: 992px) {
  .hero-media {
    aspect-ratio: 1 / 1;
  }
}

.blob {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.9;
  z-index: 0;
}
.blob-red {
  top: -40px;
  right: -40px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
}
.blob-blue {
  bottom: -40px;
  left: -40px;
  background: rgba(59, 130, 246, 0.18);
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 1rem;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
  z-index: 1;
}
.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.42), transparent);
}

.floating-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  max-width: 320px;
  padding: 14px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  z-index: 2;
}
@media (min-width: 992px) {
  .floating-badge {
    right: auto;
    width: 290px;
  }
}
.badge-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  color: rgb(34, 197, 94);
}
.text-muted-soft {
  color: var(--muted);
}

/* ===== Subjects ===== */
.section-eyebrow {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.subject-card {
  border-radius: 1rem;
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid transparent;
  transition: transform 0.15s ease, border 0.15s ease, background 0.15s ease;
}
.subject-card:hover {
  background: color-mix(in srgb, var(--primary) 5%, var(--bg));
  border-color: color-mix(in srgb, var(--primary) 20%, transparent);
  transform: translateY(-2px);
}

.subject-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  transition: transform 0.15s ease;
}
.subject-card:hover .subject-icon {
  transform: scale(1.06);
}
.subject-icon .material-symbols-outlined {
  font-size: 32px;
}

.bg-blue { background: rgba(59, 130, 246, 0.16); color: rgb(59, 130, 246); }
.bg-purple { background: rgba(168, 85, 247, 0.16); color: rgb(168, 85, 247); }
.bg-green { background: rgba(34, 197, 94, 0.16); color: rgb(34, 197, 94); }
.bg-orange { background: rgba(249, 115, 22, 0.16); color: rgb(249, 115, 22); }

/* ===== Sections titles ===== */
.section-title {
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
}
.section-subtitle {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ===== Service cards ===== */
.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.service-card .service-orb {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  transition: transform 0.2s ease;
}
.service-card:hover .service-orb {
  transform: scale(1.35);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-icon .material-symbols-outlined {
  font-size: 30px;
}
.service-icon.solid {
  background: var(--primary);
  color: #fff;
}
.service-card.featured {
  outline: 2px solid color-mix(in srgb, var(--primary) 10%, transparent);
}

.link-primary-soft {
  color: var(--primary);
}

/* ===== Steps ===== */
.eyebrow-red {
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.steps-wrap {
  position: relative;
}
.steps-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 999px;
}
.step-circle {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.4rem;
  margin: 0 auto 16px auto;
  background: var(--surface);
  color: var(--primary);
  border: 4px solid var(--primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.step-circle-solid {
  background: var(--primary);
  color: #fff;
  border-color: var(--surface);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* ===== Profile ===== */
.profile-card {
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}

.tag-uis {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: rgb(29, 78, 216);
  font-weight: 900;
  font-size: 0.75rem;
}

.profile-pic-wrap {
  width: 280px;
  height: 280px;
  position: relative;
}
.profile-pic-bg {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  transform: translate(12px, 12px);
}
.profile-pic {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.mini-feature {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Testimonials ===== */
.quote-card {
  position: relative;
  background: var(--bg);
  border-radius: 1rem;
  border-top-left-radius: 0;
  padding: 2rem;
}
.quote-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 44px;
  color: color-mix(in srgb, var(--primary) 18%, transparent);
  transform: rotate(180deg);
}
.mini-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background-size: cover;
  background-position: center;
}
.xsmall { font-size: 0.78rem; }

/* ===== CTA ===== */
.cta-bg {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% 75%, 0 95%);
  z-index: 0;
}
html.dark .cta-bg {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.cta-card {
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 22px 48px rgba(0,0,0,0.18);
}

.cta-left {
  background: var(--primary);
  color: #fff;
}

.form-control-pill,
.form-select.form-control-pill {
  border-radius: 999px !important;
  padding: 0.8rem 1rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  color: var(--text);
}

html.dark .form-control-pill,
html.dark .form-select.form-control-pill {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-color: color-mix(in srgb, var(--border) 90%, transparent);
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent);
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
}

/* Footer links */
.link-soft {
  color: var(--muted);
  text-decoration: none;
}
.link-soft:hover {
  color: var(--primary);
}

/* ===== Floating buttons ===== */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  z-index: 9999;
  transition: transform 0.15s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.03);
  color: #fff;
}
.whatsapp-float .material-symbols-outlined {
  font-size: 28px;
}

.backtotop {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  color: var(--text);
  backdrop-filter: blur(10px);
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(0,0,0,0.10);
  transition: transform 0.15s ease;
}
.backtotop:hover {
  transform: translateY(-2px) scale(1.02);
}

/* ===== Accessibility focus ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent);
}

/* ✅ Fix: Icono del toggle visible en modo noche */
.btn-theme {
  color: var(--text) !important; /* fuerza el color según el tema */
}

#theme-icon {
  color: inherit !important; /* el icono hereda el color del botón */
}

/* ✅ CONTACTO: arreglar textos e inputs en dark mode */
html.dark #contacto,
html.dark #contacto .cta-left {
  color: #f1f5f9; /* texto claro */
}

html.dark #contacto .form-label {
  color: #e5e7eb;
}

html.dark #contacto .form-control,
html.dark #contacto .form-select {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.18);
}

html.dark #contacto .form-control::placeholder {
  color: rgba(248, 250, 252, 0.6);
}

/* Para el texto dentro del select */
html.dark #contacto select,
html.dark #contacto option {
  color: #0f172a; /* algunas veces el dropdown del SO no cambia bien */
}

/* ✅ Texto de temas: centrado y justificado (sin <ul>) */
.subject-topics-wrap{
  display: flex;
  justify-content: center;
}

.subject-topics{
  max-width: 420px;
  margin: 0;
  line-height: 1.55;

  /* 🔥 esto le gana al text-center del card */
  text-align: justify !important;
  text-justify: inter-word;

  /* opcional, se ve más fino cuando hay saltos */
  hyphens: auto;
}

/* ✅ Temas en “chips” centrados y en varias líneas */
.subject-topics-chips{
  display: flex;
  flex-wrap: wrap;              /* ✅ se acomodan en varias líneas */
  justify-content: center;      /* ✅ centrado */
  gap: 8px;                     /* separación */
  max-width: 420px;             /* ✅ para que no se vea gigante */
  margin: 0 auto;               /* ✅ lo centra dentro de la card */
}

/* ✅ Estilo mini-tag */
.topic-chip{
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  line-height: 1.2;
}



/* ✅ Línea separadora entre temas y niveles */
.subject-divider{
  width: 70px;
  height: 1px;
  margin: 12px auto 14px auto;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  opacity: 0.8;
}

/* ✅ Cápsulas de NIVEL (Colegio / Universidad / ICFES) */
.subject-levels{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Base del chip */
.level-chip{
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
}

/* Nivel suave */
.level-chip-muted{
  background: color-mix(in srgb, var(--surface) 85%, var(--bg));
  color: var(--text);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
}

/* Nivel destacado (ICFES / Conversación) */
.level-chip-primary{
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}



