/* === Theme Variables === */
:root,
[data-theme="dark"] {
  --bg-primary: rgba(18, 22, 20, 0.85); /* Deep Jungle/Obsidian */
  --bg-secondary: rgba(30, 36, 32, 0.9); /* Stone Green */
  --text-primary: #f0f0f0;
  --text-secondary: #909e96;
  --text-muted: #5e6b63;
  --accent: #d29a43; /* Inca Gold */
  --shadow-color: rgba(0, 0, 0, 0.9);
  --modal-shadow: rgba(0, 0, 0, 0.8);
  --selection-bg: #6e5020;
  --border-subtle: #1e2420;
  --input-focus-bg: rgba(18, 22, 20, 0.9);
  --side-nav-line: #5e6b63;
  --slider-nav-bg: #1e2420;
  --options-link: #1e2420;
  --options-link-hover: #f0f0f0;
  --slider-item-color: #909e96;
  --slider-item-active: #f0f0f0;
  --contact-card-bg: rgba(18, 22, 20, 0.9);
}

[data-theme="light"] {
  --bg-primary: rgba(244, 236, 223, 0.85); /* Warm Sandstone */
  --bg-secondary: rgba(230, 218, 195, 0.9); /* Deep Limestone */
  --text-primary: #2e2622;
  --text-secondary: #6e655b;
  --text-muted: #8b8178;
  --accent: #b04627; /* Deep Terracotta */
  --shadow-color: rgba(60, 40, 20, 0.15);
  --modal-shadow: rgba(60, 40, 20, 0.12);
  --selection-bg: #f2cc8f;
  --border-subtle: #d6cbb5;
  --input-focus-bg: rgba(244, 236, 223, 0.9);
  --side-nav-line: #c4b9a3;
  --slider-nav-bg: #d6cbb5;
  --options-link: #8b8178;
  --options-link-hover: #2e2622;
  --slider-item-color: #6e655b;
  --slider-item-active: #2e2622;
  --contact-card-bg: rgba(255, 255, 255, 0.9);
}

/* === Apply Theme Variables === */
body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* Мягкая контрастная подложка для текста поверх 3D-фон - ВОЗВРАЩЕНО К ЛАКОНИЧНОСТИ */
.intro--banner {
  padding: 0 !important;
  background: none !important;
  will-change: transform;
}

[data-theme="light"] .intro--banner h1,
[data-theme="light"] .intro--options h3,
[data-theme="light"] .intro--options p,
[data-theme="light"] .about--banner h2 {
  text-shadow: 
    0 0 20px rgba(244, 236, 223, 0.95),
    0 0 40px rgba(244, 236, 223, 0.8),
    0 0 60px rgba(244, 236, 223, 0.5) !important;
}
[data-theme="dark"] .intro--banner h1,
[data-theme="dark"] .intro--options h3,
[data-theme="dark"] .intro--options p,
[data-theme="dark"] .about--banner h2 {
  text-shadow: 
    0 0 20px rgba(18, 22, 20, 0.95),
    0 0 40px rgba(18, 22, 20, 0.8),
    0 0 60px rgba(18, 22, 20, 0.5) !important;
}

/* Эффект Балкона: нижний блок скрывает ноги за своей непрозрачностью */
.intro--options {
  background-color: var(--bg-primary) !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 10 !important;
  box-shadow: 0 -20px 40px var(--bg-primary) !important; /* Мягкий переход сверху */
}

::-moz-selection {
  background: var(--selection-bg) !important;
}

::selection {
  background: var(--selection-bg) !important;
}

.device-notification {
  background-color: var(--bg-primary) !important;
}

.device-notification--logo,
.header--logo {
  color: var(--text-primary) !important;
}

.l-viewport {
  box-shadow: 0 0 45px 5px var(--shadow-color) !important;
}

.l-side-nav::before {
  background-color: var(--side-nav-line) !important;
}

.side-nav>li span {
  color: var(--text-primary) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

.side-nav>li::before {
  color: var(--text-muted) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.side-nav li.is-active::before {
  color: var(--text-primary) !important;
}

.intro--banner::before {
  background-color: var(--border-subtle) !important;
}

.intro--banner::after {
  display: none !important;
}

.intro--options {
  display: flex !important;
  justify-content: space-between !important;
  gap: 40px !important;
}

.intro--options>a {
  flex: 1 1 0 !important;
  max-width: none !important;
  color: var(--options-link) !important;
}

.intro--options>a:hover {
  color: var(--options-link-hover) !important;
}

.intro--options h3 {
  color: var(--text-secondary) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

.intro--options p {
  color: var(--text-primary) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.5;
}

.work h2 {
  color: var(--text-primary) !important;
}

.slider--item a {
  color: var(--slider-item-color) !important;
}

.slider--item-center a {
  color: var(--slider-item-active) !important;
}

.slider--prev,
.slider--next {
  background-color: var(--slider-nav-bg) !important;
}

.about--banner {
  height: 120px !important; /* Еще компактнее */
  position: relative !important;
}

.about--banner img {
  height: 380px !important;
  bottom: -40px !important;
  width: auto !important;
}

.about--banner h2 {
  color: var(--text-primary) !important;
  font-size: 38px !important;
  margin-top: 0 !important;
}

.services-cards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 25px !important;
  margin-top: 5px !important; /* Вплотную к заголовку */
  width: 95% !important;
  position: relative !important;
  z-index: 20 !important;
}

.service-card {
  display: flex !important;
  flex-direction: column !important;
  background-color: var(--bg-secondary) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  text-decoration: none !important;
  color: var(--text-primary) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  height: 100% !important;
}

.service-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(210, 154, 67, 0.2) !important;
}

.service-card__img {
  width: 100% !important;
  height: 180px !important; /* Картинки теперь намного больше */
  overflow: hidden !important;
}

.service-card__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease !important;
}

.service-card:hover .service-card__img img {
  transform: scale(1.1) !important;
}

.service-card__body {
  padding: 12px !important;
}

.service-card__body h3 {
  font-size: 18px !important; /* Крупнее заголовок */
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.2 !important;
}

.service-card__body p {
  font-size: 13px !important; /* Крупнее текст */
  color: var(--text-secondary) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* Адаптивность для средних экранов */
@media (max-width: 1100px) {
  .services-cards {
    width: 60% !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


.about--banner a {
  color: var(--text-primary) !important;
}

.about--options>a {
  color: var(--text-primary) !important;
}

.contact--lockup .modal {
  background-color: var(--contact-card-bg) !important;
  box-shadow: 0 0 30px 0 var(--modal-shadow) !important;
}

.contact--lockup .modal--information p,
.contact--lockup .modal--information a {
  color: var(--text-primary) !important;
}

.contact--lockup .modal--options a {
  color: #fff !important;
}

.hire h2 {
  color: var(--text-primary) !important;
}

.work-request {
  color: var(--text-primary) !important;
}

.work-request--options label {
  border-color: var(--text-primary) !important;
  color: var(--text-primary) !important;
}

.work-request--information input[type="text"],
.work-request--information input[type="email"] {
  color: var(--text-primary) !important;
  border-bottom-color: var(--text-primary) !important;
}

.work-request--information input[type="text"]:focus,
.work-request--information input[type="email"]:focus {
  background-color: var(--input-focus-bg) !important;
}

.work-request--information label {
  color: var(--text-primary) !important;
}

.outer-nav>li {
  color: var(--text-primary) !important;
}

.header--nav-toggle span,
.header--nav-toggle::before,
.header--nav-toggle::after {
  background-color: var(--text-primary) !important;
}

.intro--banner button svg,
.about--banner a svg {
  fill: var(--text-primary) !important;
}

.slider--prev svg,
.slider--next svg {
  fill: var(--text-primary) !important;
}

/* Header logo img in light mode */
[data-theme="light"] .header--logo img,
[data-theme="light"] .device-notification--logo img {
  filter: brightness(0) saturate(100%);
}

/* === Theme Toggle Button === */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 15px;
  z-index: 11;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.15);
}

.theme-toggle:focus {
  outline: none;
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: var(--text-primary);
  transition: fill 0.3s ease, transform 0.4s ease;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* Adjust header layout for toggle */
.header {
  gap: 10px;
}

.header--controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Smooth theme transition */
html[data-theme] body,
html[data-theme] .l-viewport,
html[data-theme] .device-notification,
html[data-theme] .contact--lockup .modal {
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* Contact section background in light mode */
[data-theme="light"] .contact {
  background-blend-mode: luminosity;
  background-color: rgba(245, 245, 247, 0.85);
}

/* Outline color for perspective container */
[data-theme="light"] .container {
  outline-color: var(--accent);
}

[data-theme="light"] .effect-rotate-left--animate .container {
  outline-color: var(--accent);
}

/* === Hero CTA Button === */
.hero-cta {
  position: relative;
  display: inline-block;
  padding: 16px 35px 16px 25px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff !important;
  background-color: #2d6a4f;
  border: none;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.hero-cta .btn-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #40916c 0%, #2d6a4f 50%, #1b4332 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-cta:hover .btn-background {
  opacity: 1;
}

.hero-cta:hover {
  box-shadow: 0 0 25px rgba(45, 106, 79, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.hero-cta svg {
  position: relative;
  left: 8px;
  top: 1px;
  width: 16px;
  fill: #fff;
  transition: left 0.3s ease;
}

.hero-cta:hover svg {
  left: 14px;
}

@media (max-width: 600px) {
  .hero-cta {
    font-size: 13px;
    padding: 12px 22px 12px 16px;
  }
}

/* === Shop Info (below slider) === */
.shop-info {
  position: relative;
  margin-top: 60px;
  min-height: 80px;
}

.shop-info__item {
  display: none;
  animation: shopInfoFade 0.4s ease;
}

.shop-info__item.is-active {
  display: block;
}

@keyframes shopInfoFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.shop-info__desc {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.shop-info__lot {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background-color: var(--bg-secondary);
  border-left: 3px solid #c9a227;
  border-radius: 0 4px 4px 0;
}

.shop-info__lot-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c9a227;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-info__lot-text {
  font-size: 12px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .shop-info__lot {
    flex-direction: column;
    gap: 4px;
  }
}

/* === Slider Title Overrides === */
.slider--item-title {
  margin-top: 18px !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.slider--item-center .slider--item-title {
  margin-top: 30px !important;
  font-size: 18px !important;
  letter-spacing: 1.5px;
}

/* Side items: clickable & animated */
.slider--item-left,
.slider--item-right {
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.slider--item-left:hover,
.slider--item-right:hover {
  transform: translateY(-50%) scale(1.08);
  opacity: 0.85;
}

.slider--item-left .slider--item-image,
.slider--item-right .slider--item-image {
  transition: box-shadow 0.3s ease;
}

.slider--item-left:hover .slider--item-image,
.slider--item-right:hover .slider--item-image {
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Center item: pointer to show it's clickable */
.slider--item-center {
  cursor: pointer;
}

/* === Cart Toggle Button (Header) === */
.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 11;
  transition: transform 0.3s ease;
}

.cart-toggle:hover {
  transform: scale(1.15);
}

.cart-toggle:focus {
  outline: none;
}

.cart-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background-color: #e53935;
  border-radius: 8px;
  display: none;
}

.cart-badge.has-items {
  display: block;
}

/* === Catalog Overlay === */
.catalog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  animation: catalogFadeIn 0.3s ease;
}

.catalog-overlay.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes catalogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.catalog {
  position: relative;
  width: 1000px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 40px;
  animation: catalogSlideIn 0.3s ease;
}

@keyframes catalogSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.catalog__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}

.catalog__close:hover {
  color: var(--text-primary);
}

.catalog__title {
  margin: 0 0 20px 0;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-primary);
}

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

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

.product-card {
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.product-card__img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.product-card__body {
  padding: 12px;
}

.product-card__name {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.product-card__price {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--accent);
}

.product-card__add {
  display: block;
  width: 100%;
  padding: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: #2d6a4f;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.product-card__add:hover {
  background: #40916c;
}

.product-card__add.added {
  background: var(--text-muted);
  pointer-events: none;
}

/* === Cart Sidebar Panel === */
.cart-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.4);
}

.cart-overlay.is-open {
  display: block;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100%;
  background: var(--bg-primary);
  box-shadow: -4px 0 25px rgba(0,0,0,0.2);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-panel.is-open {
  right: 0;
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-panel__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-primary);
}

.cart-panel__close {
  font-size: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.cart-panel__close:hover {
  color: var(--text-primary);
}

.cart-panel__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-panel__empty {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item__img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.cart-item__remove {
  font-size: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  flex-shrink: 0;
}

.cart-item__remove:hover {
  color: #e53935;
}

.cart-panel__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.cart-panel__total {
  font-size: 16px;
  color: var(--text-primary);
  text-align: right;
}

.cart-panel__total strong {
  font-size: 20px;
  font-weight: 900;
}

/* === Contact Modal Expansion Override === */
.contact--lockup {
  width: 100% !important;
  max-width: 90% !important;
  justify-content: flex-end !important;
}

.contact--lockup .modal {
  padding: 30px 40px !important;
  min-width: 380px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  background-color: rgba(12, 12, 12, 0.8) !important;
  backdrop-filter: blur(10px) !important;
}

.contact--lockup .modal--information p,
.contact--lockup .modal--information a {
  font-size: 16px !important;
  margin: 15px 0 !important;
  line-height: 1.4 !important;
  color: #fff !important; /* Fix text color to be light */
}

.modal--socials-group h4 {
  margin: 15px 0 10px !important;
  font-size: 15px !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

/* Social Icons Display */
.modal--social-icons {
  display: flex !important;
  gap: 15px !important;
  justify-content: center !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 25px 0 !important;
}

.modal--social-icons li {
  width: 48px !important;
  height: 48px !important;
}

.modal--social-icons a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  color: #fff !important;
  transition: transform 0.2s ease !important;
  text-decoration: none !important;
}

.modal--social-icons a:hover {
  transform: scale(1.1) !important;
}

.modal--social-icons .icon-insta {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
}

.modal--social-icons .icon-tiktok {
  background-color: #111 !important;
  border: 1px solid #333 !important;
}

/* Social Projects Display */
.modal--social-projects {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
}

.modal--social-projects li {
  width: 250px !important;
}

.modal--social-projects a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background-color: #0088cc !important; /* Telegram Blue */
  color: #fff !important;
  padding: 12px 20px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease !important;
}

.modal--social-projects a:hover {
  background-color: #0077b5 !important;
}

/* === Shop Slider Icons Override === */
.work--lockup .slider {
  height: 280px !important;
  margin-top: 30px !important;
}

.work--lockup .slider--item {
  opacity: 1 !important;
  transition: transform 0.3s ease !important;
  cursor: pointer !important;
}

.work--lockup .slider--item-center {
  z-index: 10 !important;
}

.work--lockup .slider--item-left {
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
}

.work--lockup .slider--item-center {
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.work--lockup .slider--item-right {
  top: 0 !important;
  right: 0 !important;
  transform: none !important;
}

/* Hover effects */
.work--lockup .slider--item-left:hover {
  transform: scale(1.05) !important;
}

.work--lockup .slider--item-center:hover {
  transform: translateX(-50%) scale(1.05) !important;
}

.work--lockup .slider--item-right:hover {
  transform: scale(1.05) !important;
}

.work--lockup .slider--item-title {
  font-size: 16px !important;
  margin-top: 15px !important;
}

.work--lockup .slider--item-image,
.work--lockup .slider--item-center .slider--item-image {
  width: 220px !important;
  height: 220px !important;
}

@media (max-width: 900px) {
  .work--lockup .slider--item-image,
  .work--lockup .slider--item-center .slider--item-image {
    width: 160px !important;
    height: 160px !important;
  }
}

@media (max-width: 767px) {
  .work--lockup .slider--item-image,
  .work--lockup .slider--item-center .slider--item-image {
    width: 120px !important;
    height: 120px !important;
  }
}

/* =========================================
   === RESPONSIVE / MOBILE OVERRIDES ===
   ========================================= */

/* 0. Global Layout (Fix Header Overlap) */
@media (max-width: 767px) {
  .intro, .work, .about, .contact--lockup, .hire {
    justify-content: flex-start !important;
    padding-top: 90px !important; 
    padding-bottom: 20px !important;
    padding-left: 45px !important; /* Увеличиваем отступ, чтобы точно не наезжало на ползунок */
    padding-right: 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow-y: auto !important; /* Разрешаем нативную прокрутку контента */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important; /* Плавная прокрутка для iOS */
    scrollbar-width: none !important; /* Скрываем ползунок скроллбара (Firefox) */
  }
  
  /* Скрываем родной ползунок скроллбара (Chrome, Safari, Edge) */
  .intro::-webkit-scrollbar,
  .work::-webkit-scrollbar,
  .about::-webkit-scrollbar,
  .contact--lockup::-webkit-scrollbar,
  .hire::-webkit-scrollbar {
    display: none !important;
  }
}

/* 0.5 Mobile Side Nav (Slider Indicator) */
@media (max-width: 1180px) {
  .l-side-nav {
    display: flex !important; /* Возвращаем скрытое меню */
    z-index: 50 !important;
  }
}
@media (max-width: 767px) {
  .l-side-nav::before {
    left: 4px !important; /* Прижимаем к самому краю панели */
  }
  .side-nav {
    width: 25px !important;
  }
  .side-nav li::before {
    font-size: 10px !important;
    left: 10px !important; /* Прижимаем цифры к линии */
  }
  .side-nav li.is-active::before {
    left: 10px !important; 
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #3a7558 !important; /* Выделяем зеленым */
  }
  .side-nav li span {
    display: none !important; /* Скрываем текстовые подписи */
  }
}

/* 0.6 Header Protection (Mobile) */
@media (max-width: 767px) {
  .header {
    background: transparent !important;
    z-index: 100 !important; /* Поднимаем выше всего остального */
  }
  .header::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background-color: var(--bg) !important;
    opacity: 0.95 !important;
    z-index: -1 !important;
    border-bottom: 1px solid rgba(128,128,128, 0.1) !important;
  }
}

/* Глобальное скрытие зеленых треугольников и кругов со слайда "О нас" (Desktop + Mobile) */
.about::before,
.about::after,
.about--banner::before,
.about--banner::after,
.about--banner h2::before,
.about--banner h2::after {
  display: none !important;
}

/* === Мезоамериканский каменно-нефритовый стиль (Stone/Maya UI) === */

/* Декоративный паттерн убран по просьбе пользователя */
.about--banner h2::after {
  display: none !important;
}



.cta, 
.hero-cta,
.btn-background,
.work-request--options label,
.options-b label {
  border-radius: 4px !important; /* Угловатая "каменная" кладка */
  box-shadow: 4px 4px 0px rgba(0,0,0,0.6) !important; /* Жесткая тень Необрутализма / Камня */
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s !important;
  border: 1px solid var(--border-subtle) !important;
  position: relative !important;
  overflow: hidden !important;
}

[data-theme="light"] .cta, 
[data-theme="light"] .hero-cta,
[data-theme="light"] .work-request--options label,
[data-theme="light"] .options-b label {
  box-shadow: 4px 4px 0px rgba(60, 40, 20, 0.25) !important;
}

/* Ховер-эффекты (поднятие каменных плит и золотое свечение) */
.cta:hover, 
.hero-cta:hover,
.work-request--options label:hover,
.options-b label:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 6px 6px 0px var(--accent) !important;
}

/* Активное состояние (камень вдавлен) */
.options-b input:checked + label,
.work-request--options input:checked + label {
  transform: translate(2px, 2px) !important;
  box-shadow: 2px 2px 0px var(--accent) !important;
  background-color: var(--accent) !important;
  color: #fff !important;
}

/* Слайдер индейской лавки (Минимализм + Hover Scale) */
.slider--item {
  border-radius: 50% !important;
  transform: scale(1) !important;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s !important;
  border: none !important;
  box-shadow: none !important;
}

/* Эффект увеличения при наведении */
.slider--item:hover {
  transform: scale(1.1) !important;
  z-index: 10 !important;
}

/* Центральный элемент (теперь без рамок, просто в фокусе) */
.slider--item-center {
  opacity: 1 !important;
  box-shadow: none !important;
  border: none !important;
}

/* Неактивные боковые элементы чуть приглушаем для акцента на центре */
.slider--item-left, .slider--item-right {
  opacity: 0.7 !important;
}

.slider--item-image {
  border-radius: 50% !important;
  overflow: hidden !important;
}

/* Кнопка шапки (обводка как у золотых слитков) */
.header--cta {
  border-radius: 4px !important;
  border: 2px solid var(--accent) !important;
  box-shadow: 3px 3px 0px var(--accent) !important;
  transition: all 0.2s !important;
}
.header--cta:hover {
  transform: translate(-1px, -1px) !important;
  box-shadow: 4px 4px 0px var(--accent) !important;
}

/* 1. Intro Section & Options */
@media (max-width: 767px) {
  /* Компрессия главного блока, чтобы освободить место снизу для текста */
  .intro--banner {
    height: auto !important;
    padding-bottom: 25px !important;
    margin-bottom: 65px !important; /* Увеличено, чтобы вместить кнопку ПОД линией */
  }
  .intro--banner::before {
    bottom: 0 !important; /* Двигаем горизонт. линию */
  }
  .intro--banner::after {
    bottom: -2px !important; 
  }
  
  /* Уплотняем 3 блока с текстом, но оставляем шрифты читаемыми */
  .intro--options {
    flex-direction: column !important;
    gap: 15px !important; /* Чуть свободнее */
  }
  .intro--options > a {
    text-align: center !important;
    margin-bottom: 0 !important;
  }
  .intro--options h3 {
    font-size: 16px !important; /* Возвращаем нормальный заголовок */
    margin-top: 5px !important;
    margin-bottom: 5px !important;
  }
  .intro--options p {
    font-size: 14px !important; /* Возвращаем нормальный читабельный текст */
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  /* Включаем и адаптируем персонажа на телефонах */
  .intro--banner img {
    display: block !important;
    height: 190px !important; /* Уменьшаем высоту, чтобы перья не лезли в заголовок и на шапку */
    width: auto !important;
    bottom: 0px !important; /* Оставляем стоять на серой линии */
    right: -30px !important; /* Немного отодвигаем правее от текста */
    z-index: -1 !important; 
    opacity: 0.9 !important;
  }
  /* Компактный заголовок и отступ сверху */
  .intro--banner h1 {
    font-size: 36px !important; /* Чуть аккуратнее */
    max-width: 65% !important;
    margin-top: 15px !important; /* Опускаем заголовок ниже, чтобы не лип к шапке */
    margin-bottom: 15px !important;
    z-index: 2 !important;
  }
  /* Компактная кнопка вынесенная под серую линию (не перекрывает персонажа) */
  .intro--banner .hero-cta {
    display: inline-block !important;
    position: absolute !important;
    bottom: -60px !important; /* Опускаем ниже линии */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 85% !important;
    max-width: none !important;
    padding: 12px 15px !important; /* Делаем удобной для пальца */
    font-size: 11px !important;
    line-height: normal !important;
    white-space: normal !important;
    text-align: center !important;
    z-index: 2 !important;
    margin-top: 0 !important;
  }
  /* Прячем стрелочку, раз текст по центру */
  .intro--banner .hero-cta svg {
    display: none !important;
  }
}

/* 2. Shop Slider Stack */
@media (max-width: 650px) {
  .work--lockup .slider {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important;
    margin-top: 0 !important;
    gap: 20px !important; /* Tighter gap to fit the whole stack vertically */
  }
  .work--lockup .slider--item,
  .work--lockup .slider--item-left,
  .work--lockup .slider--item-right {
    position: relative !important;
    display: block !important; /* Forces hidden items to appear */
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
  }
  .work--lockup .slider--item-center,
  .work--lockup .slider--item-center:hover {
    transform: none !important;
  }
  .work--lockup .slider--item-left:hover,
  .work--lockup .slider--item-center:hover,
  .work--lockup .slider--item-right:hover {
    transform: scale(1.03) !important;
  }
  /* Smaller margins to fit vertically and fix jumping */
  .work--lockup .slider--item-title,
  .slider--item-center .slider--item-title {
    margin-top: 8px !important;
    font-size: 14px !important;
  }
  .work--lockup .slider--item-image,
  .work--lockup .slider--item-center .slider--item-image {
    width: 100px !important;
    height: 100px !important;
  }
  .shop-info {
    margin-top: 20px !important;
  }
}

/* 3. About / Services Grid */
@media (max-width: 1024px) {
  .new-services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px !important;
  }
}

@media (max-width: 767px) {
  .about--banner h2 {
    font-size: 28px !important;
  }
  .about--banner img {
    height: 250px !important;
    bottom: -20px !important;
  }
  .new-services-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    margin-top: 25px !important;
  }
}

/* 4. Contact Modal */
@media (max-width: 600px) {
  .contact--lockup .modal {
    min-width: unset !important;
    width: 95% !important;
    padding: 20px 15px !important;
  }
  .modal--social-projects li {
    width: 100% !important;
  }
  .modal--social-projects a {
    font-size: 14px !important;
  }
}

/* 5. Catalog */
@media (max-width: 550px) {
  .catalog__grid {
    grid-template-columns: 1fr !important;
  }
  .catalog {
    padding: 24px 20px !important;
  }
  .catalog__title {
    font-size: 18px !important;
  }
}

/* 6. Cart Panel */
@media (max-width: 400px) {
  .cart-panel {
    width: 100% !important;
    right: -100% !important;
  }
  .cart-panel.is-open {
    right: 0 !important;
  }
}

/* Аппаратное ускорение для 3D-сцены */
#canvas3d {
  will-change: transform;
}

/* === Blog & Article Viewer (Premium Update) === */
.blog-container {
    width: 100% !important;
    max-width: none !important;
    margin: 110px auto 0 auto !important; 
    display: flex;
    flex-direction: column;
    height: 80vh !important; 
    padding-left: 50px; /* Идеальное расстояние от навигационной линии */
    box-shadow: none !important;
    position: relative;
    z-index: 10;
}

.blog { 
    flex-grow: 1;
    overflow-y: auto !important;
    padding: 20px 40px !important; /* Больше отступов для теней и воздуха */
    scrollbar-width: thin;
    scrollbar-color: rgba(210, 154, 67, 0.25) transparent;
}

/* Кастомный скроллбар для блога - ТОНКИЙ И АККУРАТНЫЙ */
.blog::-webkit-scrollbar {
    width: 4px;
}
.blog::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}
.blog::-webkit-scrollbar-thumb {
    background: rgba(210, 154, 67, 0.5);
    border-radius: 10px;
}

.blog--header {
    margin-bottom: 30px !important;
    flex-shrink: 0;
}

.blog--header h2 {
    font-size: 48px !important; /* Возвращаем солидный размер */
    font-weight: 900 !important;
    letter-spacing: -1.5px;
    color: var(--text-primary) !important;
    text-transform: uppercase;
    margin: 0 0 20px 0 !important;
}

.blog--header p {
    font-size: 16px !important;
    color: var(--text-secondary) !important;
}

.blog--feed {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Возврат к любимым 3-м колонкам */
    gap: 25px !important; /* Уменьшили gap, чтобы сами карточки стали максимально широкими */
    padding-bottom: 60px !important;
}

.blog-post {
    background: var(--bg-secondary) !important;
    padding: 0 !important;
    border-radius: 15px !important; /* Чуть мягче углы для больших карт */
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important; 
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow 0.4s ease !important;
    min-height: 480px; 
}

.blog-post:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Preview Image with Placeholder functionality */
.blog-post__preview {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-primary);
    transition: transform 0.6s ease;
    flex-shrink: 0;
}

/* Стилизация карточки БЕЗ картинки - добавляем стильный градиент и иконку-символ */
.blog-post__preview:empty {
    background-image: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-post__preview:empty::after {
    content: "⟐";
    font-size: 60px;
    color: var(--accent);
    opacity: 0.2;
}

.blog-post:hover .blog-post__preview {
    transform: scale(1.08);
}

.blog-post__date {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 900;
    margin: 25px 30px 10px 30px;
}

.blog-post__title {
    font-size: 28px !important; /* Крупнее для широких карточек */
    font-weight: 900 !important;
    margin: 0 30px 15px 30px !important;
    color: var(--text-primary) !important;
    line-height: 1.1 !important;
    flex-shrink: 0;
}

.blog-post__excerpt {
    font-size: 15px !important;
    color: var(--text-secondary) !important;
    line-height: 1.7 !important;
    margin: 0 30px 30px 30px !important;
    flex-grow: 1;
    overflow: hidden;
}

.blog-post__more {
    align-self: flex-start;
    padding: 14px 30px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 40px !important;
    background-color: var(--accent) !important;
    color: #fff !important;
    border: none !important;
    margin: auto 30px 30px 30px !important; /* margin-top: auto вытесняет кнопку вниз */
    transition: all 0.3s ease !important;
}

.blog-post__more:hover {
    background-color: var(--text-primary) !important;
    transform: scale(1.05);
}

.blog-post__more:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(210, 154, 67, 0.4);
}

/* --- Article Viewer Modal --- */
.article-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.article-view.is-open {
    display: flex;
    opacity: 1;
}

.article-view__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.article-view__content {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 100%;
    margin: 0 auto;
    background: var(--bg-primary);
    overflow-y: auto;
    padding: 80px 60px;
    box-shadow: 0 0 100px rgba(0,0,0,0.5);
    animation: articleSlideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes articleSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.article-view__close {
    position: fixed;
    top: 30px;
    right: calc(50% - 450px + 30px);
    background: var(--bg-secondary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.article-view__close:hover {
    background: var(--accent);
    color: #fff;
}

.article-view__header {
    margin-bottom: 40px;
}

.article-view__date {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-view__title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    color: var(--text-primary);
}

.article-view__hero {
    width: 100%;
    height: 450px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    margin-bottom: 50px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.article-view__body {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-primary);
    font-weight: 400;
}

.article-view__body p {
    margin-bottom: 25px;
}

.article-view__body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}

/* Mobile Adjustments for Modal */
@media (max-width: 950px) {
    .article-view__content {
        max-width: 100%;
        padding: 60px 25px;
    }
    .article-view__close {
        right: 20px;
        top: 20px;
    }
    .article-view__title {
        font-size: 32px;
    }
    .article-view__hero {
        height: 250px;
    }
    .article-view__body {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .blog { padding-left: 0 !important; width: 100% !important; max-width: 100% !important; }
    .blog--header h2 { font-size: 32px !important; }
    .blog--feed { grid-template-columns: 1fr !important; }
}
