/* =====================================================================
   Computer Xperts — CSR page (css/csr.css)
   Loaded on csr.html after css/site.css and css/section.css.

   Contents
    1. Hero: three snapshots
    2. Shared: section spacing, caption pill
    3. Offices & team: photo wall, team photo
    4. Training & seminars: event tickets
    5. Celebrations & awards: laid out like an Instagram profile
    6. Annual dinners: timeline
    7. Training sessions & courses: course cards, seminars on tour
    8. Responsive: 1023px, 640px
   ===================================================================== */


/* 1. Hero: three snapshots (team, seminar, trophy) pinned at slight angles */
.csr-hero .snaps { position: relative; width: 100%; max-width: 540px; margin: 0 auto; aspect-ratio: 5 / 4; }
.snap {
  position: absolute; padding: 8px 8px 0; border-radius: 6px; background: var(--white);
  box-shadow: 0 26px 46px -24px rgba(0, 0, 0, .85);
}
.snap img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.snap__cap { padding: 8px 2px 9px; color: var(--ink); font-size: 14px; font-weight: 800; text-align: center; }
.snap--1 { left: 6%; top: 20%; z-index: 1; width: 84%; transform: rotate(-2deg); }
.snap--1 img { height: auto; aspect-ratio: 16 / 9; }
.snap--1 .snap__cap { padding-right: 10px; text-align: right; }   /* the trophy covers its lower left corner */
.snap--2 { right: 0; top: 0; z-index: 2; width: 40%; transform: rotate(6deg); }
.snap--2 img,
.snap--3 img { height: auto; aspect-ratio: 4 / 3; }
.snap--3 { left: 0; bottom: 0; z-index: 3; width: 42%; transform: rotate(-5deg); }


/* 2. Shared -------------------------------------------------------------- */
.csr-sec { scroll-margin-top: calc(var(--header-h) + 8px); }

/* photo caption pill */
.cap {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 11px; border-radius: 999px;
  background: rgba(15, 15, 15, .72); color: var(--white); font-size: 13px; font-weight: 700; line-height: 1.2;
  transition: background-color .25s ease;
}
a:hover > .cap { background: var(--red); }


/* 3. Offices & team ------------------------------------------------------ */
/* photo wall: the building large, one wide photo, the rest square-ish */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 172px; gap: 12px; }
.bento__tile--0 { grid-column: span 2; grid-row: span 2; }
.bento__tile--3 { grid-column: span 2; }
.bento a, .team-shot { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 14px; background: var(--line); }
.bento img, .team-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.bento__tile--0 img { object-position: center; }
.bento a:hover img, .team-shot:hover img { transform: scale(1.05); }

/* the whole team, with the text on a dark fade on the left */
.team-panel { position: relative; margin-top: 12px; }
.team-panel .team-shot { height: clamp(260px, 32vw, 420px); }
.team-panel .team-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 10, 10, .86) 0%, rgba(10, 10, 10, .55) 30%, rgba(10, 10, 10, 0) 55%);
}
.team-panel__copy { position: absolute; left: clamp(20px, 3.4vw, 44px); bottom: clamp(20px, 3.4vw, 40px); max-width: 360px; color: var(--white); pointer-events: none; }
.team-panel__title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.team-panel__text { margin-top: 10px; color: #e2e2e2; font-size: 16px; line-height: 1.5; }
.team-panel__facts { display: flex; gap: 10px; margin-top: 16px; }
.team-panel__facts li { padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); font-size: 14px; font-weight: 700; }
.team-panel__facts strong { margin-right: 4px; color: var(--red-on-dark); font-size: 22px; font-weight: 900; }


/* 4. Training & seminars: event tickets (cover photo, perforated edge, details, four more photos) */
/* (the photo, date line and thumbnail rules are shared with the dinner timeline, section 6) */
.tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ticket { overflow: hidden; border-radius: 18px; background: var(--white); box-shadow: 0 20px 40px -30px rgba(0, 0, 0, .5); }
.ticket__cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; }
.ticket__cover img,
.tl__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.ticket__cover:hover img,
.tl__cover:hover img { transform: scale(1.04); }
.ticket__year {
  position: absolute; left: 16px; top: 16px; padding: 6px 14px; border-radius: 10px;
  background: var(--alibaba); color: var(--ink); font-size: 22px; font-weight: 900; letter-spacing: -.01em;
}
.ticket__body { position: relative; padding: 26px 24px 24px; border-top: 2px dashed var(--line); }
.ticket__body::before,
.ticket__body::after {   /* the notches of the perforated edge */
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper);
}
.ticket__body::before { left: -12px; }
.ticket__body::after { right: -12px; }
.ticket__meta,
.tl__meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; font-weight: 700; }
.ticket__meta .ic { flex: none; width: 17px; height: 17px; color: var(--alibaba-text); }
.ticket__title { margin-top: 8px; font-size: 23px; font-weight: 900; line-height: 1.2; }
.ticket__title a { color: var(--ink); text-decoration: none; }
.ticket__title a:hover { color: var(--red-text); }
.ticket__sub { margin-top: 4px; color: var(--muted); font-size: 16px; }
.ticket__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.ticket__thumbs a,
.tl__thumb { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 8px; }
.ticket__thumbs img,
.tl__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ticket__thumbs a:hover img,
.tl__thumb:hover img { transform: scale(1.08); }
.ticket__more { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 10px; color: var(--red-text); font-weight: 800; text-decoration: none; }   /* 40px tall: easy to tap */
.ticket__more .ic { width: 17px; height: 17px; transition: transform .2s ease; }
.ticket__more:hover .ic { transform: translateX(4px); }


/* 5. Celebrations & awards: profile, story highlights and a photo feed, like Instagram ----------
      Instagram's colours only on the Instagram parts (ring, Follow, the last tile). */
.csr-dark { --ig: linear-gradient(45deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%); background: var(--ink); }
.csr-dark .section-title { color: var(--white); }
.csr-dark .sec-head { margin-right: auto; margin-left: auto; text-align: center; }
.csr-dark .sec-head p { color: #cfcfcf; }

.insta { max-width: 960px; margin: 0 auto; }
.ig { width: 20px; height: 20px; fill: currentColor; }

.insta__profile {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center;
  padding-bottom: 22px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.insta__avatar { display: block; width: 112px; height: 112px; padding: 4px; border-radius: 50%; background: var(--ig); }
.insta__avatar img {
  width: 100%; height: 100%; padding: 0 12px; border: 4px solid var(--ink); border-radius: 50%;
  background: var(--white); object-fit: contain;
}
.insta__handle { color: var(--white); font-size: 24px; font-weight: 800; }
.insta__name { margin-top: 2px; color: #bdbdbd; font-size: 15px; }
.insta__stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; color: #d6d6d6; font-size: 15.5px; }
.insta__stats b { color: var(--white); font-weight: 900; }
.insta__follow { gap: 9px; min-height: 46px; padding: 0 22px; border: 0; background: var(--ig); color: var(--white); }
.insta__follow:hover { filter: brightness(1.12); }

/* story highlights: round photos in Instagram's gradient ring */
.stories {
  display: flex; gap: 22px; padding: 22px 2px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 90px; color: #e8e8e8; font-size: 13px; font-weight: 700; text-decoration: none; }
.story__ring { display: block; width: 86px; height: 86px; padding: 3px; border-radius: 50%; background: var(--ig); transition: transform .25s ease; }
.story__ring img { width: 100%; height: 100%; border: 3px solid var(--ink); border-radius: 50%; object-fit: cover; }
.story__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story:hover .story__ring { transform: scale(1.06); }
.story:hover .story__label { color: var(--white); }

/* the feed: square photos; pointing at one shows which event it is from */
.feed { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 22px; }
.post { position: relative; display: block; overflow: hidden; aspect-ratio: 1; border-radius: 6px; background: var(--ink-2); color: var(--white); text-decoration: none; }
.post img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post__corner { position: absolute; top: 10px; right: 10px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.post__corner .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.post__over {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .3) 55%, rgba(0, 0, 0, 0) 80%);
  opacity: 0; transition: opacity .25s ease;
}
.post__over b { font-size: 15px; line-height: 1.25; }
.post__over span { display: inline-flex; align-items: center; gap: 6px; color: #dedede; font-size: 13px; font-weight: 700; }
.post__over .ic { width: 15px; height: 15px; }
.post:hover img, .post:focus-visible img { transform: scale(1.05); }
.post:hover .post__over, .post:focus-visible .post__over { opacity: 1; }
.post--more { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 12px; background: var(--ig); text-align: center; }
.post--more .ig { width: 42px; height: 42px; margin-bottom: 4px; }
.post--more b { font-size: 17px; }
.post--more span { font-size: 13.5px; opacity: .9; }
.post--more:hover { filter: brightness(1.12); }


/* 6. Annual dinners: a timeline, newest first; the cards alternate photo left / photo right */
.timeline { position: relative; display: grid; gap: 26px; }
.timeline::before { content: ""; position: absolute; left: 59px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.tl { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 26px; align-items: start; }
.tl__year {
  position: relative; display: grid; place-items: center; margin-top: 22px; padding: 12px 0; border-radius: 14px;
  background: var(--ink); color: var(--white); font-size: 30px; font-weight: 900; line-height: 1; letter-spacing: -.02em;
  box-shadow: 0 0 0 6px var(--white);
}
.tl__year small { display: block; margin-top: 4px; color: #cfcfcf; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tl__card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: var(--paper);
}
.tl:nth-child(even) .tl__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.tl:nth-child(even) .tl__cover { order: 2; }
.tl__cover { display: block; min-height: 100%; overflow: hidden; aspect-ratio: 4 / 3; }
.tl__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 24px 26px; }
.tl__meta .ic { flex: none; width: 17px; height: 17px; color: var(--red-text); }
.tl__title { margin-top: 8px; color: var(--ink); font-size: clamp(20px, 1.9vw, 24px); font-weight: 900; line-height: 1.2; }
.tl__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 18px; }
.tl__more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 0; border: 0; cursor: pointer;
  background: none; color: var(--red-text); font: 800 16px/1.3 var(--font);
}
.tl__more .ic { width: 18px; height: 18px; }
@media (pointer: coarse) { .tl__more { margin-top: 8px; padding: 10px 0; } }   /* easier to tap */
.tl__more:hover { color: var(--red-deep); text-decoration: underline; }
#dinners .teaser { margin-top: 32px; }

/* 7. Training sessions & courses: Xperts red on a warm pale band ----------- */
#trainings { background: linear-gradient(180deg, var(--white) 0%, #fff3f2 100%); }
.courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid #f3d9d7; border-top: 4px solid var(--red);
  border-radius: 14px; background: var(--white); box-shadow: 0 14px 30px -24px rgba(120, 10, 10, .45);
  transition: transform .25s ease, box-shadow .25s ease;
}
.course:hover { transform: translateY(-3px); box-shadow: 0 22px 36px -24px rgba(120, 10, 10, .55); }
.course__pic { position: relative; }
.course__pic img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.course__kind {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--red); color: var(--white); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.course__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 0; }
.course__title { font-size: 20px; line-height: 1.2; }
.course:hover .course__title { color: var(--red-text); }
.course__when, .course__by { display: flex; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.course__when .ic, .course__by .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--red); }
.course__points { display: grid; gap: 5px; font-size: 14.5px; line-height: 1.4; }
.course__points li { position: relative; padding-left: 16px; }
.course__points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--red); }
.course__by { margin: auto -20px 0; padding: 12px 20px 14px; background: #fff5f4; border-top: 1px solid #f6e1df; color: var(--ink-2); }

.tours__head { margin: 52px 0 18px; font-size: clamp(22px, 2.4vw, 28px); }
.tours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tour { overflow: hidden; border-radius: 14px; background: linear-gradient(160deg, #1d1d1d 0%, #3b0d10 100%); color: var(--white); }
.tour img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 3px solid var(--red); }
.tour__body { display: grid; gap: 8px; padding: 18px 20px 22px; }
.tour__body p { color: #d9d2d2; font-size: 14.5px; line-height: 1.5; }
.tour__body .tour__meta { display: flex; gap: 8px; color: #ffb3b3; font-size: 13px; font-weight: 700; }
.tour__meta .ic { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.tour__title { font-size: 18px; line-height: 1.25; }
#trainings .teaser { margin-top: 32px; }
.teaser__btns { display: flex; flex-wrap: wrap; gap: 10px; }


/* 8. Responsive ---------------------------------------------------------- */
@media (max-width: 1023px) {
  .tours, .courses { grid-template-columns: 1fr 1fr; }
  .csr-hero .snaps { max-width: 460px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .bento__tile--3 { grid-column: auto; }
  .bento__tile--7 { grid-column: span 2; }   /* fills the last row */
  .tickets { grid-template-columns: 1fr; }
  .tl__card, .tl:nth-child(even) .tl__card { grid-template-columns: 1fr; }
  .tl:nth-child(even) .tl__cover { order: 0; }
  .tl__cover { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .tours, .courses { grid-template-columns: 1fr; }
  .csr-hero .snaps { max-width: 360px; }
  .snap__cap { padding: 6px 2px 7px; font-size: 12px; }
  .bento { grid-auto-rows: 120px; gap: 8px; }
  .team-panel .team-shot::after { background: linear-gradient(0deg, rgba(10, 10, 10, .88) 0%, rgba(10, 10, 10, .4) 55%, rgba(10, 10, 10, 0) 80%); }
  .team-panel__text { display: none; }
  .ticket__thumbs { gap: 6px; }

  .insta__profile { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .insta__avatar { width: 80px; height: 80px; padding: 3px; }
  .insta__avatar img { padding: 0 8px; border-width: 3px; }
  .insta__handle { font-size: 20px; }
  .insta__stats { gap: 4px 14px; font-size: 14px; }
  .insta__follow { grid-column: 1 / -1; justify-content: center; }
  .stories { gap: 14px; }
  .story { width: 80px; font-size: 11.5px; }
  .story__ring { width: 68px; height: 68px; }
  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin-top: 16px; }
  .post { border-radius: 2px; }
  .post__corner { top: 6px; right: 6px; }
  .post__corner .ic { width: 16px; height: 16px; }
  .post--more .ig { width: 30px; height: 30px; }
  .post--more b { font-size: 13px; }
  .post--more span { display: none; }

  .timeline::before { display: none; }
  .tl { grid-template-columns: 1fr; gap: 0; }
  .tl__year { position: absolute; left: 12px; top: 12px; z-index: 1; margin: 0; padding: 8px 12px; font-size: 20px; box-shadow: none; }
  .tl__year small { font-size: 9.5px; }
  .tl__body { padding: 18px 18px 20px; }
}
