/* JYT Projects — Recruitment Website */
:root {
  --c-primary: #361a0c;
  --c-primary-2: #43311f;
  --c-accent: #b08454;
  --c-bg: #ffffff;
  --c-bg-soft: #faf6f1;
  --c-bg-dark: #1d120a;
  --c-text: #222222;
  --c-text-soft: #555555;
  --c-border: #e7e1d9;
  --shadow-sm: 0 2px 6px rgba(54, 26, 12, .06);
  --shadow-md: 0 8px 28px rgba(54, 26, 12, .10);
  --radius: 12px;
  --radius-lg: 18px;
  --container: 1200px;
  --font-sans: 'Noto Sans Thai', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', 'Noto Sans JP', Georgia, serif;
}
body.lang-ja { font-family: 'Noto Sans JP', 'Noto Sans Thai', sans-serif; }
body.lang-en { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Thai', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-sans); font-weight: 700; color: var(--c-primary); margin: 0 0 .5em; line-height: 1.3; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-soft { background: var(--c-bg-soft); }
.section-dark { background: var(--c-bg-dark); color: #f5ede4; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark h5 { color: #fff; }
.section-dark a { color: #f5d8b6; }
.text-center { text-align: center; }
.eyebrow { display: inline-block; font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; color: var(--c-accent); font-weight: 600; margin-bottom: .8em; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 2px solid transparent; transition: all .2s; text-align: center;
  font-family: inherit;
}
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-2); border-color: var(--c-primary-2); color: #fff; }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary); border-color: #fff; }
.btn-light:hover { background: var(--c-bg-soft); }
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--c-primary); }
.brand img { height: 58px; width: auto; max-width: 160px; object-fit: contain; border-radius: 6px; }
.brand-text { width: 270px; flex-shrink: 0; }
.brand-text strong { display: block; font-size: .78rem; line-height: 1.25; letter-spacing: .02em; white-space: nowrap; }
.brand-text small { display: block; font-size: .7rem; color: var(--c-text-soft); }
/* ที่อยู่ + เบอร์โทรใต้ชื่อบริษัท: เรียงต่อกันในแนวตั้ง ขนาดฟอนต์เท่ากัน */
.brand-text .brand-addr { font-size: .62rem; line-height: 1.4; margin-top: 4px; }
.brand-text .brand-tel  { font-size: .62rem; line-height: 1.4; margin-top: 2px; }
.brand-text .brand-line { font-size: .62rem; line-height: 1.4; margin-top: 2px; }
.brand-text .brand-line .line-icon { display: inline-block; height: 1em; width: auto; vertical-align: -0.15em; margin-right: 4px; border-radius: 2px; }
.brand-text .brand-tel a { color: var(--c-text-soft); }
.brand-text .brand-tel a:hover { color: var(--c-primary); }
.primary-nav { display: flex; align-items: center; gap: 20px; }
.primary-nav a { color: var(--c-text); font-weight: 500; font-size: .95rem; position: relative; white-space: nowrap; }
.primary-nav a:not(.btn).active,
.primary-nav a:not(.btn):hover { color: var(--c-primary); }
.primary-nav a:not(.btn).active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--c-primary);
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-primary); margin: 5px 0; transition: all .2s; }

/* Language switcher */
.primary-nav .lang-switch { display: flex; flex-shrink: 0; gap: 0; border: 1px solid var(--c-border); border-radius: 999px; overflow: hidden; margin-left: 12px; }
.primary-nav .lang-switch a {
  flex-shrink: 0; white-space: nowrap;
  padding: 6px 12px; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--c-text-soft); background: #fff; transition: all .15s;
  border-right: 1px solid var(--c-border);
}
.primary-nav .lang-switch a:last-child { border-right: 0; }
.primary-nav .lang-switch a:hover { background: var(--c-bg-soft); color: var(--c-primary); }
.primary-nav .lang-switch a.active,
.primary-nav .lang-switch a:not(.btn).active { background: var(--c-primary); color: #fff; }
.primary-nav .lang-switch a.active:hover { background: var(--c-primary-2); color: #fff; }
.primary-nav .lang-switch a:not(.btn).active::after { display: none !important; content: none !important; }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--c-bg-soft) 0%, #f3e6d6 100%);
  padding: clamp(56px, 10vw, 120px) 0;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero-grid h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: .02em;
  margin-bottom: .6em;
}
.hero-grid p { color: var(--c-text-soft); font-size: 1.05rem; }
.hero-image { position: relative; }
.hero-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/3; object-fit: cover; }
.hero-image::after {
  content: ''; position: absolute; left: -16px; top: -16px;
  width: 100%; height: 100%; border: 2px solid var(--c-accent);
  border-radius: var(--radius-lg); z-index: -1;
}

/* Two-column generic */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.two-col img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.two-col.reverse > :first-child { order: 2; }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.card {
  background: #fff; border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3, .card h5 { color: var(--c-primary); margin-bottom: .6em; }
.card p { color: var(--c-text-soft); margin: 0; }
.card-num {
  display: inline-block; font-family: var(--font-serif); font-size: 2.2rem;
  color: var(--c-accent); font-weight: 700; line-height: 1; margin-bottom: 16px;
}

/* Image cards (activities, gallery) */
.image-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.image-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s; }
.image-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.image-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.image-card-body { padding: 20px 22px; }
.image-card-body h3 { font-size: 1.1rem; margin: 0 0 .4em; }

/* Audience pair (Home page) */
.audience-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.audience-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 40px 32px; box-shadow: var(--shadow-sm);
}
.audience-card h5 { color: var(--c-primary); font-size: 1.2rem; }
.audience-card p { color: var(--c-text-soft); }

/* Testimonial */
.testimonials { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.quote {
  background: #fff; padding: 36px 32px; border-radius: var(--radius-lg);
  border-left: 4px solid var(--c-accent); position: relative;
}
.quote h3 { font-size: 1.15rem; font-weight: 500; line-height: 1.6; color: var(--c-text); margin: 0 0 .8em; }
.quote-author { font-size: .9rem; color: var(--c-text-soft); }

/* Mission/Vision */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.mv-card {
  padding: 40px; border-radius: var(--radius-lg);
  background: #fff; border-top: 4px solid var(--c-primary);
}
.mv-card h4 { color: var(--c-primary); font-size: 1.4rem; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.team-card { text-align: center; }
.team-card img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; margin: 0 auto 20px; box-shadow: var(--shadow-md); }
.team-card h6 { font-size: 1.1rem; margin: 0 0 .3em; color: var(--c-primary); }
.team-card .role { color: var(--c-accent); font-size: .9rem; font-weight: 500; }

/* Steps (Services process) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.step {
  background: #fff; border-radius: var(--radius); padding: 32px 26px;
  border: 1px solid var(--c-border); position: relative;
}
.step-num { font-family: var(--font-serif); font-size: 2.5rem; color: var(--c-accent); font-weight: 700; line-height: 1; margin-bottom: 14px; }
.step h5 { color: var(--c-primary); margin-bottom: .5em; }
.step p { color: var(--c-text-soft); margin: 0; font-size: .95rem; }

/* Banner strip */
.banner-strip {
  background-size: cover; background-position: center;
  padding: clamp(64px, 10vw, 120px) 24px; color: #fff;
  position: relative; text-align: center;
}
.banner-strip::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(54,26,12,.78), rgba(29,18,10,.85));
}
.banner-strip > * { position: relative; }
.banner-strip h2 {
  color: #fff; font-family: var(--font-serif); font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  max-width: 880px; margin: 0 auto; line-height: 1.5;
}

/* CTA section */
.cta-final {
  background: var(--c-primary); color: #fff; text-align: center;
  padding: clamp(64px, 10vw, 110px) 24px;
}
.cta-final h2 { color: #fff; max-width: 800px; margin: 0 auto 24px; line-height: 1.4; }

/* Contact section */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-info h5 { font-size: 1.25rem; margin-bottom: .3em; }
.contact-info .info-block { margin-bottom: 28px; }
.contact-info .info-block h6 { color: var(--c-accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .4em; }
.contact-info .info-block p { color: var(--c-text-soft); margin: 0; line-height: 1.8; }

/* Form */
.form { background: #fff; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); border: 1px solid var(--c-border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; color: var(--c-primary); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--c-border); border-radius: 8px;
  font-family: inherit; font-size: 1rem; background: var(--c-bg-soft);
  transition: border-color .2s, background .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--c-primary); background: #fff;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-msg { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; font-size: .95rem; }
.form-msg.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.form-msg.error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* Footer */
.site-footer { background: var(--c-bg-dark); color: #d8c8b6; padding-top: 64px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { width: 60px; border-radius: 6px; margin-bottom: 16px; }
.footer-brand p { color: #b9a690; font-size: .92rem; line-height: 1.7; }
.site-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: .04em; }
.site-footer p, .site-footer li, .site-footer a { color: #b9a690; font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.footer-links, .social-list { list-style: none; padding: 0; margin: 0; }
.footer-links li, .social-list li { margin-bottom: 8px; }
.footer-bar { background: #120a05; padding: 18px 0; font-size: .85rem; color: #8c7a64; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .two-col, .audience-pair, .testimonials, .mv-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .two-col.reverse > :first-child { order: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--c-border);
    flex-direction: column; gap: 0; padding: 8px 0;
    max-height: 0; overflow: hidden; transition: max-height .25s;
  }
  .primary-nav.open { max-height: 500px; }
  .primary-nav a { padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--c-border); }
  .primary-nav a.btn { margin: 12px 24px; width: calc(100% - 48px); }
  .lang-switch { margin: 12px 24px; width: calc(100% - 48px); justify-content: center; }
  .primary-nav .lang-switch a { flex: 1 1 0; text-align: center; padding: 10px 0; border-bottom: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text strong { font-size: .72rem; }
  .brand-text small { font-size: .62rem; }
  .form { padding: 24px; }
}

/* ======================================================================
   v3 additions — dropdown nav, landing, stats, timeline, gallery, etc.
   ====================================================================== */

/* Dropdown navigation */
.nav-item.has-sub { position: relative; }
.nav-sub-toggle {
  background: none; border: 0; cursor: pointer; font-family: inherit;
  font-weight: 500; font-size: .95rem; color: var(--c-text);
  display: inline-flex; align-items: center; gap: 6px; padding: 0; line-height: 1.7;
  white-space: nowrap;
}
.nav-sub-toggle:hover,
.nav-item.has-sub.active > .nav-sub-toggle { color: var(--c-primary); }
.nav-sub-toggle .caret { font-size: .7em; transition: transform .2s; }
.nav-item.has-sub::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.nav-sub {
  position: absolute; top: 100%; left: 0; margin-top: 12px; min-width: 270px;
  background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 200;
}
.nav-item.has-sub:hover .nav-sub,
.nav-item.has-sub:focus-within .nav-sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-item.has-sub:hover .caret { transform: rotate(180deg); }
.nav-sub a { display: block; padding: 9px 14px; border-radius: 8px; font-size: .9rem; color: var(--c-text); white-space: nowrap; }
.nav-sub a:hover { background: var(--c-bg-soft); color: var(--c-primary); }
.nav-sub a.active { background: var(--c-bg-soft); color: var(--c-primary); font-weight: 600; }
.nav-sub a:not(.btn).active::after { display: none; }

/* Breadcrumbs: ลอยอยู่มุมบนซ้ายของ hero ทุกหน้า */
.site-main { position: relative; }
.breadcrumbs {
  position: absolute;
  top: 14px; left: 0; right: 0;
  z-index: 5;
  font-size: .85rem;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: var(--c-text-soft); }
.breadcrumbs li + li::before { content: '›'; color: var(--c-accent); font-weight: 600; }
.breadcrumbs a { color: var(--c-text-soft); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs li[aria-current="page"] span { color: var(--c-primary); font-weight: 600; }
@media (max-width: 640px) {
  .breadcrumbs { font-size: .78rem; top: 10px; }
}

/* Centered & simple page heros */
.hero-center { text-align: center; }
.hero-center h1 { font-family: var(--font-serif); }
.hero-lead { color: var(--c-text-soft); font-size: 1.1rem; max-width: 760px; margin: 0 auto; }
/* การ์ดผู้สมัคร/นายจ้าง เมื่ออยู่ในส่วน hero: เว้นระยะจากหัวข้อ และจัดข้อความชิดซ้าย */
.hero-center .hero-gateway { margin-top: 0; text-align: left; }
.page-hero {
  background: linear-gradient(120deg, var(--c-bg-soft) 0%, #f3e6d6 100%);
  padding: clamp(48px, 7vw, 88px) 0;
}
.page-hero h1 { font-family: var(--font-serif); }

/* Landing gateway cards */
.gateway-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.gateway-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 44px 36px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
/* กล่องรูปใช้สัดส่วนใกล้เคียงรูปหมู่แนวนอน เพื่อไม่ให้ครอบตัดหัวคนในรูป */
.gateway-card .gateway-img { width: 100%; height: auto; aspect-ratio: 11 / 6; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.gateway-card h2 { margin-bottom: 20px; }
.gateway-card .btn { margin-top: auto; align-self: flex-start; }
.gateway-card-dark { background: var(--c-bg-dark); color: #e8dccb; border-color: #2d1d10; }
.gateway-card-dark h2 { color: #fff; }
.gateway-card-dark .eyebrow { color: #e0b482; }
.gateway-card-dark .check-list li { color: #d8c8b6; }
.gateway-card-dark .check-list li::before { color: #e0b482; }

/* Check / numbered lists */
.check-list, .num-list { list-style: none; padding: 0; margin: 0 0 8px; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--c-text-soft); }
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--c-accent); font-weight: 700;
}
.check-list-lg li { font-size: 1.05rem; margin-bottom: 16px; }
.num-list { counter-reset: numl; }
.num-list li { position: relative; padding-left: 44px; margin-bottom: 16px; counter-increment: numl; font-weight: 500; }
.num-list li::before {
  content: counter(numl); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700;
}
.info-list-wrap { max-width: 820px; margin: 0 auto; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { text-align: center; padding: 16px; }
.stat-num { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; color: #f0c999; line-height: 1; margin-bottom: 14px; }
.section-dark .text-center h2 { white-space: nowrap; }
.stat-label { color: #d8c8b6; font-size: .92rem; line-height: 1.6; }

/* Video section */
.section-video { padding-top: 0; }
.video-wrapper { max-width: 960px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 48px rgba(0,0,0,.18); background: #000; }
.site-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* Timeline (process steps) */
.timeline { max-width: 820px; margin: 0 auto; position: relative; }
.timeline::before { content: ''; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px; background: var(--c-border); }
.timeline-item { position: relative; display: flex; gap: 24px; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-num {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-primary); color: #fff; font-family: var(--font-serif); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; position: relative; z-index: 1;
}
.timeline-body { padding-top: 4px; }
.timeline-body h5 { margin-bottom: .35em; }
.timeline-body p { color: var(--c-text-soft); margin: 0; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { padding: 12px 16px; font-size: .9rem; color: var(--c-text-soft); }
/* รูปแนวตั้ง 18jul03 — เลื่อนกรอบขึ้นด้านบน ไม่ให้หัวคนขาด */
.gallery-item img[src*="school-18jul03"] { object-position: center 22%; }

/* Institutions */
.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.inst-item {
  display: flex; align-items: center; gap: 14px; background: #fff; padding: 18px 22px;
  border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.inst-icon { font-size: 1.4rem; flex: 0 0 auto; }

/* Dispatch field tags */
.field-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; max-width: 1000px; margin: 0 auto; }
.field-tag {
  background: #fff; border-left: 4px solid var(--c-accent); border-radius: 8px;
  padding: 16px 20px; box-shadow: var(--shadow-sm); font-weight: 500;
}

/* Subsidiary card */
.subsidiary-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 44px; box-shadow: var(--shadow-sm); text-align: center; }
.subsidiary-label { color: var(--c-text-soft); margin-bottom: 20px; }
.subsidiary-link { display: inline-flex; flex-direction: column; align-items: center; gap: 16px; }
.subsidiary-link strong { font-size: 1.5rem; color: var(--c-primary); font-family: var(--font-serif); }
.subsidiary-link .subsidiary-logo { width: 120px; height: 120px; object-fit: contain; }

/* License certificates (about) */
.license-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 28px 0; }
.license-grid img { width: 220px; max-width: 100%; border: 1px solid var(--c-border); border-radius: 8px; box-shadow: var(--shadow-sm); background: #fff; }

/* Institutions with photos (edu) */
.inst-item-photo { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.inst-item-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.inst-item-photo .inst-name { padding: 14px 18px; font-weight: 500; }

/* School page */
.school-logo { width: 140px; height: 140px; object-fit: contain; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md); }

/* School hero — โลโก้ซ้าย + ข้อความขวา จัดชิดบนให้เท่ากับโลโก้ */
.school-hero-head { display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 40px); text-align: left; }
.school-hero-head .school-hero-logo { flex: 0 0 auto; }
.school-hero-head .school-hero-logo .school-logo { display: block; }
.school-hero-head .school-hero-text { flex: 1 1 auto; min-width: 0; }
.school-hero-head .school-hero-text .eyebrow { margin-bottom: .5em; }
.school-hero-head .school-hero-text h1 { margin-top: 0; }
.school-hero-head .school-hero-text .hero-lead { margin-left: 0; margin-right: 0; }
@media (max-width: 640px) {
  .school-hero-head { flex-direction: column; align-items: center; text-align: center; }
  .school-hero-head .school-hero-text .hero-lead { margin-left: auto; margin-right: auto; }
}

/* Language school — เนื้อหาสลับซ้าย/ขวา (อ้างอิง layout เว็บต้นฉบับ) */
.school-features .school-feature { margin-bottom: clamp(40px, 6vw, 72px); }
.school-features .school-feature:last-child { margin-bottom: 0; }
.school-feature-text p:first-child { margin-top: 0; }
.school-feature-media img { width: 100%; height: auto; }
.school-feature.no-media { display: block; }
.school-feature.no-media .school-feature-text { max-width: 820px; margin: 0 auto; }
@media (max-width: 900px) {
  .school-features .school-feature.reverse > :first-child { order: 0; }
}

/* Section photo (history) */
.section-photo { max-width: 640px; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }

/* Google Maps embed (company profile) */
.gmap-embed { width: 100%; height: 300px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* Profile table */
.profile-table { width: 100%; border-collapse: collapse; }
.profile-table th, .profile-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--c-border); vertical-align: top; font-size: .95rem; }
.profile-table th { color: var(--c-primary); font-weight: 600; width: 42%; }
.profile-table td { color: var(--c-text-soft); }

/* Prose blocks */
.prose { max-width: 900px; margin: 0 auto; }
.prose p { color: var(--c-text-soft); }
.prose h2 { margin-bottom: .8em; }

/* Footer 5 columns */
.footer-grid { grid-template-columns: 1.5fr 1.1fr 1.1fr 1.1fr 1fr; }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .gateway-pair, .stats-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 8px; }
  .field-tags { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Mobile nav dropdowns */
  .primary-nav.open { max-height: 85vh; overflow-y: auto; }
  .nav-item.has-sub { width: 100%; }
  .nav-sub-toggle { width: 100%; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--c-border); }
  .nav-sub {
    position: static; opacity: 1; visibility: visible; transform: none; margin: 0;
    box-shadow: none; border: 0; border-radius: 0; padding: 0; min-width: 0;
    max-height: 0; overflow: hidden; transition: max-height .25s; background: var(--c-bg-soft);
  }
  .nav-item.has-sub.open .nav-sub { max-height: 700px; }
  .nav-item.has-sub::after { display: none; }
  .nav-sub a { padding: 12px 40px; border-bottom: 1px solid var(--c-border); border-radius: 0; }
  .timeline-item { gap: 16px; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .inst-grid { grid-template-columns: 1fr; }
  .section-dark .text-center h2 { white-space: normal; }
}

/* ======================================================================
   v5 additions — แก้ไขตาม comments คุณ Ken (8 Jul 2026)
   ====================================================================== */

/* (ภาพ 1) ธงชาติไทย + ญี่ปุ่น ข้างปุ่มสลับภาษา */
.nav-flags { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-flags img {
  width: 30px; height: 20px; object-fit: cover;
  border-radius: 3px; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm);
}

/* (ภาพ 2) ข้อความ eyebrow ย้ายขึ้นไปท้าย hero + ฟอนต์ตัวเขียน */
.hero-tagline {
  font-family: 'Caveat', 'Playfair Display', cursive;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  color: var(--c-accent);
  text-align: center;
  margin-top: clamp(32px, 6vw, 56px);
  letter-spacing: .06em;
}

/* (ภาพ 3) ส่วนสรรหา (ประวัติ): ข้อความซ้าย รูปขวา */
.targeted-grid { align-items: center; }
.targeted-grid .targeted-photo img { width: 100%; max-width: none; }

/* (ภาพ 4) วิดีโอ + แผงรูป/คำรับรองด้านขวา */
.video-story { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; align-items: stretch; }
.video-story .video-wrapper { max-width: none; margin: 0; height: 100%; display: flex; }
.video-story .site-video { height: 100%; object-fit: cover; aspect-ratio: auto; }
.video-aside { display: flex; flex-direction: column; gap: 16px; }
.video-aside-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.video-aside-photos img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 10px; box-shadow: var(--shadow-sm);
}
.quote-aside { padding: 26px 24px 20px; border-radius: var(--radius); }
.quote-aside h3 { font-size: .98rem; margin-bottom: .6em; }
.quote-aside .quote-author { font-size: .8rem; }
.video-aside-cta { display: flex; align-items: center; gap: 16px; padding: 0 4px; }
.video-aside-cta p { margin: 0; flex: 1; font-weight: 600; color: var(--c-primary); line-height: 1.55; }
.video-aside-btns { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.video-aside-btns .btn { white-space: nowrap; }
.testimonials-single { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }

/* (ภาพ 5) เกี่ยวกับเรา: องค์กรในเครือ 2 แถว (โลโก้+ชื่อ | ใบอนุญาต) */
.subsidiary-card .org-row {
  display: grid; grid-template-columns: 300px 1fr; gap: 28px;
  align-items: center; padding: 32px 0 8px; text-align: center;
}
.subsidiary-card .org-row + .org-row { border-top: 1px solid var(--c-border); margin-top: 16px; padding-top: 36px; }
.org-ident { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.org-ident .org-logo { width: 130px; height: 130px; object-fit: contain; }
.org-name {
  font-weight: 600; font-size: 1.05rem; color: var(--c-primary);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--c-accent);
}
.org-name:hover { color: var(--c-accent); }
.org-certs { margin: 0; }

/* (ภาพ 7) สำหรับผู้หางาน: การ์ดบริการเรียงแนวตั้งซ้าย + รูปใหญ่ขวา */
.services-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.services-hero-grid h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: .02em; margin-bottom: .6em;
}
.svc-stack { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.svc-item {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow-sm);
}
.svc-item h5 { margin-bottom: .35em; }
.svc-item p { margin: 0; color: var(--c-text-soft); font-size: .95rem; }
.services-hero-image { position: sticky; top: 110px; }
.services-hero-image img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

/* (ภาพ 8) ระบบวีซ่า: รายการซ้าย + รูปโทริอิขวา / ไอคอนการ์ดประโยชน์ / แถวรูปกิจกรรม */
.visa-grid { align-items: center; }
.visa-grid .visa-photo img { width: 100%; max-width: none; }
.benefit-card .card-num { font-size: 1.5rem; margin-bottom: 10px; }
.benefit-icon { height: 46px; width: auto; display: block; margin: 0 auto 18px; }
.benefit-icon-flag {
  width: 68px; height: 45px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm);
}
.photo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.photo-strip img {
  width: min(300px, 100%); aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* (ภาพ 9) ประเภทของงาน: แถวเต็มความกว้าง รูปสลับซ้าย-ขวา */
.jobcat-row { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.jobcat-media { min-height: 360px; }
.jobcat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jobcat-row.reverse .jobcat-media { order: 2; }
.jobcat-body {
  background: var(--c-bg-soft);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(36px, 5vw, 84px);
}
.jobcat-row:nth-child(even) .jobcat-body { background: #f3ece1; }
.jobcat-body h3 { margin-bottom: .9em; }
.jobcat-body .check-list li:last-child { margin-bottom: 0; }

/* (ภาพ 10) คุณสมบัติ: การ์ด 2 คอลัมน์พร้อมรูป + รูปประกอบขั้นตอน */
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.qual-img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 8px; margin-bottom: 18px; background: #f4f0ea;
}
.qual-card .card-num { margin-bottom: 8px; }
.step-img {
  margin-top: 14px; width: min(300px, 100%);
  border-radius: 8px; border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm); background: #fff;
}

/* (ภาพ 12) กิจกรรมให้ความรู้: จัดข้อความกลาง + กันคำไทยตกบรรทัดแบบเสียรูป */
.inst-item-photo .inst-name { text-align: center; text-wrap: balance; }

/* Responsive — v5 */
@media (max-width: 900px) {
  .video-story { grid-template-columns: 1fr; }
  .video-story .site-video { aspect-ratio: 16 / 9; height: auto; }
  .services-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .services-hero-image { position: static; }
  .services-hero-image img { aspect-ratio: 4/3; }
  .subsidiary-card .org-row { grid-template-columns: 1fr; gap: 20px; }
  .jobcat-row { grid-template-columns: 1fr; }
  .jobcat-row.reverse .jobcat-media { order: 0; }
  .jobcat-media { min-height: 240px; }
  .jobcat-media img { aspect-ratio: 16/9; height: auto; }
}
@media (max-width: 700px) {
  .cards-2 { grid-template-columns: 1fr; }
  .video-aside-cta { flex-direction: column; align-items: flex-start; }
  .video-aside-btns { flex-direction: row; }
}

/* ============================================================
   v6 — comments คุณ Ken 10 Jul 2026
   ============================================================ */

/* (C01) หน้าหลัก: ขยับการ์ดผู้หางาน/นายจ้างขึ้นชิดด้านบน */
.hero.hero-center { padding: clamp(20px, 3.5vw, 40px) 0 clamp(48px, 8vw, 96px); }

/* (C03) ประวัติ: วิดีโอกว้างขึ้น + ข้อความรับรองใต้วิดีโอ + แถวรูป 4 รูป */
.video-wide { max-width: 1080px; }
.video-quote { max-width: 860px; margin: 32px auto 0; text-align: center; border-left: 0; border-top: 4px solid var(--c-accent); }
.video-photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.video-photo-grid img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 10px; box-shadow: var(--shadow-sm);
}

/* (C09) นายจ้าง: แบนเนอร์ JITCO กลางหน้า + ป้ายบริษัทคู่หัวข้อบทบาทหลัก */
.emp-banner { text-align: center; margin-bottom: 40px; }
.emp-banner img {
  max-width: 640px; width: 100%;
  margin-left: auto; margin-right: auto;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); background: #fff;
}
.emp-roles-head {
  display: block; text-align: center; margin-bottom: 40px;
}
.emp-roles-head h2 { margin: 0 0 24px; }
.emp-sign img {
  width: 100%; max-width: 420px; margin: 0 auto;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}

/* (C10) นายจ้าง: การ์ดคุณสมบัติ 5 กลุ่มแถวเดียว + รูปประกอบขนาดใหญ่ */
.cards-5 { grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cards-5 .card { padding: 24px 20px; }
.cards-5 .card h5 { font-size: .98rem; }
.cards-5 .check-list li { font-size: .88rem; }
.photo-strip-lg img { width: min(460px, 100%); }

/* (C11) ขั้นตอนรับผู้ฝึกงาน: รูปประกอบหลายรูปต่อขั้น */
.step-img-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.step-img-row .step-img { margin-top: 0; width: min(280px, 100%); }

/* Responsive — v6 */
@media (max-width: 1100px) {
  .cards-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .video-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .emp-roles-head { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .emp-sign img { max-width: 420px; }
}
@media (max-width: 640px) {
  .cards-5 { grid-template-columns: 1fr; }
  .step-img-row .step-img { width: 100%; }
}
