/* ============ r7: многостраничный сайт ============ */

/* Шапка и меню */
.nav a.is-active { color: var(--orange); font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-phone { font-weight: 700; font-size: 14px; white-space: nowrap; }
.header-phone:hover { color: var(--orange); }
.nav-cta-mobile { display: none !important; }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--black); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1150px) { .header-phone { display: none; } }
@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px var(--pad) 24px;
    background: white; border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 24px 40px -24px rgba(0,0,0,0.25);
  }
  .nav.open { display: flex; }
  .nav a { font-size: 18px; font-weight: 600; color: var(--black); padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
  .nav a.btn { border-bottom: none; margin-top: 16px; color: white; font-size: 16px; padding: 16px; }
  .nav-cta-mobile { display: inline-flex !important; }
  body.menu-open { overflow: hidden; }
}

/* Шапка внутренних страниц */
.page-hero {
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
  background: radial-gradient(1000px 400px at 90% 0%, rgba(254,97,2,0.08), transparent 60%), linear-gradient(180deg, #FFFFFF 0%, #FBF8F1 100%);
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--gray-500); margin-bottom: 18px; }
.crumbs a:hover { color: var(--orange); }
.page-title { font-size: clamp(30px, 5.4vw, 64px); max-width: 960px; overflow-wrap: break-word; }
.page-lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--gray-700); max-width: 760px; margin: 18px 0 0; }
.page-hero .hero-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.section-tight { padding-top: clamp(32px, 5vw, 64px); }

/* Заголовок секции с кнопкой справа */
.section-head-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; text-align: left; flex-wrap: wrap; }
.section-head-row .section-sub { margin-left: 0; }
.more-link { margin: 40px 0 0; text-align: center; font-weight: 700; }
.more-link a, .more-inline { color: var(--orange); font-weight: 700; }
.more-link a:hover, .more-inline:hover { text-decoration: underline; }
.more-inline { display: inline-block; margin-top: 14px; }

/* Карточки применения ссылками */
a.app-card { display: block; transition: transform .3s ease, box-shadow .3s ease; }
a.app-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(0,0,0,0.35); }
.app-card-plain::after { display: block !important; }
.app-card-plain h3 { position: absolute !important; left: 24px; right: 24px; bottom: 20px; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; z-index: 2; color: white; font-size: clamp(18px, 1.8vw, 24px); }

/* Тизер услуг */
.services-teaser { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.services-teaser > div { max-width: 760px; }
.services-teaser .section-sub { color: rgba(255,255,255,0.75); margin: 16px 0 0; text-align: left; }

/* Карточки проектов — ссылки */
a.project-card { color: inherit; }
.project-image { position: relative; }
.project-photos { position: absolute; right: 12px; bottom: 12px; background: rgba(15,15,15,0.75); color: white; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.project-more { margin-top: auto; padding-top: 8px; color: var(--orange); font-weight: 700; font-size: 14px; }
.project-body p { margin: 0; color: var(--gray-700); font-size: 15px; }

/* Чередующиеся блоки (Применение) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips a { padding: 9px 16px; border-radius: 999px; background: white; border: 1px solid var(--gray-200); font-size: 14px; font-weight: 600; }
.chips a:hover { border-color: var(--orange); color: var(--orange); }
.rows { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 96px); }
.row-item { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; scroll-margin-top: 100px; }
.row-item:nth-child(even) .row-media { order: 2; }
.row-item > * { min-width: 0; }
.row-media { border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-200); aspect-ratio: 1548 / 1076; }
.row-media img { width: 100%; height: 100%; object-fit: cover; }
.row-copy h2 { font-size: clamp(24px, 3vw, 38px); margin-bottom: 16px; overflow-wrap: break-word; }
.row-copy p { color: var(--gray-700); font-size: 17px; margin: 0 0 18px; }
.row-item-text { grid-template-columns: 1fr; background: var(--cream); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2.5px solid var(--orange); border-bottom: 2.5px solid var(--orange); transform: rotate(-45deg); }
@media (max-width: 860px) {
  .row-item { grid-template-columns: 1fr; }
  .row-item:nth-child(even) .row-media { order: 0; }
  .row-copy p { font-size: 15.5px; }
}

/* Технология */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split > * { min-width: 0; }
.split .section-sub { text-align: left; margin: 18px 0 0; }
.split-media { border-radius: var(--radius-lg); overflow: hidden; max-width: 520px; justify-self: end; }
.docs-image { margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-media { justify-self: start; } }

/* Услуги */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.svc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.svc-grid > * { min-width: 0; }
.svc { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.svc-media { aspect-ratio: 4 / 3; background: var(--gray-200); overflow: hidden; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { padding: 24px 28px 28px; }
.svc-body .doc-tag { margin-bottom: 12px; }
.svc-body h2 { font-size: clamp(20px, 2.2vw, 28px); margin-bottom: 12px; overflow-wrap: break-word; }
.svc-body h3 { font-size: 20px; margin-bottom: 10px; }
.svc-body p { margin: 0; color: var(--gray-700); }
@media (max-width: 900px) { .svc-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .svc-grid, .svc-grid-3 { grid-template-columns: 1fr; } }

/* Страница проекта */
.page-hero-project .page-title { font-size: clamp(26px, 4.4vw, 52px); }
.project-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.project-layout > * { min-width: 0; }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery-item { grid-column: span 2; }
.gallery-item:nth-child(2):nth-last-child(2), .gallery-item:nth-child(3):last-child { grid-column: span 3; }
.gallery-item:nth-child(2):last-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
@media (max-width: 560px) { .gallery { gap: 8px; } }
.gallery-item { padding: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; background: var(--gray-200); cursor: zoom-in; }
.gallery-item:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.gallery-item:only-child { aspect-ratio: auto; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.project-aside { position: sticky; top: 96px; background: var(--cream); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); }
.project-facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 0; }
.project-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--gray-200); font-size: 15px; }
.project-facts span { color: var(--gray-500); }
.project-facts strong { text-align: right; }
.project-text p { margin: 0 0 14px; color: var(--gray-700); }
.project-aside .btn { margin-top: 12px; }
@media (max-width: 900px) { .project-layout { grid-template-columns: 1fr; } .project-aside { position: static; } }

/* Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,10,10,0.94); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; color: white; font-size: 40px; line-height: 1; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.lightbox button:hover { background: rgba(255,255,255,0.2); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 64px 8px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } }

/* Контакты */
.contacts-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: stretch; }
.contacts-grid > * { min-width: 0; }
.contacts-list { display: flex; flex-direction: column; gap: 16px; }
.map { border-radius: var(--radius-lg); overflow: hidden; min-height: 380px; background: var(--gray-200); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
@media (max-width: 860px) { .contacts-grid { grid-template-columns: 1fr; } }

/* Форма */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note.ok { color: #127a2e; font-weight: 700; }
.form-note.err { color: #a11; font-weight: 700; }
#zayavka { scroll-margin-top: 80px; }
.apps-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .apps-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .apps-grid-4 { grid-template-columns: 1fr; } }
