/* Smart Mam — общие стили сайта (главная + материалы) */
:root{
  --bg:#ffffff;
  --surface: rgba(15, 23, 42, .02);
  --surface2: rgba(15, 23, 42, .035);
  --card:#ffffff;
  --text:#0b1220;
  --muted: rgba(15, 23, 42, .72);
  --muted2: rgba(15, 23, 42, .58);
  --line: rgba(15, 23, 42, .12);

  --accent:#1c5961;   /* teal */
  --accent2:#2a8893;  /* light teal */
  --accent-rgb: 28, 89, 97;
  --accent2-rgb: 42, 136, 147;

  --warm:#de5b19;     /* orange */
  --warm2:#f08a3c;
  --warm-rgb: 222, 91, 25;
  --warm2-rgb: 240, 138, 60;

  --shadow: 0 18px 50px rgba(2, 6, 23, .10);
  --shadow2: 0 12px 28px rgba(2, 6, 23, .08);
  --radius: 22px;
  --radius2: 28px;
  --max: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background: var(--bg);
  line-height:1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
.container{max-width:var(--max); margin:0 auto; padding:0 18px}

/* Top nav */
.nav{
  position:sticky; top:0; z-index:50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
.nav__row{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:12px 0;
}
.brand{display:flex; gap:10px; align-items:center; min-width: 220px}
.brand__logo{
  width:34px; height:34px; border-radius:14px;
  box-shadow: 0 14px 34px rgba(var(--accent2-rgb), .18);
  background:#fff;
}
.brand__name{font-weight:900; letter-spacing:-.01em}
.brand__sub{font-size:12px; color:var(--muted2); margin-top:2px}

.nav__links{
  display:flex; gap:18px; align-items:center; flex-wrap:wrap;
  color: var(--muted);
  font-weight:600;
  font-size:14px;
}
.nav__links a{padding:8px 10px; border-radius:999px}
.nav__links a:hover{background: rgba(var(--accent2-rgb), .10); color: var(--text)}
.nav__links a.is-active{background: rgba(var(--accent2-rgb), .16); color: var(--text)}

.nav__cta{display:flex; gap:10px; align-items:center}
.btn{
  border:1px solid var(--line);
  background: #fff;
  padding: 11px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:hover{transform: translateY(-1px); box-shadow: var(--shadow2)}
.btn:active{transform: translateY(0)}
.btn--primary{
  border-color: rgba(var(--accent2-rgb), .35);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#fff;
}
.btn--primary:hover{
  background: linear-gradient(135deg, #174a50, #2b96a3);
  box-shadow: 0 18px 36px rgba(var(--accent-rgb), .20);
}
.btn--ghost{
  background: rgba(15, 23, 42, .02);
}
.btn--warm{
  border-color: rgba(var(--warm2-rgb), .35);
  background: linear-gradient(135deg, var(--warm), var(--warm2));
  color:#fff;
}
.btn--warm:hover{
  background: linear-gradient(135deg, #c54f14, #ff9a4f);
  box-shadow: 0 18px 36px rgba(var(--warm-rgb), .18);
}

/* Hero */
.hero{
  padding: 44px 0 22px;
  position: relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute; inset:-160px -160px -160px -160px;
  background:
    radial-gradient(circle at 25% 35%, rgba(var(--accent2-rgb), .22), transparent 55%),
    radial-gradient(circle at 75% 10%, rgba(var(--warm2-rgb), .20), transparent 45%),
    radial-gradient(circle at 70% 78%, rgba(var(--accent-rgb), .12), transparent 58%);
  filter: blur(0px);
  pointer-events:none;
}
.hero__grid{
  position:relative;
  display:grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 22px;
  align-items:center;
}
.kicker{
  display:inline-flex; gap:10px; align-items:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-weight:700;
  font-size: 13px;
}
.kicker b{color: var(--text)}
.h1{
  font-size: clamp(30px, 3.2vw, 48px);
  line-height:1.1;
  margin: 14px 0 12px;
  letter-spacing: -0.03em;
}
.h1 .hl{
  background: linear-gradient(135deg, var(--warm), var(--warm2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.lead{font-size: 17px; color: var(--muted); margin: 0 0 18px}
.hero .h1{font-size:clamp(26px,3.2vw,40px);line-height:1.05}
.hero__cta{display:flex; gap:12px; flex-wrap:wrap}
.hero__note{margin-top:12px; color: var(--muted2); font-size: 13px}
.hero__image{
  border-radius: var(--radius2);
  overflow:hidden;
  box-shadow: var(--shadow);
  border:1px solid var(--line);
  background: #fff;
}
.hero__image img{width:100%; height: 320px; object-fit: cover}
.hero__image--materials img{height: 360px; object-position: top center}
.hero__image .cap{margin-top:12px;padding:10px 12px;background:rgba(255,255,255,.92);border:1px solid rgba(16,24,40,.10);border-radius:16px;box-shadow:0 10px 28px rgba(7,28,40,.08);font-weight:700;color:#0f172a;line-height:1.3;display:block;width:fit-content;max-width:100%;margin-inline:auto}

/* Sections */
.section{padding: 34px 0}
.section__head{
  display:flex; gap:12px; align-items:flex-end; justify-content:space-between;
  margin-bottom: 14px;
}
.h2{
  font-size: 28px;
  letter-spacing: -.02em;
  margin:0;
}
.sub{color: var(--muted2); margin: 0; max-width: 720px}
.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.row{display:flex;align-items:flex-start;gap:12px}
.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 26px rgba(2,6,23,.05);
}
.card__pad{padding: 16px}
.card__title{font-size: 16px; margin: 0 0 6px; letter-spacing:-.01em}
.card__text{margin: 0; color: var(--muted)}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(var(--accent2-rgb), .08);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.pill--warm{background: rgba(var(--warm2-rgb), .10)}
.iconBubble{
  width: 40px; height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent2-rgb), .25);
  background: rgba(var(--accent2-rgb), .10);
  display:grid; place-items:center;
}
.iconBubble svg{width: 20px; height: 20px; stroke: var(--accent); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round}

/* Featured masterclass */
.feature{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  align-items:stretch;
}
.feature__left .h2{font-size: 26px}
.feature__right{
  border-radius: var(--radius);
  border:1px solid rgba(var(--warm2-rgb), .25);
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--warm2-rgb), .16), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(var(--accent2-rgb), .14), transparent 48%),
    rgba(255,255,255,.9);
}
.feature__right .card__pad{padding: 18px}
.kv{display:grid; gap:10px; margin-top: 10px}
.kv div{display:flex; align-items:flex-start; gap:10px; color: var(--muted)}
.kv b{color: var(--text)}

/* Materials grid */
.materials{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mcard{overflow:hidden; display:flex; flex-direction:column}
.mcard__img{height: 190px; background: #f3f4f6}
.mcard__img img{width:100%; height:100%; object-fit: contain;object-position:center center}
.mcard__body{padding: 14px 14px 16px}
.mmeta{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:8px}
.mmeta span{font-size:12px; color: var(--muted2)}
.mcard__title{font-size: 16px; margin: 0 0 6px; letter-spacing:-.01em}
.mcard__text{margin:0; color: var(--muted); font-size: 14px}
.mcard__foot{margin-top:auto; padding: 0 14px 16px}
.mlink{
  display:inline-flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(15, 23, 42, .02);
  font-weight:800;
}
.mlink:hover{background: rgba(var(--accent2-rgb), .10); border-color: rgba(var(--accent2-rgb), .25)}

/* Telegram CTA */
.tgBlock{
  border-radius: var(--radius2);
  border: 1px solid rgba(var(--accent2-rgb), .25);
  background:
    radial-gradient(circle at 10% 20%, rgba(var(--accent2-rgb), .18), transparent 46%),
    radial-gradient(circle at 90% 10%, rgba(var(--warm2-rgb), .18), transparent 45%),
    #ffffff;
  box-shadow: var(--shadow2);
}
.tgBlock .card__pad{padding: 20px}
.tgBlock__grid{
  display:grid; grid-template-columns: 1fr auto;
  gap: 14px; align-items:center;
}
.tgBlock__title{margin:0; font-size: 20px; letter-spacing:-.01em}
.tgBlock__text{margin: 6px 0 0; color: var(--muted)}
.tgBullets{margin: 14px 0 0; padding:0; list-style:none; display:grid; gap:8px}
.tgBullets li{display:flex; gap:10px; align-items:flex-start; color: var(--muted)}
.tgBullets svg{width:18px; height:18px; stroke: var(--warm); fill:none; stroke-width:2; margin-top:2px}

/* Article */
.article{
  padding: 34px 0 40px;
}
.article__hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items:center;
}
.article__hero img{width:100%; height: 340px; object-fit: contain; border-radius: var(--radius2); border:1px solid var(--line); box-shadow: var(--shadow2)}
.article__meta{display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 0}
.article__content{
  max-width: 760px;
  margin: 22px auto 0;
  color: rgba(15,23,42,.86);
  font-size: 16px;
}
.article__content h2{font-size: 22px; margin: 22px 0 10px; letter-spacing:-.01em; color: var(--text)}
.article__content h3{font-size: 18px; margin: 18px 0 8px; color: var(--text)}
.article__content p{margin: 10px 0}
.article__content ul{margin: 8px 0 12px; padding-left: 18px}
.article__content li{margin: 6px 0}
.callout{
  border:1px solid rgba(var(--accent2-rgb), .25);
  background: rgba(var(--accent2-rgb), .08);
  border-radius: 18px;
  padding: 14px 14px;
  margin: 14px 0;
  color: rgba(15,23,42,.84);
}
.callout b{color: var(--text)}
.hr{height:1px; background: var(--line); border:0; margin: 22px 0}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted2);
  font-size: 13px;
}
.footer__row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  flex-wrap:wrap;
}
.footer__dev{
  display:flex; align-items:center; gap:10px;
}
.footer__dev a{
  display:inline-flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(15,23,42,.02);
}
.footer__dev a:hover{background: rgba(var(--accent2-rgb), .10)}
.footer__dev img{height: 18px; width:auto; opacity:.82}
.smallprint{max-width: 720px; font-size: 12px; color: rgba(15,23,42,.52)}

.footer__social{
  display:flex; align-items:center; gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}
.footer__social-label{
  color: rgba(15,23,42,.62);
  font-weight: 700;
}
.footer__social-link{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(15,23,42,.02);
  font-weight: 800;
}
.footer__social-link:hover{background: rgba(var(--accent2-rgb), .10)}

/* Responsive */
@media (max-width: 980px){
  .hero__grid, .feature, .article__hero{grid-template-columns: 1fr}
  .hero__image img{height: 360px}
  .grid3, .materials{grid-template-columns: 1fr 1fr}
}
@media (max-width: 640px){
  .nav__links{display:none}
  .hero{padding-top: 34px}
  .hero__image img{height: 300px}
  .grid3, .materials{grid-template-columns: 1fr}
  .tgBlock__grid{grid-template-columns: 1fr}
}


/* Certificates grid */
.certGrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:16px;
}
@media (max-width: 980px){
  .certGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .certGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.certCard{
  display:block;
  background: rgba(255,255,255,.75);
  border:1px solid rgba(16,24,40,.14);
  border-radius:18px;
  overflow:hidden;
  box-shadow: 0 12px 32px rgba(16,24,40,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.certCard img{
  width:100%;
  height:160px;
  object-fit:cover;
  display:block;
  filter: saturate(1.02);
}
.certCard__cap{
  padding:10px 12px 12px;
  font-size:14px;
  color: rgba(16,24,40,.78);
}
.certCard:hover{
  transform: translateY(-3px);
  border-color: rgba(0,119,128,.38);
  box-shadow: 0 18px 44px rgba(16,24,40,.14);
}


/* === v11: Home hero + certificates + compact buttons === */
.btn--sm{
  padding: 9px 12px;
  font-size: 15px;
}

.hero__grid--home{
  align-items: center;
}

.hero__bullets{
  list-style: none;
  padding: 0;
  margin: 14px 0 6px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.hero__bullets li{
  position: relative;
  padding-left: 22px;
}
.hero__bullets li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand);
  font-weight: 800;
}

.hero__cta--wrap{
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hero__link{
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  padding: 8px 2px;
  border-radius: 10px;
}
.hero__link:hover{
  text-decoration: underline;
}

.hero__note{
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.certScroller{
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scroll-snap-type: x mandatory;
}
.certCard{
  flex: 0 0 260px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}
.certCard img{
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: #f7faf9;
  display: block;
}
.certCard__cap{
  padding: 12px 14px;
  font-weight: 800;
  font-size: 14px;
}

/* Make nav CTAs a bit more compact on desktop */
.nav__cta .btn{
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 920px){
  .certCard{ flex-basis: 240px; }
}

.hero__kicker{margin-top:18px;font-weight:800;font-size:18px;color:var(--ink);}

/* ==========================================================
   v16 overrides — compact readable hero, tighter cards,
   photo covers for materials & articles
   ========================================================== */

/* HERO: make the first screen lighter and more readable */
.hero{ padding: 28px 0 18px; }
.hero__kicker{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(16,24,40,.78);
}
.h1{ font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.02em; }
.hero__lead{ font-size: 17px; max-width: 56ch; }
.hero__cta{ margin-top: 18px; gap: 10px; }
.btn{ padding: 12px 16px; font-size: 15px; }
.btn--sm{ padding: 10px 14px; font-size: 14px; }

/* Home hero: full-height photo + plaque on the photo */
.hero__grid--home{align-items:stretch}
.hero__grid--home .hero__content{align-self:center}

.heroMedia{position:relative;height:100%;min-height:420px;border-radius:22px;overflow:hidden;padding:0;background:transparent;border:0;box-shadow:0 18px 50px rgba(7,28,40,.14)}
.heroMedia__img{width:100%;height:100%;object-fit:cover;object-position:50% 45%;display:block}
.heroMedia__cap{position:absolute;left:14px;bottom:14px;width:min(480px,calc(100% - 28px));margin:0;padding:12px 14px;background:rgba(255,255,255,.92);border:1px solid rgba(255,255,255,.58);border-radius:18px;box-shadow:0 14px 36px rgba(7,28,40,.18);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);font-weight:700;color:#0f172a;font-size:18px;line-height:1.3}
/* remove the previous extra top margin injected by old overrides */
.hero__kicker{ margin-top: 0; }

@media (max-width: 980px){
  .hero{ padding: 18px 0 10px; }
  .hero__grid{ grid-template-columns: 1fr; }
  .hero__grid--home .heroMedia{ height: 360px; min-height: 0; }
  .heroMedia__cap{ left: 12px; bottom: 12px; width: calc(100% - 24px); font-size: 16px; }
  .hero__cta{ margin-top: 14px; }
}
/* FEATURE CARDS: icon closer to the title */
.cardHead{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.cardHead__body{ display:flex; flex-direction:column; gap: 6px; }
.card__title{ margin: 0; font-size: 20px; }
.card__text{ margin-top: 10px; }
.iconBubble{ width: 44px; height: 44px; border-radius: 14px; }

/* MATERIALS: real photo covers (3:2) */
.materialsCard__media{ aspect-ratio: 3/2; height: auto; }
.materialsCard__media img{ width:100%; height:100%; object-fit: cover; }
.materialsCard__media{ background: #f3f5f7; }

/* ARTICLE hero cover: vertical posters should NOT be cropped */
.article__hero picture,
.article__hero img{
  display:block;
  width:100%;
}

.article__hero img{
  height:auto;
  max-height: 640px;
  object-fit: contain;
  background: var(--paper);
}


/* v16: hero meta line + link */
.hero__metaLine{ margin-top: 14px; color: rgba(16,24,40,.72); font-weight: 600; }
.hero__link{ display:inline-block; margin-top: 6px; color: var(--teal); font-weight: 800; text-decoration: none; }
.hero__link:hover{ text-decoration: underline; }
/* v16: smaller header CTA buttons */
.nav__cta .btn{ padding: 9px 14px; font-size: 15px; }
/* v16: materials cards on home/materials — real photo covers */
.mcard__img{ height: auto; aspect-ratio: 3 / 2; }
.mcard__img img{ object-fit: cover; }


/* v19: poster-style materials cards (image contains the title) */
.srOnly{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

.posterGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items:start;
}

.posterGrid--home{
  margin-top: 22px;
}

@media (max-width: 980px){
  .posterGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .posterGrid{ grid-template-columns: 1fr; }
}

.posterCard{
  display:block;
  color:inherit;
  text-decoration:none;
}

.posterCard__imgWrap{
  border-radius: var(--radius2);
  overflow:hidden;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(16,24,40,.14);
  transform: translateY(0);
  transition: transform .18s ease, box-shadow .18s ease;
}

.posterCard__img{
  display:block;
  width:100%;
  height:auto;
}

.posterCard__meta{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 6px 0;
  color: rgba(16,24,40,.7);
  font-size: 14px;
  font-weight: 600;
}

.posterCard__open{
  color: rgba(16,24,40,.85);
}

.posterCard:hover .posterCard__imgWrap{
  transform: translateY(-2px);
  box-shadow: 0 22px 70px rgba(16,24,40,.18);
}

.posterCard:focus-visible{
  outline: 3px solid rgba(28, 100, 118, .35);
  outline-offset: 6px;
  border-radius: var(--radius2);
}

/* v19: materials header illustration — remove the frame */
.hero__image--materials{padding:0;background:transparent;border:0;box-shadow:none;overflow:visible}

/* v19: materials header illustration — show the full poster (no crop) */
.hero__image--materials img{
  height:auto;
  max-height: 520px;
  width:auto;
  max-width: 100%;
  object-fit: contain;
  display:block;
  margin-inline:auto;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(16,24,40,.14);
}
