/* ==========================================================================
   infoskudai.my — rasa portal Yahoo awal, sentuhan moden
   Susunan: 1) token 2) asas 3) masthead 4) susun atur 5) direktori
            6) notis 7) kaki 8) responsif 9) mod gelap
   ========================================================================== */

/* 1) Token ---------------------------------------------------------------- */
:root {
  --purple: #4b0f8f;
  --purple-2: #7a2bd4;
  --purple-3: #a855f7;
  --yellow: #ffd23f;
  --yellow-soft: #fff6d0;
  --link: #0000cc;
  --link-visited: #6b21a8;
  --ink: #1a1a1a;
  --ink-soft: #555;
  --ink-mute: #777;
  --page: #e9e9ef;
  --panel: #ffffff;
  --panel-2: #f4f4f7;
  --rule: #cfcfda;
  --rule-soft: #e3e3ea;
  --ok: #147a3d;
  --warn: #a35a00;
  --radius: 8px;
  --font: Verdana, Geneva, "DejaVu Sans", Tahoma, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 1px 2px rgba(24, 12, 48, .10), 0 6px 18px rgba(24, 12, 48, .06);
  --btn-bg: #4b0f8f;
  --btn-fg: #ffffff;
  --btn-bg-hover: #370970;
  --wrap: 1060px;
}

/* 2) Asas ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 12px/1.55 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.balut { flex: 1 0 auto; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--purple-2);
  outline-offset: 2px;
  border-radius: 3px;
}

h1, h2, h3, h4 { margin: 0 0 .45em; line-height: 1.25; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
p { margin: 0 0 .8em; }
small { font-size: 10.5px; }
hr { border: 0; border-top: 1px solid var(--rule-soft); margin: .9em 0; }

code, .mono { font-family: var(--mono); font-size: 11px; }

.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;
}

.papan {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 3) Masthead ------------------------------------------------------------- */
.masthead {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 62%, #9333ea 100%);
  border-bottom: 3px solid var(--yellow);
  color: #fff;
}

.masthead .dalam {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 16px 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.jenama {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.9px;
  line-height: 1;
  text-decoration: none;
  color: #fff;
}
.jenama:visited { color: #fff; }
.jenama .titik { color: var(--yellow); }
.jenama .tld { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.jenama .seru {
  color: var(--yellow);
  font-size: 32px;
  transform: translateY(1px) rotate(6deg);
  display: inline-block;
}

.slogan {
  color: #f3e8ff;
  font-size: 10.5px;
  line-height: 1.4;
  max-width: 34ch;
}

.masthead .cari {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}
.masthead .cari input {
  font: 11px var(--font);
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 5px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  width: 176px;
}
.masthead .cari input::placeholder { color: #e2d4f5; }
.masthead .cari button {
  font: 700 11px var(--font);
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: var(--yellow);
  color: #3b0764;
  cursor: pointer;
}

/* Saluran kategori, seperti bar saluran Yahoo */
.saluran {
  background: #2d0a56;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.saluran .dalam {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.saluran .dalam::-webkit-scrollbar { display: none; }
.saluran a {
  color: #e9d8fd;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.saluran a:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.saluran a[aria-current="page"] { color: #fff; border-bottom-color: var(--yellow); }
.saluran .kira {
  color: var(--yellow);
  font-weight: 400;
  font-size: 10px;
}

/* 4) Susun atur ----------------------------------------------------------- */
.balut {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 16px 28px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 236px;
  gap: 14px;
  align-items: start;
}

.tajuk-bahagian {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0 0 5px;
  border-bottom: 2px solid var(--purple-2);
  font-size: 13px;
  letter-spacing: .01em;
}
.tajuk-bahagian .kira {
  margin-left: auto;
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 400;
}

.sisi-kiri { display: grid; gap: 12px; position: sticky; top: 10px; }

.menu { padding: 8px; }
.menu h2 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-mute);
  margin: 0 0 6px 2px;
}
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { border-top: 1px dotted var(--rule-soft); }
.menu li:first-child { border-top: 0; }
.menu a {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 2px;
  text-decoration: none;
  font-size: 11.5px;
}
.menu a:hover { color: var(--purple); text-decoration: underline; }
.menu a .kira { color: var(--ink-mute); font-size: 10px; }

.kotak-sumber { padding: 9px 10px; font-size: 10.5px; line-height: 1.5; }
.kotak-sumber h2 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-mute);
  margin: 0 0 6px;
}
.kotak-sumber dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; }
.kotak-sumber dt { color: var(--ink-mute); }
.kotak-sumber dd { margin: 0; overflow-wrap: anywhere; }

/* 5) Direktori ------------------------------------------------------------ */
.kumpulan { margin-bottom: 14px; }
.kumpulan > h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin: 0 0 4px;
  color: var(--purple);
}
.kumpulan > h3 .ikon { color: var(--purple-3); }

.senarai-baris {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.senarai-baris li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px dotted var(--rule-soft);
  transition: background .12s ease;
}
.senarai-baris li:first-child { border-top: 0; }
.senarai-baris li:hover { background: var(--panel-2); }
.senarai-baris .gambar-link { display: block; line-height: 0; }
.senarai-baris .gambar {
  width: 62px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rule-soft);
  background: var(--panel-2);
}
.senarai-baris .nama { font-weight: 700; font-size: 12px; }
.senarai-baris .nota { color: var(--ink-soft); font-size: 11px; }
.senarai-baris .cap {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* 6) Notis --------------------------------------------------------------- */
.suapan { display: grid; gap: 10px; }

.kad-notis {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.kad-notis:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(24, 12, 48, .12); }
.kad-notis .gambar {
  width: 118px;
  height: 84px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--rule-soft);
}
.kad-notis h3 { font-size: 13px; margin: 0 0 3px; }
.kad-notis h3 a { text-decoration: none; color: var(--purple); }
.kad-notis h3 a:hover { text-decoration: underline; }
.kad-notis p { margin: 0 0 5px; font-size: 11px; color: var(--ink-soft); }
.kad-notis .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.lencana {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #ede4ff;
  color: #4c1d95;
  border: 1px solid #d9c6ff;
}
.lencana[data-jenis="promosi"] { background: var(--yellow-soft); color: #7a4a00; border-color: #f5d97a; }
.lencana[data-jenis="waktu-operasi"] { background: #e0f2e6; color: #14603a; border-color: #b7e0c6; }
.lencana[data-jenis="buka-baru"] { background: #ffe4ef; color: #9d174d; border-color: #f9c3d8; }
.lencana[data-jenis="jawatan-kosong"] { background: #e0edff; color: #163e7a; border-color: #bcd4f7; }

.cap-masa {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-soft);
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Halaman rencana */
.rencana { padding: 16px; }
.rencana .kepala { border-bottom: 1px solid var(--rule-soft); padding-bottom: 8px; margin-bottom: 12px; }
.rencana .kepala h1 { font-size: 20px; color: var(--purple); }
.rencana .kepala .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.rencana .isi p { font-size: 12px; }
.rencana .isi h2 { margin-top: 1.2em; padding-bottom: 3px; border-bottom: 1px dotted var(--rule); color: var(--purple); }
.rencana .isi ul { padding-left: 1.1em; }
.rencana .isi li { margin-bottom: .25em; }
.rencana figure { margin: 12px 0; }
.rencana img { max-width: 100%; border-radius: 6px; border: 1px solid var(--rule); }
.rencana figcaption { font-size: 10.5px; color: var(--ink-mute); margin-top: 4px; }

.bukti-dalam {
  background: var(--panel-2);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 10.5px;
  color: var(--ink-soft);
}

/* Kotak kosong yang jujur */
.kosong {
  padding: 14px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--ink-mute);
  font-size: 11px;
  text-align: center;
}
.kosong strong { color: var(--ink-soft); }

/* Carian / penapis */
.penapis {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.penapis input {
  flex: 1 1 200px;
  font: 11.5px var(--font);
  padding: 7px 9px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
}
.penapis select {
  font: 11.5px var(--font);
  padding: 7px 8px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
}
.penapis .kira-hasil { font-size: 10.5px; color: var(--ink-mute); }
.tersembunyi { display: none !important; }

.kumpulan-grid {
  columns: 2;
  column-gap: 14px;
}
.kumpulan-grid > .kumpulan {
  break-inside: avoid;
  margin-bottom: 14px;
}



/* Sorotan halaman utama ------------------------------------------------ */
.sorotan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: start;
}
.sorotan-teks { min-width: 0; }
.sorotan img {
  width: 132px;
  height: 99px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
  justify-self: end;
}
.sorotan h3 { margin: 6px 0 4px; font-size: 16px; }
.sorotan h3 a { color: var(--purple); text-decoration: none; }
.sorotan h3 a:hover { text-decoration: underline; }
.sorotan p { font-size: 12px; color: var(--ink-soft); margin: 0 0 8px; }
.sorotan .meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}
.sorotan-pautan {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  white-space: nowrap;
}
.sorotan-pautan:hover { text-decoration: underline; }
.sorotan-pautan span { font-size: 13px; line-height: 1; }

.sumber-nota {
  font-size: 10.5px;
  color: var(--ink-mute);
  border-top: 1px dotted var(--rule-soft);
  padding-top: 6px;
  margin-top: 10px;
}

@media (max-width: 680px) {
  .sorotan { grid-template-columns: minmax(0, 1fr) 104px; gap: 10px; }
  .sorotan img { width: 104px; height: 78px; }
}

/* Komen --------------------------------------------------------------- */
.senarai-komen { list-style: none; margin: 0; padding: 0; }
.senarai-komen li {
  border-top: 1px dotted var(--rule-soft);
  padding: 9px 0;
}
.senarai-komen li:first-child { border-top: 0; padding-top: 2px; }
.komen-teks { margin: 0 0 4px; font-size: 12px; }
.komen-nama { margin: 0; font-size: 10.5px; color: var(--ink-mute); }

.butang {
  font: 700 11.5px var(--font);
  padding: 8px 14px;
  border: 1px solid var(--btn-bg);
  border-radius: 5px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.butang:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.butang-kosong {
  background: transparent;
  color: var(--purple);
}
.butang-kosong:hover { background: var(--panel-2); color: var(--purple); }

/* Modal --------------------------------------------------------------- */
.modal {
  border: 0;
  padding: 0;
  width: calc(100% - 32px);
  max-width: 430px;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(20, 8, 40, .45);
}
.modal::backdrop { background: rgba(20, 8, 40, .55); }
.modal-dalam { padding: 18px 18px 14px; }
.modal h2 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--purple);
}
.modal p { font-size: 12px; line-height: 1.6; }

@media (prefers-color-scheme: dark) {
  .butang { color: #14101c; }
  .butang-kosong { color: var(--purple); }
  .modal { background: var(--panel); }
}

/* Cip pautan pantas */
.cip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cip a {
  font-size: 10.5px;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  text-decoration: none;
}
.cip a:hover { border-color: var(--purple-2); color: var(--purple); }

/* 7) Kaki ----------------------------------------------------------------- */
.kaki {
  border-top: 3px solid var(--purple);
  background: #2d0a56;
  color: #d8c9ee;
  margin-top: 8px;
}
.kaki .dalam {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 16px 20px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 10.5px;
}
.kaki a { color: #e9d8fd; }
.kaki .nota { max-width: 52ch; line-height: 1.6; }

/* 8) Responsif ------------------------------------------------------------ */
@media (max-width: 900px) {
  .balut { grid-template-columns: 168px minmax(0, 1fr); }
  .sisi-kanan { display: none; }
  .sisi-kiri { position: static; }
}
@media (max-width: 680px) {
  .balut { grid-template-columns: minmax(0, 1fr); }
  .kumpulan-grid { columns: 1; }
  .sisi-kiri { order: 3; }
  .jenama { font-size: 25px; }
  .jenama .tld { font-size: 14px; }
  .jenama .seru { font-size: 27px; }
  .masthead .cari { margin-left: 0; width: 100%; }
  .masthead .cari input { flex: 1; width: auto; }
  .slogan { max-width: none; }
  .kad-notis { grid-template-columns: 88px minmax(0, 1fr); }
  .kad-notis .gambar { width: 88px; height: 64px; }
  .senarai-baris li { grid-template-columns: 50px minmax(0, 1fr); }
  .senarai-baris .gambar { width: 50px; height: 36px; }
  .senarai-baris .cap { grid-column: 2; }
}

/* 9) Mod gelap ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece7f5;
    --ink-soft: #b6adc6;
    --ink-mute: #928a9f;
    --page: #120c1c;
    --panel: #1c1428;
    --panel-2: #241a33;
    --rule: #3a2c4e;
    --rule-soft: #312545;
    --link: #a5b4fc;
    --link-visited: #c4b5fd;
    --purple: #c4b5fd;
    --purple-2: #a855f7;
    --purple-3: #d8b4fe;
    --btn-bg: #c4b5fd;
    --btn-fg: #14101c;
    --btn-bg-hover: #ddd6fe;
  }
  body { background: var(--page); }
  .masthead { background: linear-gradient(135deg, #2a0b52, #4c1d95 60%, #6d28d9); }
  .saluran { background: #1b0a33; }
  .kaki { background: #1b0a33; }
  .penapis input, .penapis select { background: var(--panel); color: var(--ink); }
  .lencana { background: #3b2a55; color: #e9d8fd; border-color: #55407a; }
  .kosong, .bukti-dalam { background: var(--panel-2); }
  @media (prefers-reduced-motion: reduce) {
    .kad-notis, .senarai-baris li { transition: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .masthead, .saluran, .kaki, .sisi-kiri, .sisi-kanan, .masthead .cari { display: none; }
  .balut { grid-template-columns: 1fr; }
  body { background: #fff; }
}
