/*
  PROFPORTAL: Global custom styles (site-wide).

  Keep only truly global rules here.
  Tutor-specific styling lives in profportal-custom.css and is conditionally enqueued only on Tutor pages.
*/

/* --- Header: убрать паразитный верхний отступ ~80px (5em) -------------
   Astra Header Builder имел "section-header-builder-layout-margin" с top:5em
   (декоративный отступ под баннер «ёлочные игрушки», который давно убрали) →
   на ВСЕХ страницах над логотипом висела пустая полоса ~80px (плюс admin-bar
   ≈ воспринималось как ~260px). Сбрасываем в 0. Источник правки — git-тема,
   а не Customizer/БД, чтобы переживать пересборку контейнера (как pp-custom-css). */
.site-header,
#masthead,
.site-header .ast-builder-grid-row-container {
  margin-top: 0 !important;
}

/* --- Header: Logo sizing — ЕДИНЫЙ размер на ВСЕХ типах страниц -----------
   Было: правила заскоплены на `.site-header`. Tutor LMS на одиночных
   course/lesson/quiz рендерит шапку через get_tutor_header()/tutor_custom_header()
   (Astra-хедер грузится из другого контекста, а в spotlight/block-theme — вообще
   своя обёртка `tutor-site-wrap`/`wp-site-blocks` без `.site-header`). Поэтому
   бренд-лого там не попадал под размер и схлопывался до intrinsic (мелкий).
   Стало: сайзим ГЛОБАЛЬНО по уникальному классу `.pp-inline-logo` (его инжектит
   astra_logo filter в functions.php) + raw custom-logo как фолбэк. `!important` —
   чтобы перебить inline-стили Tutor и Astra-customizer независимо от обёртки.
   Цель: desktop 72px (горизонтальный знак+текст), mobile 56px (квадратный знак). */

/* Сырое растровое лого (фолбэк, если бренд-SVG не сработал) */
.site-logo-img img,
.custom-logo-link img,
.custom-mobile-logo-link img,
img.custom-logo {
  max-height: 72px !important;
  width: auto !important;
  height: auto !important;
}

/* Бренд: cube-знак (SVG-квадрат) + ЖИВОЙ HTML-вордмарк. Текст вынесен из SVG —
   раньше «ПРОФПОРТАЛ» лежал внутри profportal-horizontal.svg и при height:72px
   рендерился ≈15px (мелко). Теперь типографика рулится тут, независимо от знака.
   Цель: знак 56px, «ПРОФПОРТАЛ» 28px/700, тэглайн 13px/400 (desktop);
   44/22/11 на mobile (брейкпойнт Astra-хедера 921px). */
.pp-inline-logo,
.pp-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.pp-inline-logo:hover,
.pp-brand:hover { text-decoration: none; }
.pp-logo-mark { display: inline-flex; align-items: center; }
/* Куб крупнее относительно вордмарка 28px (заказчик: знак выглядел мелким). 56→64px. */
.pp-logo-mark svg { display: block; height: 64px !important; width: auto; }
.pp-logo-text { display: inline-flex; flex-direction: column; gap: 2px; }
.pp-wordmark {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700; font-size: 28px; letter-spacing: 1px;
  color: #0f172a; line-height: 1;
}
.pp-tagline {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400; font-size: 13px; letter-spacing: 4px;
  color: #6b7280; line-height: 1;
}

@media (max-width: 921px) {
  .site-logo-img img,
  .custom-logo-link img,
  .custom-mobile-logo-link img,
  img.custom-logo {
    max-height: 56px !important;
  }
  .pp-inline-logo,
  .pp-brand { gap: 12px; }
  .pp-logo-mark svg { height: 52px !important; } /* 44→52: куб крупнее на mobile */
  .pp-wordmark { font-size: 22px; }
  .pp-tagline { font-size: 11px; }
}

/* --- Footer: Copyright line --- */
.ast-small-footer .ast-footer-copyright {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(17, 24, 39, 0.72); /* мягкий серый */
}

.ast-small-footer .ast-footer-copyright p {
  margin: 0; /* Astra оборачивает контент в <p> через wpautop */
}

.ast-small-footer .ast-footer-copyright a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 24, 39, 0.25);
}

.ast-small-footer .ast-footer-copyright a:hover,
.ast-small-footer .ast-footer-copyright a:focus {
  border-bottom-color: rgba(17, 24, 39, 0.6);
}

/* =======================================================================
   PROFPORTAL — Каталог курсов: поиск/фильтр/сортировка + «воздух» + бренд-чипы
   (v0.3.5 follow-up) Бренд: #3e64de, Inter, скругления 12px.
   ======================================================================= */

/* --- «Воздух»: верхний отступ контента каталога (после убранного ghost-паддинга) --- */
.course-archive-page {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 32px;
  padding-bottom: 56px;
}

/* --- Бренд-панель фильтра каталога (v0.4.0: одна строка, компактнее) -----
   Заказчик: фильтры занимали 3-4 строки + отдельная кнопка «Найти». Стало —
   одна строка [Поиск …………] [Категории ▾] [Сортировка ▾]; кнопка убрана
   (поиск live через pp-courses-live). На mobile (≤768px) — колонка full-width. */
.pp-course-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 28px;
}
.pp-cf-search {
  position: relative;
  flex: 1 1 320px;
  min-width: 220px;
}
.pp-cf-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3b2;
  font-size: 18px;
  pointer-events: none;
}
.pp-course-filters input[type="search"] {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 0.5px solid #e4e7ed;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: #1f2937;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.pp-course-filters input[type="search"]:focus {
  outline: none;
  border-color: #3e64de;
  box-shadow: 0 0 0 3px rgba(62, 100, 222, .14);
}
.pp-cf-select {
  flex: 0 0 200px;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 0.5px solid #e4e7ed;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #1f2937;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.pp-cf-select:focus {
  outline: none;
  border-color: #3e64de;
  box-shadow: 0 0 0 3px rgba(62, 100, 222, .14);
}
/* Кнопка «Найти» теперь только в <noscript> (фолбэк без JS) — стиль на месте. */
.pp-cf-btn {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: #3e64de;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.pp-cf-btn:hover { background: #2f4fc0; }
.pp-cf-btn:active { transform: translateY(1px); }
.pp-cf-reset {
  flex: 0 0 auto;
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
}
.pp-cf-reset:hover { color: #3e64de; text-decoration: underline; }
.pp-cf-summary {
  margin: -12px 0 24px;
  color: #6b7280;
  font-size: 14px;
}
.pp-cf-summary strong { color: #1f2937; }

/* Лёгкий «грузится» во время live-fetch: чуть гасим сетку, не дёргая layout. */
.course-archive-page.pp-cf-loading [tutor-course-list-container] {
  opacity: .55;
  transition: opacity .15s;
  pointer-events: none;
}

/* Пагинация: ровная горизонтальная по центру под сеткой (а не колонкой-боксом справа) */
.course-archive-page .tutor-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-top: 40px;
  border: 0;
}

@media (max-width: 768px) {
  .pp-course-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pp-cf-search,
  .pp-cf-select,
  .pp-cf-btn,
  .pp-cf-reset { flex: 1 1 auto; width: 100%; }
  .pp-cf-reset { justify-content: center; }
}

/* --- Категория курса как бренд-чип (вместо «От автор В категория») --- */
.pp-course-cats {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}
.pp-course-cat-chip {
  display: inline-block;
  padding: 4px 12px;
  background: #eef2ff;
  color: #3e64de !important;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s;
}
.pp-course-cat-chip:hover { background: #e0e7ff; }

/* --- Скрыть автора курса на ОДИНОЧНОЙ странице курса (на карточках убран в meta.php) ---
   Заказчик: автор не показывается нигде. Категории/контент остаются. CSS-only, без риска. */
.tutor-single-course-segment-instructors,
.tutor-course-details-instructors,
.tutor-single-course-author,
.tutor-course-author,
.tutor-single-course-meta-author,
.tutor-single-course-segment[id*="instructor"],
.tutor-single-course-content .tutor-instructor-list,
[class*="tutor-single-course"] .tutor-course-instructor {
  display: none !important;
}

/* --- «Воздух» на остальных контент-страницах (dashboard, single course) ---------
   Чисто ADDITIVE-отступы: если селектор не совпал — no-op (риск ≈ 0). Single lesson
   НЕ трогаем намеренно — там full-bleed spotlight-плеер (его бережёт pp-custom-css). */
body.tutor-screen-frontend-dashboard .tutor-dashboard {
  padding-top: 16px;
  padding-bottom: 48px;
}
body.tutor-screen-frontend-dashboard .tutor-dashboard-content {
  padding-left: 8px;
  padding-right: 8px;
}
body.tutor-screen-frontend-dashboard .tutor-dashboard-content-inner > * + * {
  margin-top: 24px;
}
.tutor-single-course .tutor-course-details-widget,
.tutor-single-course .tutor-course-spotlight-wrapper > .tutor-container > .tutor-row > * {
  margin-bottom: 24px;
}
.tutor-single-course .tutor-course-details-tab,
.tutor-single-course .tutor-course-content-list,
.tutor-single-course .tutor-course-topics {
  margin-top: 24px;
  margin-bottom: 32px;
}

/* =======================================================================
   PROFPORTAL — Скрыть ВСЕ ценники Tutor LMS (v0.4.0)
   Заказчик: цены/ярлык «Бесплатно» не показывать нигде — ни в каталоге,
   ни на странице курса, ни в карточках «Личного кабинета». Обучение
   распространяется не через ценник Tutor (оплата идёт через УЦ).
   Классы подтверждены по шаблонам Tutor 3.9.x (loop/*, single/course/*,
   dashboard/*). Все правила scoped в tutor/course-контекст — глобальный
   `.price` НЕ трогаем, чтобы не задеть сторонние виджеты. CSS-only,
   additive: если селектор не совпал — no-op (риск ≈ 0).
   ======================================================================= */

/* --- Каталог / циклы курсов (loop/course-price*.php) --- */
.tutor-course-price,
.tutor-course-loop-price,
.list-item-price,
[class*="course-price"],
[class*="tutor-course-price"] {
  display: none !important;
}

/* --- Одиночная страница курса: ценовой блок sidebar/enroll-box
   (single/course/add-to-cart-tutor.php, continue-lesson.php) --- */
.tutor-course-sidebar-card-pricing,
.tutor-course-price-tax,
.tutor-price-preview-box,
.tutor-price-box-thumbnail,
.tutor-single-course-price,
.tutor-course-details-price,
.tutor-single-course-segment-price {
  display: none !important;
}

/* --- WooCommerce/EDD ценники, но ТОЛЬКО внутри курса (не на shop) --- */
.tutor-single-course .price,
.tutor-course-list .price,
.list-item-price .price,
.tutor-card-footer .price,
.tutor-wc-price,
.wc-price-html,
[class*="tutor-course"] .woocommerce-Price-amount {
  display: none !important;
}

/* --- Карточки «Личного кабинета»: ярлык «Бесплатно» на записанных курсах
   (dashboard/enrolled-courses.php → tutor_course_loop_price(),
    dashboard/my-courses.php → tutor-card-footer) --- */
.tutor-dashboard .tutor-course-price,
.tutor-dashboard .list-item-price,
.tutor-dashboard-content .tutor-course-price,
.tutor-dashboard-content .list-item-price {
  display: none !important;
}

/* =======================================================================
   PROFPORTAL — Убрать ссылку «Вопросы и ответы» (Q&A) (v0.4.0)
   Заказчик: пункт «Вопросы и ответы» из навигации Tutor не нужен.
   Основной фикс — нативный тумблер Tutor `enable_q_and_a_on_course=0`
   (Settings → Course → Q&A) применён на стенде через wp option (см. REPORT).
   Ниже — CSS catch-all на случай кеша/иной роли/иной поверхности рендера
   (десктоп-меню, мобильный нижний бар, таб одиночного курса).
   ======================================================================= */
.tutor-dashboard-menu-question-answer,
.tutor-dashboard-menu-item-question-answer,
.tutor-dashboard-menu-item.tutor-dashboard-menu-question-answer,
li.tutor-dashboard-menu-question-answer,
.tutor-dashboard-permalinks a[href*="question-answer"],
.tutor-dashboard a[href*="question-answer"],
#tutor-dashboard-footer-mobile a[href*="question-answer"],
a[href$="/question-answer"],
a[href*="/question-answer/"],
[data-tutor-nav-target*="question_and_answer"],
[data-tutor-nav-target*="question-answer"],
[data-tutor-nav-target*="qna"] {
  display: none !important;
}

