/* === GLOBAL STYLING FOR DAFFARI WEBSITE === */

/* Font dan warna dasar */
body {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: #2b2b2b;
  line-height: 1.7;
  font-size: 1rem;
  margin: 0;
}

/* Warna utama & aksen */
:root {
  --primary-color: #004aad;
  --accent-color: #0074e4;
  --light-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Navbar Quarto */
.navbar {
  background-color: var(--primary-color) !important;
  box-shadow: 0 2px 10px var(--shadow);
}

.navbar-brand,
.navbar-nav .nav-link {
  color: #fff !important;
  font-weight: 500;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
}

/* Headings */
h1, h2, h3, h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 1.8em;
}

/* Link */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* Gambar dan figure */
.quarto-figure img {
  border-radius: 10px;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.2s ease;
}

.quarto-figure img:hover {
  transform: scale(1.03);
}

/* Card-like sections */
section, .content {
  background: var(--light-bg);
  border-radius: 15px;
  padding: 25px 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 25px var(--shadow);
}

/* TOC sidebar */
#TOC {
  background: #f3f7fd;
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
  border-radius: 10px;
}

/* Footer */
footer {
  text-align: center;
  color: #555;
  padding: 25px;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
  margin-top: 40px;
  background: #f9fbff;
}

/* Responsif */
@media (max-width: 768px) {
  section, .content {
    padding: 15px 18px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }
}

/* === Responsive YouTube Embed === */
iframe {
  display: block;
  margin: 25px auto;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  max-width: 100%;
}

@media (max-width: 768px) {
  iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* === Image Styling for Stories === */
.quarto-figure img {
  width: 80%;
  max-width: 750px;
  margin: 25px auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.quarto-figure img:hover {
  transform: scale(1.03);
}

/* === Make Navbar Sticky (Always Visible) === */
.navbar {
  position: fixed !important;
  top: 0;
  width: 100%;
  z-index: 9999;
  background: rgba(0, 74, 173, 0.95) !important;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px var(--shadow);
  transition: background 0.3s ease;
}

/* Disable Headroom hide-on-scroll behavior */
.headroom--unpinned,
.headroom--pinned,
.headroom--not-top,
.headroom--top {
  transform: none !important;
  transition: none !important;
}

body {
  padding-top: 100px !important; /* ubah dari 70px ke 100px */
}

/* === Responsive & readable rubric tables === */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto 1.25rem auto;
}

/* Make tables fixed layout so columns don't explode */
.table-responsive table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

/* Cells wrap text and break long words */
.table-responsive th,
.table-responsive td {
  white-space: normal !important; /* allow wrapping */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  vertical-align: top;
  padding: 0.9rem 1rem;
}

/* Improve header appearance */
.table-responsive thead th {
  text-align: left;
  background: #f3f7fd;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Small screens: slightly reduce padding */
@media (max-width: 768px) {
  .table-responsive th,
  .table-responsive td {
    padding: 0.6rem 0.6rem;
    font-size: 0.95rem;
  }
}

