/* Services: requests home (requests/index.html, Naimi model: services first, then the request form)
   and customer list (requests/my.html). Docs: docs/features/06-requests-and-offers.md, part 5.
   Banner and breadcrumbs from the rating template (reference-category.css, mobile-layout.css). */
.rq-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Banner: exactly the rating template (category/web-development/almaty.html), only without dimming */
body.category-layout-v2.rq-home-page[data-category][data-city] .ranking-ad-banner > img { filter: none; }
@media (max-width: 768px) {
  .rq-home-page .ranking-ad-banner__content { background: none; }
}
.rq-home { padding-bottom: 88px; }

/* Search row: «Какая услуга нужна?», «Создать заявку», «Мои заявки» */
.rq-search { display: flex; gap: 12px; margin-top: 24px; }
.rq-search__field { display: flex; flex: 1 1 auto; align-items: center; gap: 14px; min-width: 0; min-height: 64px; padding: 0 20px; border: 1px solid #d2d6dd; border-radius: 16px; background: #fff; color: var(--color-muted); }
.rq-search__field svg { flex: 0 0 20px; }
.rq-search__field:focus-within { border-color: var(--color-title); }
.rq-search__field input { width: 100%; min-width: 0; height: 62px; padding: 0; border: 0; background: transparent; color: var(--color-title); font: 400 19px/1.3 var(--font-body); outline: none; -webkit-appearance: none; appearance: none; }
.rq-search__field input::placeholder { color: #8a909c; opacity: 1; }
.rq-search__field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.rq-search .btn { min-height: 64px; padding-inline: 24px; white-space: nowrap; }

.rq-block-title { margin: 0; color: var(--color-title); font-size: 26px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.rq-sec { margin-top: 56px; }
.rq-sec[hidden] { display: none; }
.rq-sec > .rq-block-title { margin-bottom: 20px; }
.rq-sec__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.rq-sec__head .rq-groups { margin: 0; }

/* Service cards: name, short text, company count; no photos */
.rq-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rq-card { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 104px; padding: 18px 20px; border-radius: 16px; background: #f6f6f6; color: var(--color-title); text-decoration: none; box-sizing: border-box; }
.rq-card:hover { background: #eef0f3; }
.rq-card__title { font-size: 17px; font-weight: 500; line-height: 1.3; }
.rq-card__text { color: #5c6170; font-size: 14px; line-height: 1.45; }
.rq-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; color: var(--color-muted); font-size: 14px; }
.rq-card__arrow { flex: 0 0 16px; color: var(--color-title); }
.rq-card:hover .rq-card__title { color: var(--color-primary); }
/* Popular: one tonal panel of cells (same language as «Проверка компании» in the profile) */
.rq-cards--popular { gap: 0; overflow: hidden; border-radius: 16px; background: #f6f6f6; }
.rq-cards--popular > li + li { border-left: 1px solid #e4e6ea; }
.rq-cards--popular > li:nth-child(4n+1) { border-left: 0; }
.rq-cards--popular > li:nth-child(n+5) { border-top: 1px solid #e4e6ea; }
.rq-cards--popular .rq-card { min-height: 128px; padding: 22px 24px; border-radius: 0; background: transparent; }
.rq-cards--popular .rq-card:hover { background: #eef0f3; }
.rq-cards--popular .rq-card__title { font-size: 19px; letter-spacing: -.01em; }

/* Group chips (Naimi «Категории») */
.rq-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rq-groups[hidden] { display: none; }
.rq-group-chip { min-height: 40px; padding: 0 16px; border: 1px solid #dcdfe5; border-radius: 999px; background: #fff; color: var(--color-title); font: 500 15px/1 var(--font-body); white-space: nowrap; cursor: pointer; }
.rq-group-chip:hover { border-color: var(--color-title); }
.rq-group-chip[aria-pressed="true"] { border-color: var(--color-title); background: var(--color-title); color: #fff; }
.rq-services__empty { margin-top: 12px; padding: 24px; border-radius: 16px; background: #f6f6f6; }
.rq-services__empty[hidden] { display: none; }
.rq-services__empty p { max-width: 620px; margin: 0 0 16px; color: #4b5162; font-size: 16px; line-height: 1.6; }

/* Reviews */
.rq-reviews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rq-review-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 16px; background: #f6f6f6; }
.rq-review-card p { margin: 0; }
.rq-review-card__stars { color: #f5a623; font-size: 15px; letter-spacing: 2px; }
.rq-review-card__price { color: var(--color-title); font-size: 18px; font-weight: 600; }
.rq-review-card__text { color: #4b5162; font-size: 15px; line-height: 1.5; }
.rq-review-card__who { margin-top: auto !important; padding-top: 4px; color: var(--color-muted); font-size: 14px; }
.rq-review-card__service { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: #e9eaed; color: #555a64; font-size: 14px; font-weight: 600; }

/* All services: the home page rubricator («Категории» on index.html). The rules below are a copy of
   home.css (RUBRICATOR and «Home categories» blocks); keep them in sync. Phones: accordion from partials.js
   and mobile-layout.css. */
.rq-rubric > .rq-block-title { margin-bottom: 24px; }
.rq-rubric .rubricator-grid[hidden] { display: none; }
    /* --- RUBRICATOR: DESKTOP EDITORIAL INDEX --- */
    .rubricator-extra-list[hidden] { display: none; }
    .rubricator-subtitle {
          margin: 24px 0 7px;
    color: #000000;
    font: 600 14px / 1.3 var(--font-body);
    letter-spacing: 0;
    text-transform: none
    }
    .rubricator-subgroup:first-child .rubricator-subtitle { margin-top: 2px; }
    .rubricator-extra-list .rubricator-subgroup:first-child .rubricator-subtitle { margin-top: 24px; }

    @media (min-width: 1025px) {
      .rubricator-header { margin-bottom: 56px; }
      .rubricator-intro {
        max-width: 560px;
        margin-top: 28px;
        color: #66686d;
        font-size: 16px;
        line-height: 1.65;
      }
      .rubricator-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        border-bottom: 1px solid rgba(21, 21, 21, 0.34);
      }
      .rubricator-column {
        position: relative;
        min-width: 0;
        padding: 30px clamp(18px, 1.65vw, 28px) 22px;
        border-top: 1px solid rgba(21, 21, 21, 0.34);
        border-right: 1px solid rgba(21, 21, 21, 0.18);
      }
      .rubricator-column:first-child { padding-left: 0; }
      .rubricator-column:last-child { padding-right: 0; border-right: 0; }
      .rubricator-column:nth-child(5n+1) { padding-left: 0; }
      .rubricator-column:nth-child(5n) { padding-right: 0; border-right: 0; }
      .rubricator-column::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 0;
        width: 38px;
        height: 2px;
        background: var(--color-primary);
        transition: width 0.36s cubic-bezier(0.16, 1, 0.3, 1);
      }
      .rubricator-column:hover::before { width: 100%; }
      .rubricator-title {
                min-height: 50px;
        margin: 0 0 10px;
        color: var(--color-title);
        font-family: var(--font-title);
        font-size: clamp(18px, 1.55vw, 16px);
        font-weight: 600;
        line-height: 1.12;
        border-bottom: 1px solid #E2E2E2;
      }
      .rubricator-list {
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        list-style: none;
      }
      /*.rubricator-list li { border-bottom: 1px solid rgba(21, 21, 21, 0.12); }*/
      .rubricator-link {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 16px;
        align-items: center;
        gap: 8px;
        /* min-height: 48px; */
        margin-inline: -8px;
        padding: 4px 8px;
        color: #000000;
        font-size: 14px;
        font-weight: 300;
        line-height: 1.35;
        text-decoration: none;
        transition: color 0.2s ease, background-color 0.2s ease, padding-left 0.2s ease;
      }
      .rubricator-link::after {
        content: '↗';
        color: var(--color-primary);
        font-size: 13px;
        opacity: 0;
        transform: translate(-4px, 4px);
        transition: opacity 0.2s ease, transform 0.2s ease;
      }
      .rubricator-link:hover,
      .rubricator-link:focus-visible {
        color: var(--color-primary);
        background: rgba(245, 27, 36, 0.055);
        padding-left: 12px;
        outline: 0;
      }
      .rubricator-link:hover::after,
      .rubricator-link:focus-visible::after { opacity: 1; transform: translate(0, 0); }
      .rubricator-link--unavailable {
        color: #96989d;
        cursor: not-allowed;
      }
      .rubricator-link--unavailable::after { content: none; }
      .rubricator-link--unavailable:hover,
      .rubricator-link--unavailable:focus-visible {
        padding-left: 8px;
        background: transparent;
        color: #96989d;
      }
      .rubricator-toggle {
        width: 100%;
        min-height: 48px;
        padding: 12px 0;
        border: 0;
        background: transparent;
        color: var(--color-primary);
        font: 650 13px/1.2 var(--font-body);
        text-align: left;
        cursor: pointer;
      }
      .rubricator-toggle span { display: inline-block; margin-left: 7px; transition: transform 0.2s ease; }
      .rubricator-toggle:hover span,
      .rubricator-toggle:focus-visible span { transform: translateY(3px); }
      .rubricator-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }
    }

    @media (prefers-reduced-motion: reduce) {
      .rubricator-column::before, .rubricator-link, .rubricator-link::after, .rubricator-toggle span { transition: none; }
    }
.home-categories .rubricator-toggle { display:flex; align-items:center; gap:8px; }
.home-categories .rubricator-toggle span { margin:0; transform:none; }
.home-categories .home-category-chevron { position:relative; display:block; width:16px; height:16px; flex:0 0 16px; }
.home-category-chevron::before { position:absolute; top:3px; left:4px; width:7px; height:7px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; content:""; transform:rotate(45deg); }
.home-categories .rubricator-toggle[aria-expanded="true"] .home-category-chevron::before { top:6px; transform:rotate(225deg); }
.home-categories .rubricator-link::after { content:""; width:12px; height:12px; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 10 10 2M3 2h7v7' fill='none' stroke='%23ed1c24' stroke-width='1.5'/%3E%3C/svg%3E") center/12px 12px no-repeat; }
.home-categories a:focus-visible,.home-categories button:focus-visible { outline:2px solid var(--color-title); outline-offset:3px; }
@media (min-width:769px) and (max-width:1024px) {
  .home-categories .rubricator-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; }
  .home-categories .rubricator-column { min-width:0; }
  .home-categories .rubricator-title { margin-bottom:16px; font-size:22px; font-weight:500; line-height:1.25; }
  .home-categories .rubricator-list { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
  .home-categories .rubricator-link { font-size:16px; line-height:1.5; }
  .home-categories .rubricator-link::after { content:none; }
  .home-categories .rubricator-toggle { min-height:48px; padding:12px 0; border:0; background:transparent; color:var(--color-primary); font:500 15px/1.4 var(--font-body); text-align:left; cursor:pointer; }
}
@media (max-width:768px) {
  .home-categories .rubricator-intro { margin-top:12px; font-size:16px; line-height:1.5; }
  .home-categories .rubricator-toggle { display:none; }
  .home-categories .rubricator-link::after { content:none; }
}

/* Service page: companies as the rating card */
.rq-company-list { display: grid; gap: 16px; }
.rq-company-list .company-card { cursor: pointer; }
.rq-card-name { color: inherit; text-decoration: none; }
.rq-card-name:hover { color: var(--color-primary); }
.rq-company-list .company-meta-city.rq-bin-ok { color: #0a8a5f; font-weight: 600; text-decoration: none; }
.rq-company-list .company-meta-city.rq-bin-ok::before { content: "БИН "; color: #848993; font-weight: 400; }
.rq-company-list .company-meta-city.rq-bin-ok--ip::before { content: none; }

/* For companies */
.rq-biz { padding: 88px 0; background: #fff; }
.rq-biz__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 56px; align-items: start; }
.rq-biz h2 { margin: 16px 0 24px; color: var(--color-title); font-size: clamp(30px, 3vw, 42px); font-weight: 520; line-height: 1.1; letter-spacing: -.035em; }
.rq-biz__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rq-biz__list li { display: grid; align-content: start; gap: 8px; padding: 20px; border-radius: 16px; background: #f6f6f6; }
.rq-biz__list b { color: var(--color-title); font-size: 17px; font-weight: 600; }
.rq-biz__list span { color: #4b5162; font-size: 15px; line-height: 1.5; }
.rq-biz .btn { min-height: 52px; }

/* Service page */

.rq-home-page :is(.rq-search .btn, .rq-card, .rq-group-chip, .rq-review-card__service, .rq-biz .btn, .rq-card-name, .rq-bin-ok, .rq-services__empty .btn):focus-visible { outline: 2px solid var(--color-title); outline-offset: 3px; }

@media (max-width: 1100px) {
  .rq-cards, .rq-reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rq-cards--popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq-cards--popular > li:nth-child(n) { border-left: 0; border-top: 0; }
  .rq-cards--popular > li:nth-child(2n) { border-left: 1px solid #e4e6ea; }
  .rq-cards--popular > li:nth-child(n+3) { border-top: 1px solid #e4e6ea; }
  .rq-biz__inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .rq-home { padding-bottom: 56px; }
  .rq-search { flex-wrap: wrap; gap: 8px; margin-top: 16px; }
  .rq-search__field { flex-basis: 100%; min-height: 56px; border-radius: 14px; }
  .rq-search__field input { height: 54px; font-size: 17px; }
  .rq-search .btn { flex: 1 1 0; min-height: 52px; padding-inline: 12px; }
  .rq-sec { margin-top: 40px; }
  .rq-block-title { font-size: 22px; }
  .rq-sec > .rq-block-title, .rq-sec__head { margin-bottom: 14px; }
  .rq-card { min-height: 96px; padding: 14px 16px; border-radius: 14px; }
  .rq-card__title { font-size: 16px; }
  .rq-reviews { display: flex; gap: 10px; overflow-x: auto; margin: 0 calc(var(--container-padding, 16px) * -1); padding: 0 var(--container-padding, 16px) 4px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--container-padding, 16px); scrollbar-width: none; }
  .rq-reviews::-webkit-scrollbar { display: none; }
  .rq-cards--popular { display: block; border-radius: 14px; }
  .rq-cards--popular > li { padding: 0 16px; border: 0 !important; }
  .rq-cards--popular > li + li .rq-card { border-top: 1px solid #e4e6ea; }
  .rq-cards--popular .rq-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; }
  .rq-cards--popular .rq-card:hover { background: none; }
  .rq-cards--popular .rq-card__title { font-size: 17px; }
  .rq-cards--popular .rq-card__text { display: none; }
  .rq-cards--popular .rq-card__arrow { color: #a3a8b3; }
  .rq-cards--popular .rq-card__meta { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; gap: 10px; }
  .rq-review-card { flex: 0 0 80%; padding: 18px; border-radius: 14px; scroll-snap-align: start; }
  .rq-groups { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--container-padding, 16px) * -1) 14px; padding: 0 var(--container-padding, 16px); scrollbar-width: none; }
  .rq-sec__head .rq-groups { margin: 0 calc(var(--container-padding, 16px) * -1); }
  .rq-groups::-webkit-scrollbar { display: none; }
  .rq-group-chip { flex: 0 0 auto; }
  .rq-biz { padding: 56px 0; }
  .rq-biz__list { grid-template-columns: 1fr; gap: 10px; }
  .rq-biz__list li { padding: 18px; border-radius: 14px; }
}
@media (max-width: 640px) {
}
@media (max-width: 380px) {
  .rq-cards { grid-template-columns: 1fr; }
}

/* requests/my.html */
.my-rq__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.my-rq__head .btn { min-height: 56px; padding-inline: 28px; }
.my-rq { max-width: 1080px; margin-top: 48px; }
.my-rq [hidden] { display: none; }
.my-rq__group { margin: 0 0 16px; color: var(--color-title); font-size: 22px; font-weight: 500; }
.my-rq__list + .my-rq__group { margin-top: 48px; }
.my-rq__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.my-rq__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; padding: 28px 32px; border-radius: 16px; background: #f6f6f6; }
.my-rq__main { display: grid; gap: 8px; }
.my-rq__meta { margin: 0; color: var(--color-muted); font-size: 14px; }
.my-rq__item h3 { margin: 0; color: var(--color-title); font-size: 22px; font-weight: 500; line-height: 1.3; }
.my-rq__item h3:focus { outline: none; }
.my-rq__item.is-closed h3 { color: #4b5162; }
.my-rq__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 0; color: #4b5162; font-size: 15px; line-height: 1.5; }
.my-rq__badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--color-title); font-size: 14px; font-weight: 600; white-space: nowrap; }
.my-rq__badge.is-offers { background: var(--color-primary); color: #fff; }
.my-rq__badge.is-selected { background: var(--color-title); color: #fff; }
.my-rq__badge.is-closed { background: #e7e9ee; color: #4b5162; }
.my-rq__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 20px; }
.my-rq__actions .btn { min-height: 48px; padding-inline: 22px; }
.my-rq__close { padding: 8px 0; border: 0; background: none; color: var(--color-title); font: 600 15px/1.3 var(--font-body); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.my-rq__close:hover { color: var(--color-primary); }
.owner-test__list a { color: var(--color-title); font: 600 15px/1.4 var(--font-body); text-decoration: underline; text-decoration-color: #c6c9ce; text-underline-offset: 4px; }

.my-rq-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 32px); width: min(480px, calc(100vw - 32px)); padding: 32px; border: 0; border-radius: 16px; background: #fff; color: var(--color-title); }
.my-rq-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.my-rq-dialog h2 { margin: 0; font-size: 26px; font-weight: 500; line-height: 1.2; }
.my-rq-dialog p { margin: 12px 0 0; color: #4b5162; font-size: 16px; line-height: 1.6; }
.my-rq-dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.my-rq-dialog__actions .btn { min-height: 52px; }

.owner-entry-page :is(.my-rq__head .btn, .my-rq__actions .btn, .my-rq__close, .owner-test__list a, .my-rq-dialog .btn):focus-visible { outline: 2px solid var(--color-title); outline-offset: 3px; }

@media (max-width: 768px) {
  .my-rq { margin-top: 32px; }
  .my-rq__item { grid-template-columns: 1fr; padding: 24px; border-radius: 14px; }
  .my-rq__item h3 { font-size: 20px; }
  .my-rq__actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .my-rq__head .btn, .my-rq__actions .btn, .my-rq-dialog__actions .btn { width: 100%; }
  .my-rq-dialog { padding: 24px; }
}

/* Phone tap targets (mobile audit, 13 Nov 2026) */
@media (max-width: 768px) {
  .rq-review-card__service { display: inline-flex; align-items: center; min-height: 44px; }
  .rq-group-chip { min-height: 44px; }
}
