/* The service page's own blocks (SiteServicePage.vue, /programare/service), under the intro and the feature row. The
   cards and rows are the site's shared ones: .feats (categorie.css), the location cards and the brand tiles (base.css,
   catalog.css), the promotion card (.offer). This file only places them and draws the parts that are new: the parts line
   under the locations, the tariffs call-out, the ITP block and the price list of /tarife-service. Phone first. */

/* Two blocks in a row share one gap, not two paddings. */
.svc > .sec + .sec { padding-top: 0; }

/* Values: the intro and the five values on the grey band, centred like the info text above. */
.svc-values { padding-block: var(--s-8); background: var(--paper-2); text-align: center; }
.svc-values .wrap { display: grid; justify-items: center; gap: var(--s-5); }
.svc-values .sec-h { max-width: 22ch; margin: 0; text-wrap: balance; }
.svc-intro { max-width: 68ch; font-size: var(--step-0); line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.svc-values .feats { margin-top: var(--s-3); }

.svc-teams { margin-top: var(--s-7); }

/* Parts and accessories: one line under the location cards, the addresses that sell them. */
.svc-parts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: var(--step--1); line-height: 1.5; color: var(--ink-2); }
.svc-parts > .icon { flex: none; width: 24px; height: 24px; color: var(--ink); }
.svc-parts > span { flex: 1 1 28ch; text-wrap: pretty; }
.svc-parts > span a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.svc-parts > span a:hover { text-decoration-thickness: 2px; }

/* Tariffs call-out: a black card like the home's teasers, the whole card opens the tariffs page. The count of price
   sections and the logos of their brands (the client's files, on white tiles as in the brand pills) come from the list. */
.svc-tariffs { position: relative; display: grid; gap: var(--s-6); padding: var(--s-6) var(--s-5); border-radius: var(--radius-lg); transition: transform 700ms var(--ease-lift), box-shadow 700ms var(--ease-lift); }
.svc-tariffs:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -36px oklch(0.1 0.005 268 / 0.6); }
.svc-tariffs:has(h2 a:focus-visible) { outline: 2px solid var(--navy); outline-offset: 3px; }
.svc-tariffs-copy { display: grid; justify-items: start; gap: var(--s-3); }
.svc-tariffs h2 a::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.svc-tariffs h2 a:focus-visible { outline: 0; }
.svc-tariffs p { max-width: 40ch; color: var(--ink-2); text-wrap: pretty; }
.svc-tariffs p strong { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.svc-tariffs .btn { margin-top: var(--s-2); }
.svc-tariffs .btn .icon { width: 18px; height: 18px; transition: transform 500ms var(--ease-lift); }
.svc-tariffs:hover .btn { border-color: var(--ink); }
.svc-tariffs:hover .btn .icon { transform: translateX(4px); }
.svc-tariffs-brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-3); }
.svc-tariffs-brands li { display: grid; place-items: center; height: 84px; padding: var(--s-3) var(--s-4); border-radius: 12px; background: #fff; }
.svc-tariffs-brands img { width: 100%; max-width: 110px; height: 100%; object-fit: contain; }

/* Brands' own service sites: the home's brand tiles, each opening the brand's site in a new tab (the corner arrow says so). */
.svc-oem .brands-row a { position: relative; }
.svc-oem .brands-row a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.svc-oem .brands-row a:active { background: var(--line-strong); }
.svc-out { position: absolute; top: var(--s-3); right: var(--s-3); width: 16px; height: 16px; color: var(--ink-3); transform: rotate(-45deg); transition: transform 500ms var(--ease-lift), color var(--t-fast); }
.svc-oem .brands-row a:hover .svc-out { color: var(--ink); transform: rotate(-45deg) translateX(3px); }
.svc-oem-name { font-weight: 700; color: var(--ink); }

/* ITP (SiteItpPage.vue): the authorisation and equipment as reading text with the booking button, then what the inspection
   covers as a two-column list of hairline ticks (the site's check icon), no boxes. */
.itp { display: grid; gap: var(--s-7); }
.itp-top { display: grid; gap: var(--s-7); }
.itp-team .team-list { grid-template-columns: minmax(0, 1fr); }
.itp-team .team-dept { display: none; } /* the title already names the department */
.itp-auth { display: grid; justify-items: start; gap: var(--s-4); }
.itp-auth .sec-h { max-width: 24ch; margin: 0; text-wrap: balance; }
.itp-auth .prose { font-size: var(--step-0); color: var(--ink-2); }
.itp-auth .btn { margin-top: var(--s-2); }
.itp-auth .btn .icon { width: 18px; height: 18px; }
.itp-list { display: grid; gap: var(--s-4); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.itp-list h3 { font-size: var(--step-1); text-wrap: balance; }
.itp-checks { display: grid; gap: var(--s-3) var(--s-6); }
.itp-checks li { display: flex; align-items: flex-start; gap: var(--s-3); line-height: 1.5; text-wrap: pretty; }
.itp-checks .icon { flex: none; width: 22px; height: 22px; margin-top: 0.05em; color: var(--navy); }

@media (min-width: 1000px) {
  .itp-top:has(.itp-team) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
}

@media (min-width: 761px) {
  .itp-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-tariffs { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: var(--s-7); padding: var(--s-7); }
}

/* The price list (SiteTariffs.vue, /tarife-service): an index, then one table per section, each in one card (the site's
   hairline card: line border, 12px radius, white). Every price has the same grammar (siteFormat tariffLines): the amount
   in tabular numerals with its unit beside it, muted, on one baseline; a VAT label in a fixed slot before the amount when
   the cell has two lines (net, with VAT); a column whose prices all share one form says it once under its heading. All
   prices are right-aligned, as are their headings. Phone first: below 700 px each row is a block (the label, then one
   "column: price" line per column). */
/* min-width 0 and a minmax track: the index row's own width must never widen the page (it scrolls inside itself). */
.tf { --tf-bar: 3.75rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); min-width: 0; }
.tf-lead { display: grid; gap: var(--s-2); max-width: 68ch; color: var(--ink-2); text-wrap: pretty; }
.tf-valid { font-size: var(--step--1); font-weight: 600; color: var(--ink); }

/* A brand's logo, or a wrench for a section with no brand logo: one tile, same size and ground everywhere it appears. */
.tf-mark { display: grid; flex: none; place-items: center; width: 28px; height: 28px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); }
.tf-mark img { width: 100%; height: 100%; object-fit: contain; }
.tf-mark .icon { width: 16px; height: 16px; }

/* The index. Below 1200 px: one row of single-line items under the header, scrolling sideways with snap. */
.tf-nav { position: sticky; top: var(--top-h); z-index: 5; min-width: 0; margin-inline: calc(-1 * var(--gutter)); border-bottom: 1px solid var(--line); background: var(--paper); }
.tf-nav ol { position: relative; display: flex; gap: var(--s-1); padding: var(--s-2) var(--gutter); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.tf-nav ol::-webkit-scrollbar { display: none; }
.tf-nav li { flex: none; scroll-snap-align: start; }
.tf-nav a { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: var(--s-2) var(--s-3) var(--s-2) calc(var(--s-3) + 3px); border-radius: 8px; font-size: var(--step--1); font-weight: 500; line-height: 1.3; color: var(--ink-2); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.tf-nav a::before { content: ""; position: absolute; left: 0; top: var(--s-2); bottom: var(--s-2); width: 3px; border-radius: 3px; background: transparent; transition: background var(--t-fast); }
.tf-nav a:hover { background: var(--paper-2); color: var(--ink); }
.tf-nav a:active { background: var(--line); }
.tf-nav a:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.tf-nav a[aria-current] { background: var(--paper-2); font-weight: 600; color: var(--ink); }
.tf-nav a[aria-current]::before { background: var(--navy); }

.tf-sections { display: grid; gap: var(--s-8); min-width: 0; }
.tf-sec { display: grid; gap: var(--s-4); min-width: 0; scroll-margin-top: calc(var(--top-h) + var(--tf-bar) + var(--s-4)); }
.tf-head { display: flex; align-items: flex-start; gap: var(--s-4); } /* the tile stays by the first line of a long title */
.tf-head .tf-mark { width: 52px; height: 52px; padding: var(--s-2); border-radius: 12px; }
.tf-head .tf-mark .icon { width: 22px; height: 22px; }
.tf-head h2 { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.tf-units { margin-top: var(--s-1); font-size: var(--step--1); color: var(--ink-2); text-wrap: pretty; }
.tf-sec-intro { max-width: 68ch; color: var(--ink-2); text-wrap: pretty; }

.tf-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.tf-shared-m { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); text-wrap: pretty; }
.tf-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tf-table tbody th { font-weight: 600; line-height: 1.4; text-align: left; overflow-wrap: anywhere; text-wrap: pretty; }
.tf-price { display: grid; justify-items: end; gap: var(--s-1); text-align: right; }
.tf-line { display: flex; align-items: baseline; justify-content: flex-end; gap: var(--s-2); }
.tf-vat { flex: none; width: 4.5rem; font-size: 0.75rem; font-weight: 500; color: var(--ink-3); text-align: left; white-space: nowrap; }
.tf-amt { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tf-unit, .tf-from { font-size: 0.8rem; font-weight: 500; color: var(--ink-3); }
.tf-note { max-width: 30ch; font-size: 0.75rem; line-height: 1.4; color: var(--ink-3); text-wrap: pretty; }
.tf-none { color: var(--ink-3); }
.tf-fine { padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-2); text-wrap: pretty; }

.tf-end { display: grid; justify-items: start; gap: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.tf-end .btn .icon { width: 18px; height: 18px; transition: transform 500ms var(--ease-lift); }
.tf-end .btn:hover .icon { transform: translateX(4px); }
.tf-foot { max-width: 90ch; font-size: 0.8rem; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }

@media (max-width: 699px) {
  .tf-table, .tf-table tbody, .tf-table tr, .tf-table th, .tf-table td { display: block; }
  .tf-table thead { display: none; }
  .tf-table tbody tr { padding: var(--s-4); }
  .tf-table tbody tr + tr { border-top: 1px solid var(--line); }
  .tf-table tbody th { margin-bottom: var(--s-1); }
  .tf-table td { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-2); }
  .tf-col { display: grid; min-width: 0; font-size: var(--step--1); color: var(--ink-2); text-wrap: pretty; }
  .tf-col small { font-size: 0.75rem; color: var(--ink-3); }
}

@media (min-width: 700px) {
  .tf-shared-m, .tf-col { display: none; }
  /* Up to six columns: a wide table scrolls inside its card, the row labels held at the left edge on the card's white. A
     shadow at the right edge shows there is more (it is covered by the card's white once the end is reached). */
  .tf-scroll {
    overflow-x: auto;
    background:
      linear-gradient(to left, var(--card) 40%, oklch(1 0 0 / 0)) right / 2.5rem 100% no-repeat local,
      linear-gradient(to left, oklch(0 0 0 / 0.12), oklch(0 0 0 / 0)) right / 0.75rem 100% no-repeat scroll;
  }
  .tf-table th, .tf-table td { padding: var(--s-3) var(--s-4); vertical-align: middle; }
  .tf-table tbody tr { height: 3.5rem; }
  .tf-table tbody > tr > * { border-top: 1px solid var(--line); }
  .tf-table thead tr:last-child > * { padding-top: var(--s-2); padding-bottom: var(--s-3); }
  .tf-table thead tr:first-child > * { padding-top: var(--s-4); }
  .tf-table thead th { font-size: var(--step--1); font-weight: 600; line-height: 1.35; color: var(--ink); text-align: right; vertical-align: bottom; text-wrap: balance; }
  .tf-th-sub { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 500; color: var(--ink-3); }
  .tf-table thead .tf-shared { padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); color: var(--ink-2); text-align: right; }
  .tf-table tbody th { position: sticky; left: 0; width: 40%; min-width: 10rem; background: var(--card); font-weight: 500; }
  .tf-table td { white-space: nowrap; }
  .tf-vat { width: 4rem; }
}

/* From 1200 px (below it the tables need the whole measure) the index is a column beside the tables, held under the
   header while the list scrolls. Every item has the same height: two lines at most, then an ellipsis (the full title is
   the section's own heading). */
@media (min-width: 1200px) {
  .tf-table th, .tf-table td { padding-inline: var(--s-5); }
  .tf { grid-template-columns: minmax(15rem, 3fr) minmax(0, 9fr); column-gap: var(--s-7); align-items: start; }
  .tf-lead { grid-column: 1 / -1; }
  .tf-nav { top: calc(var(--top-h) + var(--s-5)); margin: 0; border: 0; background: none; }
  .tf-nav ol { flex-direction: column; gap: 2px; padding: 0; overflow: visible; }
  .tf-nav a { height: 3.5rem; white-space: normal; }
  .tf-nav-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .tf-sec { scroll-margin-top: calc(var(--top-h) + var(--s-5)); }
}

@media (prefers-reduced-motion: reduce) {
  .svc-tariffs, .svc-out, .tf-end .btn .icon, .svc-tariffs .btn .icon, .tf-nav a, .tf-nav a::before { transition: none; }
  .svc-tariffs:hover { transform: none; }
}
