/* ==========================================================================
   Martin Education Hub — plain CSS design system
   ========================================================================== */

:root {
  --primary: #3538CD;
  --primary-dark: #1E1B6E;
  --primary-darker: #14123f;
  --primary-light: #EEF0FC;
  --accent: #F5821F;
  --text: #1F2137;
  --text-muted: #5B5E76;
  --white: #ffffff;
  --border: #E3E6F5;
  --success-bg: #E9F9EE;
  --success-text: #146C34;
  --error-bg: #FDECEC;
  --error-text: #A32020;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(30, 27, 110, 0.08);
  --shadow-sm: 0 2px 10px rgba(30, 27, 110, 0.06);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--primary-dark); margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 12px; }

ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }
.section-alt { background: var(--primary-light); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-light { background: var(--white); color: var(--primary); }
.btn-light:hover { background: var(--primary-light); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; background: var(--white); padding: 4px 12px; border-radius: var(--radius-sm); }
.logo-img { display: block; height: 44px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { color: var(--primary-dark); font-size: 1.05rem; letter-spacing: .03em; }
.logo-text small { color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--white); font-weight: 600; font-size: .95rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-color: var(--accent); }
.site-nav a.nav-cta { background: var(--white); color: var(--primary); border: none; padding: 10px 22px; border-radius: 999px; }
.site-nav a.nav-cta:hover { background: var(--primary-light); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; }

/* ---------- Flash messages ---------- */
.flash { padding: 12px 0; }
.flash-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm);
}
.flash-success .flash-inner { background: var(--success-bg); color: var(--success-text); }
.flash-error .flash-inner { background: var(--error-bg); color: var(--error-text); }
.flash-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 70%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero::before { width: 340px; height: 340px; top: -120px; right: -80px; }
.hero::after { width: 220px; height: 220px; bottom: -100px; left: -60px; background: rgba(245,130,31,.18); }

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 90px 24px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}
.hero.hero-simple .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 70px 24px; }
.hero.hero-no-art .hero-inner { grid-template-columns: 1fr; text-align: center; }
.hero.hero-no-art .hero-inner > div { max-width: 640px; margin: 0 auto; }
.hero.hero-no-art p.lead { margin-left: auto; margin-right: auto; }
.hero.hero-no-art .btn-row { justify-content: center; }
.hero h1 { color: var(--white); font-size: 2.6rem; }
.hero p.lead { color: rgba(255,255,255,.88); font-size: 1.08rem; max-width: 520px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-row { margin-top: 20px; }
.hero.hero-simple .btn-row { justify-content: center; }

.stat-strip {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  background: var(--primary-light);
  padding: 24px;
  border-radius: var(--radius);
  margin-top: -46px;
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow);
}
.stat-strip .stat { text-align: center; }
.stat-strip .stat strong { display: block; color: var(--primary); font-size: 1rem; }
.stat-strip .stat span { color: var(--text-muted); font-size: .82rem; }

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

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}

.feature-row { display: flex; gap: 16px; margin-bottom: 26px; }
.feature-row .num { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.feature-row h3 { margin-bottom: 4px; color: var(--primary); }
.feature-row p { color: var(--text-muted); margin: 0; }

.why-us { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.why-us .photo-block { background: linear-gradient(160deg, var(--primary), var(--primary-dark)); border-radius: var(--radius); min-height: 320px; }

.lang-card, .course-card { overflow: hidden; padding: 0; }
.lang-card .thumb, .course-card .thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--primary-light), #dfe3fb);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  background-size: cover;
  background-position: center;
}
.lang-card .body, .course-card .body { padding: 20px; }
.lang-card h3 { margin-bottom: 6px; }
.lang-card p { color: var(--text-muted); font-size: .92rem; }
.lang-card .level { color: var(--primary); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--white); font-weight: 700; font-size: .78rem; }

.exam-card { display: flex; flex-direction: column; gap: 10px; }
.exam-card .exam-head { display: flex; align-items: center; gap: 10px; }
.exam-card p { color: var(--text-muted); font-size: .9rem; flex: 1; }

.tech-card .thumb { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; font-size: 2rem; }
.tech-card .tech-thumb-img { width: 100%; height: 170px; object-fit: cover; display: block; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; }
.faq-item summary { cursor: pointer; padding: 16px 0; font-weight: 700; color: var(--primary-dark); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 16px; color: var(--text-muted); margin: 0; }

/* ---------- Partners ---------- */
.partners-row { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; align-items: center; }
.partner-chip { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 22px; font-weight: 700; color: var(--primary-dark); background: var(--white); display: flex; align-items: center; justify-content: center; }
.partner-chip img { height: 32px; max-width: 150px; width: auto; object-fit: contain; display: block; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,.85); max-width: 560px; margin: 0 auto 24px; }

/* ---------- Pricing / booking ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card .price-head { background: var(--primary); color: var(--white); padding: 18px 20px; border-radius: var(--radius) var(--radius) 0 0; margin: -26px -26px 18px; }
.price-card .price-head small { opacity: .85; display: block; }
.price-tags { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; font-size: .85rem; }
.price-tags span { background: var(--primary-light); color: var(--primary-dark); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.price-card p.desc { color: var(--text-muted); font-size: .9rem; flex: 1; }

.fee-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.fee-table th, .fee-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.fee-table th { background: var(--primary); color: var(--white); }
.fee-table tbody tr:nth-child(odd) { background: var(--primary-light); }
.fee-table td:last-child { color: var(--primary); font-weight: 700; }

/* Tick list (e.g. "We Accept Payments Via") */
.tick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tick-list li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.tick-list svg { flex: none; color: var(--primary); }

.note-box { background: var(--primary-light); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 20px 24px; }
.note-box ul { list-style: disc; padding-left: 20px; }
.note-box li { margin-bottom: 8px; color: var(--text-muted); }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--primary-dark); }
.form-section-title .icon { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; }

.field-group { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password],
select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(53,56,205,.12); }
.file-drop { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 30px; text-align: center; color: var(--text-muted); cursor: pointer; background: var(--primary-light); }
.file-drop strong { color: var(--primary); }
.file-drop input[type=file] { display: none; }
.file-drop .file-name { margin-top: 8px; font-size: .85rem; color: var(--primary-dark); font-weight: 600; }
.file-drop.file-drop-filled { border-style: solid; border-color: var(--primary); background: var(--success-bg); }
.file-name-success { color: var(--success-text); }
.required { color: #C0392B; }
.help-text { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.error-text { font-size: .82rem; color: var(--error-text); margin-top: 4px; }

/* ---------- Contact page ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 56px; }
.contact-cards .card { text-align: left; }
.contact-cards .icon-circle { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.2rem; }
.contact-cards a { color: var(--primary); font-weight: 700; }

/* ---------- Admin ---------- */

/* Sidebar shell: fixed-width dark sidebar + flexible main content area. */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; background: var(--primary-light); }

.admin-sidebar {
  width: 258px;
  flex: none;
  background: linear-gradient(185deg, var(--primary-dark), var(--primary-darker) 85%);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 110;
  box-shadow: 3px 0 18px rgba(10, 9, 40, .18);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.admin-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

.admin-sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 22px 20px 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar-logo-box {
  background: var(--white);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  box-shadow: 0 4px 14px rgba(10, 9, 40, .28);
}
.admin-sidebar-logo-box .logo-img { height: 38px; }
.admin-sidebar-logo-label { color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding-left: 2px; }

.admin-sidebar-nav { display: flex; flex-direction: column; gap: 3px; padding: 4px 14px; flex: 1; }
.admin-sidebar-nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px 11px 16px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.72); font-weight: 600; font-size: .91rem;
  letter-spacing: .01em;
  transition: background .18s ease, color .18s ease, transform .18s ease, padding-left .18s ease;
}
.admin-sidebar-nav a svg { flex: none; opacity: .8; transition: opacity .18s ease; }
.admin-sidebar-nav a:hover { background: rgba(255,255,255,.07); color: var(--white); padding-left: 20px; }
.admin-sidebar-nav a:hover svg { opacity: 1; }
.admin-sidebar-nav a.active {
  background: linear-gradient(90deg, var(--primary), rgba(53,56,205,.75));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(53, 56, 205, .35);
}
.admin-sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.admin-sidebar-nav a.active svg { opacity: 1; }

.admin-sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-sidebar-logout {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.72); font-weight: 600; font-size: .91rem;
  transition: background .18s ease, color .18s ease;
}
.admin-sidebar-logout svg { flex: none; opacity: .8; transition: opacity .18s ease; }
.admin-sidebar-logout:hover { background: rgba(220, 68, 68, .16); color: #FF9C9C; }
.admin-sidebar-logout:hover svg { opacity: 1; }

.admin-backdrop { display: none; }

.admin-main { flex: 1; min-width: 0; }
.admin-mobile-bar { display: none; }
.admin-wrap { max-width: 1100px; margin: 40px auto; padding: 0 24px; }

.admin-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: .88rem; vertical-align: top; }
.admin-table th { background: var(--primary-light); color: var(--primary-dark); }

/* Combined "primary + secondary" cell, e.g. a name stacked over its contact details. */
.cell-primary { font-weight: 600; color: var(--primary-dark); }
.cell-secondary { font-size: .82rem; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.cell-secondary a { color: var(--text-muted); }

/* ---------- Smart tables: search box, column filters, page size, pagination ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.table-search { flex: 1 1 220px; min-width: 160px; }
.table-search input[type=search] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit; background: var(--white); color: var(--text);
}
.table-search input[type=search]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(53,56,205,.12); }
.table-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.table-filter-select {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .85rem; font-family: inherit; background: var(--white); color: var(--text);
}
.table-page-size { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.table-page-size select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .85rem; font-family: inherit; font-weight: 400; color: var(--text); background: var(--white);
}

.table-empty-state { text-align: center; color: var(--text-muted); font-style: italic; padding: 22px !important; }

.table-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.table-pagination.is-single-page { justify-content: flex-end; }
.table-pagination-summary { font-size: .82rem; color: var(--text-muted); }
.table-pagination-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.table-page-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.table-page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.table-page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.table-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.table-page-ellipsis { color: var(--text-muted); padding: 0 4px; }

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.admin-stats .stat-card { background: var(--primary); color: var(--white); border-radius: var(--radius); padding: 22px; text-align: center; }
.admin-stats .stat-card strong { font-size: 2rem; display: block; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.login-box { max-width: 380px; margin: 90px auto; }

/* ---------- Site settings page ---------- */
.settings-section { margin-bottom: 32px; scroll-margin-top: 84px; }
.settings-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.settings-section-title .icon { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; }
.settings-section-desc { color: var(--text-muted); font-size: .88rem; margin: 0 0 16px; }
.settings-image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-image-card h4 { margin-bottom: 6px; font-size: 1rem; }
.settings-image-preview { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); height: 150px; margin: 14px 0 10px; background: var(--primary-light); }
.settings-image-preview img, .settings-image-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.settings-image-preview--empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: var(--text-muted); font-size: .82rem; }
.settings-remove-toggle { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .85rem; color: var(--text-muted); margin: 0 0 14px; cursor: pointer; }
.settings-remove-toggle input { width: auto; margin: 0; }
.settings-save-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow); }
.settings-save-bar p { margin: 0; }
.settings-save-bar .btn { flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: rgba(255,255,255,.85); padding-top: 56px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-col h4 { color: var(--white); margin-bottom: 16px; font-size: 1rem; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.75); margin-bottom: 10px; font-size: .92rem; }
.footer-col p.footer-contact-line { display: flex; align-items: center; gap: 8px; }
.footer-contact-icon { flex: none; opacity: .8; }
.footer-col a:hover { color: var(--accent); }
.footer-brand p { max-width: 280px; }
.logo-footer { background: var(--white); display: inline-flex; align-items: center; width: fit-content; margin-bottom: 16px; }
.logo-footer .logo-img { height: 38px; width: auto; max-width: 160px; object-fit: contain; }
.social-row { display: flex; gap: 10px; margin-top: 12px; }
.social-row a { background: rgba(255,255,255,.12); width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82rem; max-width: var(--max-width); margin: 0 auto; }

/* ---------- Hero photo variant (booking page) ----------
   The photo lives on ::before (not the element itself) so it can carry its
   own light blur without affecting the crisp heading/button text that sits
   in .hero-inner. A soft, moderate treatment keeps the real classroom photo
   clearly visible while still giving the white heading enough contrast. */
.hero-photo { position: relative; background: var(--primary-dark); }
.hero-photo::before {
  content: "";
  position: absolute;
  top: -8px; right: -8px; bottom: -8px; left: -8px;
  width: auto; height: auto;
  border-radius: 0;
  background-image: linear-gradient(180deg, rgba(15,13,52,.42), rgba(15,13,52,.62)), var(--hero-img);
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  filter: blur(2px);
  transform: scale(1.02);
}
.hero-photo::after { content: none; display: none; }
.hero-photo .hero-inner { position: relative; z-index: 1; }
.hero-photo h1, .hero-photo p.lead { text-shadow: 0 2px 14px rgba(0,0,0,.5); }

/* Looping background video (e.g. the About page hero). The section becomes
   its own stacking context (position:relative + z-index:0 below) so the
   video / tint / text layers are explicitly ordered by z-index (1/2/3) and
   stay scoped to this section — no reliance on DOM order or negative
   z-index escaping into the rest of the page. */
.hero-video { position: relative; background: var(--primary-dark); z-index: 0; }
.hero-bg-video {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero-video::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: auto; height: auto;
  border-radius: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(15,13,52,.5), rgba(15,13,52,.68));
}
.hero-video::after { content: none; display: none; }
.hero-video .hero-inner { position: relative; z-index: 3; }
.hero-video h1, .hero-video p.lead { text-shadow: 0 2px 14px rgba(0,0,0,.5); }
@media (prefers-reduced-motion: reduce) {
  .hero-bg-video { display: none; }
}

.btn-dark { background: rgba(8,8,36,.55); color: var(--white); border: 2px solid rgba(255,255,255,.55); }
.btn-dark:hover { background: rgba(8,8,36,.85); }

/* ---------- Trust row (icon strip) ---------- */
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; padding: 30px 0; }
.trust-item { display: flex; align-items: center; gap: 12px; padding: 6px 38px; border-right: 1px solid var(--border); }
.trust-item:last-child { border-right: none; }
.trust-item .icon-ball {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-dark); color: var(--white);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.trust-item strong { display: block; color: var(--primary-dark); font-size: .95rem; }
.trust-item span { color: var(--text-muted); font-size: .8rem; }

/* ---------- Program / language price cards v2 ---------- */
.price-card.v2 .price-head { background: var(--primary-dark); }
.price-lines { margin: 10px 0 18px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .88rem; flex: 1; }
.price-lines div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; color: var(--text-muted); }
.price-lines strong { color: var(--text); font-weight: 700; }
.btn-soft { background: var(--primary-light); color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn-soft:hover { background: var(--primary); color: var(--white); }

/* Check-badge list (e.g. "What's Included") */
.check-list { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 16px 0 0; }
.check-list li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.check-badge {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
}

/* One-time registration fee highlight */
/* Stays a single row at every width (icon | text | amounts) — elements shrink
   rather than stack, matching the compact mobile design. */
.onetime-fee { display: flex; align-items: center; gap: 14px; background: var(--primary-dark); color: var(--white); border-radius: var(--radius); padding: 16px 18px; margin-top: 18px; flex-wrap: nowrap; }
.onetime-fee .star { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.1rem; }
.onetime-fee .info { flex: 1 1 auto; min-width: 0; }
.onetime-fee .info strong { font-size: .92rem; }
.onetime-fee .info small { display: block; opacity: .8; font-size: .72rem; margin-top: 2px; }
.onetime-fee .amounts { display: flex; gap: 16px; flex: none; }
.onetime-fee .amounts div { text-align: right; }
.onetime-fee .amounts span { display: block; font-size: .65rem; opacity: .75; }
.onetime-fee .amounts strong { font-size: .95rem; }

/* Discount banner */
.discount-banner { background: #FDF1D6; border-radius: var(--radius-sm); padding: 16px 24px; text-align: center; color: #7A4A00; font-weight: 600; }

/* Dark feature strip below CTA band */
.feature-strip { background: var(--primary-darker); padding: 22px 0; }
.feature-strip .container { display: flex; justify-content: center; flex-wrap: wrap; gap: 36px; }
.feature-strip .f-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.9); font-weight: 600; font-size: .92rem; }

/* Still-have-questions CTA */
.questions-cta { text-align: center; }
.questions-cta .btn-row { justify-content: center; }
.btn-call { background: var(--primary); color: var(--white); }
.btn-call:hover { background: var(--primary-dark); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1DA851; }

/* Booking modal */
dialog.booking-modal { border: none; border-radius: var(--radius); padding: 0; max-width: 560px; width: 92vw; box-shadow: var(--shadow); }
dialog.booking-modal::backdrop { background: rgba(17,15,58,.55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 24px; }
.modal-program-name { font-weight: 700; color: var(--primary-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .why-us { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero .btn-row { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  /* Collapses into the hamburger menu earlier than the rest of the layout
     breakpoints below — five nav links plus the CTA pill and logo crowd
     and wrap awkwardly on tablet-width screens well before 720px. */
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-nav.open { max-height: 400px; }
  .site-nav a { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav a.nav-cta { margin: 14px 24px; text-align: center; }
}

@media (max-width: 720px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .settings-image-grid { grid-template-columns: 1fr; }
  .settings-save-bar { flex-direction: column; align-items: stretch; text-align: center; position: static; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .stat-strip { margin-top: 24px; }
  .contact-cards { grid-template-columns: 1fr; }
  .price-card .price-head { margin: -26px -26px 18px; }
  .trust-item { border-right: none; padding: 8px 18px; width: 100%; justify-content: center; }
  .feature-strip .container { gap: 18px 28px; }

  /* Admin tables collapse into stacked "label: value" cards instead of
     scrolling sideways — data-label on each <td> comes from admin-tables.js. */
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; padding: 4px 14px; background: var(--white); }
  .admin-table tr[data-no-results-row], .admin-table tr:has(td[colspan]) { padding: 14px; }
  .admin-table td { border-bottom: 1px dashed var(--border); padding: 9px 0; }
  .admin-table td:last-child { border-bottom: none; }
  .admin-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin-bottom: 3px;
  }

  .table-toolbar { flex-direction: column; align-items: stretch; }
  .table-filters { flex-direction: column; }
  .table-filter-select { width: 100%; }
  .table-page-size { justify-content: space-between; }
  .table-pagination { justify-content: center; }
  .table-pagination.is-single-page { justify-content: center; }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 8px 0 30px rgba(10, 9, 40, .35);
    border-radius: 0 var(--radius) var(--radius) 0;
  }
  .admin-sidebar.open { transform: translateX(0); }

  .admin-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,13,52,.55);
    backdrop-filter: blur(1px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    z-index: 105;
  }
  .admin-backdrop.open { opacity: 1; pointer-events: auto; }

  .admin-mobile-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 75%);
    color: var(--white);
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
  }
  .admin-sidebar-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; flex: none; transition: opacity .15s ease; }
  .admin-sidebar-toggle:hover { opacity: .8; }
  .admin-sidebar-toggle span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; }
  .admin-mobile-title { font-weight: 700; font-size: 1rem; letter-spacing: .01em; }

  .admin-wrap { margin: 24px auto; padding: 0 18px; }
}

@media (max-width: 480px) {
  .onetime-fee { gap: 8px; padding: 10px 12px; }
  .onetime-fee .star { width: 28px; height: 28px; font-size: .8rem; }
  .onetime-fee .info strong { font-size: .66rem; line-height: 1.25; }
  .onetime-fee .info small { font-size: .56rem; line-height: 1.3; }
  .onetime-fee .amounts { gap: 8px; }
  .onetime-fee .amounts strong { font-size: .72rem; }
  .onetime-fee .amounts span { font-size: .5rem; }
}

@media (max-width: 340px) {
  .onetime-fee .info strong { font-size: .6rem; }
  .onetime-fee .amounts strong { font-size: .64rem; }
}

/* ── Utility classes (migrated from inline styles) ───────────────────────── */

/* Spacing */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mx-auto { margin: 0 auto; }
.pt-0 { padding-top: 0; }

/* Sizing */
.max-w-220 { max-width: 220px; }
.max-w-260 { max-width: 260px; }
.max-w-320 { max-width: 320px; }
.max-w-360 { max-width: 360px; }
.max-w-640 { max-width: 640px; }
.max-w-760 { max-width: 760px; }
.max-w-none { max-width: none; }

/* Text */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary-dark { color: var(--primary-dark); }
.no-underline { text-decoration: none; }

/* Flex layout */
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-center { justify-content: center; }
.flex-gap-6 { display: flex; gap: 6px; }
.flex-gap-8 { display: flex; gap: 8px; }

/* Form controls */
.checkbox-inline { width: auto; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-weight: 400; }

/* Hero eyebrow shown over a dark hero photo/gradient background */
.eyebrow-light { color: #FFC98A; }

/* Outline button variants */
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-danger { border-color: #C0392B; color: #C0392B; }
.btn-outline-footer { border-color: rgba(255, 255, 255, .55); color: #fff; }

/* Admin: small table thumbnail vs. larger form image preview */
.admin-thumb-sm { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.admin-thumb-lg { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.image-preview-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.no-image-label { color: var(--text-muted); font-size: .8rem; }
.mission-icon-cell { font-size: 1.4rem; }

/* Admin: simple tabbed panels (e.g. Site Settings "Mission & Values" /
   "Why Choose Us" sections — an add-form tab alongside a card-list tab). */
.settings-tabs .tab-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.settings-tabs .tab-nav button { background: none; border: none; padding: 10px 16px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; flex: none; }
.settings-tabs .tab-nav button:hover { color: var(--text); }
.settings-tabs .tab-nav button.active { color: var(--primary); border-bottom-color: var(--primary); }
.settings-tabs .tab-panel { display: none; }
.settings-tabs .tab-panel.active { display: block; }

@media (max-width: 640px) {
  .settings-tabs .tab-nav button { padding: 10px 14px; font-size: .85rem; }
  .admin-card { padding: 18px; }
  .file-drop { padding: 20px; }
  .settings-image-preview { height: 130px; }
}

/* Admin: mobile-bar flash message (narrower padding than the public site's .flash-inner) */
.flash-inner-admin { max-width: none; padding: 12px 18px; }

/* Admin auth pages (login / forgot / reset password) */
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 24px; }

/* Site settings page: section subtitle under "Site Settings" heading */
.settings-subtitle { color: var(--text-muted); font-size: .9rem; margin: 4px 0 0; }

/* Courses page: technical-course card description (same treatment .lang-card p gets) */
.course-desc { color: var(--text-muted); font-size: .92rem; }

/* Booking page: price-lines block with no rows to show (hides the divider) */
.price-lines-empty { border-top: none; }

/* Booking page: note-box lead paragraph, plain and icon variants */
.note-box-heading { margin: 0 0 10px; }
.note-box-heading-icon { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }

/* Register page: multi-section form wrapper */
.register-form { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

/* Booking page hero photo: fills the section like .hero-simple's inner layout,
   but with the taller 80px vertical padding this photo variant uses. */
.hero-photo .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 80px 24px; }

/* Dynamic per-record background images. The URL itself is set inline via a
   CSS custom property (see e.g. booking.php's --hero-img); every other
   declaration lives here so only the URL is ever inline. */
.thumb.has-photo { background-image: var(--thumb-img); background-size: cover; background-repeat: no-repeat; background-position: center; background-color: var(--primary-light); }
.why-us .photo-block.has-photo { background-image: var(--photo-img); background-size: cover; background-position: center; background-repeat: no-repeat; background-color: var(--primary-light); }
