/* =====================================================================
   Computer Xperts — section page styles (css/section.css)
   Shared by the Alibaba pages and the Services pages. Loaded after css/site.css
   and before the section's own stylesheet (css/alibaba.css, css/services.css).

   The accent colour comes from --accent: Xperts red by default; the Alibaba
   pages switch it to Alibaba orange (in css/alibaba.css).
   Calm by design (body class "calm", css/site.css): no mouse effects and no entrance
   animations, only colour changes on hover. The 2D illustrations run their own gentle motion.

   Contents
    1. Accent colours; colour across the Alibaba and Services pages
    2. Page hero: partner/platform label, logo, sub heading, buttons
    3. Section menu (strip under the hero)
    4. Blocks: section, section head, two columns, dark band, call-to-action strip
    5. Picture gallery (numbered captions, opens in the full-size viewer)
    6. Client quote + YouTube video boxes (Alibaba Success Stories, Testimonials)
    7. Responsive: 1180px, 1023px, 640px
   ===================================================================== */


/* 1. Accent colours ---------------------------------------------------- */
.section-page {
  /* spacing; a section may tighten these (css/services.css) */
  --sec-pad: var(--section-y);   /* space above and below a section */
  --sec-head-gap: 22px;      /* under a section title */
  --split-gap: 44px;         /* between picture and text */
  --split-img: 440px;        /* largest picture in a two-column block */
  --hero-img: 560px;         /* largest hero picture */

  --accent: var(--red);
  --accent-text: var(--red-text);       /* small text on white */
  --accent-on-dark: #ff8080;            /* small text on black */
  --accent-tint: var(--red-tint);
  --accent-deep: var(--red-deep);       /* the dark end of a colour band */
  --accent-hi: #ff5a5a;                 /* the bright end of a colour band */
}

/* Colour across the Alibaba and Services pages (their own sheets choose which band is bold):
   the strip of section pages under the hero is in the accent, deep to bright; the grey bands take
   the pale accent; --accent-band paints a bold band in the accent. Buttons stay Xperts red. */
:is(.alibaba, .services) {
  --accent-band:
    radial-gradient(50% 80% at 100% 0%, color-mix(in srgb, var(--accent-hi) 70%, transparent), transparent 70%),
    linear-gradient(120deg, var(--accent-deep), var(--accent));
}
:is(.alibaba, .services) .section-nav { border-bottom: 0; background: linear-gradient(90deg, var(--accent-deep), var(--accent) 60%, var(--accent-hi)); }
:is(.alibaba, .services) .section-nav a { color: rgba(255, 255, 255, .82); }
:is(.alibaba, .services) .section-nav a:hover { color: var(--white); border-bottom-color: rgba(255, 255, 255, .5); }
:is(.alibaba, .services) .section-nav [aria-current="page"] { color: var(--white); border-bottom-color: var(--white); }
:is(.alibaba, .services) .sec:not(.sec--white) { background: var(--accent-tint); }


/* 2. Page hero ---------------------------------------------------------- */
.sec-hero .page-hero__text { margin-top: 14px; }
.sec-hero .page-hero__media > img { width: 100%; max-width: var(--hero-img); margin: 0 auto; }
.sec-hero__sub { margin-top: 14px; color: var(--white); font-size: clamp(19px, 1.7vw, 23px); font-weight: 700; line-height: 1.35; }

/* label pill, on its own or next to a white logo (.hero-brand) */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 12px 6px 10px;
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-on-dark); font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
}
.hero-badge .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.hero-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.hero-brand img { width: auto; height: 46px; }
.hero-brand .hero-badge { margin-bottom: 0; }


/* 3. Section menu ------------------------------------------------------- */
.section-nav { background: var(--white); border-bottom: 1px solid var(--line); }
.section-nav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a,
.section-nav [aria-current="page"] {
  display: block; padding: 16px 14px 14px; border-bottom: 3px solid transparent; white-space: nowrap;
  font-size: 15px; font-weight: 700; text-decoration: none; transition: color .2s ease, border-color .2s ease;
}
.section-nav a { color: var(--muted); }
.section-nav a:hover { color: var(--ink); border-bottom-color: var(--line); }
.section-nav [aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }


/* 4. Blocks ------------------------------------------------------------- */
.sec { padding: var(--sec-pad) 0; background: var(--paper); }
.sec--white { background: var(--white); }
.sec-head { max-width: 760px; margin-bottom: var(--sec-head-gap); }
.sec-head p { margin-top: 10px; color: var(--muted); font-size: 16.5px; }
.sec-head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; max-width: none; }

/* two columns: picture + text (--flip: text first) */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--split-gap); align-items: center; }
.split--flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.split__media img { width: 100%; max-width: var(--split-img); margin: 0 auto; }
.split__media--photo img { max-width: none; border-radius: 16px; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .55); }
.split__media--wide img { max-width: 500px; }
.split h2 { color: var(--ink); font-size: clamp(28px, 3vw, 40px); font-weight: 900; line-height: 1.15; letter-spacing: -.01em; }
.split p { margin-top: 14px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.split p.lead { margin-top: 0; color: var(--ink); font-size: clamp(18px, 1.5vw, 20px); }
.split .hero-actions { margin-top: 24px; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.split--three { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr); }

/* body text under a section title */
.sec-text { margin-top: 12px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.sec-text--gap { margin: 26px 0 14px; color: var(--ink); font-weight: 700; }

/* dark statement band */
.band { padding: 30px 0; background: var(--ink); border-top: 4px solid var(--accent); }
.band p,
.band h2,
.band h3 { max-width: 900px; margin: 0 auto; color: var(--white); font-size: clamp(18px, 1.7vw, 22px); font-weight: 700; line-height: 1.55; text-align: center; }
.band .band__action { margin-top: 18px; }

/* dark call-to-action strip */
.teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px;
  padding: 26px 30px; border-radius: 16px; background: var(--ink); color: var(--white);
}
.teaser p { font-size: 19px; font-weight: 800; line-height: 1.35; }
.teaser small { display: block; margin-top: 4px; color: #bdbdbd; font-size: 14.5px; font-weight: 400; }


/* 5. Picture gallery ---------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; counter-reset: item; }
.gallery > li { grid-column: span 2; counter-increment: item; }
.gallery > li.gallery__wide { grid-column: span 3; }
.gallery a { display: block; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: var(--white); }
.gallery img { width: 100%; aspect-ratio: 640 / 530; object-fit: cover; transition: transform .4s ease; }
.gallery__wide img { aspect-ratio: 960 / 530; }
.gallery a:hover img { transform: scale(1.03); }
.gallery h3 { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--ink); font-size: 17px; font-weight: 900; }
.gallery h3::before {
  content: counter(item); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-tint); color: var(--accent-text); font-size: 14px;
}


/* 6. Client quote + video boxes ------------------------------------------ */
.story h2 { margin-bottom: 18px; }
.story__quote { position: relative; margin: 0; padding: 28px 28px 24px; border-radius: 16px; background: var(--paper); border-left: 4px solid var(--accent); }
.story__quote > .ic { width: 30px; height: 30px; color: var(--accent); }
.story__quote p { margin-top: 10px; color: var(--ink); font-size: 16.5px; line-height: 1.75; }
.story__quote footer { margin-top: 16px; color: var(--ink); font-size: 17px; font-weight: 900; }
.story__quote footer span { display: block; color: var(--muted); font-size: 14.5px; font-weight: 700; }

.story-videos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.story-video__media { position: relative; display: block; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 10; background: var(--ink); }
.story-video__media img { width: 100%; height: 100%; object-fit: cover; transition: filter .3s ease; }
.story-video__media:hover img { filter: brightness(.8); }
.story-video__play {
  position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 58px; height: 58px;
  border-radius: 50%; background: rgba(0, 0, 0, .65); color: var(--white); transition: background-color .2s ease;
}
.story-video__play svg { width: 26px; height: 26px; fill: currentColor; }
.story-video__media:hover .story-video__play { background: var(--youtube); }
.story-video h3 { margin-top: 10px; color: var(--ink); font-size: 16px; font-weight: 900; line-height: 1.3; }
.story-video p { color: var(--muted); font-size: 14px; line-height: 1.4; }


/* 7. Responsive --------------------------------------------------------- */
@media (max-width: 1180px) {
  .story-videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .sec-hero .page-hero__inner { gap: 24px; padding-bottom: 36px; }
  .split,
  .split--flip,
  .split--even,
  .split--three { grid-template-columns: 1fr; gap: 24px; }
  .split__media { order: 2; }
  .teaser { flex-direction: column; align-items: flex-start; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery > li, .gallery > li.gallery__wide { grid-column: auto; }
  .gallery__wide img { aspect-ratio: 640 / 530; }
}

@media (max-width: 640px) {
  .hero-badge { gap: 6px; padding: 5px 10px 5px 8px; font-size: 11.5px; letter-spacing: .03em; }
  .hero-brand img { height: 38px; }
  .teaser { padding: 22px 20px; }
  .gallery { gap: 12px; }
  .gallery h3 { font-size: 15px; }
  .story__quote { padding: 22px 20px 20px; }
  .story-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .story-video h3 { font-size: 15.5px; }
}
