/* ==========================================================================
   Global Variables
   ========================================================================== */
:root {
  --primary: #d4af37; /* gold */
  --accent: #a67c00; /* dark gold */
  --bg: #000000;     /* black background */
  --text: #d4af37;   /* gold text */
  --header-bg: #000000;
  --card-bg: #111111;
  --footer-bg: #111111;
  --border: #d4af37; /* gold border */
  --font-family: Arial, Helvetica, sans-serif;
}
html { overflow-x: hidden; }

/* === GLOBAL STYLES === */
* { box-sizing: border-box; }
body {
  font-family: var(--font-family);
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

.mobile-safe-padding {
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: #ffe066; }

/* === HEADER === */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  width: 100%;
}
.branding { display: flex; align-items: center; gap: 10px; }
.logo { height: 40px; }
.site-name { font-size: 1.2em; font-weight: bold; }

/* === NAV === */
.main-nav {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
}
.nav-menu {
  display: none;
  gap: 20px;
  align-items: center;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease;
}
.nav-menu.active {
  display: flex !important;
  flex-direction: column;
  max-height: 500px !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto;
  transition: all 0.3s ease;
}
.nav-menu a { color: var(--text); padding: 6px 10px; }
.nav-menu a:hover { color: var(--primary); }
.nav-menu a.active {
  background: var(--primary);
  color: #000;
  border-radius: 4px;
}
.nav-menu > .dropdown { position: relative; }
.nav-menu > .dropdown > a:after { content: ' \25BE'; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--header-bg);
  border: 1px solid var(--border);
  min-width: 150px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
}
.submenu a { display: block; padding: 6px 10px; white-space: nowrap; color: var(--text); }
.dropdown:hover > .submenu { display: block; }
.hamburger {
  display: none;
  cursor: pointer;
  position: relative;
  z-index: 101;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #fff;
  margin: 4px 0;
  transition: 0.3s;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === FEATURED HERO === */
.featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.featured .hero-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-text {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  color: var(--text);
  word-break: break-word;
}
.hero-text h2 {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  line-height: 1.2;
}
.hero-text p {
  margin: 5px 0 0;
  font-size: clamp(0.9rem, 3vw, 1rem);
}

/* === LAYOUT WRAPPERS === */
.content-wrapper { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; }
.container { display: flex; flex: 1; gap: 20px; max-width: 1200px; margin: 0 auto; padding: 20px; }
.container main { flex: 3; }
.container .sidebar { flex: 1; }
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 70px;
  padding-bottom: 60px;
}

/* === CARDS === */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 20px; }
.card {
  border: 1px solid var(--border);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  background: var(--card-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s;
}
.card:hover { transform: translateY(-3px); }
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-main {
  width: 100%;
  max-width: 540px;       /* Batasi maksimal agar tidak terlalu lebar di desktop */
  margin: 1.2rem auto 2rem auto; /* Center di parent */
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: #191516;
  box-shadow: 0 2px 18px rgba(0,0,0,0.11);
}
.article-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  background: #191516;
  aspect-ratio: 16/9;
}
@media (max-width: 600px) {
  .article-main {
    max-width: 99vw;
    border-radius: 10px;
  }
  .article-main img {
    border-radius: 10px;
  }
}

.card-content { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.card-content h3 { margin: 0 0 10px; font-size: 1.2em; }
.card-content p { flex: 1; margin: 0 0 10px; color: var(--text); }
.card-content time { font-size: .8em; color: var(--primary); }
.badge { display: inline-block; background: var(--primary); color: #000; padding: 2px 6px; font-size: .75em; border-radius: 4px; margin-bottom: 5px; }

/* === SIDEBAR === */
.sidebar-title { margin-top: 0; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; }
.sidebar-list img { width: 80px; height: 45px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.side-meta { display: flex; flex-direction: column; }
.sidebar-list a { color: inherit; }
.sidebar-list time { font-size: .8em; color: var(--primary); }

/* === FOOTER === */
.bottom-nav {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 0);
  left: 0;
  width: 100%;
  height: calc(50px + env(safe-area-inset-bottom, 0));
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  color: var(--text);
  font-size: 0.9rem;
  padding: 5px 0;
}
.bottom-nav a.active {
  color: var(--primary);
}
.site-footer { display:block; }

@media (min-width: 768px) {
  .bottom-nav { height: calc(60px + env(safe-area-inset-bottom, 0)); padding-bottom: env(safe-area-inset-bottom, 0); }
  .bottom-nav a { font-size: 1rem; }
  .hamburger { display: none; }
  #nav-menu {
    display: flex !important;
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* === SHARE === */
.share { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.share a { padding: 8px 12px; border-radius: 4px; color: #000; background: var(--primary); text-decoration: none; }
.share a:hover { background: #ffe066; }

/* === RELATED === */
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 5px; }
.related a { text-decoration: none; }

/* === RESPONSIVE === */
  @media (max-width: 767px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .container { flex-direction: column; }
  .sidebar { order: 2; }
  .hamburger {
    display: block;
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 9999;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    z-index: 9998;
  }
  .featured {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .sidebar-list li { flex-direction: column; }
  .sidebar-list img { width: 100%; height: auto; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .header-inner { flex-wrap: wrap; padding: 10px; }
  .branding .logo { height: 32px; }
  .nav-menu { width: 100%; }
  .container, main { padding: 15px; }
  main { padding-top: 70px; padding-bottom: 60px; }
  .cards { grid-template-columns: 1fr; }
  .share a { flex: 1 1 auto; text-align: center; }
}

.quick-links {
  padding: 1.5rem 0 0.5rem 0;
  background: var(--footer-bg, #111);
  text-align: center;
}

.quick-links h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--primary, #ffb700);
  text-align: center;
}

.quick-links ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.quick-links li {
  margin: 0;
}

.quick-links a {
  color: var(--text, #ffe066);
  text-decoration: none;
  font-weight: 500;
}

.quick-links a:hover {
  color: var(--primary, #ffb700);
  text-decoration: underline;
}

.footer-content {
  color: var(--text, #ffe066);
  text-align: center;
  padding: 0 0 1rem 0;
  font-size: 0.93rem;
  margin: 0;
}

@media (max-width: 600px) {
  .quick-links ul {
    flex-direction: column;
    gap: 10px;
  }
}
