/*
Theme Name: CRL Theme
Theme URI: https://crl.ks.ua
Author: CRL IT
Description: Легка тема для офіційного сайту КНП "Косівська ЦРЛ"
Version: 0.1
Text Domain: crl-theme
*/

:root {
  --bg: #f5f9ff;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #38bdf8;
  --soft-blue: #eaf4ff;
  --soft-blue-2: #dbeafe;
  --border: #dbeafe;
  --shadow: 0 18px 45px rgba(37, 99, 235, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--muted);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: #334155;
}

.main-nav a:hover {
  background: #eaf4ff;
  color: var(--primary-dark);
}

.hero {
  padding: 64px 0 34px;
}

.hero-card {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 34%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.10), transparent 36%),
    linear-gradient(135deg, #ffffff, #eaf4ff);
  border: 1px solid var(--border);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: 52px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  margin: 0 0 22px;
  letter-spacing: -0.05em;
}

.hero p {
  font-size: 19px;
  color: #475569;
  max-width: 720px;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 750;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-light {
  background: white;
  border-color: var(--border);
  color: #1e293b;
}

.btn-light:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.hero-info {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  align-self: stretch;
}

.hero-info h2 {
  font-size: 20px;
  margin: 0 0 14px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-item {
  padding: 12px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid var(--border);
}

.info-item strong {
  display: block;
  font-size: 14px;
}

.info-item span {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.03em;
}

.section-desc {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 720px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.news-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body {
  padding: 20px;
}

.news-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.news-title {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 10px;
}

.news-excerpt {
  color: var(--muted);
  margin: 0 0 14px;
}

.read-more {
  color: var(--primary-dark);
  font-weight: 750;
}

.page-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  margin: 34px 0;
}

.page-content h1 {
  margin-top: 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.site-footer {
  margin-top: 46px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: white;
  padding: 42px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 24px;
}

.footer-muted {
  color: #cbd5e1;
}

.footer-title {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .main-nav ul {
    flex-wrap: wrap;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* === CRL BLUE LOGO UPDATE START === */
body {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.15), transparent 28%),
    linear-gradient(180deg, #f5f9ff 0%, #eef6ff 45%, #f8fbff 100%);
}

.container {
  width: min(1420px, calc(100% - 44px));
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #dbeafe;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.06);
}

.header-inner {
  min-height: 86px;
}

.brand-with-logo {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 260px;
}

.site-logo-img {
  width: 265px;
  max-width: 38vw;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero {
  padding: 70px 0 36px;
}

.hero-card {
  grid-template-columns: minmax(0, 1.22fr) minmax(380px, 0.78fr);
  gap: 34px;
  padding: clamp(34px, 4.2vw, 58px);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.25), transparent 32%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.12), transparent 36%),
    linear-gradient(135deg, #ffffff, #eaf4ff);
  border: 1px solid #dbeafe;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
}

.hero p {
  max-width: 760px;
}

.contact-panel {
  padding: 22px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
}

.info-list {
  gap: 9px;
}

.info-item {
  padding: 11px 13px;
  background: rgba(248, 251, 255, 0.96);
  border: 1px solid #dbeafe;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.info-item:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.07);
}

.info-item strong {
  color: #172033;
  font-size: 13.5px;
  line-height: 1.25;
}

.info-item span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}

.info-item a {
  color: #1d4ed8;
  font-weight: 750;
}

.info-item a:hover {
  text-decoration: underline;
}

.hero-actions-mini {
  margin-top: 15px;
}

.hero-actions-mini .btn {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-light {
  background: rgba(255,255,255,0.82);
  border-color: #dbeafe;
}

.main-nav a:hover {
  background: #eaf4ff;
  color: #1d4ed8;
}

.card,
.news-card,
.page-content {
  border-color: #dbeafe;
}

.site-footer {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

@media (max-width: 1040px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    max-width: 620px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1420px);
  }

  .header-inner {
    min-height: auto;
  }

  .site-logo-img {
    width: 220px;
    max-width: 76vw;
  }

  .hero {
    padding: 34px 0 24px;
  }

  .hero-card {
    padding: 26px;
    border-radius: 26px;
  }
}
/* === CRL BLUE LOGO UPDATE END === */


/* === CRL header + hero refinements === */

.site-header {
  min-height: auto;
}

.header-inner {
  min-height: 86px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-with-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  max-width: 260px;
}

.site-logo-img {
  width: 180px;
  max-height: 74px;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: none;
}

.main-nav {
  display: block;
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 9px 12px;
  font-size: 15px;
}

.container {
  width: min(1380px, calc(100% - 40px));
}

.hero {
  padding: 58px 0 34px;
}

.hero-card {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 58px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
}

.contact-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.contact-panel .info-list {
  gap: 10px;
}

.contact-panel .info-item {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(191, 219, 254, 0.95);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.05);
}

.info-item strong {
  font-size: 14px;
  color: #1e293b;
}

.info-item span {
  font-size: 14px;
}

.info-item a {
  color: var(--primary-dark);
  font-weight: 800;
}

.info-item a:hover {
  text-decoration: underline;
}

.hero-actions .btn-primary {
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

@media (max-width: 1000px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    margin-left: 0;
    width: 100%;
  }

  .main-nav ul {
    justify-content: flex-start;
  }

  .hero-card {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .site-logo-img {
    width: 160px;
    max-height: 68px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 24px, 1380px);
  }

  .hero {
    padding: 34px 0 24px;
  }

  .hero-card {
    padding: 28px;
    border-radius: 26px;
  }

  .site-logo-img {
    width: 145px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
/* === FINAL HEADER / HERO FIX === */

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dbeafe;
}

.header-inner {
  min-height: 104px !important;
  padding: 10px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 28px !important;
  flex-direction: row !important;
}

.brand-with-logo {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  max-width: none !important;
}

.site-logo-img {
  width: 265px !important;
  max-width: 265px !important;
  max-height: 90px !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.main-nav {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-left: auto !important;
  flex: 1 1 auto !important;
}

.main-nav ul {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.main-nav li {
  display: block !important;
}

.main-nav a {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding: 9px 11px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.main-nav a:hover {
  background: #eaf4ff !important;
  color: #1d4ed8 !important;
}

.hero {
  padding: 56px 0 34px !important;
}

.hero-card {
  grid-template-columns: 1.18fr 0.82fr !important;
  gap: 56px !important;
}

.contact-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.contact-lines {
  display: grid;
  gap: 12px;
  font-size: 15px;
}

.contact-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
}

.contact-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-line span {
  color: #475569;
  font-weight: 650;
}

.contact-line a,
.contact-line strong {
  color: #1d4ed8;
  font-weight: 850;
}

.contact-line a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .header-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    min-height: auto !important;
  }

  .site-logo-img {
    width: 235px !important;
    max-width: 235px !important;
    max-height: 82px !important;
  }

  .main-nav {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .main-nav ul {
    justify-content: flex-start !important;
  }

  .hero-card {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .site-logo-img {
    width: 210px !important;
    max-width: 210px !important;
  }

  .main-nav a {
    font-size: 13px !important;
    padding: 8px 10px !important;
  }

  .contact-line {
    display: block;
  }

  .contact-line span,
  .contact-line a,
  .contact-line strong {
    display: block;
  }
}

/* === COMPACT HERO + CLEAN QUICK LINKS === */

.hero {
  padding: 36px 0 24px !important;
}

.hero-card {
  padding: 34px 42px !important;
  border-radius: 30px !important;
  gap: 42px !important;
}

.hero h1 {
  font-size: clamp(30px, 3.4vw, 46px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.04em !important;
  margin-bottom: 18px !important;
  max-width: 760px;
}

.hero p {
  font-size: 17px !important;
  line-height: 1.65 !important;
  max-width: 760px !important;
  margin-bottom: 22px !important;
}

.hero-badge {
  margin-bottom: 14px !important;
  padding: 7px 13px !important;
  font-size: 13px !important;
}

.hero-actions {
  gap: 10px !important;
}

.btn {
  min-height: 42px !important;
  padding: 10px 17px !important;
}

.contact-lines {
  gap: 9px !important;
  font-size: 14px !important;
}

.contact-line {
  padding: 0 0 8px !important;
}

.quick-links-section {
  padding-top: 20px !important;
}

.quick-links-section .grid {
  margin-top: 0 !important;
}

.quick-links-section .card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.quick-links-section .card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.10);
}

.quick-links-section .card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.quick-links-section .card p {
  font-size: 15px;
}

@media (max-width: 900px) {
  .hero-card {
    padding: 28px !important;
  }

  .hero h1 {
    font-size: clamp(28px, 8vw, 38px) !important;
  }

  .hero p {
    font-size: 16px !important;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 24px 0 18px !important;
  }

  .hero-card {
    padding: 22px !important;
    border-radius: 24px !important;
  }

  .quick-links-section .card {
    min-height: 112px;
  }
}

/* === NEWS ARCHIVE === */

.news-archive {
  padding-top: 46px !important;
}

.pagination {
  margin-top: 34px;
}

.pagination .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #1e293b;
  font-weight: 700;
}

.pagination .current {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* === INTERACTIVE HOME TABS === */

.home-tabs {
  margin-top: 0;
}

.home-tabs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-tab-card {
  appearance: none;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 36%),
    #ffffff;
  border-radius: 22px;
  padding: 22px;
  min-height: 150px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.home-tab-card:hover,
.home-tab-card.active {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
}

.home-tab-card.active {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff, #eaf4ff);
}

.home-tab-card .tab-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 850;
}

.home-tab-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
  color: #172033;
  margin-bottom: 8px;
}

.home-tab-card small {
  display: block;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.home-tab-panels {
  margin-top: 20px;
}

.home-tab-panel {
  display: none;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 26px;
  padding: 24px;
  overflow: hidden;
}

.home-tab-panel.active {
  display: block;
  animation: tabFade .18s ease-out;
}

@keyframes tabFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.panel-head p {
  margin: 7px 0 0;
  color: #64748b;
}

.panel-more {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 4px 4px 12px;
  scrollbar-color: #93c5fd #eff6ff;
  scrollbar-width: thin;
}

.scroll-row::-webkit-scrollbar {
  height: 9px;
}

.scroll-row::-webkit-scrollbar-track {
  background: #eff6ff;
  border-radius: 999px;
}

.scroll-row::-webkit-scrollbar-thumb {
  background: #93c5fd;
  border-radius: 999px;
}

.mini-card {
  scroll-snap-align: start;
  min-height: 156px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 20px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.12);
}

.mini-card strong {
  display: block;
  color: #172033;
  font-size: 19px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.mini-card span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.mini-card::after {
  content: "Детальніше →";
  color: #1d4ed8;
  font-weight: 850;
  font-size: 14px;
  margin-top: 16px;
}

@media (max-width: 1000px) {
  .home-tabs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .home-tabs-grid {
    grid-template-columns: 1fr;
  }

  .home-tab-card {
    min-height: auto;
    padding: 18px;
  }

  .home-tab-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .scroll-row {
    grid-auto-columns: minmax(240px, 82vw);
  }

  .panel-head h2 {
    font-size: 24px;
  }
}

/* === TABS CLOSED BY DEFAULT + CLEAN EXPANDED ROW === */

.home-tab-card {
  position: relative;
}

.home-tab-card.active::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -18px;
  width: 26px;
  height: 26px;
  background: #ffffff;
  border-right: 1px solid rgba(37, 99, 235, 0.22);
  border-bottom: 1px solid rgba(37, 99, 235, 0.22);
  transform: rotate(45deg);
  z-index: 3;
}

.home-tab-panels {
  margin-top: 24px !important;
}

.home-tab-panel {
  display: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 18px 0 2px !important;
  overflow: visible !important;
}

.home-tab-panel.active {
  display: block;
  animation: tabFade .18s ease-out;
}

.panel-head {
  display: none !important;
}

.scroll-row {
  padding: 12px 4px 16px !important;
  border-top: 1px solid rgba(37, 99, 235, 0.14);
  background:
    linear-gradient(90deg, rgba(37,99,235,0.08), transparent 22%, transparent 78%, rgba(37,99,235,0.08));
  border-radius: 0 !important;
}

.mini-card {
  cursor: pointer;
}

.mini-card::after {
  content: none !important;
  display: none !important;
}

.mini-card:hover strong {
  color: #1d4ed8;
}

@media (max-width: 600px) {
  .home-tab-card.active::after {
    left: 30px;
    bottom: -16px;
    width: 22px;
    height: 22px;
  }

  .home-tab-panels {
    margin-top: 20px !important;
  }
}

/* === CLEAN CAROUSEL WITHOUT VISIBLE STRIP === */

.home-tab-panels {
  margin-top: 22px !important;
}

.home-tab-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 8px 0 0 !important;
}

.scroll-row {
  border-top: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 6px 52px 10px !important;
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(260px, 310px) !important;
  gap: 16px !important;
  overflow-x: auto !important;
  scroll-snap-type: inline mandatory !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.scroll-row::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.carousel-shell {
  position: relative;
  margin-top: 4px;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.carousel-arrow:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.carousel-arrow-prev {
  left: 0;
}

.carousel-arrow-next {
  right: 0;
}

.mini-card {
  min-height: 150px !important;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 36%),
    #ffffff !important;
  border: 1px solid rgba(191, 219, 254, 0.95) !important;
  border-radius: 22px !important;
  padding: 22px !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.06) !important;
}

.mini-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(37, 99, 235, 0.45) !important;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.13) !important;
}

.mini-card strong {
  font-size: 20px !important;
  line-height: 1.22 !important;
}

.mini-card span {
  font-size: 14px !important;
  line-height: 1.45 !important;
}

@media (max-width: 700px) {
  .scroll-row {
    padding: 6px 0 10px !important;
    grid-auto-columns: minmax(250px, 82vw) !important;
  }

  .carousel-arrow {
    display: none !important;
  }
}

/* === UNIFIED SVG ICONS + CLEAN CAROUSEL FINAL === */

.home-tab-card.active::after {
  display: none !important;
}

.home-tabs-grid {
  align-items: stretch;
}

.home-tab-card {
  position: relative;
  overflow: hidden;
}

.home-tab-card.active {
  border-color: rgba(37, 99, 235, 0.55) !important;
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.14) !important;
}

.home-tab-card.active::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #facc15);
}

.tab-icon,
.mini-icon {
  color: #2563eb;
}

.tab-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.20), transparent 40%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(56, 189, 248, 0.10));
  border: 1px solid rgba(191, 219, 254, 0.95);
  margin-bottom: 14px;
}

.tab-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(56, 189, 248, 0.09));
  border: 1px solid rgba(191, 219, 254, 0.95);
  margin-bottom: 14px;
  flex: 0 0 auto;
}

.mini-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-tab-panels {
  margin-top: 20px !important;
}

.home-tab-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.carousel-shell {
  position: relative;
  padding: 0 62px;
  margin-top: 0;
}

.scroll-row {
  border-top: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 4px 0 12px !important;
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(270px, 320px) !important;
  gap: 16px !important;
  overflow-x: auto !important;
  scroll-snap-type: inline mandatory !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.scroll-row::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(255, 255, 255, 0.96);
  color: #2563eb;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

.carousel-arrow:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.carousel-arrow-prev {
  left: 0;
}

.carousel-arrow-next {
  right: 0;
}

.mini-card {
  min-height: 178px !important;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 38%),
    #ffffff !important;
  border: 1px solid rgba(191, 219, 254, 0.95) !important;
  border-radius: 22px !important;
  padding: 22px !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.06) !important;
  justify-content: flex-start !important;
}

.mini-card::after {
  content: none !important;
  display: none !important;
}

.mini-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(37, 99, 235, 0.45) !important;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.13) !important;
}

.mini-card:hover .mini-icon {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-color: rgba(37, 99, 235, 0.45);
}

.mini-card:hover strong {
  color: #1d4ed8;
}

.mini-card strong {
  font-size: 20px !important;
  line-height: 1.22 !important;
  margin-bottom: 9px !important;
}

.mini-card span:not(.mini-icon) {
  font-size: 14px !important;
  line-height: 1.45 !important;
  color: #64748b;
}

@media (max-width: 900px) {
  .carousel-shell {
    padding: 0;
  }

  .carousel-arrow {
    display: none !important;
  }

  .scroll-row {
    grid-auto-columns: minmax(250px, 82vw) !important;
  }
}

@media (max-width: 600px) {
  .tab-icon {
    width: 48px;
    height: 48px;
  }

  .tab-icon svg {
    width: 26px;
    height: 26px;
  }

  .mini-card {
    min-height: 164px !important;
  }
}

/* === ICONS RETHINK: CLEANER OFFICIAL STYLE === */

.home-tab-card {
  padding: 24px !important;
}

.home-tab-card .tab-kicker {
  display: block !important;
  margin-bottom: 9px !important;
}

.tab-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.tab-title-row strong {
  margin: 0 !important;
}

.tab-icon {
  width: auto !important;
  height: auto !important;
  min-width: 34px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  color: #2563eb !important;
}

.tab-icon svg {
  width: 34px !important;
  height: 34px !important;
  stroke-width: 1.85 !important;
}

.home-tab-card.active .tab-icon {
  color: #1d4ed8 !important;
}

/* Нижні плитки: іконка як водяний знак на фоні */
.mini-card {
  position: relative !important;
  overflow: hidden !important;
  padding: 24px !important;
}

.mini-card .mini-icon {
  position: absolute !important;
  right: 18px !important;
  top: 16px !important;
  width: 86px !important;
  height: 86px !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(37, 99, 235, 0.10) !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

.mini-card .mini-icon svg {
  width: 86px !important;
  height: 86px !important;
  stroke-width: 1.35 !important;
}

.mini-card strong,
.mini-card span:not(.mini-icon) {
  position: relative !important;
  z-index: 1 !important;
}

.mini-card:hover .mini-icon {
  color: rgba(37, 99, 235, 0.16) !important;
  background: transparent !important;
  border: 0 !important;
}

.mini-card strong {
  max-width: 82%;
}

.mini-card span:not(.mini-icon) {
  max-width: 86%;
}

/* Щоб верхні плитки не виглядали як застосунок */
.home-tab-card {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 34%),
    #ffffff !important;
}

.home-tab-card.active {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 36%),
    linear-gradient(135deg, #ffffff, #eef7ff) !important;
}

@media (max-width: 600px) {
  .tab-icon svg {
    width: 30px !important;
    height: 30px !important;
  }

  .mini-card .mini-icon,
  .mini-card .mini-icon svg {
    width: 72px !important;
    height: 72px !important;
  }
}

/* === HOVER CAROUSEL CONCEPT: NO BUTTONS, COMPACT CARDS === */

.carousel-arrow,
.carousel-arrow-prev,
.carousel-arrow-next {
  display: none !important;
}

.home-tab-panels {
  margin-top: 18px !important;
}

.home-tab-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

.hover-carousel-shell,
.carousel-shell {
  position: relative !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* М'який натяк, що ряд можна рухати */
.hover-carousel-shell::before,
.hover-carousel-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 0px;
  z-index: 4;
  pointer-events: none;
}

.hover-carousel-shell::before {
  left: 0;
  background: linear-gradient(90deg, #eef6ff 0%, rgba(238, 246, 255, 0) 100%);
}

.hover-carousel-shell::after {
  right: 0;
  background: linear-gradient(270deg, #eef6ff 0%, rgba(238, 246, 255, 0) 100%);
}

.scroll-row {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(220px, 252px) !important;
  gap: 14px !important;
  overflow-x: auto !important;
  overscroll-behavior-inline: contain !important;
  scroll-snap-type: none !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 2px 0 12px !important;
  background: transparent !important;
  border: 0 !important;
}

.scroll-row::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Нижні плитки — компактні, без водяних іконок */
.mini-card {
  position: relative !important;
  overflow: hidden !important;
  min-height: 124px !important;
  padding: 18px 18px 16px !important;
  border-radius: 20px !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #f9fcff 100%) !important;
  border: 1px solid rgba(191, 219, 254, 0.95) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.055) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease !important;
}

.mini-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #facc15);
  opacity: 0.55;
}

.mini-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(37, 99, 235, 0.42) !important;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.13) !important;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 38%),
    #ffffff !important;
}

.mini-card .mini-icon {
  display: none !important;
}

.mini-card strong {
  position: relative !important;
  z-index: 1 !important;
  max-width: none !important;
  font-size: 18px !important;
  line-height: 1.22 !important;
  margin: 0 0 9px !important;
  color: #172033 !important;
}

.mini-card span:not(.mini-icon) {
  position: relative !important;
  z-index: 1 !important;
  max-width: none !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  color: #64748b !important;
}

.mini-card:hover strong {
  color: #1d4ed8 !important;
}

/* Верхні плитки лишаємо з іконкою в ряд, але трохи чистіше */
.home-tab-card {
  min-height: 132px !important;
  padding: 22px !important;
}

.tab-title-row {
  gap: 10px !important;
}

.tab-icon {
  color: #2563eb !important;
  opacity: 0.9;
}

.tab-icon svg {
  width: 30px !important;
  height: 30px !important;
  stroke-width: 1.8 !important;
}

.home-tab-card strong {
  font-size: 25px !important;
}

@media (max-width: 900px) {
  .hover-carousel-shell::before,
  .hover-carousel-shell::after {
    display: none !important;
  }

  .scroll-row {
    grid-auto-columns: minmax(230px, 80vw) !important;
    scroll-snap-type: inline mandatory !important;
  }

  .mini-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .mini-card {
    min-height: 118px !important;
  }

  .home-tab-card {
    min-height: auto !important;
  }
}



/* === REFINED DEPARTMENT CARDS === */

/* Вужчі бокові fade-зони */
.hover-carousel-shell::before,
.hover-carousel-shell::after {
  width: 0px !important;
}

.hover-carousel-shell::before {
  background: linear-gradient(90deg, #eef6ff 0%, rgba(238, 246, 255, 0) 100%) !important;
}

.hover-carousel-shell::after {
  background: linear-gradient(270deg, #eef6ff 0%, rgba(238, 246, 255, 0) 100%) !important;
}

/* Трохи менший відступ між каруселлю і краями */
.scroll-row {
  padding: 2px 0 10px !important;
}

/* Самі карточки */
.mini-card {
  min-height: 118px !important;
  padding: 16px 18px 14px !important;
  border-radius: 18px !important;
  position: relative !important;
}

/* Тонка акцентна лінія зверху лишається, але ніжніша */
.mini-card::before {
  left: 16px !important;
  right: 16px !important;
  height: 2px !important;
  opacity: 0.42 !important;
}

/* Прибираємо старі великі іконки повністю */
.mini-card .mini-icon {
  display: none !important;
}

/* Нова маленька іконка-декор у правому верхньому куті */
.mini-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  opacity: 0.16;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

/* Текст */
.mini-card strong {
  font-size: 17px !important;
  line-height: 1.18 !important;
  margin: 0 0 8px !important;
  max-width: calc(100% - 42px) !important;
}

.mini-card span:not(.mini-icon) {
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  max-width: calc(100% - 28px) !important;
}

/* Ховер */
.mini-card:hover {
  transform: translateY(-2px) !important;
}

.mini-card:hover::after {
  opacity: 0.24;
}

.gridtab{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
}

.gridtab .listing-item{
    border-radius:12px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    transition:.3s;
}

.gridtab .listing-item:hover{
    transform:translateY(-4px);
}

.gridtab img{
    width:100%;
    height:240px;
    object-fit:cover;
    display:block;
}

.gridtab .title{
    padding:15px;
    font-size:20px;
    font-weight:700;
    line-height:1.4;
}

.gridtab .excerpt{
    padding:0 15px 20px;
    color:#666;
}

/* tablet */
@media(max-width:992px){
    .gridtab{
        grid-template-columns:repeat(2,1fr);
    }
}

/* mobile */
@media(max-width:600px){
    .gridtab{
        grid-template-columns:1fr;
    }
}

.blog-category .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .blog-category .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-category .posts-grid {
        grid-template-columns: 1fr;
    }
}

.blog-category .post-card {
    border-radius: 20px;
    overflow: hidden;
}

.blog-category .post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.blog-builder {
    display: grid;
    gap: 30px;
}

/* колонки */
.columns-1 { grid-template-columns: 1fr; }
.columns-2 { grid-template-columns: repeat(2, 1fr); }
.columns-3 { grid-template-columns: repeat(3, 1fr); }
.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

body.page-id-201 .blog-builder { gap:20px; }
body.page-id-201 .blog-card { min-width:0; display:flex; flex-direction:column; border-color:#d9e4f0; }
body.page-id-201 .blog-card .thumb { display:block; }
body.page-id-201 .blog-card img { display:block; height:180px; }
body.page-id-201 .blog-card .content { padding:18px; }
body.page-id-201 .blog-card h2 { margin:0 0 12px; font-size:19px; line-height:1.35; overflow-wrap:anywhere; }
body.page-id-201 .blog-card p { margin:0; font-size:15px; line-height:1.55; }
body.page-id-201 .builder-pagination { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:32px; }
body.page-id-201 .builder-pagination .page-numbers { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:44px; height:44px; padding:0 12px; border:1px solid #d9e4f0; border-radius:10px; font-size:16px !important; color:#2468ad; text-decoration:none; }
body.page-id-201 .builder-pagination .current { background:#2468ad; border-color:#2468ad; color:#fff; }
body.page-id-201 .builder-pagination a:hover { background:#edf4fb; }

/* картка */
.blog-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.2s;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

@media (max-width: 992px) {
    .columns-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .columns-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .columns-4 { grid-template-columns: 1fr; }
    .columns-2,
    .columns-3 { grid-template-columns: 1fr; }
}

.blog-builder .builder-pagination .page-numbers {
    border: none;
    background: transparent;
}

.blog-builder .builder-pagination .page-numbers:hover {
    background: #f5f5f5;
}

.blog-builder .builder-pagination .page-numbers.current {
    background: #111;
    color: #fff;
}

.blog-builder .builder-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.blog-builder .builder-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;

    margin: 0 5px;

    border-radius: 999px;
    border: 1px solid #e5e5e5;

    background: #fff;
    color: #333;

    text-decoration: none;
    font-size: 14px;

    transition: all 0.2s ease;
}

.blog-builder .builder-pagination .page-numbers:hover {
    background: #f5f5f5;
    border-color: #000;
    transform: translateY(-2px);
}

.blog-builder .builder-pagination .page-numbers.current {
    background: #000;
    color: #fff;
    border-color: #000;
}

.blog-builder .builder-pagination .prev,
.blog-builder .builder-pagination .next {
    font-weight: 600;
    font-size: 16px;
}

.builder-pagination .page-numbers {
    font-size: 24px !important;

    width: 44px;
    height: 44px;

 
    color: #ff3b30; /* будь-який колір */
    align-items: center;
    justify-content: center;
}
/* === 2026 presentation polish: header and responsive navigation === */
.site-header {
  position: sticky !important;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12) !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.site-header .header-inner {
  min-height: 88px !important;
  padding: 8px 0 !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
}

.site-header .site-logo-img {
  width: 190px !important;
  max-width: 190px !important;
  max-height: 72px !important;
}

.site-header nav.desktop-menu {
  display: block !important;
  flex: 1 1 auto;
  width: auto;
  margin-left: auto;
  padding: 0 !important;
  background: transparent !important;
}

.site-header .desktop-menu > .menu {
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: nowrap;
}

.site-header .desktop-menu .menu > li > a {
  height: auto;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 12px;
  color: #172033 !important;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.site-header .desktop-menu .menu > li > a:hover,
.site-header .desktop-menu .menu > li:focus-within > a {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}

.site-header .submenu,
.site-header .submenu-2 {
  border-radius: 12px;
  background: #123d70;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  overflow: visible;
}

.site-header .submenu a:hover,
.site-header .submenu-2 a:hover {
  background-color: #2468ad !important;
  color: #ffffff !important;
}

.site-header .submenu a,
.site-header .submenu-2 a {
  font-size: 14px;
  line-height: 1.35;
}

.site-header .submenu > li:first-child > a,
.site-header .submenu-2 > li:first-child > a {
  border-radius: 12px 12px 0 0;
}

.site-header .submenu > li:last-child > a,
.site-header .submenu-2 > li:last-child > a {
  border-radius: 0 0 12px 12px;
}

.site-header .submenu > li:only-child > a,
.site-header .submenu-2 > li:only-child > a {
  border-radius: 12px;
}

.menu-chevron {
  display: inline-block;
  margin-left: 3px;
  color: #2563eb;
  font-size: 16px;
  line-height: 0;
}

/* One shared footer across the homepage and all internal pages. */
.rd-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.rd-site-footer {
  padding: 68px 0 24px;
  color: #b7cccd;
  background: #071f3d;
}

body:not(.home) .rd-site-footer {
  margin-top: 46px;
}

.rd-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 70px;
}

.rd-footer-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.rd-footer-grid strong {
  margin-bottom: 8px;
  color: #fff;
}

.rd-footer-grid a {
  color: #b7cccd;
  font-size: 14px;
  text-decoration: none;
}

.rd-footer-grid a:hover {
  color: #fff;
}

body .rd-footer-brand img {
  width: 180px;
  height: auto;
  max-height: 82px;
  padding: 8px 12px;
  border-radius: 12px;
  object-fit: contain;
  object-position: left center;
  filter: none;
  opacity: 1;
  background: #fff;
}

.rd-footer-brand p {
  max-width: 350px;
  font-size: 14px;
  line-height: 1.65;
}

.rd-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 55px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.13);
  font-size: 12px;
}

.rd-footer-bottom a {
  color: #fff;
  text-decoration: none;
}

.rd-footer-signature {
  display: flex;
  align-items: center;
  gap: 22px;
}

.rd-footer-signature img {
  display: block;
  width: 72px;
  height: auto;
  opacity: .38;
  transition: opacity .18s ease;
}

.rd-footer-signature img:hover {
  opacity: .62;
}

@media (max-width: 850px) {
  .rd-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 42px;
  }
}

@media (max-width: 520px) {
  .rd-shell {
    width: min(100% - 24px, 1180px);
  }

  .rd-footer-grid {
    grid-template-columns: 1fr;
  }

  .rd-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .rd-footer-signature {
    width: 100%;
    justify-content: space-between;
  }
}

/* Keep the accessibility plugin visible without the clipped blue tab. */
.yydev-warp {
  position: fixed !important;
  top: auto !important;
  bottom: 20px !important;
  left: 16px !important;
  width: 52px !important;
  height: 52px !important;
  z-index: 990 !important;
}

.yydev-warp .yy-button {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  place-items: center;
  width: 52px !important;
  height: 52px !important;
  border: 2px solid #ffffff !important;
  border-radius: 14px !important;
  background: #2468ad !important;
  box-shadow: 0 10px 28px rgba(7, 89, 133, 0.28) !important;
}

.yydev-warp .yy-button::after {
  content: "";
}

.yydev-warp .crl-access-icon {
  display: block;
  width: 31px;
  height: 31px;
  color: #fff;
}

.yydev-warp .yy-box {
  position: absolute !important;
  top: auto !important;
  bottom: 62px !important;
  left: 0 !important;
  width: 290px !important;
  max-width: calc(100vw - 24px) !important;
  padding: 18px !important;
  border: 1px solid #d9e4f0 !important;
  border-radius: 16px !important;
  color: #102b4e !important;
  background: #ffffff !important;
  box-shadow: 0 20px 55px rgba(16, 43, 78, .24) !important;
}

.yydev-warp .yy-box a {
  border-radius: 8px !important;
}

@media (max-width: 1100px) {
  .site-header .site-logo-img {
    width: 160px !important;
    max-width: 160px !important;
  }

  .site-header .desktop-menu .menu > li > a {
    padding-inline: 8px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .yydev-warp {
    top: auto !important;
    bottom: 12px !important;
    left: 12px !important;
  }
  .site-header .header-inner {
    min-height: 72px !important;
    padding: 6px 0 !important;
  }

  .site-header .site-logo-img {
    width: 138px !important;
    max-width: 138px !important;
    max-height: 60px !important;
  }

  .site-header nav.desktop-menu {
    display: none !important;
  }

  .site-header .hamburger {
    display: grid !important;
    place-content: center;
    width: 48px;
    height: 48px;
    margin-left: auto;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
    position: relative;
    z-index: 1002;
  }

  .site-header .hamburger span {
    width: 24px;
    height: 2px;
    margin: 3px 0;
    border-radius: 99px;
    background: #172033;
  }

  .site-header .mobile-menu {
    top: 0;
    width: min(88vw, 340px);
    padding: 72px 12px 24px !important;
    background: #102248 !important;
    box-shadow: -18px 0 50px rgba(15, 23, 42, 0.28);
    z-index: 1001;
  }

  .site-header .mobile-menu.active {
    display: block !important;
  }

  .site-header .mobile-menu a {
    border-radius: 10px;
  }

  .hero {
    padding-top: 22px !important;
  }

  .hero-card {
    padding: 24px 20px !important;
    border-radius: 24px !important;
    gap: 30px !important;
  }

  .hero-card h1 {
    font-size: clamp(32px, 9vw, 42px) !important;
    line-height: 1.06 !important;
  }
}

/* === Unified internal page system === */
body:not(.home) main.container {
  width: min(1380px, calc(100% - 40px));
}

body:not(.home) .page-content {
  position: relative;
  margin: 38px auto 58px;
  padding: clamp(26px, 4vw, 54px);
  border: 1px solid #d9e4f0;
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(16, 43, 78, .08);
}

body:not(.home) .page-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(26px, 4vw, 54px);
  width: 74px;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: #2468ad;
}

body:not(.home) .page-content > h1 {
  margin: 0 0 34px;
  color: #102b4e;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.04;
}

body:not(.home) .page-content h2,
body:not(.home) .page-content h3 {
  color: #102b4e;
  line-height: 1.15;
}

body:not(.home) .page-content p,
body:not(.home) .page-content li {
  color: #43546a;
  font-size: 17px;
  line-height: 1.75;
}

body:not(.home) .page-content a {
  color: #2468ad;
  text-underline-offset: 3px;
}

body:not(.home) .page-content > img,
body:not(.home) .page-content figure img,
body:not(.home) .page-content .gallery img {
  border-radius: 18px !important;
  box-shadow: 0 15px 36px rgba(16, 43, 78, .12);
}

body:not(.home) .page-content .gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 16px !important;
  margin: 14px 0 38px !important;
  padding: 0 !important;
}

body:not(.home) .page-content .gallery img {
  width: 100% !important;
  max-width: none !important;
  height: 300px !important;
  object-fit: cover;
  transition: transform .3s ease, box-shadow .3s ease !important;
}

body:not(.home) .page-content .gallery img:hover,
body:not(.home) .page-content .image-container:hover img {
  transform: scale(1.025);
  box-shadow: 0 22px 45px rgba(16, 43, 78, .2);
}

body:not(.home) .page-content table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0;
  color: #263a55;
}

body:not(.home) .page-content table td,
body:not(.home) .page-content table th {
  padding: 13px 15px;
  border-color: #d9e4f0 !important;
}

.crl-empty-state {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #d9e4f0;
  border-radius: 20px;
  background: linear-gradient(135deg, #f1f6fc, #f8fbff);
}

.crl-empty-state > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #fff;
  background: #2468ad;
  font-size: 25px;
  font-weight: 800;
  font-family: Georgia, serif;
}

.crl-empty-state h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
}

.crl-empty-state p {
  max-width: 720px;
  margin: 0;
}

.crl-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.crl-empty-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #c9daec;
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.crl-empty-actions a:first-child {
  color: #fff !important;
  border-color: #2468ad;
  background: #2468ad;
}

/* Administration: contact facts and leadership cards. */
body.page-id-639 .page-content > table:first-of-type {
  margin-bottom: 42px;
  overflow: hidden;
  border: 1px solid #d9e4f0;
  border-radius: 18px;
  background: #f7faff;
}

body.page-id-639 .page-content > table:first-of-type tr:nth-child(even) {
  background: #eef5fc;
}

body.page-id-639 .page-content > table:first-of-type td:first-child {
  width: 31%;
  color: #102b4e;
}

body.page-id-639 .page-content > table:nth-of-type(2),
body.page-id-639 .page-content > table:nth-of-type(2) tbody {
  display: block;
}

body.page-id-639 .page-content > table:nth-of-type(2) tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

body.page-id-639 .page-content > table:nth-of-type(2) tr:first-child {
  display: none;
}

body.page-id-639 .page-content > table:nth-of-type(2) tr:not(:first-child) {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  grid-template-rows: repeat(3, auto);
  overflow: hidden;
  border: 1px solid #d9e4f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 43, 78, .08);
}

body.page-id-639 .page-content > table:nth-of-type(2) td {
  display: block;
  width: auto !important;
  min-width: 0;
  padding: 10px 18px !important;
  border: 0 !important;
  text-align: left !important;
  white-space: normal !important;
}

body.page-id-639 .page-content > table:nth-of-type(2) td:first-child {
  grid-row: 1 / 4;
  padding: 0 !important;
}

body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(2) {
  padding-top: 22px !important;
}

body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(2)::before,
body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(3)::before,
body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(4)::before,
body.page-id-174 .page-content > table:nth-of-type(2) td:nth-child(3)::before,
body.page-id-174 .page-content > table:nth-of-type(2) td:nth-child(4)::before {
  display: block;
  margin-bottom: 3px;
  color: #7690ad;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(2)::before { content: "Посада"; }
body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(3)::before { content: "День прийому"; }
body.page-id-639 .page-content > table:nth-of-type(2) td:nth-child(4)::before { content: "Години"; }

body.page-id-639 .page-content > table:nth-of-type(2) .image-container {
  width: 100% !important;
  height: 100%;
  min-height: 235px;
  border-radius: 0 !important;
}

body.page-id-639 .page-content > table:nth-of-type(2) .image-container img {
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  min-height: 235px;
  border-radius: 0 !important;
  object-fit: cover;
}

body.page-id-639 .page-content > table:nth-of-type(2) td p,
body.page-id-639 .page-content > table:nth-of-type(2) td span {
  margin: 0;
  font-size: 15px !important;
  line-height: 1.4;
}

/* Polyclinic: head physician and adaptive doctor directory. */
body.page-id-174 .page-content > table:first-of-type {
  margin: 34px 0;
  overflow: hidden;
  border: 1px solid #d9e4f0;
  border-radius: 20px;
  background: #f2f7fd;
}

body.page-id-174 .page-content > table:first-of-type td {
  border: 0 !important;
}

body.page-id-174 .page-content > table:nth-of-type(2),
body.page-id-174 .page-content > table:nth-of-type(2) tbody {
  display: block;
}

body.page-id-174 .page-content > table:nth-of-type(2) tbody {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.page-id-174 .page-content > table:nth-of-type(2) tr {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #d9e4f0 !important;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 43, 78, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

body.page-id-174 .page-content > table:nth-of-type(2) tr:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px rgba(16, 43, 78, .15);
}

body.page-id-174 .page-content > table:nth-of-type(2) td {
  display: block;
  width: 100% !important;
  padding: 9px 20px !important;
  border: 0 !important;
  text-align: left !important;
  white-space: normal !important;
}

body.page-id-174 .page-content > table:nth-of-type(2) td:first-child {
  padding: 0 !important;
}

body.page-id-174 .page-content > table:nth-of-type(2) td:nth-child(2) {
  flex: 1;
  padding-top: 18px !important;
}

body.page-id-174 .page-content > table:nth-of-type(2) td:nth-child(3)::before { content: "Графік прийому"; }
body.page-id-174 .page-content > table:nth-of-type(2) td:nth-child(4)::before { content: "Місце прийому"; }

body.page-id-174 .page-content > table:nth-of-type(2) .image-container {
  width: 100% !important;
  height: 255px;
  border-radius: 0 !important;
}

body.page-id-174 .page-content > table:nth-of-type(2) .image-container img {
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  border-radius: 0 !important;
  object-fit: cover;
  object-position: center 18%;
}

body.page-id-174 .page-content > table:nth-of-type(2) .overlay-text {
  max-width: none !important;
  padding: 12px 14px !important;
  background: linear-gradient(transparent, rgba(7, 31, 61, .88)) !important;
  font-size: 15px !important;
  text-align: left !important;
}

body.page-id-174 .page-content > table:nth-of-type(2) td p,
body.page-id-174 .page-content > table:nth-of-type(2) td span {
  margin: 0 0 5px;
  font-size: 15px !important;
  line-height: 1.4;
  text-align: left !important;
}

body.page-id-174 .page-content > table:nth-of-type(2) td a {
  display: inline-flex;
  margin-top: 7px;
  padding: 9px 13px;
  border-radius: 9px;
  color: #fff !important;
  background: #2468ad;
  text-decoration: none;
}

body.page-id-174 .page-content > table:nth-of-type(2) td a span {
  margin: 0;
  color: inherit !important;
}

@media (max-width: 1050px) {
  body.page-id-174 .page-content > table:nth-of-type(2) tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-id-639 .page-content > table:nth-of-type(2) tbody {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body:not(.home) main.container {
    width: min(100% - 20px, 1380px);
  }

  body:not(.home) .page-content {
    padding: 28px 18px;
    border-radius: 22px;
  }

  body:not(.home) .page-content::before {
    left: 18px;
  }

  body:not(.home) .page-content .gallery,
  body.page-id-174 .page-content > table:nth-of-type(2) tbody {
    grid-template-columns: 1fr !important;
  }

  body.page-id-639 .page-content > table:first-of-type,
  body.page-id-639 .page-content > table:first-of-type tbody,
  body.page-id-639 .page-content > table:first-of-type tr,
  body.page-id-639 .page-content > table:first-of-type td {
    display: block;
    width: 100% !important;
  }

  body.page-id-639 .page-content > table:first-of-type tr {
    padding: 10px 0;
    border-bottom: 1px solid #d9e4f0;
  }

  body.page-id-639 .page-content > table:first-of-type td {
    padding: 4px 12px;
  }

  body.page-id-639 .page-content > table:nth-of-type(2) tr:not(:first-child) {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  body.page-id-639 .page-content > table:nth-of-type(2) .image-container,
  body.page-id-639 .page-content > table:nth-of-type(2) .image-container img {
    min-height: 220px;
  }

  .crl-empty-state {
    grid-template-columns: 1fr;
  }
}

/* Department staff: match the modern polyclinic doctor cards. */
body:not(.home) .page-content > .container:has(> .block img[alt="Прев'ю"]) {
  width: 100%;
  margin: 30px 0 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) {
  display: flex;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #d9e4f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 43, 78, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]):hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px rgba(16, 43, 78, .15);
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) > div:first-child {
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #edf4fb;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) img {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: contain;
  object-position: center;
  transition: transform .35s ease;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]):hover img {
  transform: scale(1.025);
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) > div:last-child {
  flex: 1;
  padding: 18px 20px 20px;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) p {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  text-align: left !important;
  color: #52677d;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) br {
  display: none;
}

body:not(.home) .page-content > .container > .block:has(img[alt="Прев'ю"]) strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.25;
  color: #102b4e;
}

@media (max-width: 1050px) {
  body:not(.home) .page-content > .container:has(> .block img[alt="Прев'ю"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body:not(.home) .page-content > .container:has(> .block img[alt="Прев'ю"]) {
    grid-template-columns: 1fr;
  }
}
