/* ============================================================
   IT Коледж — Public site CSS
   Self-hosted fonts + design tokens + layout styles
   ============================================================ */

/* ---- @font-face: Open Sans ---- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-cyrillic-800-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/lib/fonts/open-sans/files/open-sans-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- @font-face: Inter ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/lib/fonts/inter/files/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Design tokens
   ============================================================ */

:root {
  /* ---- Brand: Violet (primary) ---- */
  --brand-purple: #600CEB;
  --brand-purple-700: #4809B0;
  --brand-purple-600: #550AC9;
  --brand-purple-500: #600CEB;
  --brand-purple-400: #7E38EF;
  --brand-purple-300: #9D66F3;
  --brand-purple-200: #C4A3F8;
  --brand-purple-100: #E2D0FC;
  --brand-purple-50:  #F2EBFE;
  --brand-purple-61a: rgba(96,12,235,0.61);
  --brand-purple-42a: rgba(96,12,235,0.42);

  /* ---- Brand: Yellow ---- */
  --brand-yellow: #F9DB74;
  --brand-yellow-300: #FBE79A;
  --brand-yellow-200: #FCEFBC;
  --brand-yellow-100: #FDF6DC;
  --brand-yellow-50:  #FEFAEE;

  /* ---- Brand: Sky ---- */
  --brand-blue: #5FBDF7;
  --brand-blue-300: #8BD0F9;
  --brand-blue-200: #B4E1FB;
  --brand-blue-100: #DAF0FD;
  --brand-blue-50:  #EEF8FE;

  /* ---- Brand: Coral / Orange ---- */
  --brand-orange: #E36756;
  --brand-orange-300: #EB9186;
  --brand-orange-200: #F2B8B1;
  --brand-orange-100: #F8DCD8;
  --brand-orange-50:  #FCEEEC;

  /* ---- Neutrals ---- */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #F7F7F8;
  --neutral-100: #F5F5F5;
  --neutral-200: #E4E4E4;
  --neutral-300: #D9D9D9;
  --neutral-400: #B1B1B1;
  --neutral-500: #898989;
  --neutral-600: #606060;
  --neutral-700: #4B4B4B;
  --neutral-900: #1D1D1B;
  --neutral-950: #000000;
  --ink:         #211F54;
  --stroke-cool: #A0A3BD;

  /* ---- White alpha ---- */
  --white-92: rgba(255,255,255,0.92);
  --white-78: rgba(255,255,255,0.78);
  --white-68: rgba(255,255,255,0.68);
  --white-56: rgba(255,255,255,0.56);
  --white-42: rgba(255,255,255,0.42);
  --white-30: rgba(255,255,255,0.30);

  /* ---- Semantic ---- */
  --color-primary:        var(--brand-purple);
  --color-primary-hover:  var(--brand-purple-700);
  --color-primary-soft:   var(--brand-purple-50);
  --color-accent:         var(--brand-orange);
  --color-info:           var(--brand-blue);
  --color-highlight:      var(--brand-yellow);

  --text-strong:     var(--neutral-950);
  --text-body:       #000000;
  --text-heading:    var(--ink);
  --text-muted:      var(--neutral-500);
  --text-on-primary: #FFFFFF;
  --text-link:       var(--brand-purple);

  --surface-page:    #FFFFFF;
  --surface-card:    #FFFFFF;
  --surface-subtle:  var(--neutral-100);
  --surface-primary: var(--brand-purple);
  --surface-inverse: var(--neutral-950);

  --border-subtle: var(--neutral-200);
  --border-strong: var(--neutral-300);
  --border-cool:   var(--stroke-cool);
  --focus-ring:    var(--brand-purple);

  /* ---- Spacing ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 100px;
  --page-gutter: 100px;
  --content-max: 1170px;
  --content-wide: 1440px;

  /* ---- Typography ---- */
  --font-display: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui:      "Inter", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-logo:    "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --weight-regular:   400;
  --weight-semibold:  600;
  --weight-bold:      700;
  --weight-extrabold: 800;

  --text-display-2xl: 120px;
  --text-display-xl:  80px;
  --text-display-lg:  55px;
  --text-h1:          55px;
  --text-h2:          34px;
  --text-h3:          25px;
  --text-body-lg:     25px;
  --text-body-size:   17px;
  --text-body-md:     16px;
  --text-caption:     12px;

  --leading-tight:   1.05;
  --leading-snug:    1.2;
  --leading-normal:  1.4;
  --leading-relaxed: 1.6;

  --tracking-tight:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.02em;

  /* ---- Radii ---- */
  --radius-xs:   6px;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   45px;
  --radius-pill: 999px;
  --radius-mark: 22.9%;

  /* ---- Shadows ---- */
  --shadow-sm:     0 3px 3px rgba(0,0,0,0.05);
  --shadow-md:     0 3px 5px rgba(0,0,0,0.2);
  --shadow-soft:   0 4px 24px rgba(21,19,99,0.06);
  --shadow-card:   15px 22px 41px 0 rgba(0,0,0,0.15);
  --shadow-violet: 0 18px 40px -12px rgba(96,12,235,0.45);

  /* ---- Gradients ---- */
  --gradient-primary: linear-gradient(269.9deg, #600CEB 0%, rgba(96,12,235,0.42) 43%, rgba(96,12,235,0) 96%);
  --gradient-title:   linear-gradient(90deg, #EBE1FF 0%, #7E38EF 45%, #600CEB 100%);
  --gradient-stroke:  linear-gradient(180deg, #FFFFFF -42.92%, rgba(255,255,255,0.78) 2.95%, rgba(255,255,255,0) 94.69%);
  --gradient-surface: linear-gradient(150deg, #7E38EF 0%, #600CEB 55%, #4809B0 100%);

  /* ---- Motion ---- */
  --ease-out:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.18s;
  --dur-base: 0.26s;
  --dur-slow: 0.4s;
}

/* ============================================================
   Base reset & global
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--color-primary-hover); }

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-4);
}

/* ============================================================
   Layout containers
   ============================================================ */

.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--space-6));
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 1440px) {
  .wrap {
    padding-inline: var(--page-gutter);
    max-width: calc(var(--content-max) + 2 * var(--page-gutter));
  }
}

/* Legacy .container alias — matches .wrap exactly */
.container {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--space-6));
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 1440px) {
  .container {
    padding-inline: var(--page-gutter);
    max-width: calc(var(--content-max) + 2 * var(--page-gutter));
  }
}

/* ============================================================
   Brand motif utilities
   ============================================================ */

.it-dots {
  background-image: radial-gradient(var(--brand-purple-200) 2px, transparent 2px);
  background-size: 28px 28px;
}
.it-dots--dense { background-size: 18px 18px; }
.it-dots--on-violet {
  background-image: radial-gradient(rgba(255,255,255,0.22) 2px, transparent 2px);
}

.it-title-pill {
  display: inline-flex;
  align-items: center;
  padding: 18px 40px;
  border-radius: var(--radius-pill);
  background: var(--gradient-title);
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.it-fade-bar {
  height: 86px;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary);
}

.it-focusable:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   Top contact bar
   ============================================================ */

#sp-top-bar {
  background: var(--neutral-50);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  color: var(--text-muted);
}

.top-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-block: var(--space-2);
}

.top-title {
  font-weight: var(--weight-semibold);
  color: var(--text-heading);
  flex: 1 1 auto;
}

.top-search {
  display: flex;
  align-items: center;
}
.top-search form {
  display: flex;
  gap: var(--space-2);
}
.top-search input[type="search"] {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.top-search input[type="search"]:focus {
  border-color: var(--color-primary);
}

.top-lang {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
}
.top-lang a { color: var(--text-muted); }
.top-lang strong { color: var(--color-primary); }

.top-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.top-contacts li { display: flex; align-items: center; gap: var(--space-1); }
.top-contacts .ico { font-size: 1em; }
.top-contacts a { color: var(--text-muted); }
.top-contacts a:hover { color: var(--color-primary); }

/* ============================================================
   Header - Design: white bg, purple text nav, pill active state
   ============================================================ */

#sp-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border-subtle);
}

.header-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: 14px;
  flex-wrap: nowrap;
}

/* Logo lockup */
#sp-logo a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
#sp-logo .logo-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
#sp-logo .logo-wordmark {
  height: 32px;
  width: auto;
}
#sp-logo {
  margin-right: var(--space-2);
  flex-shrink: 0;
}

/* Header CTA button */
.header-cta-btn {
  display: inline-flex;
  align-items: center;
  background: var(--brand-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: var(--weight-bold);
  font-size: 14px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  margin-left: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out);
}
.header-cta-btn:hover {
  background: var(--brand-purple-700);
  color: #fff;
}

/* Mobile toggle */
#offcanvas-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
#offcanvas-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

/* Navigation */
#sp-menu {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.megamenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1px;
  align-items: center;
  flex-wrap: nowrap;
}

.megamenu > .menu-item > a {
  display: block;
  padding: 9px clamp(6px, 0.55vw, 11px);
  border-radius: var(--radius-pill);
  color: var(--ink) !important;
  font-family: var(--font-ui);
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.megamenu > .menu-item > a:hover {
  color: var(--brand-purple) !important;
  background: var(--brand-purple-50);
}
.megamenu > .menu-item.has-child:hover > a {
  color: var(--brand-purple) !important;
  background: var(--brand-purple-50);
}

/* Chevron indicator for items with children */
.megamenu > .menu-item.has-child > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 5px;
  vertical-align: 1px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.megamenu > .menu-item.has-child:hover > a::after {
  transform: rotate(-135deg);
}

/* Dropdown */
.menu-item { position: relative; }
.menu-item .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  padding: 8px;
  /* Bridge the gap between trigger and dropdown panel */
  padding-top: 14px;
  margin-top: 0;
}
/* Use a pseudo-element bridge to prevent gap hover loss */
.menu-item.has-child > .dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.menu-item:hover > .dropdown { display: block; }

.dropdown-inner { padding: 0; }
.dropdown-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dropdown-items .menu-item > a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--ink) !important;
  font-size: 14px;
  transition: background var(--dur-fast) var(--ease-out);
}
.dropdown-items .menu-item > a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* Arrow indicator for nested dropdown parents */
.dropdown-items > .menu-item.has-child > a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-left: 6px;
  vertical-align: 1px;
}

/* Nested (3rd-level) flyout: appears to the right of parent */
.dropdown-items .menu-item > .dropdown {
  top: 0;
  left: 100%;
  margin-top: 0;
  padding-top: 8px;
  margin-left: 4px;
}
/* Hover bridge for nested flyout (covers the gap to the left) */
.dropdown-items .menu-item.has-child > .dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  bottom: 0;
  width: 8px;
  height: auto;
  right: auto;
}

/* ============================================================
   Page title banner
   ============================================================ */

#sp-page-title {
  background: var(--gradient-surface);
  padding: var(--space-10) 0;
}
#sp-page-title h2 {
  color: #fff;
  font-size: var(--text-h2);
  font-weight: var(--weight-extrabold);
  margin: 0;
}

/* ============================================================
   Main body
   ============================================================ */

#sp-main-body {
  padding: var(--space-12) 0;
}

/* ============================================================
   Section headings & content components
   ============================================================ */

.sec-h {
  font-size: var(--text-h2);
  font-weight: var(--weight-extrabold);
  color: var(--text-heading);
  margin-bottom: var(--space-6);
}

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
}

/* Card */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-body-md);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  border: none;
  text-decoration: none;
}
/* btn-primary and btn-outline now defined in blocks.css */

/* ============================================================
   Footer - Design: dark ink bg, 3-column grid
   ============================================================ */

#sp-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
}

.footer-main {
  padding: 44px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
.footer-logo-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.footer-logo-wordmark {
  height: 32px;
  width: auto;
  /* Invert dark wordmark to white for dark footer */
  filter: brightness(0) invert(1);
}

.footer-desc {
  margin-top: 16px;
  max-width: 320px;
  line-height: 1.6;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.footer-nav h4,
.footer-contacts h4 {
  color: #fff;
  font-weight: var(--weight-bold);
  font-size: 15px;
  margin: 0 0 14px;
}

.footer-nav ul,
.footer-contacts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-nav ul a,
.footer-contacts ul a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.footer-nav ul a:hover,
.footer-contacts ul a:hover {
  color: #fff;
}

.footer-contacts li {
  color: rgba(255,255,255,0.7);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.social-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  font-size: 12px;
  font-weight: var(--weight-bold);
  color: #fff;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out);
}
.social-item:hover { background: rgba(255,255,255,0.2); }
.social-item svg { width: 20px; height: 20px; }

/* Partner logos strip */
.footer-partners {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
}
.partner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.partner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.partner-chip:hover { box-shadow: 0 2px 12px rgba(255,255,255,0.18); }
.partner-chip img {
  height: 32px;
  width: auto;
  display: block;
}

.footer-copyright {
  /* background stays full-bleed; border + content constrained via .wrap */
}

.copyright-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-ui);
  font-size: 14px;
  padding-block: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.admin-link {
  color: rgba(255,255,255,0.42);
  font-size: 13px;
}
.admin-link:hover { color: rgba(255,255,255,0.92); }

/* ============================================================
   Language switcher
   ============================================================ */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
}
.lang-switcher a { color: var(--white-68); }
.lang-switcher a:hover { color: #fff; }
.lang-switcher strong { color: #fff; }
.lang-sep { color: var(--white-42); }

/* ============================================================
   Fallback notices (preserved from original)
   ============================================================ */

.fallback-notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--brand-yellow-100);
  border-left: 4px solid var(--brand-yellow);
  border-radius: var(--radius-xs);
  font-size: var(--text-body-md);
  color: var(--text-body);
  margin-bottom: var(--space-4);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1023px) {
  .top-contacts { display: none; }
  .top-title { display: none; }
  .header-cta-btn { display: none; }

  #offcanvas-toggler { display: flex; }

  #sp-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--gradient-surface);
    z-index: 300;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: var(--space-16) var(--space-6) var(--space-6);
    overflow-y: auto;
  }
  body.nav-open #sp-menu { display: flex; }

  .megamenu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .megamenu > .menu-item > a {
    padding: var(--space-4) var(--space-4);
    border-radius: 0;
    font-size: var(--text-body-lg);
    border-bottom: 1px solid var(--white-30);
    color: #fff !important;
  }
  .menu-item .dropdown {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.08);
    border-radius: 0;
    border: none;
  }
  .menu-item:hover > .dropdown { display: block; }
  .dropdown-items .menu-item > a {
    color: var(--white-92) !important;
    padding-left: var(--space-8);
  }
  .dropdown-items .menu-item > a:hover {
    background: var(--white-30);
    color: #fff !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 767px) {
  .wrap { padding-inline: var(--space-4); }
  .top-bar-row { gap: var(--space-2); }
  .top-search { display: none; }
  #sp-main-body { padding: var(--space-8) 0; }
  .sec-h { font-size: var(--text-h3); }
  #sp-page-title h2 { font-size: var(--text-h3); }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .wrap { padding-inline: var(--space-8); }
}

/* ============================================================
   News listing — card grid  (Task 10.1)
   ============================================================ */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.news-card__img-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-primary-soft);
}

.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-base) var(--ease-out);
}
.news-card:hover .news-card__img { transform: scale(1.04); }

.news-card__img-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--gradient-primary);
  opacity: 0.25;
}

.news-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.news-card__date {
  font-size: var(--text-caption);
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.news-card__title {
  font-size: var(--text-body-lg);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  line-height: var(--leading-snug);
  margin: 0;
}
.news-card__title a {
  color: inherit;
  text-decoration: none;
}
.news-card__title a:hover { color: var(--color-primary); }

.news-card__excerpt {
  font-size: var(--text-body-md);
  color: var(--text-body);
  line-height: var(--leading-relaxed);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__link {
  align-self: flex-start;
  margin-top: var(--space-3);
  font-size: var(--text-caption);
  padding: var(--space-2) var(--space-4);
}

/* Pagination */
.pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.pagination-counter {
  font-size: var(--text-body-md);
  color: var(--text-muted);
  margin: 0;
}

.pagination {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

.pagination li a,
.pagination li span {
  min-width: 40px;
  text-align: center;
  padding: var(--space-2) var(--space-3);
}

/* Override btn-outline (white-on-dark) for pagination on light page background */
.pagination li a.btn-outline {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  background: transparent;
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
}
.pagination li a.btn-outline:hover {
  background: var(--brand-purple-50);
  border-color: var(--brand-purple-700);
  color: var(--brand-purple-700);
}

/* Active page button */
.pagination li.active span.btn-primary {
  background: var(--brand-purple);
  color: #fff;
  border: 1.5px solid var(--brand-purple);
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
}

.pagination li.active span {
  cursor: default;
}

/* Responsive news grid */
@media (max-width: 1023px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Article detail  (Task 10.2)
   ============================================================ */

.article-layout {
  max-width: 820px;
  margin: 0 auto;
}

.article-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.article-title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-h1);
  color: var(--text-heading);
  line-height: var(--leading-tight);
  margin: 0;
}

.article-meta {
  font-size: var(--text-body-md);
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.article-cover {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-4) 0;
}
.article-cover img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.article-back {
  margin-top: var(--space-8);
}

/* Prose / typographic containment for imported news HTML */
.prose {
  font-size: var(--text-body-size);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
}
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}
.prose p { margin: 0 0 var(--space-4); }
.prose img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 70vh;
  border-radius: var(--radius-sm);
  display: block;
  margin: var(--space-6) auto;
}
/* Inline icons next to links (e.g. PDF icons) stay small */
.prose a > img,
.prose a > img:only-child {
  display: inline-block;
  vertical-align: middle;
  max-height: 1.4em;
  max-width: 1.4em;
  width: auto;
  margin: 0 4px 0 0;
  border-radius: 0;
}
.prose a { color: var(--text-link); }
.prose a:hover { color: var(--color-primary-hover); }
.prose ul, .prose ol {
  padding-left: var(--space-8);
  margin: 0 0 var(--space-4);
}
.prose li { margin-bottom: var(--space-2); }
.prose blockquote {
  border-left: 4px solid var(--color-primary);
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary-soft);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: var(--text-body-md);
}
.prose th, .prose td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  text-align: left;
}
.prose th { background: var(--surface-subtle); font-weight: var(--weight-semibold); }
.prose iframe, .prose video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--space-6) auto;
}

/* ============================================================
   Contacts page  (Task 10.3)
   ============================================================ */

.contacts-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-10);
  align-items: start;
  margin-top: var(--space-10);
}

.contacts-info__title {
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-top: 0;
  margin-bottom: var(--space-5);
}

.contacts-info__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: var(--text-body-md);
  color: var(--text-body);
}

.contacts-info__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.contacts-info__ico {
  font-size: 1.2em;
  flex-shrink: 0;
}

.contacts-form-card {
  padding: var(--space-10);
}

.contacts-form-card__eyebrow {
  margin-bottom: var(--space-2);
}

.contacts-form-card__title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-h3);
  color: var(--text-heading);
  margin: 0 0 var(--space-6);
}

/* Form shared styles */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field label {
  font-family: var(--font-ui);
  font-size: var(--text-body-md);
  font-weight: var(--weight-semibold);
  color: var(--text-heading);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  color: var(--text-body);
  background: var(--surface-page);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.field-error {
  font-size: var(--text-caption);
  color: #c0392b;
  font-family: var(--font-ui);
}

.alert-success {
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary);
  color: var(--text-heading);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xs);
  font-weight: var(--weight-semibold);
}

.alert-warning {
  background: #fff8e1;
  border: 1px solid #f9a825;
  color: #5a3e00;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xs);
}

@media (max-width: 767px) {
  .contacts-layout { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .contacts-form-card { padding: var(--space-6); }
}

/* ============================================================
   Search page  (Task 10.4)
   ============================================================ */

.search-form {
  margin-bottom: var(--space-8);
}

.search-form__row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.search-form__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  color: var(--text-body);
  background: var(--surface-page);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.search-form__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.search-summary {
  font-size: var(--text-body-md);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.search-results {
  list-style: none;
  margin: 0 0 var(--space-8);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.search-result-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.search-result-item:hover {
  box-shadow: var(--shadow-soft);
}

.search-result-item__link {
  font-size: var(--text-body-md);
  font-weight: var(--weight-semibold);
  color: var(--text-link);
  flex: 1;
}
.search-result-item__link:hover { color: var(--color-primary-hover); }

.search-result-item__date {
  font-size: var(--text-caption);
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: var(--font-ui);
}

/* ============================================================
   Generic content page  (Task 10.5)
   ============================================================ */

.prose-page {
  max-width: 820px;
  margin: 0 auto;
}

/* ============================================================
   Library pages  (Task 10.4 extension)
   ============================================================ */

.lib-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.lib-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  font-family: var(--font-ui);
  font-weight: var(--weight-semibold);
  font-size: var(--text-body-md);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-link);
}
.lib-letter:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.lib-letter-empty {
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}

.lib-letter-current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  cursor: default;
  pointer-events: none;
}

.lib-section-title {
  font-size: var(--text-h3);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin: var(--space-8) 0 var(--space-5);
}

.lib-periodicals {
  list-style: disc;
  padding-left: var(--space-8);
  margin: 0 0 var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-body-md);
  line-height: var(--leading-relaxed);
}

.lib-list {
  list-style: decimal;
  padding-left: var(--space-8);
  margin: 0 0 var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.lib-entry {
  font-size: var(--text-body-md);
  line-height: var(--leading-relaxed);
}

.lib-citation { color: var(--text-body); }

.lib-view {
  margin-left: var(--space-3);
  font-size: var(--text-caption);
  font-family: var(--font-ui);
  font-weight: var(--weight-semibold);
  color: var(--text-link);
}
.lib-view:hover { color: var(--color-primary-hover); }

.lib-intro {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   btn-default alias for backward compat
   ============================================================ */

.btn-default {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-xs);
  font-family: var(--font-ui);
  font-size: var(--text-body-md);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn-default:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

/* ============================================================
   Responsive article title
   ============================================================ */

@media (max-width: 767px) {
  .article-title { font-size: var(--text-h2); }
  .news-card__title { font-size: var(--text-body-md); }
}

/* ============================================================
   Article carousel
   ============================================================ */

.article-carousel {
  position: relative;
  margin: var(--space-8) 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-muted, #f5f5f5);
}

.article-carousel__track {
  position: relative;
  width: 100%;
  min-height: 300px;
}

/* CSS-first: all slides positioned in the stack; only .active is visible.
   No JS needed to hide slides - no FOUC. */
.article-carousel__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease, transform 350ms ease;
  transform: translateX(8px);
}

.article-carousel__slide.active {
  position: relative; /* reclaim height from the track */
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* Slide entering from left (prev direction) */
.article-carousel__slide.entering-prev {
  transform: translateX(-8px);
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .article-carousel__slide {
    transition: opacity 150ms ease;
    transform: none !important;
  }
}

.article-carousel__slide img {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.article-carousel__prev,
.article-carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: var(--space-3) var(--space-4);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  z-index: 2;
  transition: background var(--dur-fast) var(--ease-out);
}

.article-carousel__prev:hover,
.article-carousel__next:hover {
  background: rgba(0, 0, 0, 0.75);
}

.article-carousel__prev { left: var(--space-3); }
.article-carousel__next { right: var(--space-3); }

.article-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.article-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-primary, #1e40af);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur-fast) var(--ease-out);
}

.article-carousel__dot.active {
  background: var(--color-primary, #1e40af);
}

/* ============================================================
   YouTube embed wrapper (responsive 16:9)
   ============================================================ */

.youtube-embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin: var(--space-6) 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}

.youtube-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   Tag chips
   ============================================================ */

.tag-chip {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 9999px;
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  background: var(--color-primary-soft, #e0e7ff);
  color: var(--color-primary, #1e40af);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out);
}

.tag-chip:hover {
  background: var(--color-primary, #1e40af);
  color: #fff;
}

.tag-chip--sm {
  font-size: 0.7rem;
  padding: 2px var(--space-2);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.news-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-2) 0;
}

.page-heading {
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-bottom: var(--space-8);
}

/* ============================================================
   Editor carousel container preview
   Shows a dashed border around .carousel containers in WYSIWYG
   so editors know which images will become a carousel.
   ============================================================ */

.sun-editor-editable .carousel,
.se-wrapper-inner .carousel {
  border: 2px dashed var(--brand-purple, #600CEB);
  border-radius: var(--radius-sm, 8px);
  padding: var(--space-3, 12px);
  margin: var(--space-4, 16px) 0;
  position: relative;
  min-height: 60px;
}
.sun-editor-editable .carousel::before,
.se-wrapper-inner .carousel::before {
  content: 'Каруселя';
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--brand-purple, #600CEB);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 4px;
  pointer-events: none;
}

