* {
  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;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 28px 40px;
  gap: 24px;
}

.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,
.menu-icon::before,
.menu-icon::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: #141414;
  position: relative;
}

.menu-icon::before { transform: translateY(-6px); }
.menu-icon::after { transform: translateY(4px); }

.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;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
  }
  .header-right {
    order: 2;
  }
  .header-left {
    order: 1;
  }
  .main-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }
  .menu-toggle { display: inline-flex; }
  body.nav-open .main-nav { display: flex; }
}

/* 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 14px;
}

.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; }
  .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; }
.page .section-subtitle { text-align: center !important; margin-left: auto; margin-right: auto; display: block; }

/* 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; }
}

@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;
}

/* 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%); }
}

@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-item {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 36px 32px;
  background: #F3F5FD;
  position: relative;
  border-radius: 5px 25px 25px 25px;
  margin-top: 25px;
}

.blog-item::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: #ffffff;
  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;
}

/* 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; }

/* 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; }

/* 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: 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: 9999;
  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: 9999;
  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;
}

.portfolio-subtitle {
  font-size: 16px;
  color: #141414;
  line-height: 1.6;
  margin: 16px 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-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.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;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: static;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid #e2e2e2;
  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: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
}

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

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
}

@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;
}


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

.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;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: static;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid #e2e2e2;
  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: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
}

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

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
}

@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: 9999;
  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;
}

.portfolio-subtitle {
  font-size: 16px;
  color: #141414;
  line-height: 1.6;
  margin: 16px 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.35);
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.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;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: static;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid #e2e2e2;
  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: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
}

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

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
}

@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.35);
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.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;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Крестик теперь не absolute, он в header */
.portfolio-modal-close {
  position: static;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid #e2e2e2;
  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: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f9f9f9;
}

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

.modal-actions .modal-service-btn:hover {
  background: #f9f9f9;
}

@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; }

/* 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; }
}