/**
 * Remove duplicate page titles (purple h1.pet__title vs crumbs / inner titles).
 * Does not edit custom.css / custom.min.css / mobile-card-fixes / footer.php.
 * Marker: titlededupe20261020a
 *
 * Events/collaborations: .pet__title is already display:none in custom.css —
 * keep .mobile-filter > .tabs__content_title, hide breadcrumbs twin.
 * SEO articles: real H1 is .seo-articles__title (header skips pet__title).
 */

/* Auth / registration: title lives in the white card */
html body:has(.authorization__title) .pet > .pet__title {
  display: none !important;
}

/* SEO articles hub/detail: one H1 — .seo-articles__title */
html body:has(.seo-articles__title) .pet > .pet__title {
  display: none !important;
}

html body:has(.authorization__title) .pet > .breadcrumbs {
  display: none !important;
}

/* Events / collaborations: title = mobile-filter h3 (pet__title already off) */
.pet:has(.events-page-head) > .breadcrumbs,
.pet:has(.collaborations-page-head) > .breadcrumbs,
.pet:has(.collaborations-hub) > .breadcrumbs {
  display: none !important;
}

/*
 * Current page name is already in h1.pet__title — drop the twin crumb.
 * Multi-level trails keep parents (e.g. Чаты → Группа).
 */
.pet:has(> .pet__title):not(:has(.events-page-head)):not(:has(.collaborations-page-head)):not(:has(.collaborations-hub)):not(:has(.not-found)) .breadcrumbs .breadcrumbs__item:last-child {
  display: none !important;
}

/* Section root: only one crumb (= title) → hide empty trail */
.pet:has(> .pet__title):not(:has(.events-page-head)):not(:has(.collaborations-page-head)):not(:has(.collaborations-hub)):not(:has(.not-found)) .breadcrumbs:has(.breadcrumbs__item:only-child),
.pet:has(> .pet__title):not(:has(.events-page-head)):not(:has(.collaborations-page-head)):not(:has(.collaborations-hub)):not(:has(.not-found)) .breadcrumbs:not(:has(.breadcrumbs__item:not(:last-child))) {
  display: none !important;
}

/* Section pages: purple hero already has ShowTitle — hide twin in mobile-filter */
.pet:has(> .pet__title):not(:has(.events-page-head)):not(:has(.collaborations-page-head)):not(:has(.collaborations-hub)):not(:has(.not-found)) .tabs__content_right > .mobile-filter > .tabs__content_title {
  display: none !important;
}

/* Charts: sidebar page title repeats ShowTitle (all widths) */
#cotinder-charts-page .charts-page-sidebar .tabs__content_left-wrapper > .tabs__content_title {
  display: none !important;
}

/* Charts split: filter row not needed when sidebar is always open */
@media (min-width: 1024px) {
  #cotinder-charts-page.charts-page--split .tabs__content_right > .mobile-filter {
    display: none !important;
  }
}

/* Charge / map / similar split pages: hide empty mobile-filter title row twin */
@media (min-width: 1024px) {
  .pet .tabs__content_layout .tabs__content_right > .mobile-filter:not(:has(.filter__button)):not(:has(.mobile-filter__controls)) {
    display: none !important;
  }
}
