/* =====================================================================
   Floating contact rail + contact / about pages
   ===================================================================== */

.contact-rail {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-dark);
  box-shadow: 0 6px 20px -6px rgba(13, 27, 42, .45);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cr-btn:hover { transform: translateX(-3px); box-shadow: 0 10px 26px -6px rgba(13, 27, 42, .55); }
.cr-btn svg { width: 26px; height: 26px; }

/* LINE is the channel this business closes on, so it is the only one in a brand colour and
   the only one that is larger. A rail where everything shouts equally says nothing. */
/* theme:fixed สีแบรนด์ของ LINE และ Facebook — เป็นของเจ้าของแพลตฟอร์ม เราเปลี่ยนตามธีมไม่ได้ */
.cr-line { background: #06c755; width: 60px; height: 60px; }
.cr-line svg { width: 32px; height: 32px; }
.cr-tel  { background: var(--accent); }
.cr-fb   { background: #1877f2; }
/* theme:end */
.cr-mail { background: var(--steel); }

/* The label slides out on hover; on touch it never appears, and the icon has an aria-label. */
.cr-label {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--navy);
  color: var(--on-dark);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.cr-label small { display: block; font-weight: 400; font-size: 11.5px; color: var(--on-dark-muted); }
.cr-label::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--navy);
}
.cr-btn:hover .cr-label,
.cr-btn:focus-visible .cr-label {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 640px) {
  /* On a phone the rail becomes a bottom bar: a vertical rail would cover the content, and
     the thumb is at the bottom of the screen anyway. */
  .contact-rail {
    right: 0;
    left: 0;
    top: auto;
    bottom: 0;
    transform: none;
    flex-direction: row;
    gap: 0;
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 20px -8px rgba(13, 27, 42, .35);
    padding: 6px;
  }
  .cr-btn, .cr-line {
    flex: 1;
    width: auto;
    height: 46px;
    border-radius: 10px;
  }
  .cr-line { flex: 1.6; }        /* still the widest target */
  .cr-line svg, .cr-btn svg { width: 22px; height: 22px; }
  .cr-label { display: none; }
  body { padding-bottom: 62px; }  /* keep the footer clear of the bar */
}

/* ---------------------------------------------------------------- page header */
.page-hero {
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy-lift) 100%);
  color: var(--on-dark);
  padding: 46px 0;
  margin-bottom: 40px;
}
.page-hero h1 { color: var(--on-dark); font-size: clamp(24px, 3.2vw, 32px); margin: 0 0 8px; }
.page-hero p { margin: 0; color: var(--on-dark-soft); max-width: 62ch; }
.page-hero .crumbs { color: var(--on-dark-muted); margin-bottom: 14px; }
.page-hero .crumbs a:hover { color: var(--on-dark); }

/* ---------------------------------------------------------------- branches */
.branch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.branch {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.branch-map {
  aspect-ratio: 16 / 10;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}
.branch-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.branch-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.branch-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.branch-head h3 { margin: 0; font-size: 16.5px; }
.branch-head .tag { font-size: 11px; }
.branch-en { color: var(--muted); font-size: 12.5px; }
.branch-row { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; }
.branch-row .ico {
  width: 22px; height: 22px; flex: none; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.branch-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.branch-actions .btn { padding: 8px 14px; font-size: 13px; }

/* ---------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; align-items: start; }
.prose { font-size: 15.5px; line-height: 1.85; }
.prose p { margin: 0 0 16px; }
.prose h2 { font-size: 20px; margin: 28px 0 12px; }
.prose strong { color: var(--ink); }

.fact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.fact-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fact-row:last-child { border-bottom: 0; }
.fact-row span { color: var(--muted); flex: none; }
.fact-row strong { text-align: right; }

/* ---------------------------------------------------------------- services */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.svc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }
.svc-img { aspect-ratio: 4 / 3; background: var(--surface); overflow: hidden; }
.svc-img img { width: 100%; height: 100%; object-fit: cover; }
.svc-body { padding: 16px 18px; }
.svc-body h3 { margin: 0 0 5px; font-size: 15.5px; }
.svc-body p { margin: 0; color: var(--muted); font-size: 13.5px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
}
