/* Amer — Hero slider, design 2: the rounded picture.
 *
 * Two template pages, told apart by the section's full_width:
 *  - on  — home-office-equipment.html:1348, `.tf-slideshow.tf-btn-swiper-main
 *    .mt-20` > `.tf-swiper.sw-slide-show.slider_effect_fade`: page wide, the
 *    copy centred in white, a white pill, the white bars
 *    (`.sw-line-default`) and the large glass arrows
 *    (`.tf-sw-nav-2.style-3.style-large` in `.group-nav-action.pst-2`),
 *    edge to edge with square corners, one slide at a time, sliding
 *    (the template's slide effect, as in 1.0.42). Until
 *    2026-10-13 it was the template's row with the neighbours peeking in
 *    (data-preview 1.08379, data-tablet 1.1, data-mobile-sm 1.1,
 *    data-mobile 1.15, centred, 10 / 15 / 20px apart) and 16px corners
 *    (`.sld_image.radius-16`); decision 1 of the options review made
 *    «القسم بعرض الشاشة كلها» reach both edges in every picture design;
 *  - off — home-auto.html:1517, `.tf-slideshow.flat-spacing-3.pb-0` >
 *    `.container` > `.tf-swiper.radius-12[data-effect=fade]`: one slide at
 *    a time in the page container, 12px corners, the copy at the start
 *    (`.sld_content.type-2`: 45px in from 992px, plus the container's 15),
 *    the ink bars (`.sw-line-default.style-2.pst-3`).
 * Numbers from styles.css:613-618 (h1), 7795-7825 (.tf-btn, .btn-white),
 * 8347-8400 (.sw-line-default), 8413-8458 (.tf-sw-nav-2 style-3/large),
 * 8484-8520 (.slider_effect_fade), 8592-8712 (.tf-slideshow), 8738-8866
 * (.group-nav-action, .sld_content, .sld_image), measured live against both
 * pages at 1920/1600/1440/1024/768/390 (D:/tmp/amer-build/r5/build-hero-a/).
 * The slider is the theme's shared Swiper (ui.js); before it starts the row
 * is already laid out at its final size (core.css [data-amer-swiper] rules,
 * given the fractional counts below).
 */

/* office: 20px under the header (`.mt-20`); auto: 40px (`.flat-spacing-3
   .pb-0`). Neither has space under it. */
.mt-section.amer-hero-slider--d2 { padding-block: var(--mt-space-top, 20px) var(--mt-space-bottom, 0px); }
.mt-section.amer-hero-slider--d2:not(.mt-section--full) { padding-block: var(--mt-space-top, 40px) var(--mt-space-bottom, 0px); }
@media (max-width: 767px) {
  .mt-section.amer-hero-slider--d2 { padding-block: var(--mt-space-top-mobile, var(--mt-space-top, 20px)) var(--mt-space-bottom-mobile, var(--mt-space-bottom, 0px)); }
  .mt-section.amer-hero-slider--d2:not(.mt-section--full) { padding-block: var(--mt-space-top-mobile, var(--mt-space-top, 40px)) var(--mt-space-bottom-mobile, var(--mt-space-bottom, 0px)); }
}

.amer-hero-slider--d2 .amer-hs2__stage { position: relative; }
.amer-hero-slider--d2 .swiper-slide { block-size: auto; }

/* ---- One slide ------------------------------------------------------------
   Height (`.tf-slideshow .slideshow-wrap`): the picture's own ratio from
   1440px (office 1770x620, auto 1620x825), 600px below that, 550px under
   768px, 450px under 576px. The merchant's height sliders, once moved off
   their defaults, set it instead (desktop from 768px, phone below). */
.amer-hero-slider--d2 .amer-hs2__slide {
  position: relative;
  overflow: hidden;
  block-size: var(--mt-slider-height, 600px);
  border-radius: 16px;
  background: var(--mt-slide-bg, #101010);
}
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__slide { border-radius: 12px; }
/* Full width: both screen edges, square (2026-10-13, decision 1). */
.amer-hero-slider--d2 .amer-hs2--wide .amer-hs2__slide { border-radius: 0; }
@media (min-width: 1440px) {
  .amer-hero-slider--d2 .amer-hs2__slide { block-size: var(--mt-slider-height, auto); }
  .amer-hero-slider--d2 .amer-hs2__slide--plain { aspect-ratio: 1770 / 620; }
  .amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__slide--plain { aspect-ratio: 1620 / 825; }
}
@media (max-width: 767px) {
  .amer-hero-slider--d2 .amer-hs2__slide { block-size: var(--mt-slider-height-mobile, 550px); }
}
@media (max-width: 575px) {
  .amer-hero-slider--d2 .amer-hs2__slide { block-size: var(--mt-slider-height-mobile, 450px); }
}
.amer-hero-slider--d2 .amer-hs2__slide--plain { background: var(--mt-slide-bg, var(--amer-surface, #f7f7f7)); }
/* The picture is in the flow, so with no fixed height (1440px and up) the
   slide takes its ratio; with one, min = max = 100% makes it that height,
   cropped from the centre (`object-fit: cover`). */
.amer-hero-slider--d2 .amer-hs2__media { block-size: 100%; }
.amer-hero-slider--d2 .amer-hs2__media picture { display: contents; }
.amer-hero-slider--d2 .amer-hs2__img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  min-block-size: 100%;
  max-block-size: 100%;
  object-fit: cover;
}
[dir="rtl"] .amer-hero-slider--d2 .amer-hs2__media--rtl-mirror .amer-hs2__img { transform: scaleX(-1); }

/* YouTube: the poster with a play mark; the slide opens the video. */
.amer-hero-slider--d2 .amer-hs2__youtube { position: relative; display: block; block-size: 100%; min-block-size: 100%; }
.amer-hero-slider--d2 .amer-hs2__play {
  position: absolute;
  inset: 0;
  z-index: 3;
  inline-size: 64px;
  block-size: 64px;
  margin: auto;
  border-radius: 50%;
  background: #fff;
  transition: transform .3s var(--amer-ease, ease);
}
[dir] .amer-hero-slider--d2 .amer-hs2__play::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: 0;
  block-size: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #101010;
  translate: 3px 0;
}
.amer-hero-slider--d2 .amer-hs2__youtube:hover .amer-hs2__play,
.amer-hero-slider--d2 .amer-hs2__youtube:focus-visible .amer-hs2__play { transform: scale(1.1); }

.amer-hero-slider--d2 .amer-hs2__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--mt-slide-overlay, #000);
  opacity: var(--mt-slide-opacity, .4);
}
.amer-hero-slider--d2 .amer-hs2__overlay--gradient { background: linear-gradient(to top, var(--mt-slide-overlay, #000) 0%, transparent 70%); }

/* ---- The copy -------------------------------------------------------------
   `.sld_content` (absolute, centred on the slide) > `.container` (1440px,
   15px gutters) > `.content-sld_wrap`. office: centred, 15px in from the
   slide; auto (`.type-2`): 45px more from 992px — 60px in all. The
   merchant's content padding replaces the whole inset. */
.amer-hero-slider--d2 .amer-hs2__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-block: 40px;
  pointer-events: none;
}
.amer-hero-slider--d2 .amer-hs2__slide--v-start .amer-hs2__content { align-items: flex-start; }
.amer-hero-slider--d2 .amer-hs2__slide--v-end .amer-hs2__content { align-items: flex-end; padding-block-end: 64px; }
.amer-hero-slider--d2 .amer-hs2__wrap {
  inline-size: 100%;
  max-inline-size: var(--amer-page-width, 1440px);
  margin-inline: auto;
  padding-inline: var(--mt-slider-content-padding, 15px);
  text-align: start;
}
@media (min-width: 992px) {
  .amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__wrap { padding-inline: var(--mt-slider-content-padding, 60px); }
}
@media (max-width: 767px) {
  .amer-hero-slider--d2 .amer-hs2__wrap,
  .amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__wrap { padding-inline: var(--mt-slider-content-padding-mobile, 15px); }
}
.amer-hero-slider--d2 .amer-hs2__copy > * { pointer-events: auto; }
.amer-hero-slider--d2 .amer-hs2__slide--h-center .amer-hs2__wrap { text-align: center; }
.amer-hero-slider--d2 .amer-hs2__slide--h-end .amer-hs2__wrap { text-align: end; }
.amer-hero-slider--d2 .amer-hs2__slide--h-center .amer-hs2__actions { justify-content: center; }
.amer-hero-slider--d2 .amer-hs2__slide--h-end .amer-hs2__actions { justify-content: flex-end; }
@media (max-width: 767px) {
  .amer-hero-slider--d2 .amer-hs2__slide--mv-start .amer-hs2__content { align-items: flex-start; padding-block-end: 40px; }
  .amer-hero-slider--d2 .amer-hs2__slide--mv-center .amer-hs2__content { align-items: center; padding-block-end: 40px; }
  .amer-hero-slider--d2 .amer-hs2__slide--mv-end .amer-hs2__content { align-items: flex-end; padding-block-end: 48px; }
  .amer-hero-slider--d2 .amer-hs2__slide--mh-start .amer-hs2__wrap { text-align: start; }
  .amer-hero-slider--d2 .amer-hs2__slide--mh-center .amer-hs2__wrap { text-align: center; }
  .amer-hero-slider--d2 .amer-hs2__slide--mh-end .amer-hs2__wrap { text-align: end; }
  .amer-hero-slider--d2 .amer-hs2__slide--mh-start .amer-hs2__actions { justify-content: flex-start; }
  .amer-hero-slider--d2 .amer-hs2__slide--mh-center .amer-hs2__actions { justify-content: center; }
  .amer-hero-slider--d2 .amer-hs2__slide--mh-end .amer-hs2__actions { justify-content: flex-end; }
}

/* `p.sub-text_sld.lh-24` (office: 16/24, 400) and
   `p.sub-text_sld.fw-semibold.mb-8` (auto: 16/26, 600, 8px under it);
   both pages hide it under 576px (`.sld_content .sub-text_sld`). */
.amer-hero-slider--d2 .amer-hs2__eyebrow {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--mt-slide-text, #fff);
  overflow-wrap: anywhere;
}
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__eyebrow { margin-block-end: 8px; font-weight: 600; line-height: 26px; }
@media (max-width: 575px) {
  .amer-hero-slider--d2 .amer-hs2__eyebrow { display: none; }
}
/* `.title_sld.h1`: 34-56px on 44-68px, .05em (none in Arabic), 500. */
.amer-hero-slider--d2 .amer-hs2__title {
  margin: 0;
  font-family: var(--amer-font-heading);
  font-weight: var(--amer-fw-heading, 500);
  font-size: var(--amer-fs-h1, clamp(34px, 5vw, 56px));
  line-height: clamp(44px, 6vw, 68px);
  letter-spacing: var(--amer-ls-title, .05em);
  color: var(--mt-slide-title, #fff);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.amer-hero-slider--d2 .amer-hs2__subtitle {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 28px;
  color: var(--mt-slide-text, #fff);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.amer-hero-slider--d2 .amer-hs2__subtitle:first-child { margin-block-start: 0; }
/* `.heading.mb-28` (office) / `.heading` 32px (auto, `mb-xl-32`). */
.amer-hero-slider--d2 .amer-hs2__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 28px; }
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__actions { margin-block-start: 32px; }
.amer-hero-slider--d2 .amer-hs2__actions:first-child { margin-block-start: 0; }
/* `.tf-btn.btn-white`: 44px (58px from 1200), 24px (32px) sides, a pill,
   600; on hover it inverts to the ink. A button the merchant made dark
   inverts to white instead. */
.amer-hero-slider--d2 .amer-hs2__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  block-size: 44px;
  padding-inline: 24px;
  border: var(--mt-slide-button-bw, 0) solid var(--mt-slide-button-border, transparent);
  border-radius: var(--amer-radius-button, 60px);
  background: var(--mt-slide-button-bg, #fff);
  color: var(--mt-slide-button-text, var(--amer-heading, #101010));
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .3s var(--amer-ease, ease), color .3s var(--amer-ease, ease), border-color .3s var(--amer-ease, ease);
}
@media (min-width: 1200px) {
  .amer-hero-slider--d2 .amer-hs2__button { block-size: 58px; padding-inline: 32px; }
}
.amer-hero-slider--d2 .amer-hs2__button:hover,
.amer-hero-slider--d2 .amer-hs2__button:focus-visible { background: var(--mt-slide-button-hover-bg, var(--amer-heading, #101010)); color: var(--mt-slide-button-hover-text, var(--amer-bg, #fff)); text-decoration: none; }
.amer-hero-slider--d2 .amer-hs2__button--secondary {
  border: 1px solid var(--mt-slide-button-border, currentColor);
  background: var(--mt-slide-button-bg, transparent);
  color: var(--mt-slide-button-text, var(--mt-slide-title, #fff));
}
.amer-hero-slider--d2 .amer-hs2__button--secondary:hover,
.amer-hero-slider--d2 .amer-hs2__button--secondary:focus-visible { border-color: #fff; background: #fff; color: #101010; }
.amer-hero-slider--d2 .amer-hs2__slide--plain .amer-hs2__button:not(.amer-hs2__button--secondary) {
  background: var(--mt-slide-button-bg, var(--amer-heading, #101010));
  color: var(--mt-slide-button-text, var(--amer-bg, #fff));
}
.amer-hero-slider--d2 .amer-hs2__slide--plain .amer-hs2__button:not(.amer-hs2__button--secondary):hover,
.amer-hero-slider--d2 .amer-hs2__slide--plain .amer-hs2__button:not(.amer-hs2__button--secondary):focus-visible { background: var(--amer-primary); color: var(--amer-on-primary, #fff); }

.amer-hero-slider--d2 a:focus:not(:focus-visible),
.amer-hero-slider--d2 button:focus:not(:focus-visible),
.amer-hero-slider--d2 a:focus-visible,
.amer-hero-slider--d2 button:focus-visible { outline: none; }

/* ---- Entrance (`.slider_effect_fade`) --------------------------------------
   The copy of a slide that is not the current one waits 100px low and
   hidden and rises in over .3s (delays .5/.6/.7/.8s) when it comes in;
   office's picture (`.scale-item.scale-item-1`) settles from 120% over .5s
   after .3s. Only once Swiper runs, so nothing is hidden without it. */
@media (prefers-reduced-motion: no-preference) {
  .amer-hero-slider--d2 .swiper-initialized .amer-hs2__fade { transition: opacity .3s ease, transform .3s ease, visibility .3s ease; }
  .amer-hero-slider--d2 .swiper-initialized .swiper-slide:not(.swiper-slide-active) .amer-hs2__fade { opacity: 0; visibility: hidden; transform: translateY(100px); }
  .amer-hero-slider--d2 .amer-hs2__fade--1 { transition-delay: .5s; }
  .amer-hero-slider--d2 .amer-hs2__fade--2 { transition-delay: .6s; }
  .amer-hero-slider--d2 .amer-hs2__fade--3 { transition-delay: .7s; }
  .amer-hero-slider--d2 .amer-hs2__fade--4 { transition-delay: .8s; }
  .amer-hero-slider--d2 .amer-hs2--wide .swiper-initialized .amer-hs2__img { transition: scale .5s linear .3s; }
  .amer-hero-slider--d2 .amer-hs2--wide .swiper-initialized .swiper-slide:not(.swiper-slide-active) .amer-hs2__img { scale: 1.2; }
}

/* ---- Navigation -----------------------------------------------------------
   The bars: office's white `.sw-line-default` 28px off the bottom (15px
   under 768px), centred on the row; auto's ink `.style-2.pst-3` 40px off
   the bottom and 60px in from the start from 992px. */
.amer-hero-slider--d2 .amer-hs2__lines {
  position: absolute;
  inset-inline: 0;
  inline-size: auto;
  inset-block-end: 28px;
  z-index: 3;
}
@media (max-width: 767px) {
  .amer-hero-slider--d2 .amer-hs2__lines { inset-block-end: 15px; }
}
@media (min-width: 992px) {
  /* `left: 60px` on a full-width bar row: its middle 60px off the slide's
     middle, kept inside the slide here. */
  .amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__lines { padding-inline-start: 120px; inset-block-end: 40px; }
}
.amer-hero-slider--d2 .amer-hs2__lines .swiper-pagination-bullet { background: var(--mt-nav-text, #fff); }
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__lines .swiper-pagination-bullet { background: var(--mt-nav-text, var(--amer-heading, #101010)); }
.amer-hero-slider--d2 .amer-hs2__lines .swiper-pagination-bullet-active { background: var(--mt-nav-active, var(--mt-nav-text, #fff)); }
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__lines .swiper-pagination-bullet-active { background: var(--mt-nav-active, var(--mt-nav-text, var(--amer-heading, #101010))); }

/* The arrows: `.tf-sw-nav-2.style-3.style-large` — 60px glass squares,
   8px corners, a white line on hover — at the edges of `.container-full`
   (1800px, 15px gutters) 49px in, centred on the slide. The template shows
   them from 1600px; here from 1200px, so the switch shows on a laptop. */
.amer-hero-slider--d2 .amer-hs2__arrow {
  position: absolute;
  inset-block-start: 50%;
  z-index: 3;
  display: none;
  inline-size: 60px;
  block-size: 60px;
  margin-block-start: -30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--mt-nav-bg, rgb(255 255 255 / .1));
  color: var(--mt-nav-text, #fff);
  font-size: 28px;
}
.amer-hero-slider--d2 .amer-hs2__arrow--prev { inset-inline-start: max(64px, calc((100% - 1800px) / 2 + 64px)); }
.amer-hero-slider--d2 .amer-hs2__arrow--next { inset-inline-end: max(64px, calc((100% - 1800px) / 2 + 64px)); }
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__arrow--prev { inset-inline-start: 20px; }
.amer-hero-slider--d2 .amer-hs2--boxed .amer-hs2__arrow--next { inset-inline-end: 20px; }
@media (min-width: 1200px) {
  .amer-hero-slider--d2 .amer-hs2__arrow { display: inline-flex; }
}
.amer-hero-slider--d2 .amer-hs2__arrow:hover,
.amer-hero-slider--d2 .amer-hs2__arrow:focus-visible { border-color: var(--mt-nav-active, #fff); background: var(--mt-nav-bg, rgb(255 255 255 / .1)); color: var(--mt-nav-active, var(--mt-nav-text, #fff)); }
.amer-hero-slider--d2 .amer-hs2__arrow.swiper-button-lock { display: none; }

/* «لون الكلام» (text_color, 2026-10-13): the slide counter sits
   on the section's own colour, so it takes the merchant's colour
   (--amer-hs-ink, hero-slider.jinja) before the theme's. */
.amer-hero-slider--d2 .amer-hs2__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-block-start: 10px;
  font-size: 14px;
  line-height: 22px;
  color: var(--amer-hs-ink, var(--amer-heading));
}
.amer-hero-slider--d2 .amer-hs2__progress-track { position: relative; inline-size: 120px; block-size: 2px; background: var(--mt-progress-track, #ddd); overflow: hidden; }
.amer-hero-slider--d2 .amer-hs2__progress-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--mt-progress-fill, var(--amer-heading)); transition: inline-size .3s var(--amer-ease, ease); }
/* «الجزء اللي يفضل باين لما الصورة تتقص» (2026-10-13): the slide picture is
   held at the point the merchant chose; the section writes the two
   properties only when a choice is not the middle (hero-slider.jinja,
   hs_focus), and the phone picture's own choice takes over from 767px down,
   the break of its <source>. */
.amer-hero-slider--d2 img[data-amer-focus] { object-position: var(--amer-focus, 50% 50%); }
@media (max-width: 767px) {
  .amer-hero-slider--d2 img[data-amer-focus] { object-position: var(--amer-focus-m, var(--amer-focus, 50% 50%)); }
}
/* «الصورة على الكمبيوتر» = «كاملة من غير قص» (a slide's image_fit,
   hero-slider.jinja hs_focus): from 768px the picture is drawn whole in its
   box, on the slide's «لون الخلفية» when one is set; the phone keeps cover. */
@media (min-width: 768px) {
  .amer-hero-slider--d2 img[data-amer-fit="contain"] { object-fit: contain; background-color: var(--amer-fit-bg, transparent); }
}
/* From 1440px this design's slide takes its picture's own height; a whole picture keeps a banner ratio
   instead (review 2026-10-19: a tall photo made a 1806px hero), and a height set in the panel still wins
   (it replaces the slide's auto height). */
@media (min-width: 1440px) {
  .amer-hero-slider--d2 .amer-hs2__slide:has(img[data-amer-fit="contain"]) { aspect-ratio: 1770 / 620; }
}

/* Arabic letters join: any letter-spacing pulls them apart in WebKit (Safari, every iPhone and Mac), while Chrome ignores it on
   Arabic, so it never showed on a Windows check (Framlna review, 2026-10-29). Right-to-left pages track nothing here. */
[dir="rtl"] .amer-hero-slider--d2 .amer-hs2__title { letter-spacing: 0; }
