/* ============================================
   pages.css — Внутренние страницы (page, single, category)
   Подключать ПОСЛЕ redesign.css
   ============================================ */

/* ===== БАННЕР-ШАПКА ВНУТРЕННИХ СТРАНИЦ ===== */
.title-page-breads {
  position: relative;
  background: var(--dark-bg, #091E3E);
  overflow: hidden;
  padding: 0;
}

/* Фоновое изображение — затемнение */
.title-page-breads .back_img_section {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.title-page-breads .back_img_section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 30, 62, .75) 0%,
    rgba(9, 30, 62, .85) 100%
  );
  z-index: 1;
}
.title-page-breads .back_img_section picture,
.title-page-breads .back_img_section picture img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Контент баннера */
.title-page-breads .cont {
  position: relative;
  z-index: 2;
}
.title-page-breads .container-breads_title {
  padding-top: 32px;
  padding-bottom: 32px;
  /*padding-left: 0;*/
}

/* Хлебные крошки */
.title-page-breads #breadcrumbs,
.title-page-breads .container-breads_title #breadcrumbs {
  margin: 0 0 12px;
  font-size: 13px;
}
.title-page-breads #breadcrumbs *,
.title-page-breads .container-breads_title #breadcrumbs * {
  color: rgba(255, 255, 255, .6) !important;
  font-weight: 400 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 13px !important;
}
.title-page-breads #breadcrumbs .breadcrumb_last {
  color: var(--orange, #FF7800) !important;
}
.title-page-breads #breadcrumbs a:hover {
  color: #fff !important;
}

/* Заголовок страницы в баннере */
.title-page-breads .title-page {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  padding: 0;
  border-left: 4px solid var(--orange, #FF7800);
  padding-left: 20px;
  line-height: 1.3;
  font-family: 'Montserrat', sans-serif;
}


/* ===== PAGE-CONTENT (контент под баннером) ===== */
.page-content {
  padding: 32px clamp(20px, 8.33vw, 160px) 32px;
  margin: 0;
  background: #fff;
}

.page-content .cont {
  max-width: 100%;
}

/* Хлебные крошки внутри page-content (page.php) */
.page-content #breadcrumbs {
  margin: 0 0 20px;
  font-size: 13px;
}
.page-content #breadcrumbs * {
  color: #8a8f9a;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 400;
}
.page-content #breadcrumbs a:hover {
  color: var(--orange, #FF7800);
}
.page-content #breadcrumbs .breadcrumb_last {
  color: var(--orange, #FF7800);
}

/* Заголовок повторный (page-content) */
.page-content .site-page-title {
  font-size: 28px;
  font-weight: 800;
  color: #1A1A1A;
  margin: 0 0 32px;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  border-left: 4px solid var(--orange, #FF7800);
  padding-left: 20px;
}
.page-content .site-page-title::before {
  display: none; /* Убираем старый абсолютно-позиционированный before из main.css */
}

/* Типографика контента */
.page-content p,
.page-content span,
.page-content strong {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  font-family: 'Montserrat', sans-serif;
}
.page-content p {
  margin: 0 0 18px;
}
.page-content strong {
  color: #1A1A1A;
}
.page-content a {
  color: var(--orange, #FF7800);
  text-decoration: none;
  transition: color .2s;
  font-family: 'Montserrat', sans-serif;
}
.page-content a:hover {
  color: #E56B00;
}

/* Списки */
.page-content ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.page-content ul li {
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  font-family: 'Montserrat', sans-serif;
}
.page-content ul li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--orange, #FF7800);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 0;
  display: block;
}

.page-content ol {
  margin: 0 0 20px;
  padding: 0 0 0 24px;
}
.page-content ol li {
  margin-bottom: 10px;
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  font-family: 'Montserrat', sans-serif;
}

/* Таблицы */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: 'Montserrat', sans-serif;
}
.page-content table td,
.page-content table th {
  padding: 14px 18px;
  border: 1px solid #e8ecf1;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  vertical-align: top;
}
.page-content table th {
  background: #F4F5F7;
  font-weight: 700;
  color: #1A1A1A;
}

/* Изображения */
.page-content .alignleft {
  float: left;
  margin: 0 32px 20px 0;
  border-radius: 10px;
}
.page-content .alignright {
  float: right;
  margin: 0 0 20px 32px;
  border-radius: 10px;
}
.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}


/* ===== АРХИВ НОВОСТЕЙ (category.php) ===== */
/* Карточки как на главной */
.archive-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.archive-news-card {
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8ecf1;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.archive-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
}

.archive-news-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eee;
}
.archive-news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.archive-news-card:hover .archive-news-card__image img {
  transform: scale(1.05);
}
.archive-news-card__noimg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #091E3E, #0D2E5C);
}

.archive-news-card__date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange, #FF7800);
  color: #fff !important;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px !important;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.archive-news-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.archive-news-card__body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 10px;
  line-height: 1.4;
  font-family: 'Montserrat', sans-serif;
}
.archive-news-card__body p {
  font-size: 13px;
  color: #6B6B6B;
  line-height: 1.5;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .archive-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .title-page-breads .container-breads_title {
    padding: 50px 50px 40px;
  }
  .title-page-breads .title-page {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .archive-news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-content {
    padding: 16px 12px 16px;
  }
  .title-page-breads .container-breads_title {
    padding: 40px 16px 32px;
  }
  .title-page-breads .title-page {
    font-size: 24px;
  }
  .page-content .site-page-title {
    font-size: 22px;
    margin-bottom: 24px;
  }
}

/* ============================================
   CONTACTS PAGE
   ============================================ */

.contacts-page-section {
  background: var(--white);
}

.contacts-grid-new {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 56px;
  align-items: start;
}

.contact-group-card {
  min-width: 0;
}

.contact-group-card__title {
  margin: 0 0 18px;
  font-family: var(--font-main);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-black);
  letter-spacing: 0;
}

.contact-group-card__desc {
  margin: 0 0 28px;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.55;
  color: #98A2B3;
  min-height: 48px;
}

.contact-person-card {
  position: relative;
  background: #F1F2F4;
  border-radius: 28px;
  padding: 26px 22px 20px;
  overflow: hidden;
  transition:
          transform .35s cubic-bezier(.22, 1, .36, 1),
          box-shadow .35s cubic-bezier(.22, 1, .36, 1),
          background .35s ease;
}

/* мягкая верхняя подсветка */
.contact-person-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 120px;
  background: linear-gradient(
          180deg,
          rgba(255,255,255,.28) 0%,
          rgba(255,255,255,0) 100%
  );
  pointer-events: none;
}

.contact-person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(9, 30, 62, .08);
  background: #eef0f3;
}

.contact-person-card__head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.contact-person-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #F7E9DB;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
          transform .35s cubic-bezier(.22, 1, .36, 1),
          background .25s ease,
          box-shadow .25s ease;
}

.contact-person-card:hover .contact-person-card__icon {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 20px rgba(255, 120, 0, .12);
}

.contact-person-card__icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.contact-person-card__meta {
  min-width: 0;
  padding-top: 4px;
}

.contact-person-card__name {
  margin: 0 0 6px;
  font-family: var(--font-main);
  font-size: 20px;
  line-height: 1.12;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-black);
  word-break: break-word;
}

.contact-person-card__role {
  margin: 0;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.45;
  color: #A8B0BC;
}

.contact-info-box {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  border: 1px solid transparent;
  text-decoration: none;
  transition:
          transform .34s cubic-bezier(.22, 1, .36, 1),
          box-shadow .34s cubic-bezier(.22, 1, .36, 1),
          background .26s ease,
          border-color .26s ease;
}

.contact-info-box + .contact-info-box {
  margin-top: 14px;
}

.contact-info-box:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.92);
  border-color: rgba(255, 120, 0, .12);
  box-shadow: 0 14px 30px rgba(9, 30, 62, .08);
}

.contact-info-box__icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #F7E9DB;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
          transform .34s cubic-bezier(.22, 1, .36, 1),
          background .26s ease,
          box-shadow .26s ease;
}

.contact-info-box:hover .contact-info-box__icon {
  transform: scale(1.06);
  box-shadow: 0 8px 18px rgba(255, 120, 0, .12);
  background: #F5E3D1;
}

.contact-info-box__icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.contact-info-box__content {
  min-width: 0;
}

.contact-info-box__label {
  margin: 0 0 6px;
  display: block;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  color: #626A77;
  letter-spacing: 0;
}

.contact-info-box__value {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--orange);
  text-decoration: none;
  word-break: break-word;
  transition:
          color .24s ease,
          transform .24s ease;
}

.contact-info-box:hover .contact-info-box__value {
  color: var(--orange-hover);
  transform: translateX(2px);
}

/* если contact-info-box это ссылка */
a.contact-info-box {
  color: inherit;
}

/* лёгкая stagger-анимация появления */
.contact-group-card:nth-child(1) .contact-person-card {
  animation: contactFadeUp .55s ease both;
}
.contact-group-card:nth-child(2) .contact-person-card {
  animation: contactFadeUp .55s ease .08s both;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .contacts-grid-new {
    gap: 34px 32px;
  }

  .contact-group-card__title {
    font-size: 22px;
  }

  .contact-person-card__name {
    font-size: 18px;
  }
}

@media (max-width: 1024px) {
  .contacts-grid-new {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-group-card__desc {
    min-height: 0;
    margin-bottom: 22px;
  }
}

@media (max-width: 640px) {
  .contact-group-card__title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .contact-group-card__desc {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .contact-person-card {
    padding: 18px 16px 16px;
    border-radius: 22px;
  }

  .contact-person-card__head {
    grid-template-columns: 52px 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }

  .contact-person-card__icon,
  .contact-info-box__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .contact-person-card__icon svg,
  .contact-info-box__icon svg {
    width: 22px;
    height: 22px;
  }

  .contact-person-card__name {
    font-size: 17px;
  }

  .contact-person-card__role {
    font-size: 14px;
  }

  .contact-info-box {
    grid-template-columns: 52px 1fr;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .contact-info-box__label {
    font-size: 13px;
  }

  .contact-info-box__value {
    font-size: 15px;
  }
}

/* ============================================
   ЕДИНАЯ СЕТКА САЙТА
   Баннер, хлебные крошки и все секции на одной линии
   ============================================ */

:root {
  --site-side-pad: clamp(20px, 8.33vw, 160px);
}

/* Баннер внутренней страницы */
.title-page-breads .container-breads_title {
  padding-left: var(--site-side-pad) !important;
  padding-right: var(--site-side-pad) !important;
}

/* Все основные секции сайта */
.hello-section,
.themes-section,
.news-section,
.org-section,
.faq-section,
.schedule-section,
.page-content,
.conf-page,
.social-follow-section,
.stats-bar,
.partners-section {
  padding-left: var(--site-side-pad) !important;
  padding-right: var(--site-side-pad) !important;
}

/* Внутренние контейнеры не должны добавлять ещё один отступ */
.title-page-breads .cont,
.hello-section .cont,
.themes-section .cont,
.news-section .cont,
.org-section .cont,
.faq-section .cont,
.schedule-section .cont,
.page-content .cont,
.conf-page .cont,
.social-follow-section .cont,
.stats-bar .cont,
.partners-section .cont {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Мобильная версия */
@media (max-width: 640px) {
  :root {
    --site-side-pad: 16px;
  }

  .title-page-breads .container-breads_title {
    padding-left: var(--site-side-pad) !important;
    padding-right: var(--site-side-pad) !important;
  }

  .hello-section,
  .themes-section,
  .news-section,
  .org-section,
  .faq-section,
  .schedule-section,
  .page-content,
  .conf-page,
  .social-follow-section,
  .stats-bar,
  .partners-section {
    padding-left: var(--site-side-pad) !important;
    padding-right: var(--site-side-pad) !important;
  }
}