/**
 * Стили страниц: Услуги, Примеры решений, карточки услуг/решений
 * Загружается вместе с home.css (header/footer уже стилизованы)
 */

/* Header layout для подстраниц (body.page-sub от задач/решений) */
body.page-sub .header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--spacing-lg);
  height: 100%;
}

body.page-sub .logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; color: var(--color-text); text-decoration: none; }
body.page-sub .logo__mark { width: 44px; min-height: 2.5em; align-self: stretch; flex-shrink: 0; border: 2px solid var(--color-text); background: linear-gradient(135deg, var(--color-bg), var(--color-bg-alt)); }
body.page-sub .logo__text { display: flex; flex-direction: column; line-height: 1.08; gap: 0; }
body.page-sub .logo__line { display: block; }
body.page-sub .header__nav { display: flex; justify-content: center; }
body.page-sub .nav__list { display: flex; align-items: center; gap: 2.25rem; margin: 0; padding: 0; list-style: none; }
body.page-sub .nav__link { font-size: 1.575rem; font-weight: 400; color: var(--color-text); text-decoration: none; }
body.page-sub .nav__link:hover { text-decoration: none; }
body.page-sub .header__actions { display: flex; align-items: center; gap: 0.75rem; }
body.page-sub .icon-btn { width: 40px; height: 40px; border: 1px solid var(--border-color); background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* Breadcrumbs */
.breadcrumbs {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: ">";
  margin-right: 0.5rem;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.breadcrumbs__item a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumbs__item a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumbs__item [aria-current] {
  color: var(--color-text);
  font-weight: 600;
}

/* Page hero */
.page-hero {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.page-hero__title {
  margin: 0;
  font-size: 2.25rem;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Page content */
.page-content {
  padding: 2rem 0 3rem;
}

.feature-grid--page {
  margin-top: 0;
}

/* Solutions grid 2×2 */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.solution-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, background 0.2s;
}

.solution-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
  color: var(--color-text);
}

.solution-card__media {
  height: 140px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg-alt) 100%);
}

.solution-card__panel {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.solution-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-family: var(--font-heading);
}

.solution-card__desc {
  margin: 0 0 auto;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.solution-card__meta {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .solutions-grid {
    grid-template-columns: 1fr;
  }
}

/* Detail page layout: 70% content + sidebar */
.page-main--detail {
  min-height: 100vh;
}

.page-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

.page-detail__content {
  min-width: 0;
}

.page-detail__title {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.page-detail__lead {
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.page-detail__meta {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.page-detail__body {
  max-width: 65ch;
}

.page-detail__body p {
  margin: 0 0 1rem;
  line-height: 1.65;
}

.page-detail__cta-block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.page-detail__cta-text {
  margin: 0 0 0.75rem !important;
  font-weight: 600;
}

/* Sidebar with sticky CTA button */
.page-detail__sidebar {
  order: -1;
}

.sticky-cta {
  position: sticky;
  top: calc(12vh + 1rem);
}

.sticky-cta__btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

@media (min-width: 900px) {
  .page-detail-layout {
    grid-template-columns: 1fr 280px;
  }

  .page-detail__sidebar {
    order: 0;
  }
}
