/* ==========================================================================
   A.I.T.E. — public website styles (Premium redesign)
   ========================================================================== */
:root {
  /* Brand palette */
  --brand: #16407a;
  --brand-dark: #0d2a52;
  --brand-light: #2f6fd0;
  --brand-bright: #4a90e2;
  --accent: #ffb020;
  --accent-dark: #e08e0b;

  /* Neutrals */
  --text: #1c2733;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --bg-soft-2: #eef3fb;
  --border: #e4eaf2;

  /* Status */
  --success: #2e9e5b;
  --danger: #d9534f;
  --warning: #e0a800;
  --info: #2f6fc4;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #16407a 0%, #2f6fd0 55%, #4a90e2 100%);
  --grad-accent: linear-gradient(135deg, #ffc247 0%, #ff9d1c 100%);
  --grad-hero: radial-gradient(1200px 600px at 12% -10%, #2f6fd0 0%, transparent 55%),
               radial-gradient(1000px 700px at 100% 0%, #16407a 0%, transparent 50%),
               linear-gradient(160deg, #0d2a52 0%, #16407a 45%, #1d5aa8 100%);

  /* Shape & depth */
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(13, 42, 82, .06);
  --shadow: 0 12px 34px rgba(13, 42, 82, .10);
  --shadow-lg: 0 26px 60px rgba(13, 42, 82, .16);
  --ring: 0 0 0 4px rgba(47, 111, 208, .14);

  --maxw: 1320px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: "Space Grotesk", "Manrope", "Segoe UI", sans-serif;
  line-height: 1.18;
  color: var(--brand-dark);
  letter-spacing: -.02em;
}

a { color: var(--brand-light); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 880px; }

::selection { background: var(--brand-light); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--brand-light), var(--brand)); border-radius: 999px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  text-decoration: none; line-height: 1.2; overflow: hidden; white-space: nowrap;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad-accent); color: #2a1c00; box-shadow: 0 10px 24px rgba(255, 157, 28, .34); }
.btn-primary:hover { background: var(--grad-accent); color: #2a1c00; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(255, 157, 28, .46); }
.btn-brand { background: var(--grad-brand); color: #fff; box-shadow: 0 10px 26px rgba(22, 64, 122, .32); }
.btn-brand:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(22, 64, 122, .42); }
.btn-outline { background: rgba(255, 255, 255, .7); border-color: var(--border); color: var(--brand); backdrop-filter: blur(6px); }
.btn-outline:hover { border-color: var(--brand-light); color: #fff; background: var(--brand-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: #fff; color: var(--brand); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .2); }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-block { width: 100%; }
/* shine sweep */
.btn-primary::after, .btn-brand::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn-primary:hover::after, .btn-brand:hover::after { left: 130%; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(228, 234, 242, .9);
  transition: box-shadow .35s var(--ease), background .35s var(--ease);
}
.site-header.scrolled { background: rgba(255, 255, 255, .94); box-shadow: 0 14px 40px rgba(13, 42, 82, .12); border-bottom-color: transparent; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 82px; transition: height .35s var(--ease); }
.site-header.scrolled .container { height: 68px; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo {
  width: 52px; height: 52px; border-radius: 16px; background: var(--grad-brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .5px; flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(22, 64, 122, .36), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .45s var(--spring), box-shadow .45s var(--ease);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand:hover .brand-logo { transform: translateY(-3px) rotate(-6deg) scale(1.06); box-shadow: 0 16px 32px rgba(22, 64, 122, .46), inset 0 1px 0 rgba(255, 255, 255, .4); }
.brand-text strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 19px; color: var(--brand-dark); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.brand-text small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a { position: relative; padding: 10px 16px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: 14.5px; transition: color .25s var(--ease), background .25s var(--ease); }
.main-nav a::after { content: ""; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 0; height: 2px; border-radius: 2px; background: var(--grad-accent); transition: width .3s var(--ease); }
.main-nav a:hover { color: var(--brand); background: var(--bg-soft); }
.main-nav a:hover::after { width: 44%; }
.main-nav a.active { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 20px rgba(22, 64, 122, .3); }
.main-nav a.active::after { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 46px; height: 46px; padding: 0; cursor: pointer; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 13px; transition: background .25s var(--ease), border-color .25s var(--ease); }
.nav-toggle:hover { background: var(--brand); border-color: var(--brand); }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ""; display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--brand); transition: transform .3s var(--ease), opacity .3s var(--ease), background .25s var(--ease); }
.nav-toggle:hover span, .nav-toggle:hover::before, .nav-toggle:hover::after { background: #fff; }
.nav-toggle.open span { opacity: 0; }
.nav-toggle.open::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open::after { transform: translateY(-7px) rotate(-45deg); }

/* --- Nav dropdown (course categories) ------------------------------------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a { display: inline-flex; align-items: center; gap: 7px; }
.nav-caret { width: 11px; height: 11px; opacity: .65; transition: transform .3s var(--ease); }
.nav-item:hover > a .nav-caret,
.nav-item:focus-within > a .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 268px; max-width: 320px; padding: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 28px 64px rgba(13, 42, 82, .2);
  opacity: 0; visibility: hidden; z-index: 1200;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav-dropdown::before {
  content: ""; position: absolute; top: -7px; left: 50%;
  transform: translateX(-50%) rotate(45deg); width: 14px; height: 14px;
  background: #fff; border-left: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: 3px;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown a {
  display: block; padding: 11px 15px; border-radius: 12px;
  color: var(--text); font-weight: 600; font-size: 14.5px; line-height: 1.35;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.nav-dropdown a::after { display: none; }
.nav-dropdown a:hover { background: var(--bg-soft); color: var(--brand); transform: translateX(3px); }
.nav-dropdown a.nav-all {
  color: var(--brand); font-weight: 800; margin-bottom: 5px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0;
}
.nav-empty { display: block; padding: 11px 15px; color: var(--muted); font-size: 14px; }

/* --- Mobile-only nav actions (login / cabinet / enroll) ------------------- */
.nav-mobile-actions { display: none; }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; color: #fff; padding: 120px 0 130px; overflow: hidden; background: var(--grad-hero); isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(10px); z-index: 0; }
.hero::before { width: 520px; height: 520px; right: -120px; top: -140px; background: radial-gradient(circle at 30% 30%, rgba(255, 178, 32, .28), transparent 68%); animation: float1 14s ease-in-out infinite; }
.hero::after { width: 460px; height: 460px; left: -140px; bottom: -180px; background: radial-gradient(circle at 50% 50%, rgba(74, 144, 226, .34), transparent 70%); animation: float2 18s ease-in-out infinite; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 30px) scale(1.08); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -20px) scale(1.1); } }
.hero-grid-lines { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 60px 60px; mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%); -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%); }
.hero .container { position: relative; z-index: 2; max-width: 860px; }
.hero .cert { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .26); padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; margin-bottom: 26px; backdrop-filter: blur(8px); }
.hero-eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; font-size: 12.5px; font-weight: 800; letter-spacing: 2.6px; text-transform: uppercase; color: #ffd479; }
.hero-eyebrow::before { content: ""; flex: 0 0 36px; width: 36px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #ffab1f, rgba(255, 171, 31, .12)); }
@media (max-width: 720px) { .hero-eyebrow { font-size: 11px; letter-spacing: 1.5px; gap: 10px; margin-bottom: 16px; } .hero-eyebrow::before { flex-basis: 24px; width: 24px; } }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; margin: 0 0 22px; font-weight: 700; color: #fff; letter-spacing: -.03em; }
.hero h1 .accent { background: linear-gradient(100deg, #ffd479, #ffab1f); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: clamp(17px, 2vw, 21px); color: #dbe7f7; margin: 0 0 12px; max-width: 640px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; color: rgba(255, 255, 255, .7); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-scroll .mouse { width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 14px; position: relative; }
.hero-scroll .mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; background: #fff; border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* --- Page header (inner pages) ------------------------------------------- */
.page-header { position: relative; color: #fff; padding: 76px 0 66px; background: var(--grad-hero); overflow: hidden; isolation: isolate; }
.page-header::after { content: ""; position: absolute; right: -80px; top: -100px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255, 178, 32, .22), transparent 70%); z-index: 0; }
.page-header .container { position: relative; z-index: 2; }
.page-header h1 { margin: 6px 0 0; font-size: clamp(30px, 4.4vw, 46px); color: #fff; font-weight: 700; letter-spacing: -.02em; }
.breadcrumbs { font-size: 14px; color: #c3d4ec; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: #fff; font-weight: 600; }
.breadcrumbs a:hover { color: var(--accent); }

/* --- Sections ------------------------------------------------------------- */
.section { padding: 92px 0; position: relative; }
.section-soft { background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow { display: inline-block; color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 12.5px; background: var(--bg-soft-2); padding: 7px 16px; border-radius: 999px; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 14px; color: var(--brand-dark); font-weight: 700; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }

/* --- Stats ---------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 38px 24px; text-align: center; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-brand); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.stat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.stat:hover::before { transform: scaleX(1); }
.stat .num { font-family: "Space Grotesk", sans-serif; font-size: clamp(34px, 4vw, 48px); font-weight: 700; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.stat .label { color: var(--muted); margin-top: 12px; font-size: 15px; font-weight: 600; }

/* --- Cards ---------------------------------------------------------------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-img { position: relative; height: 200px; background: var(--bg-soft); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-img img { transform: scale(1.09); }
.card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(13, 42, 82, .18)); opacity: 0; transition: opacity .4s var(--ease); }
.card:hover .card-img::after { opacity: 1; }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 10px; font-size: 20px; color: var(--brand-dark); font-weight: 700; }
.card-body p { color: var(--muted); margin: 0 0 18px; font-size: 15px; flex: 1; }
.card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tag { display: inline-block; background: var(--bg-soft-2); color: var(--brand); font-size: 12px; padding: 5px 13px; border-radius: 999px; font-weight: 700; letter-spacing: .3px; }

/* --- Teacher card --------------------------------------------------------- */
.teacher-card { text-align: center; }
.teacher-card .card-body { padding: 30px 24px; }
.teacher-card .avatar { position: relative; width: 138px; height: 138px; border-radius: 50%; overflow: hidden; margin: 0 auto 20px; padding: 4px; background: var(--grad-brand); }
.teacher-card .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid #fff; }
.teacher-card h3 { font-size: 19px; margin: 0 0 5px; color: var(--brand-dark); }
.teacher-card .role { color: var(--accent-dark); font-weight: 700; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.teacher-card .bio { color: var(--muted); font-size: 14px; }

/* --- News ----------------------------------------------------------------- */
.news-card .date { display: inline-block; color: var(--brand); font-size: 13px; font-weight: 700; margin-bottom: 10px; background: var(--bg-soft-2); padding: 4px 12px; border-radius: 999px; }

/* --- Gallery -------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; height: 240px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.gallery-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-item:hover img { transform: scale(1.09); }
.gallery-item a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(13, 42, 82, .8)); opacity: .5; transition: opacity .4s var(--ease); }
.gallery-item:hover a::after { opacity: 1; }
.gallery-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; color: #fff; padding: 26px 18px 16px; font-size: 15px; font-weight: 600; }

/* --- Filter bar ----------------------------------------------------------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); width: fit-content; margin: 0 auto 40px; }
.filter-bar a { padding: 10px 22px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: all .25s var(--ease); }
.filter-bar a:hover { color: var(--brand); background: var(--bg-soft); }
.filter-bar a.active { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 18px rgba(22, 64, 122, .28); }

/* --- Forms ---------------------------------------------------------------- */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; color: var(--text); }
.form-control { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; color: var(--text); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); background: #fff; }
.form-control::placeholder { color: #9aa8b8; }
.form-control:focus { outline: none; border-color: var(--brand-light); box-shadow: var(--ring); }
textarea.form-control { min-height: 140px; resize: vertical; }
select.form-control { cursor: pointer; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; font-weight: 600; }
.form-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); }

/* Honeypot anti-spam field: hidden from humans, filled by bots */
.hp-wrap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- Search --------------------------------------------------------------- */
.header-search { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--text); background: transparent; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.header-search:hover { background: var(--brand-soft, rgba(15,52,96,.08)); color: var(--brand); transform: scale(1.08); }
.header-search.active { color: var(--brand); }
.search-inline { display: flex; gap: 12px; align-items: center; }
.search-inline .form-control { flex: 1; }
.search-summary { color: var(--muted); margin: 22px 0 8px; }
.search-group { margin-top: 40px; }
.search-group-title { font-size: 22px; margin-bottom: 18px; position: relative; padding-left: 16px; }
.search-group-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 3px; background: var(--grad-brand); }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.result-list li a { display: inline-block; padding: 12px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.result-list li a:hover { border-color: var(--brand-light); transform: translateX(4px); box-shadow: var(--shadow-sm); }

/* --- Utilities (replaces inline styles in templates) ---------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: 6px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }
.u-hidden { display: none !important; }
.mb-30 { margin-bottom: 30px; }
.pt-72 { padding-top: 72px; }
.img-h220 { height: 220px; }
.lead-block { max-width: 720px; color: var(--muted); margin-bottom: 30px; }
.container-article { max-width: 820px; }
.post-meta-hero { color: #cbd9ec; font-size: 14px; margin-top: 6px; }
.text-sm { font-size: 13px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-18 { margin-bottom: 18px; }
.mb-24 { margin-bottom: 24px; }
.pt-64 { padding-top: 64px; }
.muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.lead-muted { font-size: 18px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.justify-center { justify-content: center; }
.container-sm { max-width: 680px; }
.divider-top { border-top: 1px solid var(--border); padding-top: 18px; margin-bottom: 18px; }
.hint-strong { margin: 0 0 8px; font-weight: 700; }
.grid-contacts { grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.grid-detail { grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.grid-2eq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats-2col { grid-template-columns: repeat(2, 1fr); margin-top: 44px; }
.map-frame { margin-top: 40px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
@media (max-width: 900px) {
  .grid-contacts, .grid-detail { grid-template-columns: 1fr; }
}

/* --- Alerts --------------------------------------------------------------- */
.alert { padding: 16px 22px; border-radius: var(--radius-sm); margin: 20px 0; font-size: 15px; font-weight: 600; border: 1px solid transparent; box-shadow: var(--shadow-sm); }
.alert-success { background: #e9f8ef; color: #1d6b3f; border-color: #bfe6cf; }
.alert-danger { background: #fdecec; color: #a33; border-color: #f5c6c6; }
.alert-info { background: #e9f1fd; color: #24508f; border-color: #c4d7f5; }
.alert-warning { background: #fff7e0; color: #8a6d1a; border-color: #f2e0ab; }

/* --- Content / prose ------------------------------------------------------ */
.prose { font-size: 17px; color: #33414f; }
.prose h2, .prose h3 { color: var(--brand-dark); margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 20px 0; }
.prose ul { padding-left: 24px; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.detail-hero { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; box-shadow: var(--shadow); }
.detail-hero img { width: 100%; max-height: 460px; object-fit: cover; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.info-list li:last-child { border-bottom: none; }
.info-list .k { color: var(--muted); font-weight: 600; }
.info-list .v { font-weight: 700; text-align: right; color: var(--brand-dark); }
.info-list .v a { color: var(--brand); }

/* --- Pagination ----------------------------------------------------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 52px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); font-size: 14px; font-weight: 600; text-align: center; background: #fff; transition: all .25s var(--ease); }
.pagination a:hover { border-color: var(--brand-light); color: #fff; background: var(--brand-light); transform: translateY(-2px); }
.pagination .active { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(22, 64, 122, .28); }
.pagination .disabled { color: #b9c3cf; background: var(--bg-soft); }

/* --- CTA ------------------------------------------------------------------ */
.cta { position: relative; background: var(--grad-brand); border-radius: var(--radius-lg); padding: 58px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta::before { content: ""; position: absolute; right: -60px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 178, 32, .3), transparent 70%); }
.cta > div { position: relative; z-index: 2; }
.cta h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); color: #fff; }
.cta p { margin: 0; font-size: 17px; color: #dbe7f7; }
.cta .btn { position: relative; z-index: 2; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { position: relative; background: linear-gradient(160deg, #0d2a52 0%, #123a6d 60%, #16407a 100%); color: #c2d3e8; padding: 72px 0 0; margin-top: 40px; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; left: 50%; top: -140px; transform: translateX(-50%); width: 700px; height: 300px; background: radial-gradient(circle, rgba(74, 144, 226, .18), transparent 70%); }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.3fr; gap: 44px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 16px; margin: 0 0 20px; font-weight: 700; letter-spacing: .3px; }
.site-footer a { color: #c2d3e8; transition: color .2s var(--ease), padding-left .2s var(--ease); }
.site-footer a:hover { color: var(--accent); }
.footer-about p { font-size: 14px; color: #a6bbd6; margin: 0 0 10px; }
.footer-list { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.footer-list li { margin-bottom: 12px; }
.footer-list a:hover { padding-left: 6px; }
.footer-contact { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.footer-contact li { margin-bottom: 13px; display: flex; gap: 11px; align-items: flex-start; }
.socials { display: flex; gap: 12px; margin-top: 20px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; transition: all .3s var(--ease); }
.socials a:hover { background: var(--grad-accent); color: #2a1c00; transform: translateY(-4px); box-shadow: 0 10px 20px rgba(255, 157, 28, .3); }
.footer-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, .12); padding: 24px 0; font-size: 13.5px; color: #90a8c6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* --- Back to top ---------------------------------------------------------- */
.to-top { position: fixed; right: 26px; bottom: 26px; z-index: 900; width: 50px; height: 50px; border-radius: 14px; border: none; cursor: pointer; background: var(--grad-brand); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all .3s var(--ease); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* --- Utilities ------------------------------------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 36px; } .mb-4 { margin-bottom: 36px; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty h3 { color: var(--brand-dark); }

/* --- Reveal animations ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* --- About page ----------------------------------------------------------- */
.about-intro { position: relative; background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--brand-light); border-radius: var(--radius); padding: 34px 40px; box-shadow: var(--shadow-sm); margin-bottom: 48px; }
.about-intro p { font-size: clamp(18px, 2vw, 23px); color: var(--brand-dark); font-weight: 700; line-height: 1.5; margin: 0; font-family: "Space Grotesk", sans-serif; letter-spacing: -.01em; }
.about-layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 44px; align-items: start; }
.about-aside { position: sticky; top: 100px; }
.advantages { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.adv-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); display: flex; gap: 16px; align-items: flex-start; }
.adv-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.adv-card .ico { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px; background: var(--bg-soft-2); display: flex; align-items: center; justify-content: center; font-size: 25px; }
.adv-card h4 { margin: 0 0 6px; font-size: 17px; color: var(--brand-dark); }
.adv-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* --- CMS article page ----------------------------------------------------- */
.page-article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 52px 60px; box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Mini-LMS — student cabinet, curriculum, schedule, certificates
   ========================================================================== */

/* --- Shared bits ---------------------------------------------------------- */
.tc { text-align: center; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: .3px; }
.mt-16 { margin-top: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.divider { height: 1px; background: var(--border); margin: 26px 0; }
.inline-form { display: inline; }
.ok { color: var(--success); font-weight: 700; }
.form-narrow { max-width: 540px; }
.section-title { font-size: 24px; margin: 0 0 20px; position: relative; padding-left: 16px; }
.section-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 5px; border-radius: 3px; background: var(--grad-brand); }
.header-login { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--brand); border: 1.5px solid var(--border); background: #fff; transition: all .25s var(--ease); }
.header-login:hover { color: #fff; background: var(--brand-light); border-color: var(--brand-light); transform: translateY(-2px); }

/* Standalone avatar + role (teacher detail aside) */
.avatar { position: relative; width: 138px; height: 138px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; padding: 4px; background: var(--grad-brand); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid #fff; }
.avatar-lg { width: 168px; height: 168px; }
.role { color: var(--accent-dark); font-weight: 700; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.teacher-bio { white-space: pre-line; }

/* --- Auth (login / register) --------------------------------------------- */
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px 40px; box-shadow: var(--shadow); max-width: 540px; margin: 0 auto; }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-ico { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 20px; background: var(--bg-soft-2); font-size: 32px; margin-bottom: 16px; }
.auth-head h2 { font-size: 27px; margin-bottom: 8px; }
.auth-sub { color: var(--muted); font-size: 15px; margin: 0; }
.auth-row { margin: 6px 0 22px; }
.auth-foot { text-align: center; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.auth-foot a { font-weight: 700; }

/* --- Cabinet layout ------------------------------------------------------- */
.cabinet-section { padding-top: 56px; }
.cabinet-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.cabinet-nav { position: sticky; top: 96px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cabinet-user { display: flex; align-items: center; gap: 14px; padding: 22px; background: var(--grad-brand); color: #fff; }
.cabinet-avatar { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .5); display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 19px; }
.cabinet-user-text { min-width: 0; }
.cabinet-user-text strong { display: block; font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabinet-user-text small { display: block; color: #cddcf2; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabinet-menu { display: flex; flex-direction: column; padding: 10px; gap: 2px; }
.cabinet-menu a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--text); font-weight: 600; font-size: 14.5px; transition: background .2s var(--ease), color .2s var(--ease); }
.cabinet-menu a span { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.cabinet-menu a:hover { background: var(--bg-soft); color: var(--brand); }
.cabinet-menu a.active { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(22, 64, 122, .24); }
.cabinet-logout { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 !important; color: var(--muted) !important; }
.cabinet-logout:hover { background: #fdecec !important; color: var(--danger) !important; }

.cabinet-main { min-width: 0; }
.cabinet-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.cstat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 18px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.cstat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cstat-num { display: block; font-family: "Space Grotesk", sans-serif; font-size: 40px; font-weight: 700; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cstat-label { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.cabinet-block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.cabinet-block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.cabinet-block-head h2 { margin: 0; font-size: 22px; }
.link-more { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* --- Progress bar --------------------------------------------------------- */
.progress { width: 100%; height: 9px; background: var(--bg-soft-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad-brand); border-radius: 999px; transition: width .5s var(--ease); }
.progress-lg { height: 13px; }

/* --- Learn grid / cards --------------------------------------------------- */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.learn-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.learn-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.learn-card-img { position: relative; height: 140px; background: var(--bg-soft); overflow: hidden; }
.learn-card-img img { width: 100%; height: 100%; object-fit: cover; }
.learn-badge { position: absolute; top: 10px; left: 10px; background: rgba(13, 42, 82, .82); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(4px); }
.learn-badge.done { background: var(--success); }
.learn-card-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.learn-card-body h3 { margin: 0; font-size: 17px; }
.learn-meta { color: var(--muted); font-size: 13px; font-weight: 600; }
.learn-card-body .btn { margin-top: auto; }

.learn-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.learn-head-text h2 { font-size: 24px; }
.learn-head-text p { margin: 4px 0 0; }
.learn-head-progress { display: flex; align-items: center; gap: 14px; min-width: 240px; flex: 1; max-width: 360px; }
.progress-num { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; color: var(--brand); white-space: nowrap; }

/* --- Modules & lessons ---------------------------------------------------- */
.module { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 20px; overflow: hidden; }
.module-head { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.module-index { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; }
.module-head h3 { margin: 0 0 4px; font-size: 19px; }
.module-head p { margin: 0; font-size: 14px; }
.lesson-list { padding: 8px 0; }
.lesson { padding: 14px 24px; border-bottom: 1px solid var(--border); }
.lesson:last-child { border-bottom: none; }
.lesson-head { display: flex; align-items: center; gap: 14px; }
.lesson-check { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--bg-soft-2); color: var(--muted); }
.lesson.done .lesson-check { background: var(--success); color: #fff; }
.lesson-title { flex: 1; min-width: 0; }
.lesson-title strong { display: block; font-size: 15.5px; color: var(--text); font-weight: 600; }
.lesson-title small { color: var(--muted); font-size: 12.5px; }
.lesson-head .btn { flex-shrink: 0; }
.lesson-body { margin-top: 10px; padding-left: 42px; }
.lesson-body summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand); }
.lesson-body .prose { font-size: 15px; margin-top: 10px; }

/* --- Certificates --------------------------------------------------------- */
.cert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cert-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-soft); }
.cert-row.ready { background: #e9f8ef; border-color: #bfe6cf; }
.cert-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: var(--shadow-sm); }
.cert-text { flex: 1; min-width: 0; }
.cert-text strong { display: block; font-size: 15.5px; color: var(--brand-dark); }
.cert-text small { color: var(--muted); font-size: 13px; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.cert-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: linear-gradient(180deg, #fff, var(--bg-soft)); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.cert-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.cert-card-top { padding: 26px 22px 18px; text-align: center; background: var(--grad-brand); color: #fff; }
.cert-medal { font-size: 40px; display: block; margin-bottom: 8px; }
.cert-card-top h3 { margin: 0; color: #fff; font-size: 18px; }
.cert-card .info-list { padding: 14px 22px; }
.cert-card .info-list li { padding: 9px 0; font-size: 14px; }
.cert-card .btn-block { width: calc(100% - 44px); margin: 0 22px 22px; }

/* --- Enroll list (my courses rows) --------------------------------------- */
.enroll-list { display: grid; gap: 14px; }
.enroll-row { display: flex; align-items: center; gap: 18px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.enroll-row:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.enroll-thumb { flex: 0 0 96px; width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-soft); }
.enroll-info { flex: 1; min-width: 0; }
.enroll-info h3 { margin: 0 0 8px; font-size: 17px; }
.enroll-info .progress { margin-bottom: 8px; }
.enroll-meta { color: var(--muted); font-size: 13px; font-weight: 600; }
.enroll-row .btn { flex-shrink: 0; }

/* --- Schedule / timetable ------------------------------------------------- */
.schedule-grid { display: grid; gap: 22px; }
.schedule-day { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.schedule-day-head { display: flex; align-items: center; gap: 14px; padding: 18px 24px; background: var(--grad-brand); color: #fff; }
.schedule-day-head h2 { margin: 0; color: #fff; font-size: 20px; }
.schedule-count { margin-left: auto; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 4px 13px; font-size: 13px; font-weight: 700; }
.schedule-list { list-style: none; padding: 0; margin: 0; }
.schedule-slot { display: flex; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--border); transition: background .2s var(--ease); }
.schedule-slot:last-child { border-bottom: none; }
.schedule-slot:hover { background: var(--bg-soft); }
.slot-time { flex: 0 0 116px; font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--brand); font-size: 15px; padding-top: 2px; }
.slot-body { flex: 1; min-width: 0; }
.slot-group { display: inline-block; background: var(--bg-soft-2); color: var(--brand); font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 999px; margin-bottom: 6px; }
.slot-course { display: block; font-weight: 700; font-size: 16px; color: var(--brand-dark); margin-bottom: 6px; }
a.slot-course:hover { color: var(--brand-light); }
.slot-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.slot-meta a { color: var(--muted); font-weight: 600; }
.slot-meta a:hover { color: var(--brand); }

/* --- Course page: teachers & curriculum ---------------------------------- */
.course-teachers, .course-curriculum, .teacher-courses { margin-top: 44px; }
.teacher-chips { display: flex; gap: 14px; flex-wrap: wrap; }
.teacher-chip { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.teacher-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-light); }
.chip-avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--bg-soft); }
.chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chip-text strong { display: block; font-size: 14.5px; color: var(--brand-dark); }
.chip-text small { display: block; color: var(--muted); font-size: 12.5px; }
.curriculum { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.curriculum-module { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.curriculum-head { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.curriculum-index { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.curriculum-head strong { font-size: 16.5px; color: var(--brand-dark); }
.curriculum-head p { margin: 3px 0 0; font-size: 13.5px; }
.curriculum-lessons { list-style: none; padding: 10px 20px; margin: 0; }
.curriculum-lessons li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14.5px; color: var(--text); border-bottom: 1px dashed var(--border); }
.curriculum-lessons li:last-child { border-bottom: none; }
.lesson-dot { color: var(--accent-dark); font-size: 12px; }
.curriculum-lessons small { margin-left: auto; }
.lms-card { border-left: 4px solid var(--brand-light); }

/* --- Testing engine: shared bits ------------------------------------------ */
.mt-30 { margin-top: 30px; }
.text-xs { font-size: 12.5px; }
.btn.disabled, .btn:disabled { opacity: .55; pointer-events: none; box-shadow: none; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.badge-green { background: #e7f6ed; color: #1f7a45; }
.badge-red { background: #fdecea; color: #b23b34; }
.badge-gray { background: var(--bg-soft-2); color: var(--muted); }

/* --- Testing engine: quiz cards (cabinet list) ---------------------------- */
.quiz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.quiz-card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, #fff, var(--bg-soft)); box-shadow: var(--shadow-sm); padding: 22px; display: flex; flex-direction: column; gap: 16px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.quiz-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.quiz-card-top { display: flex; gap: 14px; align-items: center; }
.quiz-ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.quiz-card-top h3 { margin: 0; font-size: 17.5px; }
.quiz-card-top small { color: var(--muted); font-size: 13px; }
.quiz-meta { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0; margin: 0; }
.quiz-meta li { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.quiz-meta span { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.quiz-meta strong { color: var(--brand-dark); font-size: 16px; font-family: "Space Grotesk", sans-serif; }
.quiz-meta-lg { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0; }
.quiz-best { padding: 12px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.quiz-best.pass { background: #e7f6ed; color: #1f7a45; }
.quiz-best.fail { background: #fff7e0; color: #8a6d1a; }

/* Inline quizzes on the course learn page */
.quiz-inline-list { display: grid; gap: 12px; margin-top: 14px; }
.quiz-inline { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.quiz-inline-text { flex: 1; min-width: 0; }
.quiz-inline-text strong { display: block; color: var(--brand-dark); font-size: 15.5px; }
.quiz-inline-text small { color: var(--muted); font-size: 13px; }
.quiz-inline-score { flex-shrink: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 16px; padding: 5px 13px; border-radius: 999px; }
.quiz-inline-score.pass { background: #e7f6ed; color: #1f7a45; }
.quiz-inline-score.fail { background: #fdecea; color: #b23b34; }

/* Attempt history list */
.attempt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.attempt-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-soft); }
.attempt-row.pass { border-left: 4px solid var(--success); }
.attempt-row.fail { border-left: 4px solid var(--danger); }
.attempt-num { flex: 0 0 auto; font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--brand); }
.attempt-text { flex: 1; min-width: 0; }
.attempt-text strong { font-size: 16px; color: var(--brand-dark); }
.attempt-text small { display: block; color: var(--muted); font-size: 12.5px; }

/* --- Testing engine: taking a quiz ---------------------------------------- */
.quiz-take { display: grid; gap: 18px; }
.quiz-take-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-radius: var(--radius-sm); background: var(--grad-brand); color: #fff; font-weight: 700; position: sticky; top: 84px; z-index: 20; box-shadow: var(--shadow); }
.quiz-timer b { font-family: "Space Grotesk", sans-serif; font-size: 18px; }
.quiz-timer.warn { color: #ffd7d3; }
.quiz-q { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 24px; box-shadow: var(--shadow-sm); }
.quiz-q-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.quiz-q-num { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-soft-2); color: var(--brand); display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.quiz-q-text { font-size: 17px; font-weight: 600; color: var(--brand-dark); }
.quiz-q-text small { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 600; }
.quiz-options { display: grid; gap: 11px; }
.quiz-option { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease); }
.quiz-option:hover { border-color: var(--brand-light); background: var(--bg-soft); }
.quiz-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.quiz-option-mark { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; transition: border-color .2s var(--ease), background .2s var(--ease); }
.quiz-option input[type="checkbox"] ~ .quiz-option-mark { border-radius: 6px; }
.quiz-option input:checked ~ .quiz-option-mark { border-color: var(--brand); background: var(--grad-brand); }
.quiz-option input:checked ~ .quiz-option-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.quiz-option input:focus-visible ~ .quiz-option-mark { box-shadow: var(--ring); }
.quiz-option:has(input:checked) { border-color: var(--brand); background: var(--bg-soft); }
.quiz-option-text { font-size: 15.5px; color: var(--text); }
.quiz-take-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; padding-top: 8px; }

/* --- Testing engine: result & review -------------------------------------- */
.result-hero { display: flex; align-items: center; gap: 28px; padding: 30px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 34px; }
.result-hero.pass { border-left: 6px solid var(--success); }
.result-hero.fail { border-left: 6px solid var(--danger); }
.result-ring { flex: 0 0 132px; width: 132px; height: 132px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.result-hero.pass .result-ring { background: conic-gradient(var(--success) var(--p, 0), #e7f6ed 0); }
.result-hero.fail .result-ring { background: conic-gradient(var(--danger) var(--p, 0), #fdecea 0); }
.result-percent { width: 104px; height: 104px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; color: var(--brand-dark); }
.result-hero-text h2 { margin: 0 0 8px; }
.result-hero-text p { margin: 0 0 16px; }
.result-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.review-title { margin: 0 0 18px; font-size: 22px; }
.review-q { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.review-q.correct { border-left: 5px solid var(--success); }
.review-q.wrong { border-left: 5px solid var(--danger); }
.review-q-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.review-num { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; background: var(--bg-soft-2); color: var(--brand); display: flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; }
.review-q-title { flex: 1; min-width: 0; }
.review-q-title strong { color: var(--brand-dark); font-size: 16px; }
.review-q-title small { display: block; margin-top: 4px; }
.review-mark { flex: 0 0 auto; font-size: 22px; font-weight: 700; }
.review-q.correct .review-mark { color: var(--success); }
.review-q.wrong .review-mark { color: var(--danger); }
.review-options { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.review-options li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--border); font-size: 14.5px; background: var(--bg-soft); }
.review-options li.is-correct { background: #e7f6ed; border-color: #bfe6cf; }
.review-options li.is-selected { font-weight: 700; }
.review-options li.is-selected:not(.is-correct) { background: #fdecea; border-color: #f3c6c2; }
.ro-mark { color: var(--muted); }
.ro-text { flex: 1; min-width: 0; }
.tag-ok, .tag-bad { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .3px; }
.tag-ok { background: var(--success); color: #fff; }
.tag-bad { background: var(--danger); color: #fff; }
.review-skip { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.review-explain { margin-top: 14px; padding: 13px 16px; border-radius: 12px; background: #fff8e8; border: 1px solid #f2e0ab; color: #6d5614; font-size: 14.5px; }

/* --- Testing engine: responsive ------------------------------------------- */
@media (max-width: 720px) {
  .quiz-take-bar { top: 70px; }
  .result-hero { flex-direction: column; text-align: center; gap: 18px; }
  .result-hero-actions { justify-content: center; }
  .quiz-inline { flex-wrap: wrap; }
  .quiz-meta { grid-template-columns: repeat(2, 1fr); }
}

/* --- LMS responsive ------------------------------------------------------- */
@media (max-width: 1000px) {
  .cabinet-layout { grid-template-columns: 1fr; }
  .cabinet-nav { position: static; }
  .cabinet-menu { flex-direction: row; flex-wrap: wrap; }
  .cabinet-menu a { flex: 1 1 auto; justify-content: center; font-size: 13.5px; }
  .cabinet-logout { border-top: none; margin-top: 0; }
}
@media (max-width: 720px) {
  .auth-card { padding: 32px 22px; }
  .cabinet-stats { gap: 12px; }
  .cstat { padding: 20px 12px; }
  .cstat-num { font-size: 32px; }
  .learn-head { flex-direction: column; align-items: stretch; }
  .learn-head-progress { max-width: none; }
  .enroll-row { flex-wrap: wrap; }
  .enroll-thumb { flex-basis: 72px; width: 72px; height: 56px; }
  .schedule-slot { flex-direction: column; gap: 8px; }
  .slot-time { flex-basis: auto; }
  .lesson-head { flex-wrap: wrap; }
  .lesson-body { padding-left: 0; }
}

/* --- Responsive ----------------------------------------------------------- */
@keyframes navSlide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .main-nav { position: absolute; top: 82px; left: 0; right: 0; background: rgba(255, 255, 255, .98); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 22px 24px; border-bottom: 1px solid var(--border); box-shadow: 0 26px 50px rgba(13, 42, 82, .18); display: none; }
  .site-header.scrolled .main-nav { top: 68px; }
  .main-nav.open { display: flex; animation: navSlide .3s var(--ease); }
  .main-nav a { padding: 15px 18px; border-radius: 13px; font-size: 15.5px; }
  .main-nav a::after { display: none; }
  .main-nav a.active { border-radius: 13px; }
  /* Dropdown becomes an inline, always-visible sub-list on touch devices. */
  .nav-item { display: block; }
  .nav-item > a { display: flex; width: 100%; }
  .nav-caret { margin-left: auto; }
  .nav-dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    min-width: 0; max-width: none; box-shadow: none; background: transparent;
    border: none; border-left: 2px solid var(--border); border-radius: 0;
    padding: 4px 0 4px 8px; margin: 4px 0 8px 20px;
    display: flex; flex-direction: column; gap: 2px;
  }
  .nav-dropdown::before { display: none; }
  .nav-dropdown a { padding: 11px 14px; font-size: 14.5px; border-radius: 11px; }
  .nav-dropdown a:hover { transform: none; }
  .nav-dropdown a.nav-all { margin-bottom: 3px; padding-bottom: 11px; border-bottom: 1px dashed var(--border); border-radius: 11px 11px 0 0; }
  /* Actions live inside the slide-down panel on mobile. */
  .nav-mobile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--border); }
  .nav-mobile-actions a { justify-content: center; text-align: center; }
  .nav-mobile-actions a::after { display: none; }
  .nav-mobile-actions .btn { width: 100%; }
  .header-actions .header-login, .header-actions .header-cta { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; }
  .about-aside { position: static; }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .site-header .container { height: 70px; gap: 12px; }
  .site-header.scrolled .container { height: 62px; }
  .main-nav { top: 70px; }
  .site-header.scrolled .main-nav { top: 62px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 16px; }
  .brand-logo { width: 44px; height: 44px; font-size: 15px; }
  .header-actions .btn { padding: 9px 16px; font-size: 13px; }
  .hero { padding: 84px 0 96px; }
  .section { padding: 62px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta { padding: 34px; flex-direction: column; text-align: center; }
  .form-card { padding: 26px; }
  .advantages { grid-template-columns: 1fr; }
  .about-intro { padding: 26px 24px; }
  .page-article { padding: 30px 24px; }
  .to-top { right: 16px; bottom: 16px; }
}
@media (max-width: 420px) {
  .header-actions .btn { display: none; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
