/* =============================================================
   ResumeCaptain - TH Overseas Resume Examples Hub
   (th-overseas-hub-styles.css)
   Layers on top of th-styles.css (hero shell, buttons, resume-doc
   template, related-link chips, final-cta are all reused as-is).
   This file adds: the enlarged hero Resume Template preview +
   decorative paper layers, trust-signal row, category filter
   chips, the popular carousel, the compact Resume Template
   preview card (used in the carousel + category grids), category
   banners, and the expand/collapse control.
   Load order: th-styles.css, then this file.
   ============================================================= */

/* ── Hero: enlarged featured Resume Template + decorative paper
   layers behind it + trust signals ─────────────────────────── */
.rc-oh-hero-featured-wrap {
  position: relative;
  width: 340px;
  height: 460px;
}
.rc-oh-hero-paper {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 440px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.rc-oh-hero-paper--1 { transform: rotate(-5deg) translate(-16px, 10px); opacity: .5; z-index: 1; }
.rc-oh-hero-paper--2 { transform: rotate(3deg) translate(12px, 6px); opacity: .7; z-index: 2; }

.rc-oh-hero-featured {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: block;
  width: 340px;
  height: 460px;
  text-decoration: none !important;
  transition: transform .15s;
}
.rc-oh-hero-featured:hover { transform: translateY(-3px); }
.rc-oh-hero-featured__badge {
  position: absolute;
  top: -13px;
  left: 18px;
  z-index: 4;
  background: var(--brand-dark);
  color: #fff !important;
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  white-space: nowrap;
}
.rc-oh-hero-featured__clip {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(0,0,0,.3);
}
.rc-oh-hero-featured__doc {
  border: none;
  box-shadow: none;
  padding: 28px 26px;
  font-size: .82rem;
}
.rc-oh-hero-featured__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--brand));
  pointer-events: none;
}
@media (max-width: 960px) {
  .rc-oh-hero-featured-wrap { display: none; }
}

.rc-oh-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 8px;
  margin-bottom: 28px;
}
.rc-oh-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  color: rgba(255,255,255,.85);
}
.rc-oh-trust-item strong { color: #fff; font-weight: 700; }

/* ── Category filter chips ─────────────────────────────────── */
.rc-oh-filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 0;
}
.rc-oh-filter-bar__label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text) !important;
  margin-bottom: 12px;
}
.rc-oh-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rc-oh-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text) !important;
  text-decoration: none !important;
  transition: border-color .12s, transform .12s;
}
.rc-oh-filter-chip:hover { border-color: var(--cat-text, var(--brand)); transform: translateY(-1px); }
.rc-oh-filter-chip__count { color: var(--text-3); font-weight: 500; }

/* ── Popular carousel ───────────────────────────────────────── */
.rc-oh-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}
.rc-oh-section__head {
  margin-bottom: 20px;
}
.rc-oh-section__note {
  font-size: .8rem;
  color: var(--text-3) !important;
  margin-top: -8px;
  margin-bottom: 20px !important;
}

.rc-oh-carousel-wrap {
  position: relative;
}
.rc-oh-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.rc-oh-carousel__item {
  flex: 0 0 260px;
  scroll-snap-align: start;
}
.rc-oh-carousel__arrows {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.rc-oh-carousel__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.rc-oh-carousel__arrow:hover { background: var(--brand-light); border-color: #FCDDD8; color: var(--brand); }

/* ── Resume Template preview card (used everywhere on this page:
   hero fan-out, popular carousel, category grids) ──────────────
   Genuine preview of the real per-job "Resume Template" section —
   same section-title labels and summary/skills content, not a
   decorative mockup. ─────────────────────────────────────────── */
.rc-oh-tmpl-card {
  display: block;
  background: var(--white);
  border: 1.5px solid #D1D5DB;
  border-radius: 6px;
  padding: 18px 18px 16px;
  text-decoration: none !important;
  font-family: "Georgia", "Times New Roman", serif;
  transition: box-shadow .15s, border-color .15s, transform .12s;
  height: 100%;
}
.rc-oh-tmpl-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
  transform: translateY(-2px);
}
.rc-oh-tmpl-card__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a1a1a;
}
.rc-oh-tmpl-card__title {
  font-family: system-ui, sans-serif;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.rc-oh-tmpl-card__title-th {
  font-family: system-ui, sans-serif;
  font-size: .74rem;
  color: var(--text-3);
  margin-top: 2px;
}
.rc-oh-tmpl-card__section { margin-bottom: 12px; }
.rc-oh-tmpl-card__section:last-of-type { margin-bottom: 10px; }

/* .paper always contains the FULL mini resume-doc (header, Summary, Skills,
   Work Experience) — one DOM block reused for both breakpoints, per Teal's
   mobile treatment, instead of two separate markups. On desktop, everything
   except Summary is hidden here — desktop keeps its existing look (Summary
   in the paper + a separate chips-based Skills section, .rc-oh-tmpl-card__
   section below). The mobile media query flips this: shows the full paper
   (header/Skills-as-text/Experience) scaled down as one sheet, and hides
   the desktop chips section instead — see .rc-oh-tmpl-card__section rule
   inside the media query. */
.rc-oh-tmpl-card__paper-wrap { margin-bottom: 12px; }
.rc-oh-tmpl-card__paper-header,
.rc-oh-tmpl-card__paper-extra { display: none; }
.rc-oh-tmpl-card__summary {
  font-size: .76rem;
  line-height: 1.55;
  color: #333;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-oh-tmpl-card__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
}
/* .rc-th-hero-doc__pill (shared with the hero mockup) sets white-space:nowrap
   with no width cap — fine in its original wide context, but as a flex item
   here a long skill phrase (e.g. "Cultural & Heritage Tour Leading") won't
   shrink below its own content width by default (flex items start with
   min-width:auto) and overflows the card into its neighbour. min-width:0
   lets it actually shrink; max-width+ellipsis then truncates instead of
   spilling. Scoped to this card only — doesn't touch the pill elsewhere. */
.rc-oh-tmpl-card__skills .rc-th-hero-doc__pill {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-oh-tmpl-card__cta {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand);
}

/* ── Category sections ──────────────────────────────────────── */
.rc-oh-category {
  margin-bottom: 56px;
  scroll-margin-top: 24px;
}
.rc-oh-category:last-child { margin-bottom: 0; }
/* Large gradient banner (Teal-style) — ONE shared brand-color gradient for
   every category (no more per-category variants). All three banner tokens
   are declared right here, in this single rule, so a future color change
   only ever needs to happen in this one place.

   Deliberately a RADIAL gradient anchored at the top-left corner, not a
   diagonal linear-gradient with percentage stops. A percentage-stop linear
   gradient's safe zone shrinks as a *fraction* of container width — the
   math (verified): fraction = (x+y)/(W+H) for a fixed-size text block at
   pixel offset (x,y), so the same text block that's safely within the dark
   zone on a full-width 1232px banner falls into the fading zone on a
   narrower ~700px desktop/tablet banner. A radial gradient's hold radius is
   an absolute pixel distance from the corner, independent of banner width,
   so this can't happen. Hold radius (760px) is verified with margin over
   the worst-case text-block corner distance (~617px, see contrast-check
   script) — text is guaranteed to sit on solid --rc-oh-banner-dark at any
   banner width. */
.rc-oh-category__banner {
  --rc-oh-banner-dark:  #ed4e34; /* exact brand color — no darkening allowed. White text on this
                                     is 3.66:1: passes AA for h2 (large/bold, needs 3:1) but not for
                                     label-th/intro (normal text, needs 4.5:1) — accepted tradeoff to
                                     keep the brand color exact rather than darkening the background. */
  --rc-oh-banner-light: var(--brand-light); /* #FFF4F2 — existing site-wide light tint of #ed4e34 */
  --rc-oh-banner-text:  #ffffff;
  border-radius: 20px;
  padding: 40px 44px;
  margin-bottom: 24px;
  background: radial-gradient(circle farthest-corner at top left, var(--rc-oh-banner-dark) 0px, var(--rc-oh-banner-dark) 760px, var(--rc-oh-banner-light) 100%);
}
.rc-oh-category__banner h2 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--rc-oh-banner-text);
  max-width: 560px;
  text-wrap: balance;
}
.rc-oh-category__label-th {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--rc-oh-banner-text);
  margin-bottom: 16px;
}
.rc-oh-category__banner .rc-oh-category__intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rc-oh-banner-text);
  max-width: 540px;
  margin: 0;
}

/* Per-category accent — used only by the filter chips' hover border (kept
   distinct per category since the chips weren't part of this redesign). */
.rc-oh-cat--hospitality      { --cat-text: #ed4e34; }
.rc-oh-cat--wellness         { --cat-text: #0D9488; }
.rc-oh-cat--maritime         { --cat-text: #2563EB; }
.rc-oh-cat--sport-wellness   { --cat-text: #16A34A; }
.rc-oh-cat--aviation         { --cat-text: #7C3AED; }
.rc-oh-cat--tourism          { --cat-text: #B45309; }
.rc-oh-cat--healthcare-aged-care  { --cat-text: #DB2777; }
.rc-oh-cat--warehouse-mining      { --cat-text: #EA580C; }
.rc-oh-cat--cleaning-housekeeping { --cat-text: #0891B2; }
.rc-oh-cat--farm-working-holiday  { --cat-text: #65A30D; }
.rc-oh-cat--childcare             { --cat-text: #C026D3; }
.rc-oh-cat--it-technology         { --cat-text: #4F46E5; }

/* Domestic hub categories (18) — reuses this same file/selector pattern.
   `hospitality` above already covers the domestic Hospitality category
   (same sanitize_title() key), so it's intentionally not repeated here. */
.rc-oh-cat--marketing-creative        { --cat-text: #E11D48; }
.rc-oh-cat--sales-retail              { --cat-text: #F59E0B; }
.rc-oh-cat--administrative-hr         { --cat-text: #6366F1; }
.rc-oh-cat--finance-accounting        { --cat-text: #059669; }
.rc-oh-cat--engineering-manufacturing { --cat-text: #475569; }
.rc-oh-cat--technology                { --cat-text: #0284C7; }
.rc-oh-cat--logistics-supply-chain    { --cat-text: #D97706; }
.rc-oh-cat--education                 { --cat-text: #9333EA; }
.rc-oh-cat--healthcare                { --cat-text: #DC2626; }
.rc-oh-cat--construction-architecture { --cat-text: #92400E; }
.rc-oh-cat--customer-service          { --cat-text: #06B6D4; }
.rc-oh-cat--general-entry-level       { --cat-text: #15803D; }
.rc-oh-cat--banking-finance           { --cat-text: #0F766E; }
.rc-oh-cat--beauty-wellness           { --cat-text: #EC4899; }
.rc-oh-cat--government-public-sector  { --cat-text: #1E293B; }
.rc-oh-cat--legal                     { --cat-text: #1D4ED8; }
.rc-oh-cat--manufacturing-trades      { --cat-text: #78350F; }

.rc-oh-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.rc-oh-job-grid--extra {
  display: none;
  margin-top: 16px;
}
.rc-oh-job-grid--extra.is-expanded {
  display: grid;
}
.rc-oh-expand-btn {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  padding: 0;
}
.rc-oh-expand-btn:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .rc-oh-section { padding: 32px 16px; }
  .rc-oh-filter-bar { padding: 24px 16px 0; }
  .rc-oh-job-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rc-oh-carousel__item { flex-basis: 220px; }
  .rc-oh-tmpl-card { padding: 14px 14px 12px; }
  .rc-oh-tmpl-card__title { font-size: .8rem; }
  .rc-oh-category__banner { padding: 24px 22px; border-radius: 16px; }
  .rc-oh-category__banner h2 { font-size: 1.4rem; }
  .rc-oh-category__label-th { font-size: .85rem; margin-bottom: 12px; }
  .rc-oh-category__banner .rc-oh-category__intro { font-size: .92rem; }

  /* Resume Template preview cards, Teal-style: the "paper" is the FULL mini
     resume-doc (name/contact header, Summary, Skills-as-text, Work
     Experience with bullets) shrunk as ONE sheet via transform:scale() —
     like viewing the real document from a distance, not a font-size-by-
     font-size shrink of an isolated paragraph. The card header (H3 + Thai
     title) and the "ดู Resume Template ฉบับเต็ม" link stay outside .paper,
     at full readable/tappable size. The desktop chips-based Skills section
     is hidden here — Skills now lives inside the paper as a text line,
     matching how the real per-job page's Resume Template renders it.

     .paper is ABSOLUTELY POSITIONED inside .paper-wrap (not a flex child) —
     see the CSS-file-level comment above .rc-oh-tmpl-card__paper-wrap for
     why: transform doesn't change layout size, so an in-flow scaled child
     reserves its unscaled box and produces stray gaps/bands. Absolute
     positioning removes it from flow entirely, so there's nothing to
     mismatch.

     Numbers (verified with a line-budget script, not eyeballed): pre-scale
     paper 230×300px at scale .5 → visual 115×150px. Wrapper height 125px
     means the crop line lands ~230px into the pre-scale content — right
     after the "Work Experience" job line, before the bullets fully show —
     an intentional, legible crop point, not a mid-word cut a few pixels in.
     Horizontal: 138.5px card content width (2-up @375px, see grid rule
     above) − 115px paper = ~12px grey margin each side. */
  .rc-oh-tmpl-card__paper-wrap {
    position: relative;
    background: var(--bg);
    border-radius: 8px;
    height: 125px;
    overflow: hidden;
  }
  .rc-oh-tmpl-card__paper {
    position: absolute;
    top: 10px;
    left: 50%;
    margin-left: -115px; /* half of width (230px) — centers the UNSCALED box; */
    width: 230px;          /* transform-origin:top center then scales it down */
    height: 300px;         /* from that already-centered position, so the      */
    background: var(--white); /* rendered result stays centered too.          */
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 9px;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
    overflow: hidden;
    transform: scale(.5);
    transform-origin: top center;
  }
  .rc-oh-tmpl-card__paper-header,
  .rc-oh-tmpl-card__paper-extra { display: block; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__header {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__name { font-size: .78rem; margin-bottom: 2px; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__contact { font-size: .56rem; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__section { margin-bottom: 9px; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__section-title {
    font-size: .54rem;
    margin-bottom: 4px;
    padding-bottom: 2px;
  }
  .rc-oh-tmpl-card__paper .rc-oh-tmpl-card__summary {
    font-size: .68rem;
    -webkit-line-clamp: 4;
  }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__skills-grid { font-size: .64rem; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__job-header { margin-bottom: 3px; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__job-header strong { font-size: .64rem; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__job-header span { font-size: .5rem; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__bullets { padding-left: 12px; }
  .rc-oh-tmpl-card__paper .rc-th-rdoc__bullets li { font-size: .6rem; margin-bottom: 2px; }

  /* Desktop's separate chips-based Skills section is redundant on mobile —
     Skills now renders inside .paper as part of the full mini document. */
  .rc-oh-tmpl-card__section { display: none; }

  .rc-oh-tmpl-card__cta { font-size: .72rem; }
}
