/* EduSphere — split hero, cyan blobs, pastel modules, phone mockup, SaaS footer */
.ft-theme-edusphere {
  --es-blue: #2563eb;
  --es-teal: #0d9488;
  --es-green: #059669;
  --es-cyan: #38bdf8;
  --es-text: #0f172a;
  --es-muted: #64748b;
  --es-bg: #f8fafc;
  --es-pastel-blue: #eff6ff;
  --es-pastel-teal: #ecfdf5;
  --es-pastel-green: #f0fdf4;
  --ft-primary: var(--es-blue);
  --ft-secondary: var(--es-teal);
  --ft-accent: var(--es-cyan);
  --ft-text: var(--es-text);
  --ft-bg: var(--es-bg);
  --ft-footer-bg: #0f172a;
  font-family: 'Inter', sans-serif;
  background: var(--es-bg);
  color: var(--es-text);
}

/* SaaS header — two-row layout */
.es-header { background: #fff; border-bottom: 1px solid rgba(37,99,235,.1); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 24px rgba(37,99,235,.06); }
.es-header-shell { position: relative; }
.es-header-brand { min-height: 74px; }
.es-header-brand .es-logo { display: flex; align-items: center; gap: .65rem; text-decoration: none !important; color: var(--es-text) !important; font-weight: 800; font-size: 1rem; margin-right: auto; }
.es-header-brand .es-logo img { height: 50px; width: auto; max-width: 140px; object-fit: contain; border-radius: 8px; }
.es-header-brand .es-logo-icon { display: none; }
.es-phone-chip { margin-left: auto; margin-right: .5rem; background: #eff6ff; color: var(--es-blue) !important; border: 1px solid rgba(37,99,235,.12); }
.es-header-nav-row { border-top-color: rgba(37,99,235,.08); }
.es-header-nav-row .es-nav { margin: 0; }
.es-header-nav-row .es-nav ul { justify-content: center; gap: .65rem 1.1rem; }
.es-header-nav-row .es-nav a { font-size: .82rem; white-space: nowrap; padding: .35rem .15rem; }
.es-header-nav-row .es-nav li.is-active > a { color: var(--es-blue); font-weight: 600; border-top: 2px solid var(--es-blue); margin-top: -2px; padding-top: calc(.35rem + 2px); }
.es-header-actions { display: flex; gap: .55rem; align-items: center; flex-shrink: 0; }
.es-nav { margin-left: auto; margin-right: 1rem; }
.es-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; align-items: center; }
.es-nav a { text-decoration: none !important; color: var(--es-muted); font-weight: 500; font-size: .88rem; transition: color .2s; }
.es-nav li.is-active > a, .es-nav a:hover { color: var(--es-blue); }
.es-nav .ft-dropdown { position: relative; }
.es-nav .ft-dropdown ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 180px; box-shadow: 0 12px 30px rgba(0,0,0,.08); border-radius: 14px; padding: .5rem 0; flex-direction: column; gap: 0; }
.es-nav .ft-dropdown.ft-open ul { display: flex; }
.es-header-actions { display: flex; gap: .65rem; align-items: center; }
.es-btn-ghost { padding: .55rem 1rem; color: var(--es-text) !important; font-weight: 600; font-size: .85rem; text-decoration: none !important; border-radius: 10px; transition: background .2s; }
.es-btn-ghost:hover { background: rgba(37,99,235,.06); }
.es-btn-primary, .es-btn-gradient {
  display: inline-flex; align-items: center; padding: .65rem 1.25rem; border-radius: 999px; font-weight: 700; font-size: .85rem;
  text-decoration: none !important; transition: transform .25s, box-shadow .25s;
}
.es-btn-primary { background: var(--es-blue); color: #fff !important; }
.es-btn-gradient { background: linear-gradient(90deg, var(--es-blue), var(--es-teal)); color: #fff !important; box-shadow: 0 8px 24px rgba(37,99,235,.3); }
.es-btn-gradient:hover, .es-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,99,235,.35); }
.es-btn-link, .es-btn-link-light { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .88rem; color: var(--es-blue) !important; text-decoration: none !important; transition: gap .2s; }
.es-btn-link:hover { gap: .65rem; }
.es-btn-link-light { color: rgba(255,255,255,.9) !important; }
.es-nav-toggle { display: none; background: none; border: 0; font-size: 1.3rem; color: var(--es-blue); margin-left: auto; }

/* Cyan blob backgrounds */
.es-blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0; }
.es-blob-1 { width: 400px; height: 400px; background: rgba(56,189,248,.25); top: -100px; right: 10%; }
.es-blob-2 { width: 300px; height: 300px; background: rgba(13,148,136,.15); bottom: 0; left: 5%; }
.es-blob-3 { width: 280px; height: 280px; background: rgba(56,189,248,.2); top: 50%; left: 50%; transform: translate(-50%, -50%); }
.es-blob-4 { width: 350px; height: 350px; background: rgba(37,99,235,.1); top: 20%; right: -5%; }

/* Split hero */
.es-hero-wrap { position: relative; padding: 0; margin: 0; overflow: hidden; }
.es-hero { position: relative; padding: 4rem 0 3rem; overflow: hidden; }
.es-hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.es-hero-text h1 { margin: 0 0 1.25rem; font-size: clamp(1.85rem, 3.5vw, 2.65rem); font-weight: 800; line-height: 1.15; color: var(--es-text); }
.es-hero-text p { margin: 0 0 1rem; color: var(--es-muted); font-size: 1.05rem; line-height: 1.7; }
.es-hero-desc { font-size: .92rem !important; }
.es-hero-ctas { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }
.es-hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.es-hero-circle {
  width: min(380px, 90vw); height: min(380px, 90vw); border-radius: 50%; overflow: hidden;
  border: 6px solid #fff; box-shadow: 0 24px 60px rgba(37,99,235,.18); position: relative; z-index: 2;
}
.es-hero-circle img { width: 100%; height: 100%; object-fit: cover; }

/* Pastel module cards */
.es-modules { padding: 2rem 0 3.5rem; }
.es-section-title { text-align: center; font-size: 1.45rem; font-weight: 800; margin: 0 0 2rem; }
.es-modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.es-module-card {
  border-radius: 20px; overflow: hidden; padding-bottom: 1.25rem;
  transition: transform .35s, box-shadow .35s;
}
.es-module-blue { background: var(--es-pastel-blue); }
.es-module-teal { background: var(--es-pastel-teal); }
.es-module-green { background: var(--es-pastel-green); }
.es-module-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(37,99,235,.12); }
.es-module-header { display: flex; align-items: center; gap: .65rem; padding: 1.15rem 1.25rem .75rem; }
.es-module-blue .es-module-header i { color: var(--es-blue); }
.es-module-teal .es-module-header i { color: var(--es-teal); }
.es-module-green .es-module-header i { color: var(--es-green); }
.es-module-header i { font-size: 1.25rem; }
.es-module-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.es-module-thumb { height: 120px; margin: 0 1.25rem .85rem; border-radius: 12px; background-size: cover; background-position: center; opacity: .85; }
.es-module-card p { margin: 0; padding: 0 1.25rem; font-size: .85rem; color: var(--es-muted); line-height: 1.6; }

/* Features / academic programs */
.es-features { position: relative; padding: 3rem 0 4rem; overflow: hidden; background: #fff; }
.es-programs { background: linear-gradient(180deg, #fff 0%, #f8fafc 100%); }
.es-programs-sub { text-align: center; max-width: 640px; margin: -.75rem auto 2rem; color: var(--es-muted); line-height: 1.65; }
.es-programs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.es-program-card {
  background: #fff; border-radius: 20px; padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(37,99,235,.08); box-shadow: 0 12px 36px rgba(15,23,42,.06);
  text-align: center; transition: transform .25s, box-shadow .25s;
}
.es-program-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(37,99,235,.12); }
.es-program-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--es-blue), var(--es-teal)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.es-module-teal .es-program-icon { background: linear-gradient(135deg, var(--es-teal), #14b8a6); }
.es-module-green .es-program-icon { background: linear-gradient(135deg, #22c55e, var(--es-teal)); }
.es-program-card h3 { margin: 0 0 .65rem; font-size: 1.05rem; font-weight: 700; color: var(--es-text); }
.es-program-card p { margin: 0; font-size: .88rem; color: var(--es-muted); line-height: 1.65; }

/* Legacy split layout (other pages) */
.es-features-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.es-features-text h2 { margin: 0 0 .75rem; font-size: 1.75rem; font-weight: 800; }
.es-features-sub { margin: 0 0 1.5rem; color: var(--es-muted); line-height: 1.65; }
.es-feature-list { list-style: none; padding: 0; margin: 0; }
.es-feature-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid rgba(37,99,235,.08); }
.es-feature-list li:last-child { border-bottom: 0; }
.es-feature-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--es-blue), var(--es-teal)); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.es-feature-list strong { display: block; font-size: .95rem; margin-bottom: .2rem; }
.es-feature-list span { font-size: .85rem; color: var(--es-muted); }

/* Phone mockup */
.es-phone-mockup { position: relative; display: flex; justify-content: center; }
.es-phone-frame {
  width: 240px; background: #1e293b; border-radius: 32px; padding: 12px 10px 16px;
  box-shadow: 0 32px 64px rgba(15,23,42,.25); position: relative; z-index: 2;
}
.es-phone-sm { width: 180px; border-radius: 28px; padding: 10px 8px 12px; }
.es-phone-notch { width: 80px; height: 6px; background: #334155; border-radius: 999px; margin: 0 auto 8px; }
.es-phone-screen { height: 420px; border-radius: 22px; background-size: cover; background-position: top center; background-color: #fff; }
.es-phone-sm .es-phone-screen { height: 300px; border-radius: 18px; }
.es-phone-shadow { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); width: 70%; height: 30px; background: radial-gradient(ellipse, rgba(37,99,235,.2), transparent 70%); }

/* CTA with phone */
.es-cta { padding: 4rem 0; background: linear-gradient(135deg, #1e40af, #0d9488); color: #fff; overflow: hidden; }
.es-cta-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.es-cta-content h2 { margin: 0 0 .65rem; font-size: 1.75rem; font-weight: 800; }
.es-cta-content p { margin: 0 0 1.5rem; opacity: .9; line-height: 1.65; }
.es-cta-actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.es-cta-phone { display: flex; justify-content: center; }

/* SaaS footer */
.es-footer { background: #0f172a; color: #94a3b8; padding: 3.5rem 0 1.5rem; margin-top: 0; }
.es-footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; }
.es-footer-brand h3 { color: #fff; margin: .5rem 0; font-size: 1.05rem; font-weight: 800; }
.es-footer-brand p { margin: 0; font-size: .88rem; }
.es-footer-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.es-footer h4 { color: #fff; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .85rem; }
.es-footer ul { list-style: none; padding: 0; margin: 0; }
.es-footer li { margin-bottom: .4rem; font-size: .85rem; }
.es-footer a { color: #94a3b8; text-decoration: none !important; transition: color .2s; }
.es-footer a:hover { color: var(--es-cyan); }
.es-footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 1px solid rgba(255,255,255,.08); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .82rem; }
.es-social ul { display: flex; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.es-social a { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); display: inline-flex; align-items: center; justify-content: center; color: var(--es-cyan) !important; transition: background .2s; }
.es-social a:hover { background: rgba(56,189,248,.15); }
.es-scroll-top { background: linear-gradient(90deg, var(--es-blue), var(--es-teal)) !important; }

.ft-theme-edusphere .ft-topbar { background: var(--es-blue); }

/* Page content */
.ft-theme-edusphere .ft-page-content { padding: 3rem 0; }
.ft-theme-edusphere .ft-rich a { color: var(--es-blue); }
.ft-main-edusphere { min-height: 40vh; }

/* 3D hover & blob animation */
.es-module-card.ft3d-visible:hover { transform: perspective(800px) translateY(-10px) rotateX(3deg); }
.es-hero-circle.ft3d-visible { transition: transform .4s; }
.es-hero-visual:hover .es-hero-circle { transform: scale(1.03); }
.es-blob-1 { animation: esBlobDrift 12s ease-in-out infinite; }
.es-blob-2 { animation: esBlobDrift 10s ease-in-out infinite reverse; }
@keyframes esBlobDrift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px, -15px); } }
.es-phone-frame.ft3d-visible { transition: transform .35s; }
.es-phone-mockup:hover .es-phone-frame { transform: rotateY(-8deg) rotateX(4deg); }
.es-feature-list li.ft3d-visible:hover { transform: translateX(6px); transition: transform .25s; }
.es-btn-gradient:active { transform: translateY(0); }
.es-footer a:focus-visible, .es-nav a:focus-visible { outline: 2px solid var(--es-cyan); outline-offset: 2px; }
.es-scroll-top:hover { transform: translateY(-3px); }

@media (max-width: 991px) {
  .es-nav-toggle { display: block; }
  .es-header-nav-row { display: none; }
  .es-header-nav-row.ft-nav-open { display: block; position: absolute; top: 74px; left: 0; right: 0; background: #fff; padding: 1rem; box-shadow: 0 12px 30px rgba(0,0,0,.08); z-index: 1001; border-top: 1px solid rgba(37,99,235,.08); }
  .es-header-nav-row.ft-nav-open .es-nav ul { flex-direction: column; align-items: flex-start; width: 100%; }
  .es-nav .ft-dropdown { position: static; width: 100%; }
  .es-nav .ft-dropdown ul { position: static; width: 100%; min-width: 0; box-shadow: none; background: transparent; padding-left: 1rem; }
  .es-header-actions { display: none; }
  .es-hero-split, .es-modules-grid, .es-programs-grid, .es-features-split, .es-cta-inner, .es-footer-top, .es-footer-columns { grid-template-columns: 1fr; }
  .es-hero-visual { order: -1; }
  .es-phone-mockup { margin-top: 2rem; }
  .es-cta-phone { display: none; }
  .es-footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 575px) {
  .es-hero-text h1 { font-size: 1.55rem; }
  .es-hero-circle { width: min(280px, 90vw); height: min(280px, 90vw); }
  .es-module-thumb { height: 100px; }
  .es-phone-frame { width: 200px; }
  .es-phone-screen { height: 360px; }
  .es-hero-ctas, .es-cta-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .es-btn-gradient, .es-btn-link-light, .es-cta-actions a { width: 100%; justify-content: center; text-align: center; }
  .es-blob-1, .es-blob-2, .es-blob-3, .es-blob-4 { opacity: .35; transform: scale(.65); }
  .es-programs { padding: 2rem 0 2.5rem; }
  .es-program-card { padding: 1.35rem 1.15rem; }
}

[dir="rtl"] .es-nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .es-feature-list li { flex-direction: row-reverse; text-align: right; }
@media (prefers-reduced-motion: reduce) {
  .es-blob-1, .es-blob-2 { animation: none; }
}

/* Inner pages & form styling */
.ft-theme-edusphere .ft-section { padding: 2.5rem 0; }
.ft-theme-edusphere input, .ft-theme-edusphere textarea, .ft-theme-edusphere select {
  border: 1px solid rgba(37,99,235,.15); border-radius: 12px; padding: .65rem 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.ft-theme-edusphere input:focus, .ft-theme-edusphere textarea:focus {
  border-color: var(--es-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none;
}
.es-module-card { transform-style: preserve-3d; }
.es-cta-inner { position: relative; }
.es-cta-inner::before {
  content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.06); filter: blur(40px); top: -50px; right: 10%; pointer-events: none;
}
