/* ============================================================
   Ұлағатты Ұстаз — Design System (2026 refresh)
   Palette: deep Kazakh green + warm gold + cream
   ============================================================ */

:root {
  /* Brand */
  --green-900: #0f3d24;
  --green-800: #15603a;
  --green-700: #1b7344;
  --green-600: #1f8a51;
  --green-500: #2aa564;
  --green-100: #e5f3ea;
  --green-050: #f2f9f4;

  --gold-700: #a9813a;
  --gold-600: #c29544;
  --gold-500: #d4af37;
  --gold-100: #f6edd4;

  /* Neutrals */
  --ink: #15241c;
  --ink-soft: #46574d;
  --muted: #76867c;
  --line: #e7ece8;
  --cream: #fbf8f1;
  --paper: #ffffff;
  --bg: #f6f4ec;

  /* UI */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 16px rgba(21, 96, 58, .06);
  --shadow: 0 14px 40px rgba(15, 61, 36, .10);
  --shadow-lg: 0 30px 70px rgba(15, 61, 36, .16);
  --ring: 0 0 0 4px rgba(42, 165, 100, .18);

  --container: 1200px;
  --header-h: 76px;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
input, textarea, select, button { font-family: inherit; font-size: 1rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.grid { display: grid; gap: 24px; }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 10px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-100);
  padding: 7px 14px; border-radius: 999px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; color: var(--ink); }
h2.title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-top: 14px; }
h3.title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.lead { color: var(--ink-soft); font-size: 1.06rem; margin-top: 12px; }
.text-gold { color: var(--gold-600); }
.text-green { color: var(--green-700); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .96rem;
  border: 1.5px solid transparent; transition: .22s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--green-700); color: #fff; box-shadow: 0 10px 24px rgba(27,115,68,.28); }
.btn--primary:hover { background: var(--green-800); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(27,115,68,.34); }
.btn--gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: #3a2c08; box-shadow: 0 10px 24px rgba(212,175,55,.32); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(212,175,55,.4); }
.btn--ghost { background: #fff; color: var(--green-800); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--green-500); color: var(--green-700); transform: translateY(-2px); }
.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(4px); }
.btn--light:hover { background: rgba(255,255,255,.24); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(140deg, var(--green-700), var(--green-500));
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 24px; height: 24px; }
.brand__name { font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.05; }
.brand__name small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-600); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav a {
  padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--ink-soft);
  transition: .18s;
}
.nav a:hover { color: var(--green-700); background: var(--green-050); }
.nav a.active { color: var(--green-800); background: var(--green-100); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Language switch */
.lang-switch { display: inline-flex; background: var(--green-050); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: none; background: transparent; padding: 6px 12px; border-radius: 999px;
  font-weight: 700; font-size: .82rem; color: var(--muted); transition: .18s;
}
.lang-switch button.active { background: var(--green-700); color: #fff; box-shadow: var(--shadow-sm); }

.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: .25s; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; background:
    radial-gradient(900px 500px at 85% -10%, rgba(42,165,100,.14), transparent 60%),
    linear-gradient(180deg, var(--cream), var(--bg)); }
.hero__ornament { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; padding: 70px 0 56px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.hero h1 .accent { color: var(--green-700); }
.hero .lead { font-size: 1.14rem; max-width: 520px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.stat b { font-size: 1.7rem; color: var(--green-800); display: block; letter-spacing: -.02em; }
.stat span { font-size: .85rem; color: var(--muted); font-weight: 600; }

.hero__media { position: relative; }
.hero__photo {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 5/4; background: linear-gradient(135deg, var(--green-600), var(--green-800));
  position: relative;
}
.hero__photo .photo-illustration { position: absolute; inset: 0; }
.hero__badge {
  position: absolute; left: -22px; bottom: 28px; background: #fff; border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px;
}
.hero__badge .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--gold-100); display: grid; place-items: center; }
.hero__badge .ic svg { width: 22px; height: 22px; color: var(--gold-700); }
.hero__badge b { font-size: .98rem; }
.hero__badge span { font-size: .78rem; color: var(--muted); display: block; }

/* Quick cards under hero */
.quick-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: -40px; position: relative; z-index: 3; margin-bottom: 20px; }
.qcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); transition: .25s; display: block;
}
.qcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--green-100); }
.qcard .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.qcard .ic svg { width: 24px; height: 24px; }
.qcard.i1 .ic { background: var(--green-100); color: var(--green-700); }
.qcard.i2 .ic { background: var(--gold-100); color: var(--gold-700); }
.qcard.i3 .ic { background: #e8eefc; color: #3b5bdb; }
.qcard h3 { font-size: 1.12rem; }
.qcard p { color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
.qcard .more { color: var(--green-700); font-weight: 700; font-size: .88rem; margin-top: 12px; display: inline-flex; gap: 6px; align-items: center; }

/* ============================================================
   CARDS: courses / articles
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.card__media .cover { position: absolute; inset: 0; }
.card__tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.92); color: var(--green-800); font-weight: 700; font-size: .74rem;
  padding: 5px 11px; border-radius: 999px;
}
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.card__meta span { display: inline-flex; gap: 5px; align-items: center; }
.card h3 { font-size: 1.12rem; }
.card p { color: var(--ink-soft); font-size: .92rem; }
.card__foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.price { font-weight: 800; color: var(--green-800); font-size: 1.05rem; }
.price small { color: var(--muted); font-weight: 600; font-size: .78rem; text-decoration: line-through; margin-left: 6px; }
.badge-free { background: var(--green-100); color: var(--green-700); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }

/* ---------- Category chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; transition: .18s;
}
.chip:hover { border-color: var(--green-500); color: var(--green-700); }
.chip.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- Section header with link ---------- */
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.link-arrow { color: var(--green-700); font-weight: 700; display: inline-flex; gap: 7px; align-items: center; }
.link-arrow:hover { color: var(--green-800); gap: 10px; }

/* ============================================================
   FEATURES / WHY
   ============================================================ */
.features { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); }
.feature .ic { width: 52px; height: 52px; border-radius: 15px; background: var(--green-050); color: var(--green-700); display: grid; place-items: center; margin-bottom: 16px; }
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--ink-soft); font-size: .9rem; margin-top: 8px; }

/* ============================================================
   CTA band (subscription)
   ============================================================ */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 56px; color: #fff;
  background: linear-gradient(130deg, var(--green-800), var(--green-600)); box-shadow: var(--shadow-lg); }
.cta-band__orn { position: absolute; inset: 0; opacity: .25; pointer-events: none; }
.cta-band__inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255,255,255,.85); margin-top: 12px; font-size: 1.05rem; }
.cta-band .actions { display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   FORUM / VIDEO / CALENDAR blocks
   ============================================================ */
.split { display: grid; grid-template-columns: 1.3fr .8fr; gap: 28px; align-items: start; }

.forum-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.forum-item:last-child { border-bottom: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-weight: 800; color: #fff; }
.forum-item h4 { font-size: 1rem; }
.forum-item .fmeta { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.forum-item .fmeta b { color: var(--green-700); }

.video-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow-sm); }
.video-card .cover { position: absolute; inset: 0; }
.video-card .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-card .play span { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow); transition: .2s; }
.video-card:hover .play span { transform: scale(1.08); }
.video-card .play svg { width: 24px; height: 24px; color: var(--green-700); margin-left: 3px; }
.video-card .vtitle { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; font-weight: 700; font-size: .95rem; z-index: 2; }

/* Calendar */
.calendar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head b { font-size: 1.02rem; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); }
.cal-nav button:hover { border-color: var(--green-500); color: var(--green-700); }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: .72rem; color: var(--muted); font-weight: 700; padding: 6px 0; }
.cal-grid .day { padding: 8px 0; border-radius: 9px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.cal-grid .day.muted { color: var(--line); }
.cal-grid .day.event { background: var(--green-100); color: var(--green-800); font-weight: 800; }
.cal-grid .day.today { background: var(--green-700); color: #fff; }

/* ============================================================
   FORMS / AUTH
   ============================================================ */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.auth-aside { position: relative; padding: 48px; color: #fff; background: linear-gradient(150deg, var(--green-800), var(--green-600)); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.auth-aside h2 { color: #fff; font-size: 1.9rem; }
.auth-aside p { color: rgba(255,255,255,.85); margin-top: 14px; }
.auth-aside ul { margin-top: 26px; display: grid; gap: 14px; }
.auth-aside li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.95); font-size: .96rem; }
.auth-aside li svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--gold-500); margin-top: 1px; }
.auth-aside__orn { position: absolute; inset: 0; opacity: .25; pointer-events: none; }
.auth-main { padding: 48px; }

.tabs { display: inline-flex; background: var(--green-050); border-radius: 999px; padding: 4px; margin-bottom: 26px; }
.tabs button { border: none; background: transparent; padding: 10px 22px; border-radius: 999px; font-weight: 700; color: var(--muted); transition: .18s; }
.tabs button.active { background: #fff; color: var(--green-800); box-shadow: var(--shadow-sm); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 7px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink); transition: .18s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-500); background: #fff; box-shadow: var(--ring); }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }
.checkbox input { width: auto; margin-top: 3px; }
.form-foot { margin-top: 20px; }
.form-alt { margin-top: 18px; font-size: .9rem; color: var(--muted); text-align: center; }
.form-alt a { color: var(--green-700); font-weight: 700; }

/* ---------- Upload dropzone (payment check) ---------- */
.dropzone {
  border: 2px dashed var(--green-500); border-radius: var(--radius); padding: 30px; text-align: center;
  background: var(--green-050); color: var(--green-800); cursor: pointer; transition: .2s;
}
.dropzone:hover { background: var(--green-100); }
.dropzone svg { width: 40px; height: 40px; color: var(--green-600); margin: 0 auto 10px; }
.dropzone b { display: block; }
.dropzone span { font-size: .85rem; color: var(--muted); }

/* ============================================================
   PAGE HEADER (subpages)
   ============================================================ */
.page-hero { position: relative; overflow: hidden; padding: 56px 0 48px; background:
    radial-gradient(700px 360px at 90% -20%, rgba(42,165,100,.12), transparent 60%), var(--cream); border-bottom: 1px solid var(--line); }
.page-hero__orn { position: absolute; inset: 0; opacity: .45; pointer-events: none; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--green-700); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); position: relative; }
.page-hero p { color: var(--ink-soft); margin-top: 12px; max-width: 620px; position: relative; }

/* ============================================================
   PRICING (subscription)
   ============================================================ */
.pricing { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: stretch; }
.plan { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative; }
.plan.featured { border-color: var(--green-600); box-shadow: var(--shadow); transform: translateY(-8px); }
.plan.featured .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold-500); color: #3a2c08; font-weight: 800; font-size: .74rem; padding: 6px 16px; border-radius: 999px; letter-spacing: .05em; }
.plan h3 { font-size: 1.2rem; }
.plan .pamount { font-size: 2.3rem; font-weight: 800; color: var(--green-800); margin: 14px 0 4px; letter-spacing: -.02em; }
.plan .pamount small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.plan .pdesc { color: var(--ink-soft); font-size: .9rem; }
.plan ul { margin: 22px 0; display: grid; gap: 12px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); }
.plan li svg { width: 20px; height: 20px; color: var(--green-600); flex: 0 0 auto; margin-top: 1px; }
.plan .btn { margin-top: auto; }

/* ============================================================
   CERTIFICATE PREVIEW
   ============================================================ */
.cert-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.cert-paper {
  position: relative; aspect-ratio: 1.414/1; background: #fffdf7; border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 5%; container-type: inline-size;
}
.cert-border { position: absolute; inset: 14px; border: 2px solid var(--gold-500); border-radius: 8px; }
.cert-border::before { content:""; position: absolute; inset: 5px; border: 1px solid var(--gold-500); border-radius: 6px; opacity: .6; }
.cert-corner { position: absolute; width: 30%; height: 40%; top: 0; right: 0; background: linear-gradient(140deg, transparent 52%, var(--green-800) 53%); border-top-right-radius: 14px; pointer-events: none; }
.cert-content { position: relative; z-index: 2; text-align: center; height: 100%; display: flex; flex-direction: column; }
.cert-portal { font-size: 2.4cqw; letter-spacing: .22em; color: var(--green-800); font-weight: 700; margin-top: 2%; }
.cert-title { font-size: 8cqw; font-weight: 800; color: #b5121b; letter-spacing: .08em; font-family: Georgia, "Times New Roman", serif; margin: 1% 0; }
.cert-name { font-size: 5cqw; font-weight: 800; color: #1f6fb2; letter-spacing: .04em; }
.cert-for { font-size: 2.3cqw; color: var(--ink-soft); margin-top: 2%; line-height: 1.5; padding: 0 6%; }
.cert-topic { font-size: 3.2cqw; font-weight: 800; color: var(--green-800); margin: 1.5% 0; }
.cert-meta { font-size: 1.9cqw; color: var(--ink-soft); margin-top: auto; text-align: left; padding-left: 4%; }
.cert-meta div { margin: .4% 0; }
.cert-no { color: var(--gold-700); font-weight: 800; }
.cert-qr { position: absolute; top: 7%; left: 7%; width: 11%; aspect-ratio: 1; image-rendering: pixelated; z-index: 3; }

/* ============================================================
   FAQ / accordion
   ============================================================ */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 20px 22px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--ink); }
.faq-q svg { width: 22px; height: 22px; color: var(--green-600); transition: .25s; flex: 0 0 auto; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 22px 20px; color: var(--ink-soft); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: none; }
.contact-line .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--green-050); color: var(--green-700); display: grid; place-items: center; flex: 0 0 auto; }
.contact-line .ic svg { width: 22px; height: 22px; }
.contact-line b { font-size: .98rem; }
.contact-line span { color: var(--ink-soft); font-size: .92rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.75); margin-top: 20px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding: 56px 0 40px; }
.site-footer .brand__name { color: #fff; }
.site-footer .fabout { margin-top: 16px; font-size: .92rem; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; letter-spacing: .02em; }
.footer-col a { display: block; padding: 6px 0; font-size: .92rem; transition: .15s; }
.footer-col a:hover { color: var(--gold-500); padding-left: 4px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: .2s; }
.socials a:hover { background: var(--green-600); transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav { position: fixed; inset: 0; z-index: 200; background: rgba(15,61,36,.4); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: .25s; }
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(340px, 86vw); background: #fff; padding: 24px; transform: translateX(100%); transition: .28s; display: flex; flex-direction: column; gap: 6px; }
.mobile-nav.open .mobile-nav__panel { transform: translateX(0); }
.mobile-nav__panel a { padding: 14px 16px; border-radius: 12px; font-weight: 600; color: var(--ink-soft); }
.mobile-nav__panel a:hover, .mobile-nav__panel a.active { background: var(--green-050); color: var(--green-700); }
.mobile-nav__close { align-self: flex-end; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 1.2rem; color: var(--ink); margin-bottom: 10px; }

/* ============================================================
   UTIL — illustrated covers (CSS only, no external images)
   ============================================================ */
.ill { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ill-1 { background: linear-gradient(135deg, #1b7344, #2aa564); }
.ill-2 { background: linear-gradient(135deg, #15603a, #1f8a51); }
.ill-3 { background: linear-gradient(135deg, #a9813a, #d4af37); }
.ill-4 { background: linear-gradient(135deg, #2d5f8a, #4b86c4); }
.ill-5 { background: linear-gradient(135deg, #7a4fb0, #a579d6); }
.ill-6 { background: linear-gradient(135deg, #b5471f, #e07a3c); }
.cover-pattern { position: absolute; inset: 0; opacity: .3; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--green-800); color: #fff; padding: 14px 22px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 600; z-index: 300; transition: .3s; }
.toast.show { transform: translateX(-50%) translateY(0); }

.reveal { opacity: 0; transform: translateY(24px); transition: .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__media { max-width: 520px; }
  .features { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .plan.featured { transform: none; }
}
@media (max-width: 860px) {
  .nav, .header-actions > .btn { display: none; }
  .burger { display: block; }
  .header-actions { gap: 8px; }
  .cards, .quick-cards, .features { grid-template-columns: 1fr; }
  .quick-cards { margin-top: 24px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .cert-demo { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
@media (max-width: 560px) {
  .hero__stats { gap: 22px; }
  .cta-band { padding: 34px 24px; }
  .auth-main { padding: 30px 22px; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ============================================================
   NEWS PORTAL COMPONENTS (matches original ulagatttyustaz.kz)
   ============================================================ */

/* --- header search --- */
.hsearch { position: relative; flex: 1; max-width: 300px; margin-left: 6px; }
.hsearch input { width: 100%; padding: 10px 14px 10px 40px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--green-050); transition: .18s; font-size: .92rem; }
.hsearch input:focus { outline: none; border-color: var(--green-500); background: #fff; box-shadow: var(--ring); }
.hsearch svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }

/* --- section title bar (accent underline like original) --- */
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sec-title h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); position: relative; padding-bottom: 12px; }
.sec-title h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold-500), var(--green-600)); }
.sec-title .link-arrow { white-space: nowrap; }

/* --- featured slider (Басты жаңалықтар) --- */
.slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--green-900); }
.slides { display: flex; transition: transform .5s cubic-bezier(.4,.1,.2,1); }
.slide { min-width: 100%; position: relative; aspect-ratio: 16/9; max-height: 520px; }
.slide .cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,30,20,.92) 0%, rgba(10,30,20,.35) 45%, transparent 70%); }
.slide .scontent { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px, 4vw, 44px); color: #fff; }
.slide .scat { display: inline-block; background: var(--gold-500); color: #3a2c08; font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; }
.slide h3 { color: #fff; font-size: clamp(1.3rem, 3vw, 2.3rem); max-width: 760px; line-height: 1.18; }
.slide .sdate { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: rgba(255,255,255,.85); font-weight: 600; font-size: .9rem; }
.slide .sdate svg { width: 16px; height: 16px; }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 14px; pointer-events: none; }
.slider-nav button { pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--green-800); font-size: 1.3rem; display: grid; place-items: center; box-shadow: var(--shadow); transition: .2s; }
.slider-nav button:hover { background: #fff; transform: scale(1.08); }
.slider-dots { position: absolute; bottom: 16px; right: 20px; display: flex; gap: 8px; z-index: 3; }
.slider-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); transition: .2s; padding: 0; }
.slider-dots button.active { background: #fff; width: 26px; border-radius: 999px; }

/* --- featured side list (small items next to slider) --- */
.featured-grid { display: grid; grid-template-columns: 1.6fr .9fr; gap: 24px; align-items: stretch; }
.side-list { display: flex; flex-direction: column; gap: 14px; }
.side-item { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: .2s; }
.side-item:hover { border-color: var(--green-200, var(--green-100)); box-shadow: var(--shadow-sm); transform: translateX(3px); }
.side-item .sthumb { width: 86px; height: 70px; border-radius: 10px; flex: 0 0 auto; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.side-item h4 { font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-item .sdate { font-size: .76rem; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* --- news card (feed item) --- */
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .25s; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card .nmedia { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.news-card .nmedia .cover { position: absolute; inset: 0; background-size: cover; background-position: center; transition: .4s; }
.news-card:hover .nmedia .cover { transform: scale(1.05); }
.news-card .ncat { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255,255,255,.94); color: var(--green-800); font-weight: 700; font-size: .72rem; padding: 5px 11px; border-radius: 999px; }
.news-card .nbody { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card h3 { font-size: 1.02rem; line-height: 1.32; text-transform: uppercase; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .ndate { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: .82rem; }
.news-card .ndate svg { width: 15px; height: 15px; color: var(--green-600); }

.feed { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feed--3 { grid-template-columns: repeat(3, 1fr); }

/* --- layout: content + sidebar --- */
.portal-layout { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.sidebar-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.sidebar-card .sc-title { font-size: 1.05rem; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--green-100); position: relative; }
.rank-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: none; }
.rank-item .num { font-size: 1.4rem; font-weight: 800; color: var(--green-100); line-height: 1; width: 28px; flex: 0 0 auto; }
.rank-item:nth-child(1) .num { color: var(--gold-500); }
.rank-item:nth-child(2) .num { color: var(--green-500); }
.rank-item h4 { font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-item .rdate { font-size: .74rem; color: var(--muted); margin-top: 4px; }

/* --- ad banner --- */
.ad-banner { position: relative; border-radius: var(--radius); overflow: hidden; margin: 8px 0; background: linear-gradient(120deg, #141414, #2a2a2a); color: #fff; box-shadow: var(--shadow-sm); }
.ad-banner .adlabel { position: absolute; top: 8px; right: 10px; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); z-index: 3; }
.ad-inner { display: flex; align-items: center; gap: 20px; padding: 22px 26px; position: relative; }
.ad-inner .ad-gold { color: var(--gold-500); }
.ad-inner h4 { color: #fff; font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 800; }
.ad-inner p { color: rgba(255,255,255,.75); font-size: .88rem; margin-top: 4px; }
.ad-inner .ad-phone { margin-left: auto; font-weight: 800; font-size: 1.15rem; color: var(--gold-500); white-space: nowrap; }
.ad-badge { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--gold-500); display: grid; place-items: center; color: var(--gold-500); font-weight: 800; font-size: .7rem; text-align: center; line-height: 1.1; flex: 0 0 auto; }

/* --- category nav strip --- */
.cat-strip { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0; overflow-x: auto; }

/* --- single article --- */
.article-wrap { max-width: 820px; margin-inline: auto; }
.article-hero { aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; margin: 22px 0; box-shadow: var(--shadow); position: relative; }
.article-hero .cover { position: absolute; inset: 0; background-size: cover; background-position: center; }
.article-body { font-size: 1.08rem; color: var(--ink-soft); line-height: 1.8; }
.article-body p { margin-bottom: 18px; }
.article-body h2 { font-size: 1.5rem; margin: 30px 0 14px; color: var(--ink); }
.article-body blockquote { border-left: 4px solid var(--green-500); background: var(--green-050); padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 20px 0; color: var(--ink); font-style: italic; }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: .9rem; align-items: center; }
.article-meta span { display: inline-flex; gap: 7px; align-items: center; }
.article-meta svg { width: 17px; height: 17px; color: var(--green-600); }
.share-row { display: flex; gap: 10px; align-items: center; margin: 26px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-row b { margin-right: 6px; }
.share-row a { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--green-050); color: var(--green-700); transition: .2s; }
.share-row a:hover { background: var(--green-700); color: #fff; transform: translateY(-3px); }
.share-row svg { width: 19px; height: 19px; }

/* --- responsive (news portal) --- */
@media (max-width: 1024px) {
  .feed { grid-template-columns: repeat(2, 1fr); }
  .portal-layout { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .side-list { flex-direction: row; overflow-x: auto; }
  .side-item { min-width: 260px; }
}
@media (max-width: 860px) {
  .hsearch { display: none; }
}
@media (max-width: 640px) {
  .feed, .feed--3 { grid-template-columns: 1fr; }
  .ad-inner { flex-wrap: wrap; gap: 12px; padding: 18px; }
  .ad-inner .ad-phone { margin-left: 0; width: 100%; }
  .side-list { flex-direction: column; }
  .side-item { min-width: 0; }
}
