/* ======================================================
   GLOBAL BASE STYLES
====================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1e293b;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body h1 { font-size: 1.75rem;}
body h2 { font-size: 1.5rem;}
body h3 { font-size: 1.3rem;}
body h4 { font-size: 1rem;}
body h5 { font-size: .75rem;}
body h6 { font-size: .5rem;}

/* ======================================================
   CONTAINER
====================================================== */
.hidden {
    display : none;
}
a.link {
    display: block;
    font-size: 22px;
    text-align: center;
    margin: 15px;
    padding: 10px 15px;
    border: solid 1px #87bdff;
    background: #f1fcfd;
    border-radius: 10px;
}
a.link:hover {
    text-decoration: none;
    border-bottom-color: #abbdf3;
    background: #f3f3f3;
}
#container {
  flex: 1;
  display: flex;
  flex-direction: column;
  white-space: normal;        /* ini penting: abaikan newline & spasi berlebih */
  overflow-wrap: anywhere;    /* biarkan pecah di mana saja jika perlu */
  word-break: break-word;
}

/* ======================================================
   HEADER / NAVBAR
====================================================== */
.site-header {
  background: #0f172a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.site-header .inner {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.logo span {
  color: #38bdf8;
}

.logo:hover {
  color: #ffff19;
}

/* Navigation Links */
.navbar {
  display: flex;
  align-items: center;
  gap: .8rem;
  transition: all 0.3s ease;
}

.navbar a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}

.navbar a:hover {
  color: #fff;
  transform: translateY(-2px);
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.menu-toggle.active {
  transform: rotate(90deg);
}

/* ======================================================
   MAIN CONTENT AREA
====================================================== */
.content-area, .breadcrumbs {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    width: 100%;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
}

.main-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 3px 10px rgb(171 171 171 / 57%);
  animation: fadeIn 0.4s ease;
  max-width: 100%;
  overflow-x: hidden;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4 {
    color: #0f172a;
    text-shadow: 2px 2px 4px rgb(118 118 118 / 30%);
    margin-bottom: 1rem;
    font-weight: 600;
}

.main-content p {
  margin-bottom: 1rem;
  color: #334155;
}

.main-content a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px dotted #2563eb;
  transition: all 0.3s ease;
}

.main-content a:hover {
  color: #1e40af;
  border-bottom-color: #1e40af;
}

/* Lists */
.main-content ul,
.main-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.main-content li {
  margin-bottom: 0.5rem;
}

.separator {
    position: relative;
    height: 4px;
    background: linear-gradient(100deg, #ff2020, rgb(59 130 246), #f95343);
    background-size: 200% 100%;
    animation: glowMove 5s linear infinite;
    margin: 2rem 0;
    border-radius: 2px;
}

.up-animate {
    animation: floatUpDown 1.8s ease-in-out infinite;
}

.color-animate {
  background: linear-gradient(90deg, #ff4b1f, #ff9068, #ffd700, #4facfe, #00f2fe);
  background-size: 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: colorMove 6s linear infinite;
}
/* Tables */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrapper td {
    min-width : 150px;
}
.table-wrapper .w200 {
    min-width : 200px;
}
.table-wrapper .w250 {
    min-width : 250px;
}
.table-wrapper .w300 {
    min-width : 300px;
}
.table-wrapper .w350 {
    min-width : 350px;
}

.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.main-content th,
.main-content td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
}

.main-content th {
  background: #f3f4f6;
  font-weight: 600;
}

.main-content tr:nth-child(even) {
  background: #f9fafb;
}

/* Code Blocks */
.main-content code,
.main-content pre {
  background: #f1f5f9;
  font-family: "Fira Code", monospace;
  border-radius: 6px;
  color: #334155;
  font-size: 0.9rem;
}

.main-content code {
    padding: 2px 5px;
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    vertical-align: middle;
}

.main-content pre {
    padding: 1rem;
    overflow-x: auto;
    display: block;
    max-height: 400px;
    margin: 20px 0;
}

/* Blockquote */
.main-content blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #475569;
  font-style: italic;
  background: #f8fafc;
  border-radius: 6px;
}

/* ======================================================
   SIDEBAR
====================================================== */
.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar h3 {
    margin: 2rem 0 1rem;
    border-bottom: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgb(27 247 0 / 30%);
}

.sidebar .updates p {
    margin: 20px 0;
    border-left: double 3px #545454;
    padding-left: 10px;
    margin-left: -10px;
}

.sidebar .widget:first-of-type h3 {
  margin-top: 0;
}

.widget.w-editor li {
    margin: 0 0 0 20px;
    list-style-type: disclosure-closed;
    color: #bfeaff;
}

.widget.w-editor li:has(a:hover) { /* CSS4 - ini gak error, :has belum dikenali editor cPanel*/
    color: #0083c3;
}

.widget.w-editor li a {
    color: #00a0ef;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 0.8rem;
}

.sidebar a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sidebar a:hover {
  color: #1e40af;
  padding-left: 4px;
}

body.scrolled .sidebar {
  transform: translateY(3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

/* ======================================================
   FOOTER
====================================================== */
footer {
  background: #0f172a;
  color: #cbd5e1;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  margin-top: auto;
}

/* ======================================================
   ANIMATIONS
====================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================================================
   RESPONSIVE DESIGN
====================================================== */
@media (max-width: 1024px) {
  .content-area {
    grid-template-columns: 2fr 1fr;
  }
}

@media (max-width: 900px) {
    
  body h1 { font-size: 1.5rem; }
  body h2 { font-size: 1.3rem; }
  body h3 { font-size: 1.1rem; }
  body h4 { font-size: 0.9rem; }
  body h5 { font-size: 0.7rem; }
  body h6 { font-size: 0.5rem; }
    
  .content-area {
      display: block;
  }
  .content-area {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .sidebar {
    position: relative;
    top: auto;
    margin-top: 2rem;
  }

  .site-header .inner {
    flex-direction: row;
    justify-content: space-between;
  }
  
   h1 {
    font-size: 1.7rem;
  }
}

.breadcrumbs {
    display: inline-block;
    font-size: 0.80rem;
    margin: 1rem auto 0;
    text-shadow: 2px 2px 4px rgb(217 217 217);
}

.breadcrumbs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  color: #555;
}

.breadcrumbs li:not(:last-child)::after {
  content: "»";
  margin: 0 8px;
  color: #999;
  font-size: 1rem;
}

.breadcrumbs a {
  text-decoration: none;
  color: #0073e6;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
    color: #333;
    font-weight: 600;
    display: inline-block;
    max-width: 30ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes colorMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glowMove {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 600px) {
  body h1 { font-size: 1.25rem; }
  body h2 { font-size: 1.1rem; }
  body h3 { font-size: 0.95rem; }
  body h4 { font-size: 0.8rem; }
  body h5 { font-size: 0.65rem; }
  body h6 { font-size: 0.5rem; }
  
  .menu-toggle {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: #0f172a;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }

  .navbar.open {
    max-height: 300px;
    left: 25%;
    padding-bottom: .8rem;
    border-bottom: solid 3px #54606e;
  }

  .navbar a {
    width: 100%;
    font-size: 0.95rem;
    color: #fff;
    padding: .8rem 0 0 .8rem;
    border-top: 1px solid #6e6e6e;
  }
  
    .main-content {
        padding: 0;
        box-shadow: none;
    }

  .sidebar {
    padding: 1.2rem;
  }

  .logo {
    font-size: 1.4rem;
  }
}