/* ==========================================================
   SSS&P Engineering Supply Co., Ltd. - main stylesheet
   Structure/spacing pattern started from the CMS base built for testklean/ (not a strict clone —
   palette/type/section treatments below are matched directly against the real bioscience.in.th
   homepage: black header + black feature/video bands, warm cream content sections, orange accent
   headings, Poppins/Kanit type).
   ========================================================== */

:root {
  --accent: #f07a00;
  --accent-dark: #c76300;
  --olive: #1a1a1a;
  --header-footer-bg: #000000;
  --dark-band: #000000;
  --tan: #fcebe0;
  --beige: #fdf6f0;
  --text-dark: #444444;
  --text-muted: #000000;
  --bg-light: #fdf6f0;
  --border-soft: #ecd9c9;
  --radius: 8px;
  --max-width: 1180px;
  --font-heading: 'Poppins', 'Kanit', 'Segoe UI', sans-serif;
  --font-body: 'Poppins', 'Kanit', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden; /* กัน scroll แนวนอนจากเทคนิค full-bleed (.band-tan ใช้ 100vw ซึ่งกว้างกว่าพื้นที่จริงเท่าความกว้าง scrollbar) */
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--olive);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  border: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn.btn-outline:hover { background: #fff; color: var(--accent-dark); }

/* Orange brand-name heading, e.g. the "SSS&P Engineering Supply Co., Ltd." heading on the
   homepage "Who We Are" intro — matches the real site's orange H3 treatment for that heading */
.heading-accent { color: var(--accent) !important; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Header ----------
   Solid black header (matches the real logo, which is a white/orange wordmark meant for a dark
   background) instead of testklean's light "tan" header. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-footer-bg);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}
.logo img { height: 64px; width: auto; display: block; }

/* Only the top-level menu bar is a horizontal flex row — must NOT match the nested .dropdown
   <ul> (and its category-group <ul>s) below, or the popup menus render sideways instead of
   stacked vertically. */
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav li.has-dropdown > a { display: flex; align-items: center; }
.main-nav > ul > li > a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #fff;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  border-color: var(--accent);
  color: #fdd9ae;
}

/* ---------- Nav dropdowns (About / Projects) ---------- */
.main-nav li.has-dropdown { position: relative; }
.main-nav .dropdown-caret { font-size: .65em; margin-left: 4px; opacity: .7; }
.main-nav .dropdown {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 18px 36px rgba(22,50,79,.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 50;
}
.main-nav li.has-dropdown:hover > .dropdown,
.main-nav li.has-dropdown:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.main-nav .dropdown li { border: none; }
.main-nav .dropdown a {
  display: block;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--text-dark);
  border-bottom: none;
  white-space: nowrap;
}
.main-nav .dropdown a:hover { background: var(--bg-light); color: var(--accent-dark); }
.main-nav .dropdown-group-label {
  display: block;
  padding: 6px 22px 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 700;
}
.main-nav .dropdown-group + .dropdown-group { margin-top: 6px; border-top: 1px solid var(--border-soft); padding-top: 6px; }

.nav-lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  opacity: .7;
}
.nav-lang-switch a { color: #fff; border: none; padding: 0; opacity: .6; }
.nav-lang-switch a.active { opacity: 1; font-weight: 700; }
@media (max-width: 860px) { .nav-lang-switch { padding: 14px 0; } }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--header-footer-bg);
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .main-nav li { border-bottom: 1px solid rgba(255,255,255,.12); }
  .main-nav a { display: block; padding: 14px 0; }
  .nav-toggle { display: block; }

  /* On mobile the dropdown becomes a tap-to-expand accordion (see assets/js/main.js) instead of hover */
  .main-nav .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
  }
  .main-nav li.has-dropdown.open > .dropdown { max-height: 600px; }
  .main-nav .dropdown a { padding: 10px 0; color: #fff; opacity: .85; }
  .main-nav .dropdown-group-label { padding: 8px 0 2px; color: #ffffff; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-color: #0d3b45;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,30,35,.35) 0%, rgba(10,30,35,.65) 100%);
}
.hero.hero-plain::after { display: none; }
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 900px; }
.hero-content h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #fff;
}
.hero-content p { font-size: 1.05rem; color: #ffffff; }
.hero.hero-sm { min-height: 260px; }
/* มือถือ: ภาพหัวเรื่อง (hero-sm ของ About/Projects/Contact) ให้กว้างเต็มจอเสมออยู่แล้ว (section เต็มความ
   กว้างจอ ไม่มี padding ซ้าย-ขวา) แต่ความสูงเดิม fixed 260px ทุกขนาดจอทำให้จอแคบๆ ดูสัดส่วนแปลก - เปลี่ยน
   เป็นคำนวณความสูงตามสัดส่วนความกว้างจอแทน (aspect-ratio) ให้สัดส่วนภาพสมส่วนกับทุกขนาดหน้าจอมือถือ */
@media (max-width: 860px) {
  .hero.hero-sm { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
  .hero.hero-sm { aspect-ratio: 4 / 3; }
}

.hero-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}
.hero-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-dark);
  box-shadow: 0 4px 14px rgba(50,68,18,.1);
}
.hero-icon img {
  width: 22px; height: 22px; object-fit: contain;
  flex-shrink: 0;
}

/* ---------- Project category filter pills (Projects listing) ---------- */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}
.category-filter-pill {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.category-filter-pill:hover { border-color: var(--accent); color: var(--accent-dark); }
.category-filter-pill.active { background: var(--olive); border-color: var(--olive); color: #fff; }

/* ---------- Alternating text/image blocks ---------- */
.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}
.split-block-reverse .split-block-text { order: 2; }
.split-block-text p { color: var(--text-muted); }
.split-block-img img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.split-block-wide-img { margin-bottom: 40px; }
.split-block-wide-img img { width: 100%; border-radius: var(--radius); object-fit: cover; }
@media (max-width: 860px) {
  .split-block { grid-template-columns: 1fr; }
  .split-block-reverse .split-block-text { order: 0; }
}

/* Stat badge stack - homepage "Who We Are" right column (matches the real site: a stack of
   icon+label cards, alternating peach/white background, not a photo) */
.stat-badge-list { display: flex; flex-direction: column; gap: 18px; }
.stat-badge {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(26,26,26,.06);
}
.stat-badge.stat-badge-accent { background: rgba(240,122,0,.16); box-shadow: none; }
.stat-badge-icon {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--bg-light);
}
.stat-badge-icon.stat-badge-icon-dark { background: var(--olive); }
.stat-badge-icon img { width: 78%; height: 78%; object-fit: contain; }
.stat-badge-icon-text { font-family: var(--font-heading); font-weight: 700; line-height: 1.05; text-align: center; }
.stat-badge-icon-dark .stat-badge-icon-text { color: #fff; }
.stat-badge-icon:not(.stat-badge-icon-dark) .stat-badge-icon-text { color: var(--accent); }
.stat-badge-icon-text .num { display: block; font-size: 1.3rem; }
.stat-badge-icon-text .unit { display: block; font-size: .55rem; letter-spacing: .05em; opacity: .85; }
.stat-badge-label { font-weight: 700; font-size: 1.05rem; color: var(--olive); line-height: 1.35; }

.amenities-intro { text-align: center; max-width: 680px; margin: 0 auto 8px; }
.amenities-intro p { color: var(--text-muted); }

.amenities-section h3 { margin-top: 28px; }
.amenities-section h3:first-child { margin-top: 0; }
.amenities-section p { color: #4a3d2e; max-width: 780px; margin-bottom: 14px; }
.amenities-section strong { color: var(--olive); }

.projects-grid-heading { text-align: center; margin-bottom: 40px; }

/* ---------- Concept / Location pages ---------- */
.location-map-img { margin: 32px 0 0; }
.location-map-img img { width: 100%; max-width: 900px; border-radius: var(--radius); }
/* Small label above a headline (e.g. "Our History" before "A story built on growth") - the
   ACCENT ORANGE belongs on the big headline that follows, not this label (matches the mockups:
   plain bold dark label, then an orange h2) */
.split-block-subheading, .content-block .split-block-subheading { color: var(--olive); font-weight: 700; margin-top: -12px; }
.content-block .info-panel > h2,
.content-block .band-tan .band-inner > h2,
.content-block .vm-col > h2 { color: var(--accent); }
/* History paragraphs should fill the full content width (not the narrow 720px column that
   .content-block p uses elsewhere) - only targets paragraphs directly in .info-panel, not the
   narrower ones nested inside .media-text/.info-subcard/.vm-item */
.content-block .info-panel > p { max-width: none; }
.split-block-tight .split-block-text h3 { font-size: 1.1rem; margin-top: 22px; }
.split-block-tight .split-block-text h3:first-child { margin-top: 0; }
.split-block-tight .split-block-text p { font-size: .92rem; margin-bottom: 0; }
.section-tan .split-block-img img { border-radius: var(--radius); }

.transit-badges { display: flex; gap: 10px; margin: 16px 0 32px; }
.transit-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border-soft);
  font-size: .72rem; font-weight: 700; color: var(--olive);
}
.transit-badge-bts { color: var(--accent); }

.split-block-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .split-block-3col { grid-template-columns: 1fr; } }
.col3-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.col3-item h3 { font-size: 1.1rem; }
.col3-item p { color: var(--text-muted); font-size: .9rem; }

/* ---------- Decorative content cards (About pages + homepage "What We Do") ----------
   Real site content here is text-only (no photos), so these divs are what carry the visual
   design instead: numbered accent badges, cards with a top/left accent border, soft shadows. */
.icon-badge {
  display: flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: rgba(240,122,0,.12); color: var(--accent);
  font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem;
  margin: 0 auto 16px; flex-shrink: 0;
}
.icon-badge svg { width: 44px; height: 44px; }
.service-card { text-align: center; }
.service-card .service-tags { justify-content: center; }

/* Service cards - homepage "What We Do" + About > What We Do */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .service-grid { grid-template-columns: 1fr; } }
.service-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(26,26,26,.05);
  padding: 28px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(26,26,26,.1); }
.service-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: 16px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tag {
  font-size: .72rem; font-weight: 600; color: var(--accent-dark);
  background: rgba(240,122,0,.1); padding: 4px 12px; border-radius: 999px;
}

/* Info panels - About > Who We Are (History / Vision / Mission) */
/* Plain content section (no card box) - matches the reference mockup, which runs History/
   Vision/Mission as flowing text directly on the page background, not boxed cards */
.info-panel {
  margin-bottom: 64px;
}
.info-panel:last-child { margin-bottom: 0; }
.info-panel > *:first-child { margin-top: 0; }
.info-panel .split-block-subheading { margin-top: -8px; }
.info-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}
@media (max-width: 860px) { .info-subgrid { grid-template-columns: 1fr; } }
.info-subcard { background: var(--bg-light); border-radius: var(--radius); padding: 22px 20px; }
.info-subcard h3 { color: var(--accent-dark); font-size: 1rem; margin-top: 0; }
.info-subcard p { color: var(--text-muted); font-size: .88rem; margin-bottom: 0; }

/* Team group cards - About > Corporate Management */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 32px 20px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.team-card:hover { box-shadow: 0 14px 28px rgba(26,26,26,.08); transform: translateY(-4px); }
.team-card .icon-badge { margin-left: auto; margin-right: auto; }
.team-card h3 { font-size: 1rem; margin-bottom: 8px; }
.team-card p { color: var(--text-muted); font-size: .85rem; margin: 0; }

/* Timeline - About > Who We Are "Our Journey" milestones */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 980px) { .timeline-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .timeline-grid { grid-template-columns: repeat(2, 1fr); } }
/* display:flex + order lets the photo sit BELOW the year/title/description (as in the
   reference mockup - a small logo mark up top, text in the middle, photo at the bottom)
   without needing to reorder the underlying HTML/DB content */
.timeline-item { display: flex; flex-direction: column; text-align: center; position: relative; padding-top: 20px; }
.timeline-item::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.timeline-item .timeline-year { order: 1; font-family: var(--font-heading); font-weight: 700; color: var(--accent); font-size: 1.3rem; margin: 10px 0 4px; }
.timeline-item h3 { order: 2; font-size: .92rem; margin: 0 0 8px; }
.timeline-item p { order: 3; color: var(--text-muted); font-size: .82rem; margin-bottom: 12px; }
.timeline-item img { order: 4; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; margin: 0; }

/* Vision / Mission - plain 2-column text (no card boxes), matches the reference mockup */
.vm-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 12px;
}
@media (max-width: 780px) { .vm-columns { grid-template-columns: 1fr; gap: 32px; } }
.vm-col > .split-block-subheading { margin-top: 0; text-align: center; }
.vm-col > h2 { margin-top: 0; text-align: center; }
.vm-item { margin-top: 22px; }
.vm-item:first-of-type { margin-top: 24px; }
.vm-item h3 { font-size: 1rem; margin-bottom: 6px; }
.vm-item p { color: var(--text-muted); font-size: .9rem; margin-bottom: 0; }

/* Core Values ("SSS&P" values band) - solid black section, 4 cards, last one accent-filled */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 780px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .values-grid { grid-template-columns: 1fr; } }
.value-card {
  background: var(--tan);
  border-radius: var(--radius);
  padding: 32px 22px;
  text-align: center;
}
.value-card .value-letter { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 2.4rem; color: var(--olive); margin-bottom: 14px; }
.value-card h3 { font-size: 1rem; margin-bottom: 10px; color: var(--olive); }
.value-card p { font-size: .85rem; color: #6b5a4e; margin: 0; }
.value-card.value-card-accent { background: var(--accent); }
.value-card.value-card-accent .value-letter,
.value-card.value-card-accent h3 { color: #fff; }
.value-card.value-card-accent p { color: rgba(255,255,255,.9); }

/* Corporate Culture band (FAIR / CARE / CARE) - solid black section, 3 columns of badge+text rows */
.culture-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 28px;
}
@media (max-width: 780px) { .culture-columns { grid-template-columns: 1fr; } }
.culture-col .culture-col-label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; margin-bottom: 2px; }
.culture-col .culture-col-word { font-family: var(--font-heading); font-weight: 700; font-size: 1.6rem; color: var(--accent); margin-bottom: 20px; }
.culture-item { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.culture-badge {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: .95rem; color: #fff;
  background: var(--accent);
}
.culture-item:nth-child(even) .culture-badge { background: var(--olive); border: 1px solid rgba(255,255,255,.25); }
.culture-item h4 { color: #fff; font-size: .95rem; margin: 4px 0 4px; }
.culture-item p { color: #ffffff; font-size: .82rem; margin: 0; }

/* Staff / team member cards - About > Corporate Management (photo + title ribbon + experience bar + qualification) */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 24px;
}
@media (max-width: 900px) { .staff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .staff-grid { grid-template-columns: 1fr; } }
.staff-card { background: var(--tan); border-radius: var(--radius); overflow: hidden; }
.staff-card .staff-photo { aspect-ratio: 1/1; overflow: hidden; background: #e4d5c8; }
.staff-card .staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-card .staff-name { text-align: center; font-weight: 700; padding: 14px 10px 10px; font-size: .98rem; }
.staff-card .staff-title { background: var(--accent); color: #fff; text-align: center; font-weight: 600; font-size: .85rem; padding: 8px 10px; }
.staff-card .staff-exp { background: var(--accent-dark); color: #fff; text-align: center; font-weight: 700; font-size: .85rem; padding: 8px 10px; }
.staff-card .staff-qual { padding: 14px 16px 20px; }
.staff-card .staff-qual-label { color: var(--accent-dark); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.staff-card .staff-qual p { font-size: .78rem; color: #4a3d2e; margin: 0 0 8px; line-height: 1.5; }
.staff-group-label { color: var(--accent); font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 48px 0 4px; }
.staff-group-label:first-of-type { margin-top: 8px; }

/* Contact page - icon list + office blocks (left column) */
.contact-icon-list { list-style: none; margin: 0 0 32px; padding: 0; }
.contact-icon-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .95rem; }
.contact-icon-list .icon-sm { color: var(--accent); flex-shrink: 0; }
.office-block { margin-bottom: 56px; }
.office-block .office-icon { display: block; color: var(--olive); margin-bottom: 18px; }
.office-block h3 { color: var(--accent); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 12px; }
.office-block p { color: var(--text-muted); font-size: 1.05rem; margin: 0; max-width: 380px; }
.office-block:last-child { margin-bottom: 0; }
/* Contact Us intro (heading/text/icon-list) paired with the logo image on the same row */
.contact-intro-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .contact-intro-row { grid-template-columns: 1fr; } }
.contact-logo-block { text-align: center; margin-bottom: 0; }
.contact-logo-block img { max-width: 320px; margin: 0 auto; width: 100%; border-radius: var(--radius); }

/* Each office block sits beside its own map, vertically centered against it */
.contact-office-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 40px;
}
.contact-office-row:last-child { margin-bottom: 0; }
.contact-office-row .office-block { margin-bottom: 0; }
@media (max-width: 800px) { .contact-office-row { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.bg-light { background: var(--bg-light); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--text-muted); }

/* Beige strip - feature icons row (under the hero image) */
.section-beige { background: var(--beige); padding: 40px 0; }

/* Warm cream content band - matches the real site's "Who We Are" / "What We Do" sections */
.section-tan { background: var(--tan); }
.section-tan .section-head p { color: #6b5a4e; }
.section-tan .eyebrow { color: var(--accent); }
.section-tan .content-block h2 { border-bottom-color: rgba(26,26,26,.1); }
.section-tan .content-block p,
.section-tan .content-block ul,
.section-tan .content-block ol { color: #6b5a4e; }

/* Solid black band - Featured Projects / closing video CTA, matches the real site exactly */
.section-olive { background: var(--dark-band); color: #fff; }
.section-olive .section-head h2 { color: var(--accent); }
.section-olive .section-head p { color: #ffffff; }
.section-olive .eyebrow { color: var(--accent); }

/* Visually hidden but still readable by screen readers / search engines - used for the
   per-page <h1> when the hero slide image already shows the page name graphically */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .project-grid { grid-template-columns: 1fr; } }

/* ---------- Hero slider (homepage) ----------
   Plain full-width banner photo(s) directly under the black header, no dark gradient/text overlay
   — matches the real site (a clean photo, not a graphic with baked-in text). Auto-cycles with
   arrows/dots only when the admin has added more than one slide. */
.hero-slider { position: relative; overflow: hidden; background-color: #000; line-height: 0; }
.hero-slider-slide {
  width: 100%; display: block;
  opacity: 0; transition: opacity .8s ease;
  position: relative;
}
.hero-slider-slide img { width: 100%; height: auto; display: block; }
.hero-slider-slide:not(.active) { position: absolute; inset: 0; height: 100%; }
.hero-slider-slide:not(.active) img { height: 100%; object-fit: cover; }
.hero-slider-slide.active { opacity: 1; position: relative; }
.hero-slider-dots {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  display: flex; justify-content: center; gap: 10px;
}
.hero-slider-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.55); border: none; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  transition: background .2s ease, transform .2s ease;
}
.hero-slider-dot.active { background: var(--accent); transform: scale(1.2); }
.hero-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(0,0,0,.35);
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  transition: background .2s ease;
}
.hero-slider-arrow:hover { background: rgba(0,0,0,.65); }
.hero-slider-arrow.prev { left: 24px; }
.hero-slider-arrow.next { right: 24px; }
@media (max-width: 620px) {
  .hero-slider-arrow { width: 34px; height: 34px; font-size: 1.1rem; }
}

.carousel-arrow {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--olive);
  background: #fff;
  color: var(--olive);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.carousel-arrow:hover:not(:disabled) { background: var(--olive); color: #fff; }
.carousel-arrow:disabled { opacity: .3; cursor: default; }
@media (max-width: 620px) {
  .carousel-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
}
/* On the black Featured Projects band, arrows need a light-on-dark treatment instead */
.section-olive .carousel-arrow { border-color: #fff; background: transparent; color: #fff; }
.section-olive .carousel-arrow:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Featured Projects carousel (homepage) - 2 cards per view, same track mechanism as testklean's
   room carousel but themed for the black band */
.featured-carousel { display: flex; align-items: center; gap: 16px; }
.featured-carousel-wrap { flex: 1; min-width: 0; overflow: hidden; }
.featured-carousel-track { display: flex; gap: 28px; transition: transform .4s ease; }
.featured-carousel-track .project-card { flex-shrink: 0; }

.project-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: box-shadow .2s ease, transform .2s ease;
}
.project-card:hover { box-shadow: 0 16px 32px rgba(20,60,70,.12); transform: translateY(-4px); }
.project-card .project-img { height: 330px; overflow: hidden; background: #efe6d8; }
.project-card .project-img img { width: 100%; height: 100%; object-fit: cover; }
.project-card .project-body { padding: 22px; }
.project-card .project-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: #f0e6da;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.project-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.project-card p { color: var(--text-muted); font-size: .92rem; margin-bottom: 16px; }
.project-card .project-link { color: var(--accent-dark); font-weight: 700; font-size: .88rem; }

/* Dark card variant for the Featured Projects section, which sits on a solid black band on the
   real site (not a white card grid) */
.section-olive .project-card { background: #141414; border-color: #2b2b2b; }
.section-olive .project-card:hover { box-shadow: 0 16px 32px rgba(0,0,0,.5); }
.section-olive .project-card h3 { color: #fff; }
.section-olive .project-card p { color: #ffffff; }
.section-olive .project-card .project-link { color: var(--accent); }
.section-olive .project-card .project-badge { background: rgba(240,122,0,.15); color: var(--accent); }

.section-cta { text-align: center; margin-top: 40px; }

/* Short horizontal dash used as a section separator (matches the reference mockups) */
.dash-divider { width: 40px; height: 2px; background: var(--olive); opacity: .55; margin: 0 0 32px; }

.btn.btn-outline-dark {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--olive);
  color: var(--olive);
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
}
.btn.btn-outline-dark:hover { background: var(--olive); color: #fff; }

/* ---------- Room detail page ---------- */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
@media (max-width: 860px) { .project-detail-grid { grid-template-columns: 1fr; } }
.project-detail-info h1 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.project-detail-desc { color: var(--text-dark); max-width: 520px; margin-bottom: 24px; }
.project-detail-desc p { margin: 0 0 12px; line-height: 1.75; }
.project-detail-desc h2, .project-detail-desc h3 { color: var(--olive); font-size: 1.2rem; margin-top: 20px; }
.project-detail-desc img { border-radius: var(--radius); margin: 12px 0; max-width: 100%; }
.project-detail-photo img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.project-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.project-meta-item {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--olive);
}
.project-meta-item-full { flex-basis: 100%; }
.project-meta-icon { font-size: 1.2rem; }
.project-gallery-heading {
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: .08em;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

/* ---------- Content blocks (เนื้อหายาวจาก rich text editor หลังบ้าน: Concept/Location/Contact/Rooms intro/Home closing/Room description) ---------- */
.content-block { width: 100%; }
.content-block > *:first-child { margin-top: 0 !important; }
.content-block h2 {
  color: var(--olive);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-top: 56px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.content-block h3 { color: var(--olive); font-size: 1.25rem; margin-top: 32px; }
.content-block p {
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.85;
  margin-bottom: 16px;
}
.content-block ul, .content-block ol { color: var(--text-muted); max-width: 720px; padding-left: 22px; margin-bottom: 16px; }
.content-block li { margin-bottom: 6px; line-height: 1.7; }
.content-block strong { color: var(--text-dark); }
.content-block a { color: var(--accent-dark); text-decoration: none; }
.content-block a:hover { text-decoration: none; }
.content-block h2, .content-block h3 { clear: both; }
.content-block img {
  display: block;
  width: 100%;
  max-width: 780px;
  border-radius: var(--radius);
  margin: 20px auto;
}
.content-block figure { margin: 20px 0; }
.content-block::after { content: ""; display: block; clear: both; }

/* จัดภาพสลับซ้าย-ขวา คู่กับข้อความอัตโนมัติ (ใช้กับรูปที่พิมพ์ลอยๆ ในเนื้อหาปกติ ไม่ได้ครอบด้วย .media-row)
   รูปที่ 1,3,5... ชิดขวา / รูปที่ 2,4,6... ชิดซ้าย ให้ข้อความไหลข้างๆ - ตัดออกอัตโนมัติถ้าภาพอยู่ใน .media-row แล้ว */
@media (min-width: 760px) {
  .content-block > img {
    max-width: 46%;
  }
  .content-block > img:nth-of-type(odd) { float: right; margin: 6px 0 24px 36px; }
  .content-block > img:nth-of-type(even) { float: left; margin: 6px 36px 24px 0; }
}
/* รูปที่ใส่ class="full" (แทรกผ่านปุ่ม "</> แก้โค้ด HTML") = ภาพกว้างเต็มจอ (ตัดขอบ container) เช่นภาพพาโนรามา */
.content-block > img.full { float: none; clear: both; max-width: 100%; width: 100%; margin: 32px auto; }
/* รูปที่ใส่ class="wide" = กว้างเท่าคอลัมน์เนื้อหา (ไม่ลอยคู่ข้อความ แต่ไม่ล้นออกไปเต็มจอ) */
.content-block > img.wide { float: none; clear: both; max-width: 100%; width: 100%; margin: 24px 0; }

/* บล็อก 2 คอลัมน์ (ภาพ+ข้อความ) แบบตัวอย่าง mockup - ใช้ได้เมื่อพิมพ์ HTML เองผ่านปุ่ม "</> แก้โค้ด HTML"
   ใส่ <div class="media-row">...รูป...<div class="media-text">...หัวข้อ/ย่อหน้า...</div></div>
   สลับด้าน: เพิ่ม class "reverse" ให้ภาพไปอยู่ขวาแทน */
.content-block .media-row {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 48px 0;
  clear: both;
}
.content-block .media-row.reverse { flex-direction: row-reverse; }
.content-block .media-row img { flex: 1 1 46%; max-width: 46%; width: 46%; margin: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.content-block .media-row .media-text { flex: 1 1 50%; min-width: 0; }
.content-block .media-row .media-text > *:last-child { margin-bottom: 0; }
@media (max-width: 759px) {
  .content-block .media-row { flex-direction: column; gap: 16px; }
  .content-block .media-row img { max-width: 100%; width: 100%; }
}

/* 3 คอลัมน์ (ภาพ+หัวข้อ+ข้อความ) แบบ "Unrivaled Access to Two BTS Lines" ใน mockup - พิมพ์ผ่านปุ่ม "</> แก้โค้ด HTML" เช่นกัน
   <div class="media-cols"><div><img>...<h3>...<p>...</div><div>...</div><div>...</div></div> */
.content-block .media-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 40px 0;
  clear: both;
}
.content-block .media-cols img { width: 100%; max-width: 100%; margin: 0 0 16px; aspect-ratio: 4 / 3; object-fit: cover; }
.content-block .media-cols h3 { margin-top: 0; font-size: 1.1rem; }
.content-block .media-cols p { max-width: none; }
@media (max-width: 760px) { .content-block .media-cols { grid-template-columns: 1fr; } }

/* แถบพื้นหลังสีทาน เต็มความกว้างจอ (ตัดขอบ container) แบบ "Nearby Attractions" ใน location-mockup /
   "Premium In Room Amenities" ใน room-mockup - ครอบผ่านปุ่ม "</> แก้โค้ด HTML":
   <div class="band-tan"><div class="band-inner"> ...เนื้อหา... </div></div> */
.content-block .band-tan {
  background: var(--tan);
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding: 56px 24px;
  clear: both;
}
.content-block .band-tan .band-inner > img.full,
.content-block .band-tan .band-inner > img.wide { float: none; clear: both; max-width: 100%; width: 100%; margin: 24px 0; }
.content-block .band-tan .band-inner {
  max-width: calc(var(--max-width) - 48px);
  margin: 0 auto;
}
.content-block .band-tan h2:first-child,
.content-block .band-tan h3:first-child { margin-top: 0; }
.content-block .band-tan h2 { border-bottom-color: rgba(50,68,18,.15); }
.content-block .band-tan p { color: #4a3d2e; }
/* ถ้าแถบทานเป็นบล็อกสุดท้ายของเนื้อหา ให้สีทานกินพื้นที่ padding ล่างของ .section ต่อจนชิดขอบบน footer เลย (ไม่มีช่องขาวคั่น) */
.content-block > .band-tan:last-child { margin-bottom: -80px; padding-bottom: 80px; }

/* แถบพื้นหลังสีดำ เต็มความกว้างจอ - เดียวกับ .band-tan แต่กลับสี ใช้กับ Core Values / Corporate Culture
   ในหน้า Who We Are: <div class="band-dark"><div class="band-inner"> ...เนื้อหา... </div></div> */
.content-block .band-dark {
  background: var(--dark-band);
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding: 64px 24px;
  clear: both;
  color: #fff;
}
.content-block .band-dark .band-inner {
  max-width: calc(var(--max-width) - 48px);
  margin: 0 auto;
}
.content-block .band-dark .section-head h2 { color: #ffffff; }
.content-block .band-dark .section-head p.eyebrow { color: var(--accent); }
.content-block > .band-dark:last-child { margin-bottom: -80px; padding-bottom: 80px; }
.content-block > .band-dark + .band-dark { margin-top: -64px; padding-top: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-info-item .icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #f0e6da; color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.contact-info-item h4 { margin-bottom: 4px; font-size: 1rem; }
.contact-info-item p { color: var(--text-muted); margin: 0; }

.contact-form { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 32px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); }
.form-msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .9rem; }
.form-msg.success { background: #e4f7ea; color: #1c7a3f; }
.form-msg.error { background: #fdeaea; color: #a92626; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-soft); margin-top: 32px; }
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* Closing section (homepage) - text left, video right, 2-column like the real site's video band */
.closing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}
@media (max-width: 860px) { .closing-split { grid-template-columns: 1fr; text-align: center; } }
.closing-split .eyebrow { color: var(--accent); }
.closing-split p { color: #ffffff; }
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .g-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: #efe6d8; }
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--header-footer-bg);
  color: #ffffff;
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--accent); font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.footer-grid p, .footer-grid a { color: #ffffff; font-size: .92rem; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.footer-nav-list a { text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 20px;
  text-align: center;
  font-size: .82rem;
  color: #ffffff;
}
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 10px; }

/* ---------- ปุ่มเลื่อนขึ้นบนสุด ---------- */
#scrollTopBtn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--olive);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 80;
}
#scrollTopBtn:hover { background: var(--accent-dark); }
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 600px) { #scrollTopBtn { right: 14px; bottom: 14px; width: 36px; height: 36px; } }
