/* ==========================================================================
   ПЕРЕМЕННЫЕ И БАЗОВЫЕ СТИЛИ
   ========================================================================== */

:root {
  --bg: #f2f4f4;
  --surface: #ffffff;
  --ink: #10262d;
  --muted: #65757b;
  --line: #d9e0e2;
  --orange: #ff8a1d;
  --orange-dark: #d96807;
  --blue: #0b3a86;
  --green: #09b564;
  --shadow: 0 18px 45px rgba(16, 38, 45, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* ==========================================================================
   УТИЛИТЫ И ДОСТУПНОСТЬ
   ========================================================================== */

.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Skip-link для скринридеров и клавиатурной навигации */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 12px 20px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius);
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
}

.visual-trap {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.section-inner {
  width: min(100% - 48px, 1360px);
  margin: 0 auto;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background-image: 
    linear-gradient(90deg, rgba(6, 25, 29, 0.94) 0%, rgba(6, 25, 29, 0.78) 45%, rgba(6, 25, 29, 0.32) 100%), 
    url("1.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #ffffff;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 23, 27, 0.38), rgba(7, 23, 27, 0.08));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 20px 0 150px;
}

.hero__points {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 42px 0 0;
  padding: 0 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  font-weight: 700;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 44px;
}

.hero-card {
  position: relative;
  left: max(24px, calc((100% - 1360px) / 2));
  z-index: 2;
  max-width: 520px;
  padding: 28px 32px;
  top: -110px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero-card h2 {
  font-size: 26px;
}

.hero-card p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

/* ==========================================================================
   TOPBAR (ШАПКА)
   ========================================================================== */

.topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 500px 1fr;
  grid-template-areas:
    "brand contacts"
    "nav nav";
  gap: 28px;
  align-items: center;
  width: min(100% - 48px, 1360px);
  margin: 0 auto;
  padding: 26px 0;
}

.brand {
  grid-area: brand;
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.brand img {
  width: 100%;
  height: auto;
}

.nav-links {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.nav-links a {
  padding: 12px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.topbar__contacts {
  grid-area: contacts;
  display: grid;
  grid-template-columns: repeat(2, max-content) auto;
  gap: 18px;
  align-items: start;
  justify-self: end;
}

.contact-mini {
  max-width: 230px;
  font-weight: 800;
}

.contact-mini__label {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 500;
}

.messengers {
  display: flex;
  gap: 8px;
}

.messengers a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.messengers a:first-child {
  background: #2aabee;
}

.messengers a[href*="wa.me"] {
  background: #25D366 !important;
  border-radius: 12px;
}

.menu-toggle {
  grid-area: toggle;
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

/* ==========================================================================
   ЗАГОЛОВКИ
   ========================================================================== */

.eyebrow {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.hero-card h2 {
  margin: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  font-size: 70px;
}

.hero h1::first-line {
  color: var(--orange);
}

/* ==========================================================================
   КНОПКИ
   ========================================================================== */

.btn {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  font-size: 19px;
}

.btn span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff !important;
  color: var(--ink) !important;
  font-size: 26px;
  line-height: 1;
  box-sizing: border-box;
  padding-bottom: 6px;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--orange);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(255, 138, 29, 0.24);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--orange-dark);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.text-link {
  width: fit-content;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 18px;
  text-transform: uppercase;
}

/* ==========================================================================
   СЕКЦИИ
   ========================================================================== */

.section {
  padding: 40px 0;
}

.section--light {
  background: var(--bg);
}

.section--dark {
  background: var(--ink);
  color: #ffffff;
}

.section--split {
  background: #e6ecee;
}

.section--form {
  background: linear-gradient(135deg, #ffffff 0%, #eef3f4 100%);
}

.section--contacts {
  background: #ffffff;
}

.section-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 24px;
}

.section h2 {
  font-size: 58px;
  margin-bottom: 0;
}

.section-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.section--dark .section-head p:not(.eyebrow),
.section--dark .features p {
  color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   УСЛУГИ (SERVICES)
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(16, 38, 45, 0.15);
}

.service-card:hover img {
  transform: scale(1.05);
  transition: transform 0.5s ease;
}

.service-card--accent {
  background: var(--orange);
  color: #ffffff;
}

.service-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card__body {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.service-card h3,
.features h3,
.footer-contacts h3 {
  margin: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 24px;
  line-height: 1.25;
  text-transform: uppercase;
}

.service-card p:not(.eyebrow),
.split__copy p:not(.eyebrow),
.request-panel p:not(.eyebrow),
.faq-list p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.service-card--accent p {
  color: rgba(255, 255, 255, 0.86);
}

.service-card span {
  display: inline-flex;
  width: fit-content;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--orange);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-card__media {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
  overflow: hidden;
}

.service-card__media img {
  cursor: zoom-in;
  display: block;
}

.service-card__media:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   SPLIT СЕКЦИЯ
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.split__copy {
  display: grid;
  gap: 22px;
}

.split__copy h2 {
  max-width: 720px;
}

.split__media img {
  width: 100%;
  height: 620px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ==========================================================================
   ПРЕИМУЩЕСТВА (FEATURES)
   ========================================================================== */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.features article {
  min-height: 260px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.features span {
  display: inline-block;
  margin-bottom: 46px;
  color: var(--orange);
  font-weight: 900;
}

.features h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

/* ==========================================================================
   ПОРТФОЛИО
   ========================================================================== */

.portfolio-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.portfolio-item {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  text-align: left;
  cursor: zoom-in;
}

.portfolio-item--wide {
  grid-column: span 2;
}

.portfolio-item--tall {
  grid-row: span 2;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.portfolio-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
}

.portfolio-item span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.portfolio-item:hover img,
.portfolio-item:focus-visible img {
  opacity: 0.86;
  transform: scale(1.04);
}

/* ==========================================================================
   ФОРМА ЗАЯВКИ
   ========================================================================== */

.request-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: start;
  padding: 56px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.request-panel h2 {
  margin-bottom: 22px;
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.lead-form--modal {
  grid-template-columns: 1fr;
}

.lead-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
  position: relative;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafb;
  color: var(--ink);
  outline: 0;
}

.lead-form input,
.lead-form select {
  height: 54px;
  padding: 0 16px;
}

.lead-form textarea {
  resize: vertical;
  min-height: 118px;
  padding: 14px 16px;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 138, 29, 0.15);
}

.lead-form__wide {
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-status.is-success {
  color: #087f4a;
}

.form-status.is-error {
  color: #b43218;
}

/* Валидация и лоадер */
.field-error {
  display: none;
  margin-top: 6px;
  color: #b43218;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.field-error.is-visible {
  display: block;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.lead-form input.is-invalid,
.lead-form select.is-invalid,
.lead-form textarea.is-invalid {
  border-color: #b43218;
  background: #fdf6f4;
  box-shadow: 0 0 0 3px rgba(180, 50, 24, 0.12);
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
  color: transparent !important;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 38, 45, 0.06);
}

.faq-list summary {
  cursor: pointer;
  padding: 22px 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.faq-list p {
  padding: 0 24px 24px;
}

/* ==========================================================================
   КОНТАКТЫ
   ========================================================================== */

.contacts-panel {
  padding: 56px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.contacts-panel__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.map-wrap {
  overflow: hidden;
  height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f4;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.footer-contacts {
  display: grid;
  grid-template-columns: 64px repeat(3, 1fr);
  gap: 28px;
  align-items: start;
  padding-top: 34px;
}

.back-top {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 34px;
}

.footer-contacts h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.footer-contacts p,
.footer-contacts a {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}

.footer-contacts a[href^="mailto:"] {
  transition: color 0.2s ease;
}

.footer-contacts a[href^="mailto:"]:hover {
  color: var(--orange);
}

.messengers--footer a {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.messengers--footer a:first-child {
  background: #2aabee;
}

.messengers--footer a[href*="wa.me"] {
  background: #25D366 !important;
  border-radius: 12px;
}

/* Адрес - перенос строк */
.address-lines {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  display: flex;
  justify-content: center;
  padding: 28px;
  background: #07171b;
  color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   ПЛАВАЮЩИЕ КНОПКИ
   ========================================================================== */

.float-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

.float-contact a {
  min-height: 50px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(9, 181, 100, 0.28);
}

.float-contact button {
  width: 62px;
  height: 62px;
  border: 6px solid #ffffff;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(16, 38, 45, 0.2);
}

/* ==========================================================================
   МОДАЛЬНЫЕ ОКНА
   ========================================================================== */

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(5, 18, 22, 0.72);
  backdrop-filter: blur(6px);
}

.request-modal {
  width: min(94vw, 560px);
}

.modal-card {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 34px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 34px;
  line-height: 1.05;
  text-transform: uppercase;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  font-size: 26px;
}

.lightbox {
  width: min(94vw, 1100px);
}

.lightbox img {
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #07171b;
}

/* ==========================================================================
   КАРУСЕЛИ
   ========================================================================== */

.service-card__gallery {
  position: relative;
  overflow: hidden;
}

.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel img {
  flex: 0 0 100%;
  width: 100%;
  height: 280px;
  object-fit: cover;
  scroll-snap-align: center;
  cursor: zoom-in;
}

.service-card__gallery:hover img {
  transform: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--ink);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
  background: #ffffff;
  color: var(--orange);
}

.service-card__gallery:hover .carousel-btn,
.portfolio-carousel-wrapper:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

@media (hover: none) and (pointer: coarse) {
  .carousel-btn {
    display: none;
  }
}

/* Индикаторы карусели (точки) */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 0;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dots .dot:hover {
  background: var(--muted);
}

.carousel-dots .dot.is-active {
  background: var(--orange);
  transform: scale(1.3);
}

/* Карусель видео-портфолио */
.portfolio-carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.portfolio-carousel {
  gap: 16px;
}

.portfolio-carousel .portfolio-item {
  flex: 0 0 100%;
  position: relative;
  height: 450px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  border: none;
  padding: 0;
  text-align: left;
  cursor: default !important;
}

@media (min-width: 768px) {
  .portfolio-carousel .portfolio-item {
    flex: 0 0 calc(50% - 8px);
  }
}

.portfolio-carousel .portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer !important;
}

.portfolio-carousel .portfolio-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
}

.portfolio-carousel .portfolio-item span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 55px;
  z-index: 1;
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.portfolio-carousel .portfolio-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 64px;
  height: 64px;
  background-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(50% + 2px) center;
  background-size: 28px;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.portfolio-carousel .portfolio-item:hover::before {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: var(--orange-dark);
}

.portfolio-carousel .portfolio-item.is-playing::before {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.7);
}

.portfolio-carousel .portfolio-item.is-playing span {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   МЕДИА-ЗАПРОСЫ: ПЛАНШЕТЫ (до 1180px)
   ========================================================================== */

@media (max-width: 1180px) {
  /* Шапка */
  .topbar {
    grid-template-columns: 360px auto 46px;
    grid-template-areas: "brand contacts toggle";
  }

  .brand {
    width: 100%;
  }

  .topbar__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    justify-self: end;
  }

  .topbar__contacts .contact-mini {
    display: block;
    text-align: right;
  }

  .topbar__contacts .messengers {
    display: flex;
    gap: 8px;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
    background: var(--orange);
    border: none;
    box-shadow: var(--shadow);
  }

  .menu-toggle span {
    background: var(--surface);
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    width: min(360px, calc(100vw - 48px));
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(12, 33, 38, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: grid;
  }

  .nav-links a {
    border-radius: var(--radius);
  }

  /* Типографика и сетки */
  .hero h1 {
    font-size: 54px;
  }

  .section h2 {
    font-size: 46px;
    margin-bottom: 0;
  }

  .services-grid,
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .request-panel,
  .faq-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .split__media img {
    height: 480px;
  }

  /* Футер */
  .footer-contacts {
    grid-template-columns: 1fr;
    text-align: center;
    align-items: center;
    gap: 24px;
  }

  .footer-contacts .back-top {
    justify-self: center;
    margin-bottom: 16px;
  }

  .messengers--footer {
    justify-content: center;
  }

  .footer-contacts div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .footer-contacts .messengers {
    flex-direction: row;
    justify-content: center;
  }

  .section {
    padding: 60px 0;
  }
}

/* ==========================================================================
   МЕДИА-ЗАПРОСЫ: МОБИЛЬНЫЕ (до 760px)
   ========================================================================== */

@media (max-width: 760px) {
  /* Общие отступы */
  .section-inner,
  .topbar {
    width: min(100% - 28px, 1360px);
  }

  .hero {
    min-height: auto;
    padding-bottom: 40px;
  }

  .section {
    padding: 40px 0;
  }

  .section-head {
    margin-bottom: 24px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Шрифты и кнопки */
  .hero h1 {
    font-size: 30px;
  }

  .section h2 {
    font-size: 34px;
    margin-bottom: 0;
  }

  .hero__points {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero-card {
    position: static;
    margin-top: 24px;
    max-width: 100%;
  }

  .hero__content {
    padding-bottom: 16px;
  }

  /* Компактные кнопки */
  .btn {
    padding: 0 20px;
    gap: 12px;
    font-size: 15px;
    min-height: 52px;
  }

  .btn span {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  /* Сетки */
  .services-grid,
  .features,
  .portfolio-grid,
  .footer-contacts,
  .lead-form {
    grid-template-columns: 1fr;
  }

  .portfolio-item--wide,
  .portfolio-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .request-panel,
  .contacts-panel {
    padding: 32px 24px;
  }

  /* Шапка мобильная */
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 12px 16px;
    padding: 16px 0;
  }

  .brand {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    width: 100%;
    max-width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .menu-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 48px;
    height: 48px;
    background: var(--orange);
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
  }

  .menu-toggle span {
    background: var(--surface);
    width: 24px;
    height: 3px;
  }

  .topbar__contacts {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .topbar__contacts .contact-mini {
    display: none;
  }

  .topbar__contacts .messengers {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .messengers a {
    width: 48px !important;
    height: 48px !important;
    border-radius: var(--radius);
    font-size: 14px;
  }

  .messengers a[href*="wa.me"] {
    border-radius: 12px !important;
  }

  /* Плавающая кнопка */
  .float-contact a {
    display: block;
    width: 62px;
    height: 62px;
    padding: 0;
    font-size: 0;
    color: transparent;
    border: 6px solid var(--surface);
    border-radius: 50%;
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z'/%3E%3C/svg%3E") no-repeat center center / 28px;
  }

  .float-contact {
    right: 16px;
    bottom: 16px;
    gap: 8px;
  }

  .float-contact a,
  .float-contact button {
    width: 54px !important;
    height: 54px !important;
    border-width: 4px !important;
  }

  .float-contact button {
    font-size: 28px !important;
  }

  .float-contact a {
    background-size: 24px !important;
  }

  /* Контакты */
  .contacts-panel__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .contacts-panel__top .btn {
    width: 100%;
  }

  .contacts-panel__top h2 {
    font-size: 26px;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  /* Форма заявки */
  .request-panel h2 {
    margin-bottom: 20px;
  }
}