/* =============================================================
   ISO/IEC 27001:2022 certification badge — bitsolution.co.th
   -------------------------------------------------------------
   Uses only the custom properties the site already declares
   (--ink, --line, --radius, --font-mono, --ease …), so no new
   hard-coded colors or fonts are introduced.
   ============================================================= */


/* ---------- A. Certification band -------------------------- */

.iso-section {
  /* pairs with the site's existing cream background class:
     <section class="bg-tint-cream"> */
  padding-block: clamp(48px, 7vw, 96px);
}

.iso-band {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 34px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  box-shadow:
    0 1px 2px rgba(10, 10, 10, .04),
    0 18px 40px -30px rgba(10, 10, 10, .5);
}

/* The white plate around the logo enforces the clear-space
   requirement of the mark usage rules. */
.iso-badge-box {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iso-badge-box img {
  height: 120px;
  width: auto;
  display: block;
}

.iso-body > .eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.iso-body h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 10px 0;
}

.iso-body > p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 18px;
}

/* Certificate data strip */
.iso-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-2);
  padding-top: 16px;
}

.iso-meta > div {
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--line-2);
}

.iso-meta > div:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

.iso-meta dt {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}

.iso-meta dd {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.iso-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Button block removed: the site already defines .btn / .btn-primary
   (and .btn-outline in place of .btn-ghost) in style.css. */

/* Certification body note */
/* .iso-body > .iso-verify (not plain .iso-verify): the `.iso-body > p` rule above
   would otherwise win on specificity and override this margin and colour.
   Only top/bottom margins are set, so the centring at <=880px still applies. */
.iso-body > .iso-verify {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 12px;
  color: var(--muted-2);
}

.iso-verify a {
  color: inherit;
}

@media (max-width: 880px) {
  .iso-band {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 24px;
    gap: 22px;
  }
  .iso-badge-box {
    justify-self: center;
  }
  .iso-badge-box img {
    height: 96px;
  }
  .iso-body > p {
    margin-inline: auto;
  }
  .iso-meta,
  .iso-actions {
    justify-content: center;
  }
  .iso-meta > div {
    border-right: 0;
    margin: 0 0 14px;
    padding: 0;
    min-width: 46%;
  }
}


/* ---------- B. Hero trust pill ------------------------------ */

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 8px 18px 8px 10px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, .80);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.hero-trust:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(10, 10, 10, .45);
}

/* 48px, not 32px: the mark usage rules forbid rendering it below 48px
   (the vertical "CERTIFICATION" lettering degrades into a smudge). */
.hero-trust img {
  height: 48px;
  width: auto;
  display: block;
  flex: none;
}

.hero-trust strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.hero-trust small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

@media (max-width: 560px) {
  .hero-trust {
    margin-top: 20px;
    padding: 7px 14px 7px 8px;
  }
  .hero-trust small {
    display: none;          /* single line on small screens */
  }
  .hero-trust strong {
    font-size: 12px;
  }
}


/* ---------- C. Footer certification column ------------------ */

/* The footer is currently 3 columns — make it 4.
   Prefixed with .site-footer so this wins on specificity
   regardless of stylesheet load order. */
.site-footer .footer-cols {
  grid-template-columns: repeat(4, 1fr);
}

.footer-cert a {
  display: inline-block;
  line-height: 0;
}

.footer-cert img {
  height: 68px;
  width: auto;
  opacity: .9;
  transition: opacity .25s var(--ease);
}

.footer-cert a:hover img {
  opacity: 1;
}

.footer-cert p {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-footer .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .site-footer .footer-cols {
    grid-template-columns: 1fr;
  }
}


/* ---------- /isms-policy/ page (task 4.6) -------------------- */

/* The band sits inside #legal-page, whose document-style h2 / p / a rules
   (ID specificity) would otherwise restyle it. */
#legal-page .iso-band { margin: 1.75rem 0 2.5rem; }
#legal-page .iso-body h2 { margin: 10px 0; padding-top: 0; border-top: 0; font-size: clamp(22px, 2.4vw, 30px); }
#legal-page .iso-body > p { margin-top: 0; margin-bottom: 18px; }
#legal-page .iso-body > p.iso-verify { margin-top: 16px; margin-bottom: 0; font-size: 12px; line-height: 1.55; color: var(--muted-2); }
#legal-page .iso-actions a { text-decoration: none; }
/* The legal column is ~820px wide: four fields in one row don't fit, so use a tidy 2x2 grid. */
#legal-page .iso-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
#legal-page .iso-meta > div { border-right: 0; margin: 0; padding: 0; min-width: 0; }


/* ---------- Global ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero-trust,
  .iso-actions .btn,
  .footer-cert img {
    transition: none;
  }
  .hero-trust:hover,
  .iso-actions .btn:hover {
    transform: none;
  }
}
