/* Englivision platform pages: home, auth, header, footer, themes */

/* Toast notices (welcome / auth) — was relying on physics/salma CSS */
.phy-toast,
.ev-toast {
  --toast-accent: var(--ev-teal, #0f9d8a);
  --toast-duration: 6000ms;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 24px !important;
  z-index: 10050 !important;
  width: min(440px, calc(100vw - 28px)) !important;
  display: flex !important;
  gap: 12px !important;
  align-items: flex-start !important;
  padding: 16px 16px 18px !important;
  border-radius: 16px !important;
  background: #fff !important;
  border: 1px solid rgba(15,157,138,.22) !important;
  border-inline-start: 4px solid var(--toast-accent) !important;
  box-shadow: 0 18px 48px rgba(10, 37, 64, 0.18) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%) !important;
  animation: evToastIn .36s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden !important;
  color: #0a2540 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-theme="dark"] .phy-toast {
  background: #0f1f2e;
  border-color: rgba(45, 212, 191, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: #e8f1f7;
}
.phy-toast--top {
  bottom: auto;
  top: max(88px, calc(env(safe-area-inset-top, 0px) + 78px));
}
.phy-toast--success { --toast-accent: var(--ev-teal, #0f9d8a); }
.phy-toast--error { --toast-accent: #dc2626; }
.phy-toast__icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--toast-accent);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 8px 18px rgba(15, 157, 138, 0.28);
}
.phy-toast__body { min-width: 0; flex: 1; }
.phy-toast__title {
  display: block;
  font-weight: 900;
  font-size: 15px;
  color: var(--ev-navy, #0a2540);
}
html[data-theme="dark"] .phy-toast__title { color: #e8f1f7; }
.phy-toast__msg,
.phy-toast__list {
  margin: 6px 0 0;
  color: var(--ev-muted, #5b6b7c);
  font-size: 13.5px;
  line-height: 1.75;
  font-weight: 600;
}
html[data-theme="dark"] .phy-toast__msg,
html[data-theme="dark"] .phy-toast__list { color: #b7c9d8; }
.phy-toast__list { padding-inline-start: 18px; }
.phy-toast__close {
  width: 30px;
  height: 30px;
  margin-inline-start: auto;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  background: var(--ev-surface-soft, #f3f7fa);
  border: 1px solid var(--ev-line, rgba(10,37,64,.12));
  font-size: 18px;
  line-height: 1;
  color: var(--ev-muted, #5b6b7c);
  cursor: pointer;
}
.phy-toast__close:hover {
  color: var(--ev-navy, #0a2540);
  border-color: rgba(15,157,138,.35);
}
.phy-toast__progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
}
.phy-toast__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--toast-accent);
  transform-origin: right;
  animation: evToastBar var(--toast-duration) linear forwards;
}
.phy-toast.is-paused .phy-toast__progress span { animation-play-state: paused; }
.phy-toast.is-leaving {
  animation: evToastOut .28s ease both;
  pointer-events: none;
}
@keyframes evToastIn {
  from { opacity: 0; transform: translate(-50%, 18px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes evToastOut {
  to { opacity: 0; transform: translate(-50%, 12px) scale(.98); }
}
@keyframes evToastBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Header */
.ev-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--ev-header-bg);
  border-bottom: 1px solid var(--ev-line);
}
.ev-header__inner {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.ev-header__brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  min-width: 0;
}
.ev-header__brand img,
.ev-header__logo {
  width: auto;
  height: 58px;
  max-width: min(220px, 46vw);
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--ev-line);
  flex: 0 0 auto;
  display: block;
}
html[data-theme="dark"] .ev-header__logo {
  background: #fff;
  border-color: rgba(148,183,210,.2);
}
.ev-header__nav {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.ev-header__nav a:not(.ev-btn) {
  text-decoration: none; color: var(--ev-navy); font-weight: 800;
  padding: 10px 14px; border-radius: 999px;
}
.ev-header__nav a:not(.ev-btn):hover {
  background: rgba(15,157,138,.1); color: var(--ev-teal);
}
.ev-header__tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ev-header__theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--ev-surface-soft);
  border: 1px solid var(--ev-line);
}
.ev-header__themeLabel {
  font-size: .78rem;
  font-weight: 800;
  color: var(--ev-muted);
  white-space: nowrap;
}
html[data-theme="dark"] .ev-header__theme {
  background: rgba(19, 42, 64, 0.8);
  border-color: rgba(45, 212, 191, 0.28);
}
.ev-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ev-line);
  border-radius: 12px;
  background: var(--ev-surface-soft);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}
.ev-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--ev-navy);
  transition: transform .2s ease, opacity .2s ease;
}
html[data-theme="dark"] .ev-burger {
  background: rgba(19, 42, 64, 0.8);
  border-color: rgba(45, 212, 191, 0.28);
}
html[data-theme="dark"] .ev-burger span {
  background: var(--ev-teal);
}
.ev-drawer {
  display: none;
  border-top: 1px solid var(--ev-line);
  background: var(--ev-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ev-drawer.is-open { display: block; }
.ev-drawer__inner {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 16px;
  display: grid;
  gap: 8px;
}
.ev-drawer__link {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ev-navy);
  font-weight: 800;
  background: var(--ev-surface-soft);
  border: 1px solid var(--ev-line);
}
.ev-drawer__link:hover {
  color: var(--ev-teal);
  border-color: rgba(15,157,138,.35);
  background: rgba(15,157,138,.08);
}
.ev-drawer__cta {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

/* Hero — full-bleed designed banner */
.ev-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0a2540;
}
.ev-hero--banner {
  min-height: 0;
  display: block;
}
.ev-hero__media {
  width: 100%;
  line-height: 0;
  background: linear-gradient(180deg, #dceefc 0%, #f7fbff 100%);
}
.ev-hero__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(92vh, 920px);
  object-fit: cover;
  object-position: center top;
}
.ev-hero__ctaBar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 18px 16px 22px;
  background:
    linear-gradient(180deg, rgba(10,37,64,.92), rgba(10,37,64,.98));
  border-top: 1px solid rgba(255,255,255,.08);
}
.ev-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: min(1180px, 100%);
}
.ev-hero__bg,
.ev-hero__shade,
.ev-hero__content,
.ev-hero__chips { display: none !important; }
@media (max-width: 720px) {
  .ev-hero__img {
    max-height: none;
    object-fit: contain;
  }
  .ev-hero__ctaBar { padding: 14px 12px 18px; }
  .ev-hero__cta .ev-btn { flex: 1 1 140px; justify-content: center; }
}

/* Grades */
.ev-grades { padding: 72px 0 40px; }
.ev-grades__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.ev-grade {
  display: grid; gap: 0;
  text-decoration: none; color: inherit;
  background: var(--ev-surface); border: 1px solid var(--ev-line);
  border-radius: 24px; overflow: hidden;
  box-shadow: var(--ev-shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ev-grade:hover {
  transform: translateY(-6px);
  box-shadow: var(--ev-shadow);
  border-color: rgba(15,157,138,.35);
}
.ev-grade__media {
  aspect-ratio: 16 / 9;
  background: #0a2540;
  overflow: hidden;
}
.ev-grade__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0a2540;
}
.ev-grade__body {
  padding: 14px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ev-grade__body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ev-navy);
  line-height: 1.35;
}
.ev-grade__body span {
  color: var(--ev-teal);
  font-weight: 800;
  font-size: .9rem;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .ev-grades__grid { grid-template-columns: 1fr; }
  .ev-grade__media { aspect-ratio: 16 / 9; }
}

/* Teachers */
.ev-teachers { padding: 40px 0 80px; }
.ev-teachers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.ev-teacher {
  position: relative;
  background: var(--ev-surface);
  border: 1px solid var(--ev-line);
  border-radius: 28px;
  padding: 0 0 22px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--ev-shadow-soft);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.ev-teacher:hover {
  transform: translateY(-6px);
  border-color: rgba(15,157,138,.35);
  box-shadow: var(--ev-shadow);
}
.ev-teacher__cover {
  height: 92px;
  background:
    radial-gradient(420px 120px at 80% 0%, rgba(56,189,248,.35), transparent 55%),
    linear-gradient(135deg, #0a2540, #0f9d8a);
}
html[data-theme="dark"] .ev-teacher__cover {
  background:
    radial-gradient(420px 120px at 80% 0%, rgba(45,212,191,.25), transparent 55%),
    linear-gradient(135deg, #061018, #0b4f4a);
}
.ev-teacher__photo {
  width: 132px; height: 132px; margin: -66px auto 14px;
  border-radius: 50%; overflow: hidden;
  border: 5px solid #fff;
  background: linear-gradient(145deg, #0a2540, #14b8a6);
  box-shadow: 0 14px 34px rgba(10,37,64,.22);
  position: relative;
  z-index: 1;
}
html[data-theme="dark"] .ev-teacher__photo {
  border-color: #0f2235;
  box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
.ev-teacher__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.ev-teacher__photo span {
  display: grid; place-items: center; width: 100%; height: 100%;
  color: #fff; font-family: var(--ev-font-en); font-weight: 800; font-size: 2rem;
}
.ev-teacher__body { padding: 0 20px; }
.ev-teacher h3 {
  margin: 0 0 6px; font-size: 1.2rem; font-weight: 900; color: var(--ev-navy);
}
.ev-teacher__role {
  margin: 0 0 10px;
  color: var(--ev-teal);
  font-weight: 800;
  font-size: .88rem;
}
.ev-teacher__bio {
  margin: 0;
  color: var(--ev-muted);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.75;
  min-height: 3.2em;
}
.ev-teacher__grades {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 14px; padding: 0 16px;
  max-height: 78px; overflow: hidden;
}
.ev-teacher__grades span {
  padding: 6px 10px; border-radius: 999px;
  background: rgba(15,157,138,.1); color: var(--ev-teal);
  font-size: .78rem; font-weight: 800;
}
html[data-theme="dark"] .ev-teacher__grades span {
  background: rgba(45,212,191,.12);
}

/* CTA */
.ev-cta { padding: 0 0 80px; }
.ev-cta__box {
  border-radius: 32px;
  padding: 42px 28px;
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(56,189,248,.28), transparent 50%),
    linear-gradient(135deg, #071b2e 0%, #0a2540 42%, #0f6f66 100%);
  color: #fff !important;
  text-align: center;
  box-shadow: var(--ev-shadow);
}
html[data-theme="dark"] .ev-cta__box {
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(45,212,191,.2), transparent 50%),
    linear-gradient(135deg, #040d16 0%, #0a1f33 45%, #0b4f4a 100%);
}
body.englivision-platform .ev-cta__box h2,
body.ev-platform .ev-cta__box h2,
.ev-cta__box h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 0 8px 28px rgba(0,0,0,.35);
}
body.englivision-platform .ev-cta__box p,
body.ev-platform .ev-cta__box p,
.ev-cta__box p {
  margin: 0 0 22px;
  font-weight: 700;
  color: rgba(255,255,255,.94) !important;
  opacity: 1;
}
.ev-cta__box .ev-kicker {
  background: rgba(255,255,255,.16) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.28);
}
.ev-cta__box .ev-btn--primary {
  color: #fff !important;
  background: linear-gradient(135deg, #14b8a6, #0f9d8a);
  box-shadow: 0 14px 32px rgba(15,157,138,.45);
}

/* Auth */
.ev-auth {
  width: min(1100px, calc(100% - 24px));
  margin: 28px auto 60px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 640px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--ev-surface);
  border: 1px solid var(--ev-line);
  box-shadow: var(--ev-shadow);
}
.ev-auth__panel { padding: 42px 36px; display: grid; align-content: center; gap: 18px; }
.ev-auth__title {
  margin: 0; font-family: var(--ev-font-en); font-size: 2rem; font-weight: 800; color: var(--ev-navy);
}
.ev-auth__sub { margin: 0; color: var(--ev-muted); font-weight: 700; }
.ev-auth__form { display: grid; gap: 14px; }
.ev-auth__form .field { display: grid; gap: 6px; }
.ev-auth__form .label { font-weight: 800; color: var(--ev-navy) !important; }
.ev-auth__form .input,
.ev-auth__form select.input {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--ev-line-strong) !important;
  padding: 0 14px; font: inherit; font-weight: 700;
  background: #fff !important; color: var(--ev-ink) !important;
}
html[data-theme="dark"] .ev-auth__form .input,
html[data-theme="dark"] .ev-auth__form select.input {
  background: #0c1b2b !important;
  color: #e7eef5 !important;
  border-color: rgba(148,183,210,.28) !important;
}
.ev-auth__form .input::placeholder { color: var(--ev-muted) !important; opacity: 1; }
html[data-theme="dark"] .ev-auth__form .input::placeholder { color: #9db0c2 !important; }
.ev-auth__form .input:focus {
  outline: 2px solid rgba(15,157,138,.35);
  border-color: rgba(15,157,138,.45) !important;
}
.ev-auth__noticeTitle,
.ev-auth__noticeMsg,
.ev-auth__noticeList,
.ev-auth__notice strong,
.ev-auth__notice p,
.ev-auth__notice li {
  color: var(--ev-ink) !important;
}
html[data-theme="dark"] .ev-auth__noticeTitle,
html[data-theme="dark"] .ev-auth__noticeMsg,
html[data-theme="dark"] .ev-auth__noticeList,
html[data-theme="dark"] .ev-auth__notice strong,
html[data-theme="dark"] .ev-auth__notice p,
html[data-theme="dark"] .ev-auth__notice li {
  color: #e7eef5 !important;
}
.ev-auth__submit {
  min-height: 50px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--ev-teal), #0b7f71);
  color: #fff; font: inherit; font-weight: 900; cursor: pointer;
}
.ev-auth__meta {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}
.ev-auth__meta a, .ev-auth__meta button {
  background: none; border: 0; color: var(--ev-teal); font: inherit; font-weight: 800;
  cursor: pointer; text-decoration: none; padding: 0;
}
.ev-auth__wall { position: relative; min-height: 100%; background: #0a2540; }
.ev-auth__wallImg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-auth__notice {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.2);
  color: var(--ev-ink);
}
.ev-auth__notice--ok { background: rgba(15,157,138,.1); border-color: rgba(15,157,138,.25); }
.ev-auth__notice--info { background: rgba(56,189,248,.12); border-color: rgba(56,189,248,.28); }

/* ========== Professional Footer ========== */
.ev-end {
  position: relative;
  margin-top: 24px;
  background:
    radial-gradient(700px 260px at 0% 0%, rgba(20,184,166,.18), transparent 55%),
    radial-gradient(600px 240px at 100% 100%, rgba(56,189,248,.12), transparent 50%),
    var(--ev-footer-bg);
  color: #fff;
  overflow: hidden;
}
.ev-end::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #0f9d8a, #38bdf8, #0f9d8a);
}
.ev-end__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 28px;
  position: relative;
  z-index: 1;
}
.ev-end__top {
  display: grid;
  grid-template-columns: 1.15fr 1.85fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ev-end__brand {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.ev-end__mark {
  width: 140px;
  height: 140px;
  border-radius: 22px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}
.ev-end__line {
  margin: 0;
  color: var(--ev-footer-text);
  font-size: .95rem;
  line-height: 1.85;
  max-width: 34ch;
  font-weight: 600;
}
.ev-end__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.ev-end__label {
  margin: 0 0 14px;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ev-teal-2);
}
.ev-end__links,
.ev-end__phones {
  display: grid;
  gap: 10px;
}
.ev-end__links a,
.ev-end__phones a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  transition: color .2s ease, transform .2s ease;
}
.ev-end__links a:hover,
.ev-end__phones a:hover {
  color: #fff;
  transform: translateX(-3px);
}
.ev-end__phone {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: plaintext;
}
.ev-end__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ev-end__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: .88rem;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.ev-end__social:hover {
  transform: translateY(-2px);
  background: rgba(15,157,138,.22);
  border-color: rgba(45,212,191,.4);
}
.ev-end__social img {
  width: 26px; height: 26px; object-fit: contain; border-radius: 8px; background: #fff;
}
.ev-end__socialSvg {
  width: 18px; height: 18px; display: grid; place-items: center;
}
.ev-end__socialSvg svg { width: 18px; height: 18px; display: block; }
.ev-end__empty {
  margin: 0;
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.7;
}
.ev-end__legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 22px;
  color: rgba(255,255,255,.55);
  font-size: .86rem;
  font-weight: 600;
}
.ev-end__legal strong { color: rgba(255,255,255,.82); font-weight: 800; }

@media (max-width: 900px) {
  .ev-auth { grid-template-columns: 1fr; }
  .ev-auth__wall { min-height: 240px; order: -1; }
  .ev-header__logo { height: 50px; }
  .ev-header__themeLabel { display: none; }
  .ev-end__mark { width: 112px; height: 112px; }
  .ev-header__nav a:not(.ev-btn) { padding: 8px 10px; font-size: .9rem; }
  .ev-end__top { grid-template-columns: 1fr; gap: 28px; }
  .ev-end__cols { grid-template-columns: 1fr; gap: 26px; }
  .ev-header__nav { display: none; }
  .ev-burger { display: inline-flex; }
  .ev-header__inner { min-height: 68px; }
}
