/**
 * DenizTech — Main stylesheet
 * Page-specific components (UIKit loaded separately)
 */

/* -------------------------------------------------------------------------
   Logo & Burger
   ------------------------------------------------------------------------- */
.logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: height var(--duration-smooth) var(--ease);
}

.header--sticky.is-scrolled .logo-img {
  height: 44px;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 1.5rem;
  color: var(--color-primary);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--duration-normal) var(--ease), opacity var(--duration-normal) var(--ease);
}

body.menu-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .burger span:nth-child(2) {
  opacity: 0;
}

body.menu-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------------------------------------------------
   Language Switch — pill style
   ------------------------------------------------------------------------- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--color-background);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
}

.lang-switch__item,
.lang-switch a {
  padding: 6px 12px;
  font-size: var(--text-caption);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: color var(--duration-normal) var(--ease),
    background var(--duration-normal) var(--ease),
    box-shadow var(--duration-normal) var(--ease);
}

.lang-switch__item:hover:not(.active),
.lang-switch a:hover:not(.active) {
  color: var(--color-text);
  background: rgba(58, 124, 189, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lang-switch__item.active,
.lang-switch a.active {
  background: var(--color-white);
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
}

.btn-write {
  margin-left: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  margin-left: auto;
}

.header-inner .nav {
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
}

.header-inner .nav-link {
  padding: 6px 10px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Nav — hover outline + micro-effects, selected pill style (from reference)
   ------------------------------------------------------------------------- */
.nav-link {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color var(--duration-normal) var(--ease),
    background var(--duration-normal) var(--ease),
    border-color var(--duration-normal) var(--ease),
    box-shadow var(--duration-normal) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.nav-link:hover:not(.nav-active) {
  background: rgba(58, 124, 189, 0.06);
  border-color: rgba(58, 124, 189, 0.25);
  box-shadow: 0 0 0 1px rgba(58, 124, 189, 0.12);
  transform: translateY(-1px);
}

.nav-link:hover::after {
  display: none;
}

/* Selected item: light blue pill, dark blue border + text (per reference image) */
.nav-link.nav-active {
  background: #E6F0FF;
  border: 1px solid #4682B4;
  color: #4682B4;
  font-weight: var(--fw-semibold);
  box-shadow: none;
}

.nav-link.nav-active::after {
  display: none;
}

/* -------------------------------------------------------------------------
   Scroll reveal — IntersectionObserver driven (see main.js)
   ------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-reveal) var(--ease),
    transform var(--duration-reveal) var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -------------------------------------------------------------------------
   Post Cards
   ------------------------------------------------------------------------- */
.post-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: var(--card-pad);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--duration-hover) var(--ease),
    box-shadow var(--duration-hover) var(--ease),
    border-color var(--duration-hover) var(--ease);
}

.post-card:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: var(--shadow-hover);
}

.post-card .link {
  font-weight: var(--fw-medium);
  color: var(--color-primary);
}

.post-card .link:hover {
  color: var(--color-primary-hover);
}

.post-card h3 {
  margin-top: 0;
}

.post-card h3 a {
  color: var(--color-text);
}

.post-card h3 a:hover {
  color: var(--color-primary);
}

/* -------------------------------------------------------------------------
   Project Cards
   ------------------------------------------------------------------------- */
.project-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: var(--card-pad);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--duration-hover) var(--ease),
    box-shadow var(--duration-hover) var(--ease),
    border-color var(--duration-hover) var(--ease);
}

.project-card:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: var(--shadow-hover);
}

.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card-link:hover {
  color: inherit;
}

.project-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-large);
  margin-bottom: var(--space-sm);
  object-fit: contain;
}

.project-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-small);
  margin-bottom: var(--space-sm);
}

/* -------------------------------------------------------------------------
   Gallery — Websites grid (modern card layout)
   ------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card: rounded, shadow, overflow; whole card is clickable link */
.gallery-card {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.gallery-card:hover {
  box-shadow: 0 16px 40px rgba(58, 124, 189, 0.2);
  transform: translateY(-6px);
  border-color: rgba(58, 124, 189, 0.25);
}

.gallery-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image wrap: clip for scale effect */
.gallery-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f7f8fa;
}

.gallery-card .gallery-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-card:hover .gallery-preview {
  transform: scale(1.05);
}

/* Overlay: gradient, title; fades in on hover */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.3;
}

/* Card body: spacing and typography */
.gallery-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gallery-card-heading {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111111;
  margin: 0 0 8px;
  font-size: 1rem;
}

.gallery-card-desc {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 12px;
  flex: 1;
}

/* Gallery section icons and lists (mobile/desktop blocks) */
.gallery-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-large);
  margin-bottom: var(--space-sm);
  object-fit: contain;
}

.gallery-links {
  margin: var(--space-sm) 0;
}

.gallery-links a {
  margin-right: var(--space-md);
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.gallery-links a:hover {
  border-color: rgba(58, 124, 189, 0.5);
  box-shadow: 0 0 0 1px rgba(58, 124, 189, 0.3);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
   Gallery Sections (Mobile / Desktop / Store)
   ------------------------------------------------------------------------- */
.gallery-section-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 32px 0;
}

@media (min-width: 640px) {
  .gallery-section-table {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .gallery-section-table {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-section-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
  min-width: 0;
}

.gallery-section-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.06);
}

.gallery-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
}

.gallery-section-header h2,
.gallery-section-header h3 {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111111;
  margin: 0;
}

.gallery-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-section-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

/* Белые иконки на цветном фоне (SVG с currentColor) */
.gallery-section-icon--ios .gallery-section-icon-img,
.gallery-section-icon--android .gallery-section-icon-img,
.gallery-section-icon--huawei .gallery-section-icon-img,
.gallery-section-icon--macos .gallery-section-icon-img,
.gallery-section-icon--windows .gallery-section-icon-img,
.gallery-section-icon--linux .gallery-section-icon-img {
  filter: brightness(0) invert(1);
}

.gallery-section-icon--ios {
  background: #8e8e93;
}

.gallery-section-icon--android {
  background: #3ddc84;
}

.gallery-section-icon--huawei {
  background: #e41d34;
}

.gallery-section-icon--macos {
  background: #000000;
}

.gallery-section-icon--windows {
  background: #0078d4;
}

.gallery-section-icon--linux {
  background: #333333;
}

.gallery-section-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f7f8fa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gallery-item:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gallery-item--clickable {
  cursor: pointer;
}

.gallery-item--clickable:hover {
  border-color: rgba(58, 124, 189, 0.4);
  box-shadow: 0 8px 20px rgba(58, 124, 189, 0.15);
  background: #ffffff;
}

.gallery-item h3,
.gallery-item h4 {
  margin-top: 0;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111111;
}

.gallery-huawei-subsections {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.gallery-huawei-title {
  font-size: var(--text-body);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-xs);
}

@media (min-width: 768px) {
  .gallery-huawei-subsections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.btn-ghost {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-small);
  cursor: pointer;
  text-decoration: none;
}

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

.store-carousel {
  position: relative;
  margin: var(--space-xl) 0;
  overflow: hidden;
}

.store-carousel-track {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
}

.store-carousel-track::-webkit-scrollbar {
  height: 6px;
}

.store-carousel-track::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}

.store-card {
  min-width: 260px;
  max-width: 320px;
  scroll-snap-align: start;
  background: var(--color-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  flex-shrink: 0;
}

.store-card-image-wrap {
  border-radius: var(--radius-small);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.store-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.store-card-title {
  font-size: var(--text-body);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--space-xs);
}

.store-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-caption);
  background: var(--color-background);
  color: var(--color-text);
  text-decoration: none;
}

.store-link--apple {
  background: #111827;
  color: #ffffff;
}

.store-link--google {
  background: #1a73e8;
  color: #ffffff;
}

.store-link--huawei {
  background: #e41d34;
  color: #ffffff;
}

.store-link--harmony,
.store-link--harmony-next {
  background: #059669;
  color: #ffffff;
}

.store-link--rustore {
  background: #0077ff;
  color: #ffffff;
}

.store-link--apple,
.store-link--google,
.store-link--huawei,
.store-link--harmony,
.store-link--harmony-next,
.store-link--rustore,
.app-store-links .btn {
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.store-link--apple:hover,
.store-link--google:hover,
.store-link--huawei:hover,
.store-link--harmony:hover,
.store-link--harmony-next:hover,
.store-link--rustore:hover,
.app-store-links .btn:hover {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 0 0 4px rgba(58, 124, 189, 0.45);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
   Service Tiles
   ------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl) var(--space-xl);
  margin-top: var(--space-xl);
}

.service-tile {
  background: var(--color-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease);
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto;
  gap: 0 var(--space-md);
  align-items: start;
}

.service-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-tile-icon .service-icon-svg svg {
  stroke: none;
}

.service-tile-icon {
  width: 56px;
  height: 56px;
  margin: 0;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-button);
  flex-shrink: 0;
}

.service-tile-icon .service-icon,
.service-tile-icon img.service-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  margin: auto;
  align-self: center;
}

.service-tile-icon .service-icon-svg {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.service-tile-icon .service-icon-svg svg {
  width: 28px;
  height: 28px;
}

.service-tile-title {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding-left: 0;
}

.service-tile-description {
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-secondary);
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: var(--space-sm);
}

.service-tile-description p:last-child {
  margin-bottom: 0;
}

/* Legacy service-card (if used elsewhere) */
.service-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  object-fit: contain;
}

.service-description {
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.service-description p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Blog Layout
   ------------------------------------------------------------------------- */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-xl);
}

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.blog-widget {
  padding: var(--space-lg);
}

.blog-widget h3 {
  margin: 0 0 var(--space-md);
  font-size: var(--text-base);
}

.blog-widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-widget-list li {
  margin-bottom: var(--space-sm);
}

.blog-widget-list a {
  color: var(--color-text-secondary);
  transition: color var(--duration-normal) var(--ease);
}

.blog-widget-list a:hover {
  color: var(--color-primary);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag-cloud-item {
  display: inline-block;
  padding: 4px 10px;
  font-size: var(--text-small);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background var(--duration-normal) var(--ease), color var(--duration-normal) var(--ease);
}

.tag-cloud-item:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.post-item.card {
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.post-item-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.post-item .post-date {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  order: 0;
}

.post-item .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.post-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: var(--text-caption);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background var(--duration-normal) var(--ease), color var(--duration-normal) var(--ease);
}

.post-tag:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.post-item .post-excerpt {
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0;
}

.post-item h2 {
  margin-top: 0;
}

.post-item h2 a {
  transition: color var(--duration-normal) var(--ease);
  color: var(--color-text);
}

.post-item h2 a:hover {
  color: var(--color-primary);
}

.post-item .link {
  font-weight: var(--fw-medium);
}

.post-single-inner.card {
  padding: var(--space-xl);
}

.post-single .post-date {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  display: block;
  margin-bottom: var(--space-sm);
}

.post-single .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.post-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--space-md);
}

.post-content {
  line-height: 1.8;
  color: var(--color-text);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-small);
}

/* -------------------------------------------------------------------------
   App / Website Detail
   ------------------------------------------------------------------------- */
.app-detail .app-header {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.app-icon-lg {
  width: 120px;
  height: 120px;
  border-radius: 22px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  object-fit: cover;
  background: var(--color-white);
}

.app-store-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.app-store-links .btn {
  min-width: 0;
}

.qr-block {
  margin-top: var(--space-md);
}

/* QR Code — красивый контейнер в деталке */
.qr-code-container {
  margin-top: var(--space-lg);
}

.qr-code-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-large);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.qr-code-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: var(--radius-small);
  background: var(--color-white);
  padding: 8px;
}

.qr-code-label {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

/* Кнопки Privacy / Terms в деталке */
.app-legal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: var(--space-xl) 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.app-legal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: var(--fw-semibold);
  font-size: var(--text-small);
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  transition: transform var(--duration-normal) var(--ease),
    box-shadow var(--duration-normal) var(--ease),
    border-color var(--duration-normal) var(--ease),
    background var(--duration-normal) var(--ease);
}

.app-legal-btn--privacy {
  background: linear-gradient(160deg, #4a8fd4 0%, #3A7CBD 55%, #2F6CA8 100%);
  color: var(--color-white);
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(47, 108, 168, 0.12), 0 8px 20px rgba(58, 124, 189, 0.22);
}

.app-legal-btn--privacy:hover {
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(47, 108, 168, 0.14), 0 12px 24px rgba(58, 124, 189, 0.28);
}

.app-legal-btn--terms {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid rgba(58, 124, 189, 0.35);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.app-legal-btn--terms:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58, 124, 189, 0.12);
  background: rgba(58, 124, 189, 0.04);
  border-color: var(--color-primary);
}

.app-legal-btn-icon {
  font-size: 1em;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
}

.app-legal-btn--disabled {
  background: var(--color-background);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  cursor: default;
  opacity: 0.8;
}

.app-legal-btn--disabled:hover {
  transform: none;
  box-shadow: none;
}

.app-legal-btn--support {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid rgba(58, 124, 189, 0.35);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.app-legal-btn--support:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58, 124, 189, 0.12);
  background: rgba(58, 124, 189, 0.04);
  border-color: var(--color-primary);
}

/* Страница документа (Privacy/Terms) */
.app-doc {
  padding: var(--space-xl) 0;
}

.app-doc-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.app-doc-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--text-small);
  margin-bottom: var(--space-sm);
  overflow-wrap: anywhere;
}

.app-doc-back:hover {
  text-decoration: underline;
}

.app-doc-title {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.app-doc-content {
  max-width: 720px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-content h1, .doc-content h2, .doc-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.doc-content h1 { font-size: 1.35rem; }
.doc-content h2 { font-size: 1.15rem; }
.doc-content h3 { font-size: 1.05rem; }

.doc-content p {
  margin-bottom: var(--space-md);
}

.doc-content ul, .doc-content ol {
  margin: var(--space-md) 0;
  padding-left: 1.25em;
}

.doc-content li {
  margin-bottom: var(--space-xs);
}

.doc-content a {
  color: var(--color-primary);
  text-decoration: none;
}

.doc-content a:hover {
  text-decoration: underline;
}

.doc-content code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  word-break: break-all;
}

.doc-content img,
.doc-content pre,
.doc-content table {
  max-width: 100%;
}

.doc-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.doc-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

.app-doc-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.app-doc-footer--actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.app-doc-footer--actions .btn {
  min-width: 0;
  text-align: center;
}

.app-description {
  margin-bottom: var(--space-xl);
}

/* Screenshots container — wrapper with title */
.screenshots-container {
  margin-bottom: var(--space-xl);
}

.screenshots-title {
  font-size: var(--text-h4);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--space-md);
  color: var(--color-text);
}

.app-screenshots,
.website-screenshots {
  display: grid;
  gap: var(--space-md);
  perspective: 1200px;
}

.app-screenshots {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.website-screenshots {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.app-screenshots .screenshot-link,
.website-screenshots .screenshot-item {
  display: block;
  border-radius: var(--radius-small);
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.app-screenshots .screenshot-link:hover,
.website-screenshots .screenshot-item:hover {
  transform: perspective(800px) rotateY(-3deg) rotateX(2deg) translateZ(12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(58, 124, 189, 0.25),
    0 0 0 2px var(--color-primary);
}

.app-screenshots .screenshot-link img,
.website-screenshots .screenshot-item img {
  width: 100%;
  display: block;
  transition: transform var(--duration-normal) var(--ease);
}

.app-screenshots .screenshot-link img {
  height: 300px;
  object-fit: cover;
}

.website-screenshots .screenshot-item img {
  height: auto;
  min-height: 180px;
  object-fit: cover;
}

.website-screenshots .screenshot-item .screenshot-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  margin-top: 0;
}

.app-screenshots .screenshot-link:hover img,
.website-screenshots .screenshot-item:hover img {
  transform: scale(1.03);
}

.app-legal {
  margin: var(--space-xl) 0;
}

.app-legal a {
  margin-right: var(--space-md);
}

.app-releases .release-item {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--color-background);
  border-radius: var(--radius-small);
  border: 1px solid var(--color-border);
}

.release-date {
  color: var(--color-text-secondary);
  margin-left: var(--space-sm);
  font-weight: 400;
}

.website-detail .website-header {
  margin-bottom: var(--space-xl);
}

.website-detail .website-preview-lg {
  max-width: 100%;
  border-radius: var(--radius-small);
  margin-bottom: var(--space-md);
}


.tech-list {
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0;
}

.screenshot-label {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-caption);
  font-weight: var(--fw-medium);
}

/* -------------------------------------------------------------------------
   About (Info)
   ------------------------------------------------------------------------- */
.about-section .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-section .about-page-title {
  margin-bottom: var(--space-sm);
}

.about-hero-subtitle {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.about-directions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .about-directions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.about-direction-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.05rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.about-direction-text {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: var(--text-small);
}

/* -------------------------------------------------------------------------
   Lab Method
   ------------------------------------------------------------------------- */
.method-blocks-grid {
  margin-top: 0;
}

@media (min-width: 768px) {
  .method-blocks-grid.about-directions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .method-blocks-grid.about-directions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.method-banner-block {
  margin-top: 0;
}

.method-banner-text {
  margin: 0;
  max-width: none;
  width: 100%;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  text-wrap: pretty;
}

.about-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: var(--text-small);
  line-height: 1.5;
}

.about-meta-label {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.about-meta-value {
  color: var(--color-text-secondary);
}

.about-meta-separator {
  color: var(--color-text-secondary);
  opacity: 0.6;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.about-block {
  padding: var(--space-lg);
  min-height: 0;
}

.about-block h3 {
  margin: 0 0 var(--space-md);
  font-size: var(--text-base);
  color: var(--color-primary);
}

.about-block p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.about-photo-block img {
  width: 100%;
  border-radius: var(--radius-small);
  display: block;
}

.about-intro-block { grid-column: span 1; }
.about-focus-block { grid-column: span 1; }
.about-skills-block { grid-column: span 1; }
.about-experiments-block { grid-column: span 1; }
.about-education-block { grid-column: span 1; }

.about-links-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.about-links-block .btn {
  margin: 0;
}

/* Legacy about layout (fallback) */
.about-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-photo img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.about-content .page-title {
  margin-top: 0;
}

.about-skills h3,
.about-education h3 {
  margin-bottom: var(--space-sm);
}

.about-skills p,
.about-education p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.about-bio {
  margin-bottom: var(--space-xl);
}

.about-skills,
.about-education {
  margin-bottom: var(--space-lg);
}

.about-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.about-links a {
  display: inline-flex;
  align-items: center;
}

/* -------------------------------------------------------------------------
   Contact Form
   ------------------------------------------------------------------------- */
.contact-panel {
  padding: var(--card-pad);
}

.contact-panel .page-title {
  margin-bottom: var(--space-lg);
}

.contact-form .form-group {
  margin-bottom: var(--space-lg);
}

.contact-form label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--fw-semibold);
}

.contact-form input,
.contact-form textarea {
  margin-top: 0;
}

@media (max-width: 768px) {
  .contact-panel {
    padding: var(--card-pad-mobile);
  }

  .contact-panel .btn-primary {
    width: 100%;
    max-width: 280px;
  }
}

/* -------------------------------------------------------------------------
   Modal Form
   ------------------------------------------------------------------------- */
.modal-content h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.modal-content textarea {
  margin-bottom: var(--space-md);
}

.modal-content .btn-primary {
  width: 100%;
  justify-content: center;
}

.modal-content .form-group {
  margin-bottom: var(--space-md);
}

.modal-content .form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.modal-content .support-app-name {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg, #f8fafc);
  border-radius: var(--radius-input, 8px);
  font-weight: 500;
  color: var(--color-text);
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  background: var(--color-white);
  margin-top: clamp(var(--space-xl), 8vw, var(--space-hero));
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.footer-bottom .container.footer-bottom__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-content: unset;
  gap: 16px;
  text-align: left;
}

.footer-bottom .privacy-link {
  margin-left: 0;
}

.partners-carousel {
  overflow: hidden;
  padding: var(--space-lg) 0;
}

.partners-track {
  display: flex;
  gap: var(--space-xl);
  animation: scroll 20s linear infinite;
}

.partners-track:hover {
  animation-play-state: paused;
}

.partner-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-md);
  opacity: 0.8;
  transition: opacity var(--duration-normal) var(--ease);
}

.partner-link:hover {
  opacity: 1;
}

.partner-link img {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.footer-bottom {
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

.social-links {
  margin-bottom: var(--space-sm);
}

.social-links a {
  margin: 0 var(--space-sm);
}

.copyright {
  margin: 0;
}

.privacy-link {
  margin-left: var(--space-md);
}

/* -------------------------------------------------------------------------
   Breadcrumbs
   ------------------------------------------------------------------------- */
.breadcrumb {
  padding: var(--space-sm) 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease);
}

.breadcrumb-item a:hover {
  color: var(--color-primary);
}

.breadcrumb-sep {
  margin: 0 var(--space-xs);
  color: var(--color-text-secondary);
  user-select: none;
}

.breadcrumb-current {
  color: var(--color-text);
}

/* -------------------------------------------------------------------------
   Main content area
   ------------------------------------------------------------------------- */
.main {
  min-height: calc(100vh - 200px);
}

@media (max-width: 1024px) {
  .burger {
    display: flex;
    order: 3;
    margin-left: 0;
    flex-shrink: 0;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
    gap: 6px;
  }

  .header-inner .nav {
    display: none;
    order: 4;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-sm);
  }

  body.menu-open .nav {
    display: flex;
  }

  .nav-link::after {
    display: none;
  }

  .header-inner .nav-link,
  .nav a {
    padding: var(--space-md);
    width: 100%;
    text-align: left;
    font-size: 1rem;
  }

  .nav .btn-write {
    width: 100%;
    justify-content: center;
    margin: var(--space-sm) 0 0;
  }

  .lang-switch {
    flex-shrink: 0;
    padding: 3px;
    margin-left: 0;
  }
}

/* -------------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .container,
  .container-narrow {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header {
    height: 56px;
  }

  .header--sticky.is-scrolled {
    height: 52px;
  }

  .logo-img {
    height: 40px;
  }

  .header--sticky.is-scrolled .logo-img {
    height: 36px;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
  }

  .lang-switch__item,
  .lang-switch a {
    padding: 5px 9px;
    font-size: 11px;
  }

  .breadcrumb {
    padding: 6px 0;
  }

  .breadcrumb-list {
    font-size: 0.72rem;
    gap: 2px;
  }

  .breadcrumb-sep {
    margin: 0 2px;
  }

  .breadcrumb-current {
    overflow-wrap: anywhere;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 200px;
    margin: 0 auto;
  }

  .app-detail .app-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: var(--space-lg);
  }

  .app-detail .app-header > div {
    min-width: 0;
    flex: 1;
  }

  .app-detail .app-header h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.65rem);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
  }

  .app-icon-lg {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .app-store-links {
    margin: 8px 0 0;
    gap: 8px;
  }

  .app-store-links .btn {
    padding: 8px 14px;
    font-size: var(--text-small);
  }

  .qr-code-container {
    margin-top: 12px;
  }

  .qr-code-box {
    padding: 12px;
    width: 100%;
    max-width: 180px;
  }

  .qr-code-img {
    width: 112px;
    height: 112px;
  }

  .app-description {
    margin-bottom: var(--space-lg);
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .app-legal-buttons {
    flex-direction: column;
    gap: 8px;
    margin: var(--space-lg) 0;
    padding-top: var(--space-md);
  }

  .app-legal-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 14px;
  }

  .app-screenshots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .app-screenshots .screenshot-link img {
    height: 220px;
  }

  .website-screenshots {
    grid-template-columns: 1fr;
  }

  .app-doc {
    padding: var(--space-lg) 0;
  }

  .app-doc-header {
    margin-bottom: var(--space-lg);
    padding-bottom: 12px;
  }

  .app-doc-footer--actions {
    flex-direction: column;
  }

  .app-doc-footer--actions .btn {
    width: 100%;
    box-sizing: border-box;
  }

  .doc-content h1,
  .doc-content h2,
  .doc-content h3 {
    margin-top: var(--space-lg);
  }

  .gallery-section-table {
    gap: 14px;
    margin: 16px 0;
  }

  .gallery-section-card {
    padding: 14px;
    border-radius: 12px;
  }

  .gallery-section-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .gallery-section-header h2,
  .gallery-section-header h3 {
    font-size: 1.05rem;
  }

  .gallery-section-icon,
  .gallery-section-icon-img {
    width: 32px;
    height: 32px;
  }

  .gallery-section-list {
    gap: 10px;
  }

  .gallery-item {
    padding: 12px;
  }

  .gallery-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .gallery-item h3,
  .gallery-item h4 {
    font-size: 0.98rem;
  }

  .gallery-item p {
    font-size: 0.84rem;
    line-height: 1.45;
    margin: 0 0 8px;
  }

  .hero {
    padding: var(--space-xxl) 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .gallery-section-table {
    grid-template-columns: 1fr;
  }

  .gallery-grid,
  .projects-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

/* -------------------------------------------------------------------------
   Lightbox (vanilla JS) — fullscreen image viewer
   ------------------------------------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 60px 72px 32px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* Close button — top-right, prominent */
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

/* Prev/Next — left/right arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-hidden .lightbox-prev,
.lightbox-nav-hidden .lightbox-next {
  display: none;
}

/* Laboratory home shell — scoped so inner pages retain their current layout. */
.is-home {
  --color-primary: #0869df;
  --color-primary-hover: #075bbf;
  --color-primary-light: #eaf3ff;
  --color-background: #fbfcfe;
}

.is-home .header {
  height: 72px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: none;
}

.is-home .header--sticky.is-scrolled {
  height: 64px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.is-home .header-inner {
  height: 100%;
  max-width: 1240px;
  gap: 24px;
}

.is-home .logo-img,
.is-home .header--sticky.is-scrolled .logo-img {
  height: 38px;
}

.is-home .header-inner .nav {
  gap: 20px;
}

.is-home .header-inner .nav-link {
  padding: 7px 4px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  border-radius: 0;
}

.is-home .header-inner .nav-link:hover {
  color: var(--color-primary);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.is-home .header .btn-write {
  min-height: 40px;
  padding: 0 18px;
  margin-left: 12px;
  border-radius: 10px;
  font-size: 13px;
}

.is-home .lang-switch {
  padding: 3px;
  background: #fff;
  border-color: #e5eaf1;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.is-home .lang-switch__item,
.is-home .lang-switch a {
  min-width: 34px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 7px;
}

.is-home .partners-carousel--home {
  display: none;
}

.is-home .footer {
  margin-top: 0;
  padding-top: 0;
  background: #fbfcfe;
  border-top: 0;
}

.is-home .footer-bottom {
  padding: 26px 0 32px;
  font-size: 12px;
}

.is-home .footer-bottom .container.footer-bottom__inner {
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
}

.is-home .footer-bottom__social {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.is-home .footer-bottom__social a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 50%;
}

.is-home .footer-bottom__social a:hover {
  color: var(--color-primary);
  background: #eaf3ff;
}

.is-home .footer-bottom__social svg {
  width: 15px;
  height: 15px;
}

.is-home .footer-bottom__links {
  justify-self: end;
}

@media (max-width: 1024px) {
  .is-home .header-inner .nav {
    gap: 8px;
  }

  .is-home .header-inner .nav-link {
    padding: 14px 16px;
    font-size: 15px;
  }

  .is-home .header .btn-write {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .is-home .header,
  .is-home .header--sticky.is-scrolled {
    height: 60px;
  }

  .is-home .logo-img,
  .is-home .header--sticky.is-scrolled .logo-img {
    height: 34px;
  }

  .is-home .footer-bottom .container.footer-bottom__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .is-home .footer-bottom__social {
    grid-row: 1;
  }

  .is-home .footer-bottom__links {
    justify-self: center;
    justify-content: center;
  }
}

/* Shared site chrome: one compact header and footer on every public page. */
.site-body .header {
  height: 72px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: none;
}

.site-body .header--sticky.is-scrolled {
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.site-body .header-inner {
  height: 100%;
  max-width: 1240px;
  gap: 24px;
}

.site-body .logo-img,
.site-body .header--sticky.is-scrolled .logo-img {
  height: 38px;
}

.site-body .header-inner .nav {
  gap: 12px;
}

.site-body .header-inner .nav-link {
  padding: 7px 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
}

.site-body .header-inner .nav-link:hover:not(.nav-active) {
  color: var(--color-primary);
  background: rgba(58, 124, 189, 0.06);
  border-color: rgba(58, 124, 189, 0.3);
  box-shadow: 0 0 0 1px rgba(58, 124, 189, 0.1);
  transform: translateY(-1px);
}

.site-body .header-inner .nav-link.nav-active {
  color: #4682b4;
  background: #e6f0ff;
  border-color: #4682b4;
}

.site-body .header .btn-write {
  min-height: 40px;
  padding: 0 18px;
  margin-left: 4px;
  border-radius: 10px;
  font-size: 13px;
}

.site-body .lang-switch {
  padding: 3px;
  background: #fff;
  border-color: #e5eaf1;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.site-body .lang-switch__item,
.site-body .lang-switch a {
  min-width: 34px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 7px;
}

.site-body .footer {
  margin-top: 0;
  padding-top: 0;
  background: #fbfcfe;
  border-top: 0;
}

.site-body .footer-bottom {
  padding: 26px 0 32px;
  font-size: 12px;
}

.site-body .footer-bottom .container.footer-bottom__inner {
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.site-body .footer-bottom__links {
  justify-self: end;
}

@media (max-width: 1024px) {
  .site-body .header-inner .nav {
    gap: 8px;
  }

  .site-body .header-inner .nav-link {
    padding: 14px 16px;
    font-size: 15px;
  }

  .site-body .header .btn-write {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .site-body .header,
  .site-body .header--sticky.is-scrolled {
    height: 60px;
  }

  .site-body .logo-img,
  .site-body .header--sticky.is-scrolled .logo-img {
    height: 34px;
  }

  .site-body .footer-bottom .container.footer-bottom__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .site-body .footer-bottom__links {
    justify-self: center;
    justify-content: center;
  }
}
