/* ==========================================================
   PT. Surya Buana Mandala – Company Profile
   File ini berisi seluruh tampilan (warna, tata letak, dll.)
   Daftar isi:
   1. Warna & tema (terang / gelap)
   2. Dasar halaman
   3. Header & navigasi
   4. Konten (hero, kartu, tabel, dll.)
   5. Galeri & lightbox
   6. Footer
   ========================================================== */


/* ---------- 1. WARNA & TEMA ----------
   Ubah warna cukup di sini; seluruh website mengikuti. */
:root {
  --bg:    #f6f8fc;   /* latar halaman */
  --card:  #ffffff;   /* latar kartu */
  --ink:   #111a33;   /* warna teks utama */
  --mute:  #56607a;   /* warna teks pendukung */
  --line:  #dbe1ee;   /* garis / border */
  --blue:  #1030c8;   /* biru utama */
  --navy:  #0a1750;   /* biru tua (header, footer) */
  --red:   #e3242b;   /* merah aksen (tombol) */

  box-sizing: border-box;
  /* ruang aman untuk ponsel dengan poni / bar sistem */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Mode gelap otomatis mengikuti pengaturan perangkat */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:   #0b1020;
    --card: #141b34;
    --ink:  #e8ecf8;
    --mute: #9aa5c4;
    --line: #27315a;
    --blue: #6b86ff;
    --navy: #060b24;
  }
}

/* Mode gelap manual: <html data-theme="dark"> */
:root[data-theme="dark"] {
  --bg:   #0b1020;
  --card: #141b34;
  --ink:  #e8ecf8;
  --mute: #9aa5c4;
  --line: #27315a;
  --blue: #6b86ff;
  --navy: #060b24;
}


/* ---------- 2. DASAR HALAMAN ---------- */
* { box-sizing: border-box; }

html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Segoe UI", system-ui, sans-serif;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 .5em;
}

a { color: var(--blue); }

main {
  max-width: 1120px;
  margin: auto;
  padding: 28px 16px 60px;
  min-height: 70vh;
}

/* Cincin fokus yang jelas untuk pengguna keyboard */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #ffb400;
  outline-offset: 2px;
}


/* ---------- 3. HEADER & NAVIGASI ---------- */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  background: #d3dfff;
  color: #0a1750;
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 10px rgba(10, 23, 80, .12);
}

.bar {
  max-width: 1120px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0a1750;
  text-decoration: none;
  font-weight: 700;
}

.brand img {             /* logo transparan (images/logo.png) */
  height: 50px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

nav a {
  color: #2a3566;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

nav a:hover,
nav a.on {               /* .on = menu halaman yang sedang dibuka */
  background: rgba(16, 48, 200, .14);
  color: #1030c8;
}

/* Tombol menu (☰) hanya tampil di layar kecil */
#menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid #0a175066;
  color: #0a1750;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 16px;
}

@media (max-width: 860px) {
  #menu-btn { display: block; }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #d3dfff;
    box-shadow: 0 8px 14px rgba(10, 23, 80, .12);
    padding: 8px 16px;
    flex-direction: column;
    max-height: 70vh;
    overflow: auto;
  }
  nav.open { display: flex; }
}


/* ---------- 4. KONTEN ---------- */

/* Hero (bagian atas halaman Home) */
.hero {
  background: linear-gradient(120deg, #e1e9ff, #b8cbff);
  color: #0a1750;
  border: 1px solid #aebfef;
  border-radius: 14px;
  padding: 44px 28px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: center;
}
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); }
.hero p  { color: #26305c; max-width: 56ch; }
.hero img {
  width: 100%;
  max-width: 320px;
  justify-self: center;
}
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; }
}

/* Tombol */
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-size: 15px;
  margin: 6px 8px 0 0;
}
.btn.alt {               /* tombol kedua (garis tepi saja) */
  background: transparent;
  border: 1.5px solid #0a1750;
  color: #0a1750;
}

/* Kisi & kartu */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.card h3 { font-size: 18px; }
.card p  { margin: 0; color: var(--mute); font-size: 15px; }

a.card {                 /* kartu yang bisa diklik (layanan) */
  text-decoration: none;
  color: inherit;
  border-left: 5px solid var(--blue);
}
a.card:hover { border-left-color: var(--red); }

.section { margin-top: 40px; }
.crumb   { font-size: 14px; color: var(--mute); }
.note    { font-size: 13px; color: var(--mute); }

/* Dua kolom (visi & misi, kontak) */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) { .two { grid-template-columns: 1fr; } }

/* Tabel pengalaman */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { background: var(--navy); color: #fff; position: sticky; top: 0; }

/* Pencarian & filter */
.tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.tools input, .tools select { width: auto; flex: 1; min-width: 160px; }

input, select, textarea {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  width: 100%;
}

/* Label kecil (bidang usaha, nama client) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 14px;
}

/* Daftar informasi (label : isi) */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dt { color: var(--mute); }
dd { margin: 0; }
@media (max-width: 600px) { dl { grid-template-columns: 1fr; } }


/* ---------- 5. GALERI & LIGHTBOX ---------- */

/* Gambar sertifikat di kartu */
.cert-img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  cursor: zoom-in;
}

/* Tombol filter kategori galeri */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filters button {
  font: inherit;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.filters button.on {     /* kategori yang aktif */
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Kisi foto galeri */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.gallery figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--bg);
}
.gallery figcaption { padding: 8px 12px; font-size: 14px; color: var(--mute); }

/* Lightbox: gambar diperbesar satu layar penuh */
#lightbox {
  position: fixed;
  inset: 0;
  background: #000d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 16px;
  cursor: zoom-out;
}
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; background: #fff; }


/* ---------- 6. FOOTER ---------- */
footer {
  background: var(--navy);
  color: #b7c1e6;
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
}
