/* ─── Certia Public Pages — v3 Premium Design System ───────── */

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

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

/* ─── Design Tokens — Light ─────────────────────────────────── */

:root {
  --primary: #1e3a5f;
  --primary-dark: #152d4a;
  --primary-light: #2563eb;
  --accent: #0ea5e9;
  --green: #10b981;
  --green-dark: #059669;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --red: #ef4444;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-white: #ffffff;
  --surface: #ffffff;
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.08);
  --nav-bg: rgba(255,255,255,.88);
  --nav-border: rgba(226,232,240,.8);
  --hero-gradient: linear-gradient(160deg, #0b1f3a 0%, #152d50 40%, #1e4278 100%);
  --font-heading: 'Plus Jakarta Sans', 'DM Sans', -apple-system, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Design Tokens — Dark ──────────────────────────────────── */

[data-theme="dark"] {
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-muted: #334155;
  --bg-white: #1e293b;
  --surface: #1e293b;
  --nav-bg: rgba(15,23,42,.92);
  --nav-border: rgba(51,65,85,.8);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,.35);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.4);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.45);
  --hero-gradient: linear-gradient(160deg, #060e1a 0%, #0d1b30 40%, #132844 100%);
}

/* Dark mode overrides for specific components */
[data-theme="dark"] .pub-hero-split { background: #060e1a; }
[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 50%, #818cf8 100%);
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="dark"] .pub-verify-box { background: var(--bg-soft); }
[data-theme="dark"] .pub-cta-split-content { background: var(--hero-gradient); }

/* Dark mode — Nav links readable */
[data-theme="dark"] .pub-nav-links a:hover { color: #e2e8f0; }
[data-theme="dark"] .pub-nav-links a.active { color: var(--accent); }
[data-theme="dark"] .pub-nav-links a.active::after { background: var(--accent); }
[data-theme="dark"] .pub-dropdown a:hover { color: #e2e8f0; }

/* Dark mode — Logo white with fade-in */
.pub-nav-brand img,
.pub-footer-brand img {
  transition: filter 0.4s ease;
}
[data-theme="dark"] .pub-nav-brand img,
[data-theme="dark"] .pub-footer-brand img {
  filter: brightness(0) invert(1);
}

/* Dark mode — Institution icon visible */
[data-theme="dark"] .inst-logo-placeholder {
  background: rgba(255,255,255,.08) !important;
  color: var(--text-muted) !important;
}
[data-theme="dark"] .pub-card-icon,
[data-theme="dark"] .bento-card-icon {
  background: rgba(14,165,233,.12) !important;
  color: var(--accent) !important;
}
[data-theme="dark"] .pub-trust-icon {
  background: rgba(255,255,255,.06) !important;
}
[data-theme="dark"] .pub-trust-number { color: var(--accent); }

/* ─── Base ───────────────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

main { flex: 1; }

/* ─── Utilities ──────────────────────────────────────────────── */

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--primary); color: #fff; padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; z-index: 9999;
  text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-soft) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Navbar ─────────────────────────────────────────────────── */

.pub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.pub-nav.scrolled {
  box-shadow: var(--shadow-md);
}

.pub-nav-left { display: flex; align-items: center; gap: 0.5rem; }

.pub-nav-brand { display: flex; align-items: center; margin-right: 0.75rem; }
.pub-nav-brand img { height: 32px; width: auto; }

.pub-nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.pub-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  position: relative;
}
.pub-nav-links a svg { flex-shrink: 0; opacity: 0.55; transition: opacity 0.15s; }
.pub-nav-links a:hover { background: var(--bg-muted); color: var(--primary); }
.pub-nav-links a:hover svg { opacity: 1; }

/* Active page indicator */
.pub-nav-links a.active {
  color: var(--primary);
  background: var(--bg-muted);
  font-weight: 600;
}
.pub-nav-links a.active svg { opacity: 1; }
.pub-nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* Hamburger button */
.pub-menu-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pub-menu-btn:hover { background: var(--bg-soft); border-color: var(--text-light); }

/* Menu wrapper */
.pub-menu-wrap { display: none; }

/* Slide-in drawer panel */
.pub-dropdown {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(55vw, 280px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  padding: 1.25rem 0.75rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pub-dropdown.open { transform: translateX(0); }
.pub-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.pub-dropdown a svg { flex-shrink: 0; opacity: 0.5; width: 18px; height: 18px; }
.pub-dropdown a:hover,
.pub-dropdown a:active { background: var(--bg-muted); color: var(--primary); }
.pub-dropdown a:hover svg,
.pub-dropdown a:active svg { opacity: 1; }

/* Drawer backdrop */
.pub-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.pub-menu-backdrop.open { opacity: 1; pointer-events: auto; }

/* Drawer header */
.pub-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-light);
}
.pub-drawer-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}
.pub-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.pub-drawer-close:hover { background: var(--bg-muted); color: var(--text); }

.pub-nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dark mode toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-muted); color: var(--text); border-color: var(--text-light); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ─── Buttons ────────────────────────────────────────────────── */

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-heading);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pub-btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.pub-btn-outline:hover { background: var(--bg-soft); border-color: var(--text-light); }
.pub-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}
.pub-btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(30,58,95,.25); }

/* ─── Hero (full width) ──────────────────────────────────────── */

.pub-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 6rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
}
.pub-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  pointer-events: none;
}
.pub-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,40,71,.68) 0%, rgba(30,58,110,.5) 50%, rgba(37,99,235,.42) 100%);
  pointer-events: none;
}
.pub-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}
.pub-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.pub-hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,.85);
  max-width: 560px;
  margin: 0 auto 2.25rem;
}
.pub-hero-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.pub-hero-btn-primary {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.85rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.pub-hero-btn-primary:hover { box-shadow: 0 8px 30px rgba(0,0,0,.2); transform: translateY(-2px); }
.pub-hero-btn-outline {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 0.85rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.2s, border-color 0.2s;
}
.pub-hero-btn-outline:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.6); }

/* ─── Split Hero ─────────────────────────────────────────────── */

.pub-hero-split {
  display: flex;
  min-height: 560px;
  overflow: hidden;
  background: #0b1f3a;
}
.pub-hero-split-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 4rem;
  background: var(--hero-gradient);
  color: #fff;
  position: relative;
  z-index: 1;
}
.pub-hero-split-inner {
  max-width: 540px;
}
.pub-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pub-hero-split h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.pub-hero-split p {
  font-size: 1.0625rem;
  color: rgba(255,255,255,.78);
  line-height: 1.6;
  max-width: 460px;
  margin-bottom: 2rem;
}
.pub-hero-split-img {
  flex: 0 0 48%;
  position: relative;
  overflow: hidden;
}
.pub-hero-split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pub-hero-split-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,31,58,.45) 0%, transparent 18%);
  pointer-events: none;
}

/* Floating decorative badges */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  z-index: 3;
  animation: float-badge 3s ease-in-out infinite;
}
.floating-badge:nth-child(2) { animation-delay: 1s; }
.floating-badge:nth-child(3) { animation-delay: 2s; }
@keyframes float-badge {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* ─── CTA Split ──────────────────────────────────────────────── */

.pub-cta-split {
  display: flex;
  overflow: hidden;
  min-height: 380px;
}
.pub-cta-split-img {
  flex: 0 0 45%;
  overflow: hidden;
  position: relative;
}
.pub-cta-split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 6s cubic-bezier(.25,.46,.45,.94);
}
.pub-cta-split:hover .pub-cta-split-img img {
  transform: scale(1.04);
}
.pub-cta-split-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 4rem;
  background: var(--hero-gradient);
  color: #fff;
}
.pub-cta-split-content h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 800;
  margin-bottom: 0.875rem;
  line-height: 1.2;
}
.pub-cta-split-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 420px;
}

/* ─── Sections ───────────────────────────────────────────────── */

.pub-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.pub-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.pub-section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
}

.pub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.pub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.pub-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.pub-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary);
}
.pub-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }
.pub-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }

/* ─── Trust Indicators ───────────────────────────────────────── */

.pub-trust {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 2rem;
  transition: background 0.3s, border-color 0.3s;
}
.pub-trust-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}
.pub-trust-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  transition: transform 0.3s;
}
.pub-trust-item:hover .pub-trust-icon { transform: scale(1.1); }
.pub-trust-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  font-family: var(--font-heading);
}
.pub-trust-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ─── Featured Courses ───────────────────────────────────────── */

.pub-featured-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pub-featured-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}
.pub-featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
}
.pub-featured-link:hover { gap: 0.55rem; color: var(--primary); }
.pub-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ─── CTA Section (full width) ───────────────────────────────── */

.pub-cta-section {
  position: relative;
  background: var(--primary);
  color: #fff;
  overflow: hidden;
}
.pub-cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.pub-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,40,71,.7), rgba(30,58,110,.6));
}
.pub-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 5rem 2rem;
}
.pub-cta-inner h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.pub-cta-inner p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
}
.pub-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.9rem 2.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.pub-cta-btn:hover { box-shadow: 0 8px 30px rgba(0,0,0,.2); transform: translateY(-2px); }

/* ─── Verify Box ─────────────────────────────────────────────── */

.pub-verify-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.pub-verify-box h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.pub-verify-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.pub-verify-input-row { display: flex; gap: 0.5rem; }
.pub-verify-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  background: var(--bg);
  color: var(--text);
}
.pub-verify-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
#verify-result { margin-top: 1rem; font-size: 0.875rem; }
.verify-ok { color: var(--green); }
.verify-err { color: var(--red); }

/* ─── Divider ────────────────────────────────────────────────── */

.pub-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ─── Footer ─────────────────────────────────────────────────── */

.pub-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 0;
}
.pub-footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.pub-footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #64748b;
  margin-top: 1rem;
  max-width: 280px;
}
.pub-footer-brand img { height: 28px; filter: brightness(0) invert(1); opacity: 0.9; }
.pub-footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.pub-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pub-footer-social a:hover { background: #1e293b; border-color: #475569; color: #e2e8f0; }
.pub-footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.pub-footer-col a {
  display: block;
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.pub-footer-col a:hover { color: #fff; }
.pub-footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}
.pub-footer-bottom a { color: #94a3b8; text-decoration: none; transition: color 0.15s; }
.pub-footer-bottom a:hover { color: #fff; }
/* Compat: keep old .pub-footer text/a styles */
.pub-footer > p { padding: 2rem; text-align: center; font-size: 0.825rem; }
.pub-footer a { color: #cbd5e1; text-decoration: none; transition: color 0.15s; }
.pub-footer a:hover { color: #fff; }

/* ─── Logo Marquee ───────────────────────────────────────────── */

.pub-marquee {
  overflow: hidden;
  padding: 2rem 0;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.pub-marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}
.pub-marquee-track img {
  height: 40px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity 0.3s, filter 0.3s;
}
.pub-marquee-track img:hover { opacity: 1; filter: grayscale(0%); }
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Bento Grid ─────────────────────────────────────────────── */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.bento-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--surface);
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.bento-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.bento-card.featured {
  grid-column: span 2;
  grid-row: span 2;
  padding: 2.5rem;
}
.bento-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.bento-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.bento-card.featured h3 { font-size: 1.375rem; }
.bento-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Timeline Stepper ───────────────────────────────────────── */

.timeline {
  display: flex;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
/* Single connecting line behind all circles */
.timeline::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 3px;
  background: var(--border);
  z-index: 0;
}
.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 1rem;
}
.timeline-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-heading);
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(30,58,95,.25);
}
.timeline-step:nth-child(2) .timeline-number { background: var(--accent); box-shadow: 0 4px 12px rgba(14,165,233,.25); }
.timeline-step:nth-child(3) .timeline-number { background: var(--green); box-shadow: 0 4px 12px rgba(16,185,129,.25); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-step h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.timeline-step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Banner Carousel ────────────────────────────────────────── */

.pub-carousel {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  user-select: none;
}
.pub-carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(.4,0,.2,1);
}
.pub-carousel-slide {
  min-width: 100%;
  position: relative;
  display: block;
}
.pub-carousel-slide > a { display: block; }
.pub-carousel-slide img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}
.pub-carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.60) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2.5rem 2rem 4rem;
  text-align: center;
  pointer-events: none;
  color: #fff;
}
.pub-carousel-overlay h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.pub-carousel-overlay p {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  opacity: 0.9;
  max-width: 580px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.pub-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.pub-carousel-btn:hover { background: rgba(255,255,255,.3); }
.pub-carousel-btn.prev { left: 1.25rem; }
.pub-carousel-btn.next { right: 1.25rem; }
.pub-carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 10;
}
.pub-carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.pub-carousel-dot.active {
  background: #fff;
  transform: scale(1.35);
}

/* ─── Featured Course Card (shared) ──────────────────────────── */

.fc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.fc-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.fc-card-img-wrap {
  height: 190px;
  overflow: hidden;
  background: var(--bg-muted);
  flex-shrink: 0;
  position: relative;
}
.fc-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.fc-card:hover .fc-card-img { transform: scale(1.06); }
.fc-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  background: linear-gradient(135deg, var(--bg-muted), var(--border));
}
.fc-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.7rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.fc-card-badge-inscripciones {
  background: var(--accent);
  color: #fff;
  animation: pulse-badge 2s infinite;
}
.fc-card-badge-activo { background: var(--green); color: #fff; }
.fc-card-badge-finalizado { background: var(--text-light); color: #fff; }
.fc-card-badge-proximamente { background: #f59e0b; color: #fff; }
.fc-card-badge-nuevo { background: var(--primary-light); color: #fff; }

@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:0.75} }

.fc-card-body {
  padding: 1.125rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}
.fc-card-inst {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-card-name {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-card-meta {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.fc-card-meta span { display: flex; align-items: center; gap: 0.25rem; }
.fc-card-cta {
  display: inline-flex; align-items: center; gap: 0.4rem; justify-content: center;
  margin-top: 0.75rem; padding: 0.5rem 1rem; border-radius: 8px;
  background: #25D366; color: #fff; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.fc-card-cta:hover { background: #1fb855; transform: translateY(-1px); }

.fc-card-price {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  color: #1e40af;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ─── Institution Detail ─────────────────────────────────────── */

.inst-detail-header {
  background: var(--hero-gradient);
  color: #fff;
  padding: 3rem 2rem 4rem;
  position: relative;
}
.inst-detail-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.inst-detail-logo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  border: 3px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.inst-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.inst-detail-info h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.inst-detail-info p {
  font-size: 1rem;
  color: rgba(255,255,255,.75);
  max-width: 600px;
}
.inst-detail-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}
.inst-detail-stat {
  text-align: center;
}
.inst-detail-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
}
.inst-detail-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
  .pub-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-trust-inner { gap: 1rem; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.featured { grid-column: span 2; grid-row: span 1; }
  .pub-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .timeline { flex-direction: column; gap: 1.5rem; }
  .timeline::before { display: none; }
  .timeline-step { text-align: left; display: flex; gap: 1rem; align-items: flex-start; padding: 0; }
  .timeline-number { margin: 0; width: 44px; height: 44px; font-size: 1rem; flex-shrink: 0; }
  .inst-detail-header-inner { flex-direction: column; text-align: center; }
  .inst-detail-stats { justify-content: center; }
}

@media (max-width: 768px) {
  .pub-nav-links { display: none; }
  .pub-menu-wrap { display: block; }
  .pub-menu-btn { display: flex; }
  .pub-nav-brand img { height: 28px; }
  .pub-hero-split {
    flex-direction: column-reverse;
    min-height: auto;
  }
  .pub-hero-split-content { padding: 2.5rem 1.5rem; }
  .pub-hero-split-img { flex: 0 0 auto; height: 300px; }
  .pub-hero-split-img::after { background: linear-gradient(to top, rgba(11,31,58,.65) 0%, transparent 30%); }
  .pub-cta-split { flex-direction: column; }
  .pub-cta-split-img { flex: 0 0 auto; height: 280px; }
  .pub-cta-split-content { padding: 2.5rem 1.5rem; }
  .floating-badge { display: none; }
  .inst-detail-logo { width: 72px; height: 72px; }
}

@media (max-width: 600px) {
  .pub-nav { padding: 0 1rem; }
  .pub-nav-right .pub-btn-outline,
  .pub-nav-right .pub-btn-primary { display: none; }
  .pub-hero { padding: 3.5rem 1.25rem 3rem; }
  .pub-section { padding: 3rem 1.25rem; }
  .pub-verify-input-row { flex-direction: column; }
  .pub-carousel-slide img { height: 280px; }
  .pub-carousel-btn { width: 36px; height: 36px; font-size: 1.1rem; }
  .pub-carousel-overlay { padding: 1.5rem 1rem 3rem; }
  .pub-featured-grid { grid-template-columns: 1fr; }
  .pub-trust-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .pub-trust-number { font-size: 2rem; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.featured { grid-column: span 1; }
  .pub-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .inst-detail-stats { flex-direction: column; gap: 0.75rem; }
  .theme-toggle { width: 32px; height: 32px; }
}
