/* =========================================================
   Bluetech Control – site.css
   Bootstrap 5.3 + custom design tokens
   ========================================================= */

:root {
  /* palette */
  --bt-ink:      #0F2536;   /* text, footer */
  --bt-blue:     #0A5C8F;   /* primary, links */
  --bt-blue-dk:  #08486f;
  --bt-signal:   #C75B0A;   /* single accent: calls to action */
  --bt-signal-dk:#a84c07;
  --bt-steel:    #EDF2F6;   /* alternate section background */
  --bt-line:     #D5DEE6;
  --bt-muted:    #51657A;

  /* type */
  --bt-font: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* layout */
  --bt-tile-ratio: 4 / 3;
  --bt-radius: .5rem;

  /* bootstrap overrides */
  --bs-body-font-family: var(--bt-font);
  --bs-body-color: var(--bt-ink);
  --bs-link-color: var(--bt-blue);
  --bs-link-hover-color: var(--bt-blue-dk);
  --bs-primary: var(--bt-blue);
  --bs-primary-rgb: 10, 92, 143;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { font-size: 1rem; line-height: 1.65; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.15rem; }

p { max-width: 68ch; }

:focus-visible {
  outline: 3px solid var(--bt-signal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 2000;
  background: #fff; color: var(--bt-ink); padding: .5rem 1rem; border-radius: var(--bt-radius);
}
.skip-link:focus { top: .5rem; }

/* ---------- top bar ---------- */
.topbar { background: var(--bt-ink); color: #fff; font-size: .875rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar i { opacity: .75; margin-right: .35rem; }

/* ---------- navbar ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--bt-line); }
.site-header .navbar-brand img { height: 48px; width: auto; }
.site-header .nav-link { color: var(--bt-ink); font-weight: 500; padding-inline: .9rem; }
.site-header .nav-link:hover,
.site-header .nav-link:focus-visible,
.site-header .nav-link.active,
.site-header .nav-link.show { color: var(--bt-blue); }
.site-header .nav-link.active { box-shadow: inset 0 -3px 0 var(--bt-blue); }
@media (max-width: 991.98px) {
  .site-header .nav-link.active { box-shadow: none; font-weight: 700; }
}

.dropdown-menu { border-color: var(--bt-line); border-radius: var(--bt-radius); padding: .5rem; }
.dropdown-item { border-radius: .3rem; padding: .4rem .75rem; white-space: normal; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bt-steel); color: var(--bt-blue); }
@media (min-width: 992px) {
  .dropdown-menu.menu-cols { min-width: 34rem; columns: 2; column-gap: .5rem; }
  .dropdown-menu.menu-cols li { break-inside: avoid; }
  .dropdown-menu.menu-wide { min-width: 22rem; }
}

/* ---------- hero carousel ---------- */
.hero .carousel-item img { width: 100%; height: auto; display: block; }
.hero .carousel-indicators [data-bs-target] { width: .75rem; height: .75rem; border-radius: 50%; border: 0; }

/* ---------- sections ---------- */
.section { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }
.section--steel { background: var(--bt-steel); }
.section-head { margin-bottom: 2rem; }
.section-head p { color: var(--bt-muted); margin-bottom: 0; }

/* intro */
.intro-lead { font-size: 1.125rem; color: var(--bt-muted); }
.industry-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--bt-line); }
.industry-list li { padding: .6rem 0; border-bottom: 1px solid var(--bt-line); }

/* buttons */
.btn { border-radius: var(--bt-radius); font-weight: 600; padding: .65rem 1.25rem; }
.btn-signal { background: var(--bt-signal); border-color: var(--bt-signal); color: #fff; }
.btn-signal:hover, .btn-signal:focus-visible { background: var(--bt-signal-dk); border-color: var(--bt-signal-dk); color: #fff; }
.btn-outline-ink { border: 2px solid var(--bt-ink); color: var(--bt-ink); background: transparent; }
.btn-outline-ink:hover, .btn-outline-ink:focus-visible { background: var(--bt-ink); color: #fff; }

/* service tiles */
.tile { display: block; position: relative; color: inherit; text-decoration: none; height: 100%; }
.tile-media {
  aspect-ratio: var(--bt-tile-ratio); overflow: hidden;
  border-radius: var(--bt-radius); background: var(--bt-steel);
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-media img, .tile:focus-visible .tile-media img { transform: scale(1.04); }
.tile-title { margin: .75rem 0 0; font-size: 1.05rem; font-weight: 600; }
.tile:hover .tile-title, .tile:focus-visible .tile-title { color: var(--bt-blue); text-decoration: underline; text-underline-offset: .2em; }

/* product logos */
.brand-tile {
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--bt-line); border-radius: var(--bt-radius);
  aspect-ratio: 3 / 2; padding: 1rem; transition: border-color .2s ease;
}
.brand-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-tile:hover, .brand-tile:focus-visible { border-color: var(--bt-blue); }

/* certificates */
.cert-img { border: 1px solid var(--bt-line); border-radius: var(--bt-radius); background: #fff; padding: .5rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--bt-ink); color: #cfdbe6; padding-block: 3rem 1.5rem; }
.site-footer h2 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.site-footer a { color: #cfdbe6; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding-block: .2rem; }
.site-footer .contact-list li { display: flex; gap: .6rem; }
.site-footer .contact-list i { width: 1.1rem; text-align: center; margin-top: .3rem; opacity: .75; }
.footer-qr { display: flex; gap: .75rem; margin-top: 1rem; }
.footer-qr img { width: 96px; height: 96px; background: #fff; padding: 4px; border-radius: .35rem; }
.footer-fb { border: 0; width: 100%; max-width: 340px; height: 420px; background: #fff; border-radius: var(--bt-radius); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1rem; font-size: .875rem; color: #9fb2c4; }

/* back to top */
.back-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1030;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0;
  background: var(--bt-ink); color: #fff; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.back-top.is-visible { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--bt-blue); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================
   Inner pages (about us etc.)
   ========================================================= */
.page-head { background: var(--bt-steel); border-bottom: 1px solid var(--bt-line); padding-block: 1.5rem 2rem; }
.page-head .breadcrumb { margin-bottom: .75rem; --bs-breadcrumb-divider-color: var(--bt-muted); --bs-breadcrumb-item-active-color: var(--bt-muted); }
.page-head h1 { margin: 0; }

.gallery-img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--bt-radius); background: var(--bt-steel); }
.photo { width: 100%; height: auto; border-radius: var(--bt-radius); }

.rule-block { border-top: 3px solid var(--bt-blue); padding-top: 1rem; }
.rule-block h2 { font-size: 1.25rem; }
.plain-list { padding-left: 1.1rem; }
.plain-list li { margin-bottom: .5rem; max-width: 68ch; }

.customer-tile { padding: .75rem; aspect-ratio: 3 / 2; }

.footer-bottom a { color: #cfdbe6; }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; font-size: 1.4rem; }

/* project reference gallery */
.project-fig { margin: 0; }
.project-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--bt-radius); background: var(--bt-steel); display: block; }
.project-fig figcaption { margin-top: .6rem; font-size: .95rem; color: var(--bt-ink); }

/* ---- project grid: change ONE number to resize thumbnails ---- */
:root { --bt-project-min: 240px; }          /* smaller number = smaller images, more per row */
@media (max-width: 575.98px) { :root { --bt-project-min: 150px; } }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--bt-project-min), 1fr));
  gap: 1.25rem;
}
.project-link { display: block; cursor: zoom-in; }
.project-fig figcaption { font-size: .875rem; line-height: 1.4; }
