/* Общая вёрстка публичных разделов: hero, контейнер, карточки-поверхности */

.pub-page {
  background: var(--pub-bg);
}

.pub-page .container {
  max-width: var(--pub-container-max);
  padding: 1rem 1.25rem 2rem;
}

.pub-main,
.desk-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.map-main {
  gap: 1.25rem;
}

/* Hero */
.pub-hero {
  background: var(--surface);
  border-radius: var(--pub-radius-lg);
  padding: 1.65rem 2rem 1.35rem;
  box-shadow: var(--pub-shadow);
  display: grid;
  grid-template-columns: minmax(240px, 0.88fr) minmax(280px, 1.1fr);
  align-items: center;
  gap: 1.25rem 2rem;
  position: relative;
  overflow: hidden;
}

.pub-hero--wide-art {
  grid-template-columns: minmax(240px, 0.88fr) minmax(340px, 1.22fr);
}

.pub-hero--with-icon {
  border: 1px solid var(--pub-border);
  grid-template-columns: auto minmax(240px, 1fr) minmax(200px, 0.9fr);
  gap: 1.25rem 1.5rem;
}

.pub-hero__content {
  min-width: 0;
  z-index: 1;
}

.pub-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--pub-heading);
  line-height: 1.2;
}

.pub-hero__title--xl {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
}

.pub-hero__title--md {
  font-size: clamp(1.35rem, 2.5vw, 1.5rem);
  line-height: 1.25;
}

.pub-hero__lead {
  margin: 0;
  font-size: 1rem;
  color: var(--pub-text-muted);
  line-height: 1.65;
  max-width: 36rem;
}

.pub-hero__lead--relaxed {
  line-height: 1.8;
}

.pub-hero__lead--wide {
  font-size: 0.9375rem;
  max-width: 40rem;
}

.pub-hero__content .ui-msg:not(:empty) {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.pub-hero__illustration {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.pub-hero__image {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  object-position: right bottom;
}

.pub-hero--wide-art .pub-hero__image {
  max-width: none;
}

.pub-hero--with-icon .pub-hero__image {
  max-width: 420px;
}

.pub-hero__icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--pub-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pub-hero__icon svg {
  width: 2.25rem;
  height: 2.25rem;
  stroke: var(--pub-icon-stroke);
}

/* Белые карточки-поверхности */
.pub-surface {
  background: var(--surface);
  border-radius: var(--pub-radius-lg);
  box-shadow: var(--pub-shadow);
}

.pub-section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Круглые иконки */
.pub-icon-badge {
  border-radius: 50%;
  background: var(--pub-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pub-icon-badge svg {
  stroke: var(--pub-icon-stroke);
}

.pub-icon-badge--lg {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.pub-icon-badge--lg svg {
  width: 40px;
  height: 40px;
}

.pub-icon-badge--sm {
  width: 3rem;
  height: 3rem;
}

.pub-icon-badge--sm svg {
  width: 1.35rem;
  height: 1.35rem;
}

/* Кнопка-ссылка «Открыть» */
.pub-action-link,
.home-card-link,
.desk-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.875rem 1.25rem;
  border-radius: var(--pub-radius-sm);
  background: var(--pub-action-bg);
  color: var(--pub-action-color);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  width: 100%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.pub-action-link:hover,
.home-card-link:hover,
.desk-card-link:hover {
  background: var(--pub-action-hover-bg);
  color: var(--pub-action-hover-color);
}

.pub-action-link svg,
.home-card-link svg,
.desk-card-link svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.home-card-link svg {
  width: 20px;
  height: 20px;
}

.desk-card-link {
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
}

.desk-card-link svg {
  width: 0.85rem;
  height: 0.85rem;
}

.pub-page footer[data-global-footer] {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: #999;
  font-size: 0.875rem;
  border: none;
  background: transparent;
}

@media (max-width: 1200px) {
  .pub-hero--wide-art {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 1.5rem;
  }

  .pub-hero--wide-art .pub-hero__illustration {
    justify-content: center;
    align-items: center;
  }

  .pub-hero--wide-art .pub-hero__image {
    object-position: center;
  }
}

@media (max-width: 1100px) {
  .pub-hero--with-icon {
    grid-template-columns: auto 1fr;
  }

  .pub-hero--with-icon .pub-hero__illustration {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .pub-hero:not(.pub-hero--wide-art):not(.pub-hero--with-icon),
  .pub-hero--with-icon {
    grid-template-columns: 1fr;
    padding: 1.35rem 1.25rem;
  }

  .pub-hero--with-icon .pub-hero__icon {
    justify-self: start;
  }

  .pub-hero__illustration {
    justify-content: center;
  }

  .pub-hero__image {
    object-position: center;
  }
}

@media (max-width: 768px) {
  .pub-hero--wide-art {
    padding: 1.5rem;
  }
}
