* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #0f1320;
  background: #ffffff;
}

:root {
  --accent: #000BD7;
  --text: #0f1320;
  --muted: #8b8b8b;
  --container: 1120px;
  --header-height: 0px;
  --header-bg-alpha: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, var(--header-bg-alpha));
  transition: background 180ms ease, background-color 180ms ease;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 28px 40px;
  gap: 24px;
}

/* Offset page content under fixed header (controlled via JS) */
body { padding-top: var(--header-height); }

.header-left {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.menu-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background: #141414;
  transition: transform 200ms ease, background-color 200ms ease, opacity 200ms ease;
  transform-origin: 50% 50%;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 2px;
  background: #141414;
  transform-origin: 50% 50%;
  transition: transform 200ms ease, background-color 200ms ease, opacity 200ms ease;
}

/* Симметричное расположение полосок в закрытом состоянии */
.menu-icon::before { transform: translate(-50%, -50%) translateY(-6px); }
.menu-icon::after { transform: translate(-50%, -50%) translateY(6px); }

/* Expanded (open) state: turn hamburger into a cross */
.menu-toggle[aria-expanded="true"] .menu-icon {
  background: transparent; /* скрываем центральную полоску */
}
.menu-toggle[aria-expanded="true"] .menu-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.logo img {
  display: block;
  height: 28px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.main-nav a {
  display: inline-block;
  margin-right: 0;
  color: #141414;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 10px;
}

.main-nav a:hover {
  background: #e9ecef;
  cursor: pointer !important;
}

/* Pointer cursor on hover for interactive elements despite global cursor:none */
a:hover,
button:hover,
[role="button"]:hover,
.menu-toggle:hover,
.callback-btn:hover,
.modal-actions .modal-service-btn:hover,
.modal-actions .modal-close-btn:hover,
.portfolio-item:hover {
  cursor: pointer !important;
}

.main-nav a:last-child {
  margin-right: 0;
}

.header-right {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* Small analog clock between status and contact button */
.header-clock {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.header-clock .clock-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background: #f0f0f0; /* same as main nav item background */
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.06);
}

.header-clock .hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  transform: rotate(0deg);
  background: #bdbdbd; /* lighter grey for hour/minute */
  border-radius: 2px;
}

.header-clock .hand.hour {
  width: 2px;
  height: 9px;
}

.header-clock .hand.minute {
  width: 2px;
  height: 12px;
}

.header-clock .hand.second {
  width: 1.5px;
  height: 14px;
  background: #000BD7; /* brand accent for second hand */
}

.header-clock .clock-center {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #616161;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Workday status near the contact button */
.workday-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: #616161;
  align-items: flex-end; /* align contents to the right */
  text-align: right; /* right-align text */
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bdbdbd;
}
.workday-status.is-open .status-dot {
  background: #27ae60;
}
.workday-status.is-morning .status-dot {
  background: #F19E38;
}
.status-label {
  font-weight: 500;
  color: #141414;
}
.status-detail {
  color: #616161;
  font-size: 12px;
}

/* Night icon in workday status */
.status-icon {
  width: 12px;
  height: 12px;
  display: none;
  object-fit: contain;
}
.workday-status.is-night .status-dot {
  display: none;
}
.workday-status.is-night .status-icon {
  display: inline-block;
}

@media (max-width: 900px) {
  .workday-status {
    order: 1;
  }
}
.callback-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 20px; /* horizontal padding 20px as requested */
  border-radius: 10px; /* match menu items rounding */
  font-size: 16px; /* match menu items font size */
  font-weight: 500;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* как меню */
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.callback-btn:hover {
  background: #0009C4;
}

/* Mobile menu overlay styles */
.mobile-menu-overlay {
  position: fixed;
  top: 0; /* будет переопределено скриптом при открытии */
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}

body.nav-open .mobile-menu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 200ms ease;
}

.mobile-menu-content {
  position: relative;
  background: #fff;
  border-radius: 0;
  padding: 16px 16px 40px;
  width: 100%;
  max-width: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid #eee;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 250ms ease, opacity 200ms ease;
}

body.nav-open .mobile-menu-content {
  transform: translateY(0);
  opacity: 1;
}

.mobile-clock-section {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.mobile-header-clock {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: none;
}

.mobile-header-clock .clock-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background: #f0f0f0;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mobile-header-clock .hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  transform: rotate(0deg);
  background: #bdbdbd;
  border-radius: 2px;
}

.mobile-header-clock .hand.hour {
  width: 2px;
  height: 21px;
}

.mobile-header-clock .hand.minute {
  width: 2px;
  height: 27px;
}

.mobile-header-clock .hand.second {
  width: 1.5px;
  height: 32px;
  background: #000BD7;
}

.mobile-header-clock .clock-center {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #616161;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.mobile-status-section {
  text-align: center;
  margin-bottom: 32px;
}

.mobile-workday-status .status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mobile-workday-status .status-detail {
  font-size: 14px;
  color: #666;
}

.mobile-main-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.mobile-main-nav a {
  display: inline-block;
  color: #141414;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.mobile-main-nav a:hover {
  background: #e9ecef;
}

.mobile-contact-section {
  display: flex;
  justify-content: center;
}

.mobile-callback-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-callback-btn:hover {
  background: #0009C4;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .header-right,
  .header-left {
    order: 0;
  }
  .main-nav {
    display: none;
  }
  .menu-toggle { 
    display: inline-flex;
  }
  .workday-status,
  .header-clock,
  .callback-btn {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 40px 72px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 22px;
  color: var(--accent);
  font-weight: 600;
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
}

.hero-sub {
  margin: 12px auto 0;
  color: #141414;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.hero-sub em {
  font-style: italic;
}

.hero-bg {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  top: 10px;
  width: 540px;
  max-width: 70vw;
  opacity: 0.08;
  pointer-events: none;
}

@media (min-width: 1100px) {
  .hero-title { font-size: 100px; }
}

@media (max-width: 700px) {
  .hero-title { font-size: 56px; }
}
/* Team video */

/* Global 3D © background */
.site-bg-copy3d {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  perspective: clamp(900px, 45vmin, 1600px);
  perspective-origin: 50% 50%;
}

.site-bg-copy3d .copy3d {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  will-change: transform;
  font-size: clamp(1120px, 140vmin, 2800px);
  line-height: 1;
  --copy3d-base-opacity: 0.30;
  opacity: calc(var(--copy3d-base-opacity) * var(--copy3d-fade, 1));
  /* Новый шрифт для объёмной формы */
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  /* Управляем динамическим положением блика через CSS-переменные */
  --gx: 50%;
  --gy: 50%;
  filter: none;
}

.site-bg-copy3d .copy3d::before,
.site-bg-copy3d .copy3d::after {
  content: none;
  display: none !important;
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  color: transparent;
  -webkit-text-stroke: 0 transparent;
  filter: none;
  background: none !important;
}

.site-bg-copy3d .copy3d::before {
  transform: translateZ(-90px);
  background: radial-gradient(120% 120% at 60% 40%, #cfcfcf 0%, #a8a8a8 50%, #8a8a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.site-bg-copy3d .copy3d::after {
  transform: translateZ(90px);
  background: linear-gradient(to bottom, #ffffff 0%, #cfcfcf 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.site-bg-copy3d .copy3d-char {
  position: relative;
  display: inline-block;
  transform: none;
  color: transparent;
  /* Блик смещается при наклоне: центр задаётся через переменные */
  background: linear-gradient(to bottom, #ffffff 0%, #a8a8a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0 transparent;
  text-shadow: none;
}

.site-bg-copy3d .copy3d-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(140px);
  background: radial-gradient(50% 50% at 45% 40%, rgba(255,255,255,0.12), rgba(255,255,255,0));
  display: none;
}

@media (max-width: 768px) {
  .site-bg-copy3d .copy3d {
    font-size: clamp(900px, 120vmin, 2200px);
    --copy3d-base-opacity: 0.26;
    opacity: calc(var(--copy3d-base-opacity) * var(--copy3d-fade, 1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-bg-copy3d .copy3d {
    transition: none !important;
  }
}

/* Section title and subtitle */
.section-title {
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 74px;
}

.section-subtitle {
  margin: 0 0 22px;
  color: #616161;
  font-size: 16px;
}

/* Limit paragraph width for readability */
p { max-width: 900px; margin-left: auto; margin-right: auto; }

/* Services */
.services { padding: 56px 40px 72px; }

.services-inner { max-width: var(--container); margin: 0 auto; }

/* Center align Services title and subtitle */
.services .section-title,
.services .section-subtitle { text-align: center; }

.service-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-item {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 36px 32px;
  border: 1px solid rgba(226, 226, 226, 1);
  position: relative;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}




.service-icon-wrap {
  display: block;
  width: 100%;
}
.service-icon { display: block; width: 56px; height: 56px; }

.service-title {
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #141414;
}



.service-sublist {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-sublist li {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #F3F5FD;
  font-size: 14px;
  color: #3a3a3a;
}
.service-sublist li::before { content: none; }

/* Секция услуг: контент виден всегда */
.service-sublist { display: flex; }
.service-desc { display: block; }
.service-desc {
  margin: 4px 0 0;
  color: #141414;
  font-size: 16px;
  line-height: 1.6;
}



@media (max-width: 900px) {
  .service-list { grid-template-columns: 1fr; }
  /* Center-align Services card content on mobile */
  .service-item { align-items: center; text-align: center; }
  .service-icon-wrap { display: flex; justify-content: center; }
  .service-title { text-align: center; }
  .service-sublist { justify-content: center; }
  .service-desc { text-align: center; }
  .blog-list { grid-template-columns: 1fr; }
}


/* Philosophy */
.philosophy {
  background: var(--accent);
  color: #ffffff;
  padding: 128px 40px 144px;
}

.philosophy-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.philosophy .section-title {
  color: #ffffff;
  margin: 0 0 10px;
}

.philosophy-lead {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  line-height: 1.5;
}

/* Neutral page section */
.page { padding: 112px 40px 128px; background: #ffffff; }
.page-inner { max-width: var(--container); margin: 0 auto; text-align: center; }
.page .section-title { text-align: center; font-size: 64px; margin: 0 0 10px; }
.page .section-subtitle { text-align: center !important; margin-left: auto; margin-right: auto; display: block; }

/* About: Founders blocks */
#founders-title{
  margin-bottom: 50px;
}
.founder-block {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 40px;
  align-items: start;
  margin-top: 16px;
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.founder-block + .founder-block { margin-top: 40px; }

.founder-photo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.founder-photo-img {
  width: 100%;
  max-width: 420px;
  border-radius: 216px;
  object-fit: cover;
  display: block;
}

.founder-text { text-align: left; }
.founder-name {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #000;
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.founder-role {
  margin: 0 0 10px;
  color: #616161;
  font-size: 16px;
}

@media (max-width: 900px) {
  .founder-block { grid-template-columns: 1fr; }
}

/* Worldwide section */
.worldwide { padding: 112px 40px 128px; background: #F3F5FD; }
.worldwide-inner { max-width: var(--container); margin: 0 auto; }
.worldwide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.worldwide-anim { width: calc(var(--ww-radius) * 2 + var(--ww-size)); height: calc(var(--ww-radius) * 2 + var(--ww-size)); border-radius: 50%; background: transparent; margin: 0 auto; position: relative; --ww-size: 124px; --ww-radius: 140px; }
 .worldwide-anim .carousel2d { position: relative; width: calc(var(--ww-radius) * 2 + var(--ww-size)); height: calc(var(--ww-radius) * 2 + var(--ww-size)); contain: content; }
 .worldwide-anim .card { position: absolute; left: 50%; top: 50%; width: var(--ww-size); height: var(--ww-size); translate: -50% -50%; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-size: 54px; user-select: none; color: #000000cc; will-change: transform; box-shadow: none; }
 .worldwide-anim .c1 { background: transparent; border: 2px dashed #ddd; color: #aaa; font-size: 56px; }
 .worldwide-anim .c2 { background: #ffffff; border: 1px solid #e6e6e6; }
    .worldwide-anim .c3 { background: #ffffff; border: 1px solid #e6e6e6; }
    .worldwide-anim .c4 { background: #ffffff; border: 1px solid #e6e6e6; }
    .worldwide-anim .c5 { background: #ffffff; border: 1px solid #e6e6e6; }
    .worldwide-anim .c6 { background: #ffffff; border: 1px solid #e6e6e6; }
    .worldwide-anim .c7 { background: #ffffff; border: 1px solid #e6e6e6; }
    .worldwide-anim .c8 { background: #ffffff; border: 1px solid #e6e6e6; }
.worldwide-info { padding-left: 10%; padding-right: 10%; }
 .worldwide-info .section-title { margin: 0 0 10px; }
.worldwide-info .section-subtitle { margin: 0 0 16px; color: #616161; line-height: 1.6; }
.worldwide-countries { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.country-chip { display: inline-block; padding: 8px 12px; background: #ffffff; border-radius: 10px; font-weight: 500; color: #141414; }
.worldwide-note { color: #8b8b8b; margin-top: 8px; font-size: 14px; }

@media (max-width: 900px) {
  .worldwide-grid { grid-template-columns: 1fr; }
  .worldwide-anim { width: calc(var(--ww-radius) * 2 + var(--ww-size)); height: calc(var(--ww-radius) * 2 + var(--ww-size)); --ww-size: 76px; --ww-radius: 78px; }
}


/* Metrics */
.metrics { padding: 72px 40px; }
.metrics-inner { max-width: var(--container); margin: 0 auto; }
.metrics-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.metric-item { text-align: center; }
.metric-value { font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 64px; font-weight: 700; color: var(--accent); line-height: 1; }
/* Prefix for currency symbol */
 .metric-prefix { margin-right: 6px; }
.metric-label { margin-top: 8px; color: #616161; font-size: 16px; line-height: 1.5; }

@media (max-width: 900px) {
  .metrics-list { grid-template-columns: repeat(2, 1fr); }
  .metric-value { font-size: 48px; }
  /* Halve top/bottom paddings for Metrics on mobile */
  .metrics { padding-top: 36px; padding-bottom: 36px; }
}

@media (max-width: 600px) {
  .metrics-list { grid-template-columns: 1fr; }
  .metric-value { font-size: 44px; }
}

/* Clients logos carousel */
.clients { padding: 56px 40px 64px; }
.clients-inner { max-width: var(--container); margin: 0 auto; }
.clients-carousel { overflow: hidden; margin-top: 14px; }

.carousel-track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: scroll-left 60s linear infinite;
}

/* Clients photos carousel (slow, infinite, pause on hover) */
.clients-photos {
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 18px;
  margin-bottom: 40px;
}
.clients-photos .carousel-track {
  display: flex;
  width: max-content;
  gap: 24px;
  animation: scroll-left 80s linear infinite;
}
.clients-photos:hover .carousel-track { animation-play-state: running; }
.clients-photos .carousel-list {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.photo-item { flex: 0 0 auto; }
.photo-item img {
  display: block;
  width: auto;
  height: auto;
  max-height: 30vh;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid #e6e6e6;
}

/* Clients quote (large text) */
.clients-quote { margin: 0 auto 40px; max-width: 900px; }
/* Більший відступ після сабтайтла на сторінці клієнтів */
.clients-page .section-subtitle { margin-bottom: 40px; }

/* Hover pause disabled */
.clients-carousel:hover .carousel-track { animation-play-state: running; }

.carousel-list { display: flex; align-items: center; gap: 48px; }
.clients-logo { height: 48px; width: auto; flex: 0 0 auto; }

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Clients grid (4 logos per row on desktop, 2 on mobile) */
.client-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
.client-logo {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f6f7;
  border-radius: 14px;
}
.client-logo img {
  max-width: 100%;
  height: 48px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 160ms ease-in-out;
}
.client-logo:hover img { opacity: 1; }

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

/* Testimonials slider — removed */

@media (max-width: 900px) {
  .carousel-track, .carousel-list { gap: 36px; }
  .clients-logo { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { animation: none; }
}



/* Blog Articles Section */
.blog-articles { background: #ffffff; padding: 160px 40px; }
.blog-articles-inner { max-width: var(--container); margin: 0 auto; }

/* Center align Blog title */
.blog-articles .section-title {
  color: var(--accent);
  text-align: center;
}

.blog-list {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Blog page layout */
.blog-articles { padding: 56px 40px 72px; }
.blog-articles-inner { max-width: var(--container); margin: 0 auto; }
.blog-articles .section-title { font-size: 32px; text-align: center; color: var(--accent); margin: 0 0 12px; }
.blog-articles .section-subtitle { text-align: center; margin-left: auto; margin-right: auto; display: block; font-size: 18px; line-height: 1.5; max-width: 900px; margin-top: 12px; margin-bottom: 80px; color: #141414; }

/* Make latest (featured) article span two columns */
.blog-item.featured { grid-column: 1 / -1; padding: 48px 40px 36px; }
.blog-item.featured .blog-author { justify-content: center; }
.blog-item.featured .blog-title { font-size: 36px; line-height: 1.2; text-align: center; max-width: 900px; margin-left: auto; margin-right: auto; }
.blog-item.featured .blog-desc { font-size: 18px; text-align: center; max-width: 900px; margin-left: auto; margin-right: auto; }

/* Blog titles as links: no underline, brand accent color */
.blog-title a { text-decoration: none; }
.blog-title a:hover { text-decoration: none; }

/* Add top spacing before search on blog page */
.blog-articles .search-container { margin-top: 24px; }

.blog-item {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 36px 32px;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  position: relative;
  border-radius: 20px;
  margin-top: 25px;
  transition: box-shadow 0.2s ease, transform 0.12s ease, border-color 0.2s ease;
}

.blog-item::before {
  content: none;
}

/* Язичок лишається тільки у останньої (найновішої) статті — featured */
.blog-item.featured::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  width: 160px;
  height: 25px;
  background: #F3F5FD;
  border-radius: 25px 0 0 0;
  clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z');
  z-index: 2;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.blog-date {
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  line-height: 1.4;
}

.blog-category {
  padding: 6px 10px;
  border-radius: 999px;
  background: #F3F5FD;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
}

.blog-title {
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: #000000;
  line-height: 1.3;
}

.blog-desc {
  margin: -9px 0 0; /* компенсируем flex-gap 22px до ~13px */
  color: #000000;
  font-size: 16px;
  line-height: 1.6;
}

/* Preserve featured styling unchanged */
.blog-item.featured { background: #F3F5FD; border: none; }
.blog-item.featured::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  width: 160px;
  height: 25px;
  background: #F3F5FD;
  border-radius: 25px 0 0 0;
  clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z');
  z-index: 2;
}

/* Link color: black for regular cards, accent for featured */
.blog-item:not(.featured) .blog-title a { color: #000000; }
.blog-item.featured .blog-title a { color: var(--accent); }

/* Hover-ефект і клікабельність всієї картки */
.blog-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: #d6d6d6;
}
.blog-item, .blog-item:hover { cursor: pointer !important; }
.blog-item .card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Тінь при наведенні для featured-картки у кольорі, близькому до фону */
.blog-item.featured:hover {
  box-shadow: 0 12px 36px rgba(243, 245, 253, 0.7);
}

/* Blog author */
.blog-author { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.blog-author-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.blog-author-name { color: #000000; font-size: 14px; font-weight: 600; }

/* Білий фон для лейблу категорії тільки у featured-картки */
.blog-item.featured .blog-category { background: #ffffff; }

/* Blog more link under folders */
.blog-more { margin-top: 60px; text-align: center; }
/* Extra bottom spacing for clients link */
.clients .blog-more { margin-bottom: 48px; }
.blog-all-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; }
.blog-all-link .arrow { transition: transform 0.2s ease; }
.blog-all-link:hover .arrow { transform: translateX(2px); }

/* Responsive adjustments for blog */
@media (max-width: 900px) {
  .blog-list { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  position: relative;
  background: var(--accent);
  color: #fff;
  padding: 120px 40px;
  display: block;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('img/map2.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.14;
  pointer-events: none;
}

.site-footer-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: start;
}
.footer-col { min-width: 0; }
.footer-side { display: grid; gap: 24px; align-content: start; }
.footer-extra { display: grid; gap: 18px; }

.footer-title {
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.footer-subtitle {
  margin: 0 0 22px;
  color: rgba(255,255,255,0.86);
  font-size: 16px;
}

.footer-contacts { display: grid; gap: 14px; margin-top: 10px; }
.footer-email {
  color: #fff;
  text-decoration: underline;
  font-size: 18px;
  font-weight: 500;
}
.footer-email:hover { text-decoration: underline; }
.footer-worldwide { margin: 0; color: rgba(255,255,255,0.92); font-size: 18px; }
.footer-phone { color: #fff; text-decoration: none; font-size: 18px; font-weight: 500; opacity: 0.5; }
.footer-phone:hover { text-decoration: underline; }

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.footer-social { display: flex; gap: 12px; }

.footer-links { display: flex; gap: 16px; }
.footer-link { color: #fff; text-decoration: none; opacity: 0.88; }
.footer-link:hover { text-decoration: underline; opacity: 1; }

.footer-credit { color: rgba(255,255,255,0.86); font-size: 14px; }

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 36px;
  color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom-left { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.footer-bottom a { color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom .footer-copy { color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom .footer-link { font-size: 13px; text-decoration: underline; color: rgba(255,255,255,0.5); }
.footer-bottom .footer-credit { justify-self: end; text-align: right; margin: 0; color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-credit-link { text-decoration: underline; }
.footer-sep { margin: 0 12px; color: rgba(255,255,255,0.5); font-size: 13px; }

@media (max-width: 900px) {
  .footer-title { font-size: 34px; }
  .footer-email { font-size: 34px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-links { flex-wrap: wrap; }
.footer-bottom { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom-left { justify-content: center; }
  .footer-bottom .footer-credit { justify-self: center; text-align: center; }
}

/* Footer adjustments */
.site-footer { background: #000; padding: 120px 40px 60px; }
.site-footer::before { content: none !important; display: none !important; }
.footer-subtitle { max-width: 420px; }

/* Mobile: reduce horizontal paddings for main sections */
@media (max-width: 700px) {
  .site-header { padding-left: 16px; padding-right: 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .services { padding-left: 16px; padding-right: 16px; }
  .philosophy { padding-left: 16px; padding-right: 16px; }
  .page { padding-left: 16px; padding-right: 16px; }
  .worldwide { padding-left: 40px; padding-right: 40px; }
  .metrics { padding-left: 16px; padding-right: 16px; }
  .clients { padding-left: 16px; padding-right: 16px; }
  .blog-articles { padding-left: 16px; padding-right: 16px; }
  .site-footer { padding-left: 16px; padding-right: 16px; }
  /* Percentage-based paddings: remove on mobile */
  .worldwide-info { padding-left: 0; padding-right: 0; }
  .contact-left { padding-right: 0; }
  /* Slightly tighter inner padding for portfolio wrapper */
  .portfolio-inner { padding-left: 16px; padding-right: 16px; }

  /* Clients: halve bottom inner padding on mobile */
  .clients { padding-bottom: 32px; }

  /* Portfolio (Наші кейси): halve top inner padding on mobile */
  .portfolio { padding-top: 60px !important; }

  /* Worldwide: center texts and halve bottom padding on mobile */
  .worldwide { padding-bottom: 64px; }
  .worldwide-info, .worldwide-info .section-title, .worldwide-info .section-subtitle, .worldwide-note { text-align: center; }
  .worldwide-countries { justify-content: center; }

  /* Blog latest articles: reduce section title font size on mobile */
  .blog-articles .section-title { font-size: 24px; }
  /* Blog: reduce gap between cards on mobile (halve to ~12px) */
  .blog-list { gap: 12px !important; }
  /* Blog: remove extra top margin from items so gap controls spacing */
  .blog-item { margin-top: 0; }
  /* Blog featured: align contents left on mobile and match title size */
  .blog-item.featured .blog-author { justify-content: flex-start; }
  .blog-item.featured .blog-title { font-size: 22px; text-align: left; margin-left: 0; margin-right: 0; }
  .blog-item.featured .blog-desc { text-align: left; margin-left: 0; margin-right: 0; }
  /* Blog: place date and category on separate lines on mobile, align left */
  .blog-item .blog-meta { display: grid; grid-template-columns: 1fr; justify-items: start; gap: 6px; text-align: left; }
  .blog-item .blog-date, .blog-item .blog-category { display: block; }
  /* Metrics: limit label width for better readability on mobile */
  .metrics .metric-label { max-width: 190px; margin-left: auto; margin-right: auto; }

  /* Clients page: make H1 "Клієнти" same size as clients-love-title */
  .clients-page .section-title { font-size: 28px; }

  /* Footer mobile adjustments */
  .footer-email { font-size: 16px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
  .footer-bottom { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom-left { flex-direction: column; align-items: center; gap: 8px; }
  .footer-sep { display: none; }
  .footer-links { flex-direction: column; gap: 6px; }
  .footer-bottom .footer-link { font-size: 14px; }
  .footer-bottom .footer-credit { margin-top: 10px; }

  /* About page: mobile adaptations */
  .about-hero .section-title { font-size: 32px; line-height: 1.1; }
  .about-hero .section-subtitle { font-size: 16px; line-height: 1.5; }

  .about-story-team { padding-top: 60px; padding-bottom: 80px; }
  .about-story-team .about-grid { grid-template-columns: 1fr; padding-left: 0; padding-right: 0; gap: 20px; }
  .about-story-team .about-col-left p { font-size: 18px; line-height: 1.6; }
  .about-story-team .team-avatars { flex-wrap: wrap; }
  .about-story-team .avatar { width: 60px; height: 60px; }
  .about-story-team .avatar + .avatar { margin-left: -10px; }
  .about-story-team .team-text { font-size: 15px; }

  /* Founders blocks: stack and tighten spacing on mobile */
  .founder-block { grid-template-columns: 1fr; gap: 20px; }
  .founder-photo-img { max-width: 320px; }
  #founders-title { margin-bottom: 28px; }

  /* About video: ensure full width responsive */
  .about-video .video-full { border-radius: 18px; }
}

/* Ensure mobile footer email override wins over any later rules */
@media (max-width: 700px) {
  .site-footer .footer-email { font-size: 16px !important; }
}

/* About page: mobile final overrides (placed late to win cascade) */
@media (max-width: 700px) {
  /* 1) Менший h1 на мобільних */
  .about-hero .section-title { font-size: 28px; line-height: 1.15; }

  /* 2) Історія та команда: прибираємо великі бічні паддінги і робимо одну колонку */
  .about-story-team { padding-top: 60px; padding-bottom: 80px; }
  .about-story-team .about-grid { grid-template-columns: 1fr; padding-left: 0; padding-right: 0; gap: 18px; }
  .about-story-team .about-col-left p { font-size: 16px; line-height: 1.6; }
  .about-story-team .team-text { font-size: 14px; }
  .about-story-team .team-avatars { flex-wrap: wrap; }
  .about-story-team .avatar { width: 56px; height: 56px; }
  .about-story-team .avatar + .avatar { margin-left: -10px; }

  /* 3) «Наша Філософія»: бокові відступи + трохи менша висота */
  .about-philosophy { padding: 40px 16px; }
  .about-philosophy .philosophy-card { min-height: 340px; }
  .about-philosophy .philosophy-title { top: 16px; font-size: 16px; }

  /* 4) Засновники: менші фото, центрування імені та ролі */
  .founder-block { grid-template-columns: 1fr; gap: 20px; }
  .founder-photo-img { max-width: 240px; }
  .founder-text { text-align: center; }
  .founder-name { font-size: 24px; }
  .founder-role { text-align: center; }
  #founders-title { margin-bottom: 28px; }
}

/* About: story/team — розширені мобільні стилі до 900px */
@media (max-width: 900px) {
  .about-story-team .about-grid { grid-template-columns: 1fr; padding-left: 0; padding-right: 0; gap: 18px; }
  .about-story-team .about-col-left p { font-size: 16px; line-height: 1.6; }
  .about-story-team .team-avatars { flex-wrap: wrap; }
  .about-story-team .avatar { width: 56px; height: 56px; }
  .about-story-team .avatar + .avatar { margin-left: -10px; }
  .about-story-team .team-text { font-size: 14px; }
}

/* About: story/team — гарантуємо мобільні правки на ширших екранах і долаємо каскад */
@media (max-width: 1100px) {
  .about-page .about-story-team .about-grid { grid-template-columns: 1fr !important; padding-left: 0 !important; padding-right: 0 !important; gap: 16px; }
  .about-page .about-story-team .about-col-left, .about-page .about-story-team .about-col-right { max-width: 100%; }
  .about-page .about-story-team .team-avatars { flex-wrap: wrap !important; }
  .about-page .about-story-team p { overflow-wrap: anywhere; word-break: break-word; }
}

/* Custom cursor: JS-driven © — enable only on desktop (fine pointer) */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: none !important; }
  * { cursor: none !important; }
  /* Allow text cursor in inputs */
  input, textarea, select { cursor: text !important; }
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-size: 83px; /* +30% от 64px */
  font-weight: 100; /* максимально тонкое начертание для © */
  font-variation-settings: "wght" 100; /* для variable fonts */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1;
  color: #fff;
  mix-blend-mode: difference; /* динамический контраст относительно фона */
  font-family: -apple-system, system-ui, "Helvetica Neue", Segoe UI, Roboto, Arial, sans-serif;
  z-index: 2147483648; /* вище за ConveyThis (2147483647) */
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.12s ease;
}

.custom-cursor.press {
  transform: translate(-50%, -50%) scale(0.92);
}

/* Hide custom cursor with fade and scale down */
.custom-cursor.hide {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(0.6) !important;
}

/* Small dot cursor that follows pointer instantly */
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  z-index: 2147483648; /* вище за ConveyThis (2147483647) */
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.12s ease;
}

.cursor-dot.press {
  transform: translate(-50%, -50%) scale(0.92);
}

.cursor-dot.hide {
  opacity: 0 !important;
}
/* Portfolio Section */
.portfolio {
  padding: 160px 0 0;
  background: #F3F5FD;
}

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

/* Center align Portfolio title */
.portfolio .section-title {
  text-align: center;
  margin: 0 0 10px;
}

.portfolio-subtitle {
  font-size: 16px;
  color: #141414;
  line-height: 1.6;
  margin: 0 0 40px 0;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.year-filter,
.category-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 40px 0 30px 0;
  flex-wrap: wrap;
}

.search-container {
  margin: 0 0 30px 0;
}

/* Wrapper for search input with icons */
.search-field {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 14px 62px 14px 61px; /* больше отступ справа под кнопку и слева под иконку */
  border: 2px solid #e0e0e0;
  border-radius: 20px; /* increased rounding */
  font-size: 16px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* как меню */
  font-weight: 500; /* как меню */
  background: white;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Left search icon inside input */
.search-icon {
  position: absolute;
  left: 21px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0.85;
}

/* Right submit icon button */
.search-submit {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; /* одинаковый размер с левой иконкой */
  height: 20px; /* одинаковый размер с левой иконкой */
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.search-submit img {
  width: 100%;
  height: 100%;
  display: block;
}

.search-input:focus {
  outline: none;
  border-color: #e0e0e0; /* neutral, no blue */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.portfolio-content {
  display: block;
}

.portfolio-main {
  width: 100%;
}


.portfolio-main {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Portfolio actions: center the Load More button */
.portfolio-actions {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}

.load-more-btn {
  padding: 14px 29px;
  background: white;
  color: #141414;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.load-more-btn:hover {
  background: white;
}

.load-more-btn:active {
  transform: translateY(1px);
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-table-header {
  background: transparent;
}

.portfolio-table-header th {
  padding: 20px 24px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #DCE0F1;
}

.table-col-month {
  width: 20%;
}

.table-col-title {
  width: 55%;
}

.table-col-category {
  width: 25%;
}

.portfolio-item {
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #DCE0F1;
}

.portfolio-item:hover {
  background: white;
}

.portfolio-item:last-child {
  border-bottom: 1px solid #DCE0F1;
}

/* Плавне каскадне показування нових кейсів */
.portfolio-item-reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: portfolioFadeIn 280ms ease forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes portfolioFadeIn {
  to {
    opacity: 1;
    transform: none;
  }
}
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portfolio-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Вертикально: контент + кнопка ниже */
}

.portfolio-modal-content {
  background: #F3F5FD;
  border-radius: 5px 25px 25px 25px;
  padding: 40px 36px 32px;
  max-width: 650px;
  width: 90%;
  max-height: 550px; /* ограничиваем высоту модального окна */
  display: flex; /* чтобы тело занимало оставшееся место */
  flex-direction: column;
  overflow: visible;
  position: relative;
  box-shadow: none; /* как карточки услуг */
}

.portfolio-modal-content::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  width: 160px;
  height: 25px;
  background: #F3F5FD;
  border-radius: 25px 0 0 0;
  clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z');
  z-index: 2;
}

.portfolio-modal-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-right: 44px;
}
/* Meta: date above tags, stacked vertically */
.portfolio-modal-header .portfolio-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}
.portfolio-modal-header .portfolio-modal-meta .modal-date {
  display: block;
  margin: 0;
}
.portfolio-modal-header .portfolio-modal-meta .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 20px;
}

.portfolio-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #141414;
}

/* Прокручивается только описание */
.portfolio-modal-body {
  margin-top: 16px;
  color: var(--text);
  line-height: 1.6;
  flex: 1 1 auto; /* занимает доступное пространство внутри контента */
  min-height: 0; /* разрешает корректный скролл внутри flex-контейнера */
  overflow-y: auto;
}
/* Дата та теги у модальному вікні кейса */
.portfolio-modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.portfolio-modal-date {
  font-size: 13px;
  opacity: 0.6;
}

.portfolio-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  color: #141414;
  font-size: 12px;
  line-height: 18px;
}

/* Блок действий с двумя кнопками */
.modal-actions {
  display: flex;
  gap: 12px;
  max-width: 600px;
  width: 90%;
  margin-top: 16px;
}

.modal-actions .modal-service-btn,
.modal-actions .modal-close-btn {
  flex: 1;
  width: auto;
  /* Вирівнюємо тіні та анімації для обох кнопок */
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.12s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.modal-close-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Уравниваем стиль кнопки «Мені потрібна схожа послуга» с «Закрити» */
.modal-actions .modal-service-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .portfolio-modal-content { padding: 32px 24px 24px; margin: 20px; }
  .portfolio-modal-body { max-height: none; }
  .modal-actions { max-width: 600px; width: 90%; gap: 10px; }
  .modal-close-btn { padding: 14px 20px; font-size: 14px; }
  .modal-actions .modal-service-btn, .modal-actions .modal-close-btn { flex: 1; }
}
/* Floating AI action button */
.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #F19E38;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  z-index: 1000;
  transition: opacity 200ms ease, transform 200ms ease;
  will-change: opacity, transform;
}

.ai-fab img {
  width: 60%;
  height: 60%;
  pointer-events: none;
}

@media (max-width: 768px) {
  .ai-fab {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }
  .ai-fab img {
    width: 58%;
    height: 58%;
  }
}

/* Ensure hidden attribute hides the FAB regardless of author styles */
.ai-fab[hidden] { display: none !important; }

/* Animated hidden state: fade out and shrink */
.ai-fab.is-hidden {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}


/* Ensure pointer cursor on logo and portfolio items */
.logo:hover,
.logo a:hover,
.logo img:hover { cursor: pointer !important; }

.portfolio-item,
.portfolio-item:hover { cursor: pointer !important; }

#portfolio-list tr,
#portfolio-list td,
.portfolio-table-body tr,
.portfolio-table-body td { cursor: pointer !important; }

/* Ensure pointer on text inside rows */
#portfolio-list tr *,
#portfolio-list td *,
.portfolio-table-body tr *,
.portfolio-table-body td * { cursor: pointer !important; }

/* Restore cell padding in portfolio rows */
.portfolio-item td { padding: 20px 24px; vertical-align: middle; }

/* Make date and category appear with reduced emphasis */
.portfolio-item-month,
.portfolio-item-category {
  opacity: 0.5;
}

/* Mobile layout for portfolio table: stack fields to remove horizontal scroll */
@media (max-width: 768px) {
  .portfolio-table { display: block; width: 100%; }
  .portfolio-table-header { display: none; }
  .portfolio-table-body { display: block; }
  .portfolio-table-body .portfolio-item { display: block; padding: 0 !important; border-bottom: 1px solid #DCE0F1; }
  .portfolio-item td { display: block; padding: 0 !important; }
  .portfolio-item-month { display: block; font-size: 13px; opacity: 0.6; line-height: 1.2 !important; padding: 10px 0 !important; }
  .portfolio-item-title { display: block; font-size: 16px; font-weight: 600; color: #141414; word-break: break-word; line-height: 1.15 !important; margin-top: 2px !important; margin-bottom: 0 !important; }
  .portfolio-item-category { display: block; font-size: 13px; opacity: 0.6; line-height: 1.15 !important; margin-top: 0 !important; padding: 10px 0 !important;}
}


/* Portfolio Modal */
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(177, 195, 225, 0.196) !important;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portfolio-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Вертикально: контент + кнопка ниже */
}

.portfolio-modal-content {
  background: #ffffff !important;
  border-radius: 5px 25px 25px 25px;
  padding: 40px 36px 32px;
  max-width: 650px !important;
  width: 90%;
  max-height: 550px !important; /* ограничиваем высоту модального окна */
  display: flex; /* чтобы тело занимало оставшееся место */
  flex-direction: column;
  overflow: visible;
  position: relative;
  box-shadow: none; /* как карточки услуг */
}

.portfolio-modal-content::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  width: 160px;
  height: 25px;
  background: #ffffff !important;
  border-radius: 25px 0 0 0;
  clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z');
  z-index: 2;
}

.portfolio-modal-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-right: 44px;
}
/* Meta: date above tags, stacked vertically */
.portfolio-modal-header .portfolio-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}
.portfolio-modal-header .portfolio-modal-meta .modal-date {
  display: block;
  margin: 0;
}
.portfolio-modal-header .portfolio-modal-meta .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 20px;
}

.portfolio-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #141414;
}

/* Прокручивается только описание */
.portfolio-modal-body {
  margin-top: 16px;
  color: var(--text);
  line-height: 1.6;
  flex: 1 1 auto; /* занимает доступное пространство внутри контента */
  min-height: 0; /* разрешает корректный скролл внутри flex-контейнера */
  overflow-y: auto;
}

/* Блок действий с двумя кнопками */
.modal-actions {
  display: flex;
  gap: 12px;
  max-width: 600px;
  width: 90%;
  margin-top: 16px;
}

.modal-actions .modal-service-btn,
.modal-actions .modal-close-btn {
  flex: 1;
  width: auto;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.12s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.modal-close-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Уравниваем стиль кнопки «Мені потрібна схожа послуга» с «Закрити» */
.modal-actions .modal-service-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .portfolio-modal-content { padding: 32px 24px 24px; margin: 20px; }
  .portfolio-modal-body { max-height: none; }
  .modal-actions { max-width: 600px; width: 90%; gap: 10px; }
  .modal-close-btn { padding: 14px 20px; font-size: 14px; }
  .modal-actions .modal-service-btn, .modal-actions .modal-close-btn { flex: 1; }
}
/* New footer navigation columns */
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.footer-menu, .footer-social-list { list-style: none; padding: 10px 0 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-menu .footer-link, .footer-social-list .footer-link { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; opacity: 0.7; }
.footer-menu .footer-link:hover, .footer-social-list .footer-link:hover { text-decoration: underline; }

.footer-bottom { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 48px; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 36px; color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom-left { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom .footer-copy { color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-bottom .footer-link { font-size: 13px; text-decoration: underline; color: rgba(255,255,255,0.5); }
.footer-bottom .footer-credit { justify-self: end; text-align: right; margin: 0; color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-credit-link { text-decoration: underline; }
.footer-sep { margin: 0 12px; color: rgba(255,255,255,0.5); font-size: 13px; }

@media (max-width: 900px) {
  .footer-title { font-size: 34px; }
  .footer-email { font-size: 34px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-links { flex-wrap: wrap; }
.footer-bottom { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom-left { justify-content: center; }
  .footer-bottom .footer-credit { justify-self: center; text-align: center; }
}

/* Footer adjustments */
.site-footer { background: #000; padding: 120px 40px 60px; }
.site-footer::before { content: none !important; display: none !important; }
.footer-subtitle { max-width: 420px; }

/* Custom cursor: JS-driven © (Safari-friendly) */
html, body { cursor: none !important; }
* { cursor: none !important; }
/* Allow text cursor in inputs */
input, textarea, select { cursor: text !important; }

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-size: 64px; /* в 2 раза крупнее */
  line-height: 1;
  color: #fff;
  mix-blend-mode: difference; /* динамический контраст относительно фона */
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  z-index: 2147483648; /* вище за ConveyThis (2147483647) */
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.12s ease;
}

.custom-cursor.press {
  transform: translate(-50%, -50%) scale(0.92);
}

/* Hide custom cursor with fade and scale down */
.custom-cursor.hide {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(0.6) !important;
}
/* Portfolio Section */
.portfolio {
  padding: 160px 0 0;
  background: #F3F5FD;
}

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

/* Center align Portfolio title */
.portfolio .section-title {
  text-align: center;
  margin: 0 0 10px;
}

.portfolio-subtitle {
  font-size: 16px;
  color: #141414;
  line-height: 1.6;
  margin: 0 0 40px 0;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.year-filter,
.category-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 40px 0 30px 0;
  flex-wrap: wrap;
}

.search-container {
  margin: 0 0 30px 0;
}

.search-input {
  width: 100%;
  padding: 14px 52px 14px 56px; /* больше слева под иконку */
  border: 2px solid #e0e0e0;
  border-radius: 20px; /* единый радиус как вверху */
  font-size: 16px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* как меню */
  font-weight: 500; /* как меню */
  background: white;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  outline: none;
  border-color: #e0e0e0; /* убираем синий бордер */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.portfolio-content {
  display: block;
}

.portfolio-main {
  width: 100%;
}


.portfolio-main {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Portfolio actions: center the Load More button */
.portfolio-actions {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}

.load-more-btn {
  padding: 14px 29px;
  background: white;
  color: #141414;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.load-more-btn:hover {
  background: white;
}

.load-more-btn:active {
  transform: translateY(1px);
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-table-header {
  background: transparent;
}

.portfolio-table-header th {
  padding: 20px 24px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #DCE0F1;
}

.table-col-month {
  width: 20%;
}

.table-col-title {
  width: 55%;
}

.table-col-category {
  width: 25%;
}

.portfolio-item {
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #DCE0F1;
}

.portfolio-item:hover {
  background: white;
}

.portfolio-item:last-child {
  border-bottom: 1px solid #DCE0F1;
}
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portfolio-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Вертикально: контент + кнопка ниже */
}

.portfolio-modal-content {
  background: #F3F5FD;
  border-radius: 5px 25px 25px 25px;
  padding: 40px 36px 32px;
  max-width: 600px;
  width: 90%;
  max-height: 500px; /* ограничиваем высоту модального окна */
  display: flex; /* чтобы тело занимало оставшееся место */
  flex-direction: column;
  overflow: visible;
  position: relative;
  box-shadow: none; /* как карточки услуг */
}

.portfolio-modal-content::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  width: 160px;
  height: 25px;
  background: #F3F5FD;
  border-radius: 25px 0 0 0;
  clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z');
  z-index: 2;
}

.portfolio-modal-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-right: 44px;
}
/* Meta: date above tags, stacked vertically */
.portfolio-modal-header .portfolio-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}
.portfolio-modal-header .portfolio-modal-meta .modal-date {
  display: block;
  margin: 0;
}
.portfolio-modal-header .portfolio-modal-meta .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 20px;
}

.portfolio-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #141414;
}

/* Прокручивается только описание */
.portfolio-modal-body {
  margin-top: 16px;
  color: var(--text);
  line-height: 1.6;
  flex: 1 1 auto; /* занимает доступное пространство внутри контента */
  min-height: 0; /* разрешает корректный скролл внутри flex-контейнера */
  overflow-y: auto;
}

/* Блок действий с двумя кнопками */
.modal-actions {
  display: flex;
  gap: 12px;
  max-width: 600px;
  width: 90%;
  margin-top: 16px;
}

.modal-actions .modal-service-btn,
.modal-actions .modal-close-btn {
  flex: 1;
  width: auto;
}

.modal-close-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Уравниваем стиль кнопки «Мені потрібна схожа послуга» с «Закрити» */
.modal-actions .modal-service-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .portfolio-modal-content { padding: 32px 24px 24px; margin: 20px; }
  .portfolio-modal-body { max-height: none; }
  .modal-actions { max-width: 600px; width: 90%; gap: 10px; }
  .modal-close-btn { padding: 14px 20px; font-size: 14px; }
  .modal-actions .modal-service-btn, .modal-actions .modal-close-btn { flex: 1; }
}
/* Ensure pointer cursor on logo and portfolio items */
.logo:hover,
.logo a:hover,
.logo img:hover { cursor: pointer !important; }

.portfolio-item,
.portfolio-item:hover { cursor: pointer !important; }

#portfolio-list tr,
#portfolio-list td,
.portfolio-table-body tr,
.portfolio-table-body td { cursor: pointer !important; }

/* Ensure pointer on text inside rows */
#portfolio-list tr *,
#portfolio-list td *,
.portfolio-table-body tr *,
.portfolio-table-body td * { cursor: pointer !important; }

/* Restore cell padding in portfolio rows */
.portfolio-item td { padding: 20px 24px; vertical-align: middle; }

/* Make date and category appear with reduced emphasis */
.portfolio-item-month,
.portfolio-item-category {
  opacity: 0.5;
}


/* Portfolio Modal */
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portfolio-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Вертикально: контент + кнопка ниже */
}

.portfolio-modal-content {
  background: #F3F5FD;
  border-radius: 5px 25px 25px 25px;
  padding: 40px 36px 32px;
  max-width: 600px;
  width: 90%;
  max-height: 500px; /* ограничиваем высоту модального окна */
  display: flex; /* чтобы тело занимало оставшееся место */
  flex-direction: column;
  overflow: visible;
  position: relative;
  box-shadow: none; /* как карточки услуг */
}

.portfolio-modal-content::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  width: 160px;
  height: 25px;
  background: #F3F5FD;
  border-radius: 25px 0 0 0;
  clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z');
  z-index: 2;
}

.portfolio-modal-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-right: 44px;
}
/* Meta: date above tags, stacked vertically */
.portfolio-modal-header .portfolio-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}
.portfolio-modal-header .portfolio-modal-meta .modal-date {
  display: block;
  margin: 0;
}
.portfolio-modal-header .portfolio-modal-meta .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 20px;
}

.portfolio-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #141414;
}

/* Прокручивается только описание */
.portfolio-modal-body {
  margin-top: 16px;
  color: var(--text);
  line-height: 1.6;
  flex: 1 1 auto; /* занимает доступное пространство внутри контента */
  min-height: 0; /* разрешает корректный скролл внутри flex-контейнера */
  overflow-y: auto;
}

/* Блок действий с двумя кнопками */
.modal-actions {
  display: flex;
  gap: 12px;
  max-width: 600px;
  width: 90%;
  margin-top: 16px;
}

.modal-actions .modal-service-btn,
.modal-actions .modal-close-btn {
  flex: 1;
  width: auto;
}

.modal-close-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Уравниваем стиль кнопки «Мені потрібна схожа послуга» с «Закрити» */
.modal-actions .modal-service-btn {
  padding: 16px 24px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .portfolio-modal-content { padding: 32px 24px 24px; margin: 20px; }
  .portfolio-modal-body { max-height: none; }
  .modal-actions { max-width: 600px; width: 90%; gap: 10px; }
  .modal-close-btn { padding: 14px 20px; font-size: 14px; }
  .modal-actions .modal-service-btn, .modal-actions .modal-close-btn { flex: 1; }
}

/* Privacy Policy page overrides: left-align content */
.policy-page .page-inner { text-align: left !important; }
.policy-page .section-title, .policy-page .section-subtitle { text-align: left !important; }
.policy-page .section-subtitle { margin-left: 0 !important; margin-right: 0 !important; }
.policy-page p, .policy-page li { text-align: left !important; }
.policy-page p { margin-left: 0 !important; margin-right: 0 !important; }
.policy-page ul, .policy-page ol { margin-left: 0; margin-right: 0; }
@media (max-width: 600px) {
  .policy-page .section-title { font-size: 32px; }
}

/* Contact page layout */
.contact-page .page-inner { text-align: left; }
.contact-page .section-title { font-size: 42px; text-align: left; color: var(--accent); margin: 0 0 24px; }
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px; align-items: start; margin-top: 16px; }
.contact-left { max-width: 620px; justify-self: start; padding-right: 12%; padding-top: 15px; }
.contact-left .contact-lead { margin: 0 0 16px; color: #141414; font-size: 18px; line-height: 1.6; }
.contact-left .contact-note { margin: 0; color: #616161; font-size: 16px; line-height: 1.6; }
.contact-left a { color: var(--accent); text-decoration: none; }
.contact-left a:hover { text-decoration: underline; }
.contact-quick { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.contact-chip { display: inline-block; padding: 10px 14px; border-radius: 999px; background: #F3F5FD; color: #141414; font-weight: 500; text-decoration: none; }
.contact-chip:hover { background: #e9edff; }

/* Contact form */
.contact-form { display: grid; gap: 14px; padding: 40px 36px 32px; border: none; background: #F3F5FD; position: relative; border-radius: 5px 25px 25px 25px; margin-top: 25px; }
 .contact-form::before { content: ''; position: absolute; top: -18px; left: 0; width: 160px; height: 25px; background: #F3F5FD; border-radius: 25px 0 0 0; clip-path: path('M 0 0 L 120 0 C 140 2, 135 16, 160 18 L 0 50 z'); z-index: 2; }
 /* Contact title smaller inside left block */
 .contact-title { margin: 0 0 24px; font-size: 24px; font-weight: 600; color: var(--accent); text-align: left !important; margin-left: 0 !important; margin-right: 0 !important; }
.form-group { display: grid; gap: 8px; }
.form-group label { font-weight: 500; color: #141414; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 12px 14px; border: 1px solid #e4e4e4; border-radius: 12px; background: #ffffff; color: #141414; font-size: 16px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #9a9a9a; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 11, 215, 0.15); }

.consent-text { margin: 6px 0 0; color: #8b8b8b; font-size: 13px; line-height: 1.5; }
.consent-text a { color: var(--accent); text-decoration: underline; }

/* Field-level validation error messages on contact form */
.contact-form .field-error { color: #d32f2f; font-size: 13px; margin-top: 4px; text-align: left; margin-left: 0; margin-right: 0; }

/* Consent text before submit button */
.contact-consent { font-size: 13px; color: var(--text-secondary); margin: 16px 0; text-align: left; line-height: 1.4; }
.contact-consent a { color: var(--accent); text-decoration: underline; }
.contact-consent a:hover { text-decoration: none; }

/* Input font JetBrains Mono */
.contact-form input,
.contact-form textarea,
.contact-form select { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Success feedback on submit button */
.contact-submit.success { background: #4caf50; }

.contact-submit { display: inline-block; padding: 12px 18px; border: none; border-radius: 12px; background: var(--accent); color: #ffffff; font-weight: 600; font-size: 16px; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; cursor: pointer; transition: filter 0.2s ease; }
.contact-submit:hover { filter: brightness(1.06); cursor: pointer !important; }
.contact-submit:active { filter: brightness(0.95); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-left { padding-right: 0; }
}
/* Anchor offset for fixed header */
html { scroll-behavior: auto; }
.portfolio { scroll-margin-top: calc(var(--header-height, 64px) + 20px); }
/* Blog post page */
.blog-article .page-inner { text-align: left; padding-top: 80px; }
/* Вгорі лише категорія, по центру як чіп */
.blog-article .blog-top { text-align: center; margin: 0 0 14px; }
.about-page .blog-top { text-align: center; margin: 0 0 14px; }
.blog-article .section-title { font-size: 52px; text-align: center; color: var(--accent); margin: 0 0 10px; max-width: 780px; margin-left: auto; margin-right: auto; }
.blog-article .section-subtitle { display: block; text-align: center; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 16px; font-size: 18px; line-height: 1.6; color: #141414; max-width: 780px; }
.blog-article .blog-meta { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 8px 0 24px; }
.blog-article .blog-author { display: flex; align-items: center; gap: 10px; }
.blog-article .blog-author-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.blog-article .blog-author-name { font-size: 14px; font-weight: 600; color: #000000; }
.blog-article .blog-date { color: rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 1.4; }
.blog-article .blog-sep { color: rgba(0,0,0,0.35); }
.blog-article .blog-category { padding: 6px 10px; border-radius: 999px; background: #F3F5FD; font-size: 14px; color: rgba(0, 0, 0, 0.6); }

.blog-article .blog-hero { background: var(--accent); border-radius: 32px; margin: 48px 0; text-align: center; }
.blog-article .blog-hero { position: relative; overflow: hidden; height: 380px; display: flex; align-items: center; justify-content: center; padding: 0 24px; }
.blog-article .blog-hero-image { max-width: 100%; max-height: calc(100% - 100px); height: auto; width: auto; display: inline-block; margin: 50px 0; position: relative; z-index: 2; }
/* Floating blurred blobs background */
/* Morphing gradient background for hero */
/* SVG background animation inside hero */
.blog-article .hero-anim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
}

/* Infinite grid background scrolling animation (subtle) */
@keyframes bg-scrolling-reverse {
  100% { background-position: 50px 50px; }
}
@keyframes bg-scrolling {
  0% { background-position: 50px 50px; }
}

.blog-article .hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 50px 50px;
  animation: bg-scrolling-reverse 0.92s linear infinite;
}

.blog-article .blog-content { margin-top: 24px; margin-bottom: 70px; max-width: 820px; margin-left: auto; margin-right: auto; }
.blog-article .blog-content, .blog-article .blog-content p, .blog-article .blog-content li, .blog-article .blog-content h2, .blog-article .blog-content h3 { text-align: left; }
/* Зменшуємо вертикальні відступи абзаців у статті */
.blog-article .blog-content p { margin-top: 0; margin-bottom: 0; }
/* Remove global centered margins only for paragraphs inside article content */
.blog-article .blog-content p { margin-left: 0 !important; margin-right: 0 !important; }
/* Slightly increase line-height for body text in article */
.blog-article .blog-content p, .blog-article .blog-content li { line-height: 1.7; }

/* Author section under article */
.blog-article .author-block { background: #FFF8EF; border-radius: 20px; padding: 48px 70px; display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: center; max-width: 980px; margin: 0 auto 120px; }
.blog-article .author-col.author-left { display: normal; align-items: center; gap: 18px; }
.blog-article .author-photo { width: 73px; height: 73px; border-radius: 50%; object-fit: cover; }
.blog-article .author-name { font-size: 26px; font-weight: 700; color: #000; line-height: 1.25; font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-align: left !important; }
.blog-article .author-desc { font-size: 16px; color: rgba(0,0,0,0.78); margin-top: 6px; text-align: left !important; margin-left: 0; margin-right: 0; }
.blog-article .author-col.author-right { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.blog-article .author-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; background: #141414; color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 1px 0 rgba(0,0,0,0.08); transition: transform 0.08s ease, box-shadow 0.2s ease, background-color 0.2s ease; text-align: center; }
.blog-article .author-btn:hover { transform: translateY(-1px); background: #000; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.blog-article .author-btn:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
/* Small grey note under the button */
.blog-article .author-btn-note { margin-top: 14px; font-size: 12px; color: #8b8b8b; text-align: center; }

@media (max-width: 900px) {
  .blog-article .author-block { grid-template-columns: 1fr; padding: 32px; }
  .blog-article .author-col.author-right { justify-content: flex-start; align-items: flex-start; margin-top: 12px; }
}
@media (max-width: 600px) {
  .blog-article .page-inner { padding-left: 16px; padding-right: 16px; }
  .blog-article .section-title { font-size: 30px; padding: 0 8px; }
  .blog-article .section-subtitle { font-size: 16px; padding: 0 12px; }
  .blog-article .blog-hero { height: 260px; border-radius: 0; width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }
  .blog-article .blog-content { padding: 0 16px; }
  .blog-article .author-block { padding: 24px; gap: 12px; border-radius: 0; width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }
  .blog-article .author-info { min-height: 73px; align-items: center; text-align: center; }
  .blog-article .author-info .author-name,
  .blog-article .author-info .author-desc { text-align: center !important; }
  .blog-article .author-name { font-size: 24px; }
  .blog-article .author-desc { font-size: 15px; }
  .blog-article .author-col.author-left { display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .blog-article .author-col.author-right { align-items: center; justify-content: center; }
  .blog-article .author-btn { width: 100%; max-width: 320px; }
}
/* Breadcrumbs */
/* Хлібні крошки більше не використовуються на сторінці статті */
/* .blog-article .breadcrumbs { display: none; } */

/* About page */
.about-page .section-title { color: var(--accent); font-size: 42px; }
.about-hero .section-title { font-size: 56px; }

.about-philosophy .about-philosophy-list {
  max-width: 900px;
  margin: 12px auto 0;
  text-align: left;
  font-size: 18px;
  line-height: 1.6;
  color: #141414;
}

.about-story-team .about-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px; align-items: center; margin-top: 16px; }
.about-story-team .about-grid { padding-left: 150px; padding-right: 150px; }
.about-story-team .about-col-left p { font-size: 22px; line-height: 1.7; color: #141414; text-align: left; margin: 0; }
/* Increase vertical space for the story/team section */
.about-story-team { padding-top: 140px; padding-bottom: 160px; }
.about-story-team .team-avatars { display: flex; align-items: center; justify-content: flex-start; }
.about-story-team .avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: transform 180ms ease; will-change: transform; }
.about-story-team .avatar:hover { transform: translateY(-6px); }
.about-story-team .avatar + .avatar { margin-left: -16px; }
.about-story-team .team-text { margin-top: 14px; font-size: 16px; color: #616161; text-align: left; }

/* Котик: коротка «буп»‑анімація на ховер */
@media (prefers-reduced-motion: no-preference) {
  .about-story-team .avatar-cat:hover,
  .about-story-team .avatar-cat.boop {
    animation: cat-boop 280ms ease;
  }
}

@keyframes cat-boop {
  0% { transform: translateY(-6px) scale(1); }
  40% { transform: translateY(-6px) scale(1.08); }
  70% { transform: translateY(-6px) scale(0.94); }
  100% { transform: translateY(-6px) scale(1); }
}

/* Founders block styles removed: using simple static layout without custom CSS */

/* About: Full-width video block */
.about-video { padding: 0; background: #ffffff; }
.about-video .page-inner { max-width: var(--container); margin: 0 auto; }
.about-video .video-full {
  position: relative;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 30px;
  overflow: hidden;
}
.about-video .video-full::before {
  content: "";
  display: block;
  padding-top: calc(590 / 1850 * 100%);
}
.about-video .about-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 600px) {
  .about-video .video-full::before { padding-top: calc(590 / 1850 * 100%); }
}

/* About: Наша Філософія — контейнер із закругленими кутами та слайдером */
.about-philosophy { padding: 0; }
.about-philosophy .page-inner { max-width: var(--container); margin: 0 auto; }
.about-philosophy .philosophy-card {
  position: relative;
  background: #F3F5FD;
  border-radius: 30px;
  overflow: hidden;
  min-height: 420px;
}
.about-philosophy .philosophy-title {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 600;
  font-size: 18px;
  color: #141414;
}
.about-philosophy .philosophy-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 64px;
}
.about-philosophy .philosophy-slide {
  max-width: 680px;
  font-size: 32px;
  line-height: 1.3;
  color: #000BD7;
  font-family: "Unbounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
/* Анімаційні стани для плавної зміни фраз */
.about-philosophy .philosophy-slide.anim-out { opacity: 0; transform: translateY(8px); }
.about-philosophy .philosophy-slide.anim-in { opacity: 1; transform: translateY(0); }
.about-philosophy .philosophy-next {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: #141414;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.08s ease;
}
.about-philosophy .philosophy-next:hover { filter: brightness(0.98); }
.about-philosophy .philosophy-next:active { transform: translate(-50%, 1px); }

@media (max-width: 900px) {
  .about-philosophy .philosophy-slide { font-size: 24px; }
}
@media (max-width: 600px) {
  .about-philosophy { padding: 60px 0; }
  .about-philosophy .philosophy-content { padding: 60px 16px 64px; }
  .about-philosophy .philosophy-title { top: 12px; font-size: 16px; }
}
/* (видалено залишкові стилі .about-founders) */
/* Clients page: title above logos same style as testimonials title */
.clients-love-title { margin: 0 0 12px; color: var(--accent); text-align: center; }
.clients-page .section-title.clients-love-title { font-size: 28px; }

/* About: Mobile — reduce H1 to half of desktop (56px → 28px) */
@media (max-width: 700px) {
  .about-page.about-hero .section-title {
    font-size: 28px !important;
    line-height: 1.1;
  }
}

/* About video: remove border radius on mobile */
@media (max-width: 700px) {
  .about-page.about-video .video-full { border-radius: 0 !important; }
  .about-page.about-video .about-video-el { border-radius: 0 !important; }
}

/* About: STRONG mobile fix — placed at very end to win cascade */
@media (max-width: 1100px) {
  /* Force single-column and remove giant paddings inside story/team grid */
  .about-page.about-story-team .about-grid {
    display: block !important;
    grid-template-columns: 1fr !important; /* fallback if grid still applies */
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }

  .about-page.about-story-team .about-col-right,
  .about-page.about-story-team .about-col-left {
    width: 100% !important;
  }

  /* Space between stacked columns */
  .about-page.about-story-team .about-col-right { margin-top: 16px; }

  /* Prevent text overflow */
  .about-page.about-story-team p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}