/* =======================================================
   SAHAMBAGUS v2.3 GLOBAL STYLES (Mobile Polished Upgrade)
   ======================================================= */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: #0d111f;
  color: #e6edf3;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  scroll-behavior: smooth;
}

img, iframe, video {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* === CONTAINERS === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-with-sidebar {
  display: flex;
  align-items: flex-start;
  gap: 25px;
}

/* === CARDS === */
.card {
  background: #11162a;
  border: 1px solid #1a1f3a;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(62,166,255,0.3);
  background: #131a33;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5 {
  color: #3ea6ff;
  margin-bottom: 10px;
  font-weight: 600;
}

a {
  color: #3ea6ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #6ebaff;
}

/* === SIDEBAR === */
.sidebar {
  width: 320px;
  flex-shrink: 0;
}

.sidebar .widget {
  margin-bottom: 25px;
  background: #101426;
  border: 1px solid #1c223b;
  border-radius: 10px;
  padding: 18px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.sidebar .widget:hover {
  background: #141b33;
  transform: translateY(-2px);
}

.widget-title {
  color: #3ea6ff;
  font-size: 1.1rem;
  margin-bottom: 12px;
  border-bottom: 1px solid #1c223b;
  padding-bottom: 6px;
}

/* === META & TAGS === */
.meta {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.post-tags {
  font-size: 14px;
  color: #9ca3af;
}

.post-tags a {
  color: #6ebaff;
}

/* === COMMENTS === */
.comments-section {
  margin-top: 30px;
  background: #0f1426;
  border: 1px solid #1c223b;
  border-radius: 10px;
  padding: 20px;
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =======================================================
   📱 RESPONSIVE LAYOUTS (POLISHED)
   ======================================================= */

/* Tablet layout */
@media (max-width: 1024px) {
  .content-with-sidebar {
    display: block;
  }

  .main-content {
    width: 100%;
  }

  .sidebar {
    width: 100%;
    margin-top: 30px;
  }

  .card {
    padding: 18px;
  }

  h1.entry-title {
    font-size: 1.7rem;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  h1.entry-title {
    font-size: 1.4rem;
  }

  h2, h3 {
    font-size: 1.1rem;
  }

  .entry-content {
    font-size: 0.95rem;
  }

  .card {
    padding: 16px;
    border-radius: 10px;
  }

  .meta, .post-tags {
    font-size: 13px;
  }

  /* === Sidebar turun di bawah === */
  .content-with-sidebar {
    flex-direction: column !important;
    gap: 20px !important;
  }

  #primary, .site-main {
    width: 100% !important;
    order: 1;
  }

  #secondary, .sidebar, .widget-area {
    width: 100% !important;
    order: 2;
    display: block !important;
    margin-top: 20px;
    background: #0f1426;
    border-radius: 12px;
    padding: 10px;
  }

  .sidebar .widget {
    background: #101829;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 14px;
  }

  /* Touch-friendly buttons */
  button, .button, .wp-block-button__link, a.btn {
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 8px;
  }

  /* Give breathing space to bottom content */
  body {
    padding-bottom: 70px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  .container {
    padding: 0 10px;
  }

  .card {
    padding: 12px;
  }

  .sidebar {
    padding: 10px;
  }

  .sidebar .widget {
    padding: 12px;
  }

  h1.entry-title {
    font-size: 1.3rem;
  }

  h2, h3 {
    font-size: 1rem;
  }
}

/* === STICKY HEADER === */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #0d111f;
  border-bottom: 1px solid #1a1f2e;
}

/* === MOBILE BOTTOM NAVIGATION BAR === */
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #0f1426;
    border-top: 1px solid #1a1f3a;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55px;
    z-index: 1000;
  }

  .mobile-menu a {
    flex: 1;
    text-align: center;
    color: #9fc4ff;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    transition: color 0.2s ease;
  }

  .mobile-menu a:hover {
    color: #3ea6ff;
  }

  .mobile-menu span {
    display: block;
    font-size: 11px;
    margin-top: 2px;
  }
}
