body {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 300;
  color: #f0f0f0;
  background: #1a0f0a;
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll entirely */
}

/* Links */
a {
  color: #ff9800;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: #ef6c00;
}

/* HEADER */
.site-header {
  position: relative;
  width: 100%;
  height: 160px;
  background: #1a0f0a; /* Match body background outside content */
  overflow: hidden;
}

/* Inner header area - orange-brown background that matches page content width */
.site-header .header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  position: relative;
  background: #331a0d; /* Updated from purple to warm brown */
  border-radius: 0 0 6px 6px;
}

.site-header .header-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  border-radius: 0 0 6px 6px;
}

.site-header .logo {
  position: absolute;
  left: 40px; /* adjust this value as needed */
  top: 50%;
  transform: translateY(-50%); /* only vertical centering now */
  max-height: 160px;
}

.site-nav {
  position: absolute;
  top: 20px;
  right: 30px;
}

/* ✅ Navigation buttons always visible with orange background */
.site-nav a {
  color: #fff; /* white text */
  background: #ff9800; /* orange background always visible */
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.site-nav a:hover {
  background: #ef6c00; /* slightly darker on hover */
  color: #fff;
}

/* MAIN LAYOUT */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: -1;
  }
}

/* CONTENT */
.content .post-preview {
  background: #332016;
  border: 1px solid #ff9800;
  border-radius: 6px;
  margin-bottom: 20px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ✅ Global image style for homepage and articles */
.content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: block;
  margin: 0 auto 16px auto;
}

/* Keep old preview rule for homepage cards */
.content .post-preview img {
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Fix for main article page image */
article.content > img:first-of-type {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 20px auto;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

/* Optional smooth fade-in effect for main article image */
article.content > img:first-of-type {
  opacity: 0;
  transform: scale(1.02);
  animation: fadeInImage 1s ease forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.content .post-preview h2 {
  font-weight: 600;
  margin: 10px 0;
  color: #ffb74d;
}

.content .post-preview p {
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  background: #ff9800;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}

.btn:hover {
  background: #ef6c00;
  color: #fff;
}

/* SIDEBAR */
.sidebar {
  background: #332016;
  padding: 16px;
  border: 1px solid #ff9800;
  border-radius: 6px;
}

.sidebar h3 {
  margin-top: 0;
  font-weight: 600;
  color: #ffb74d;
}

.sidebar-post {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.sidebar-post img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

/* FOOTER — FULL-WIDTH ORANGE-BROWN BAR RESTORED */
.site-footer {
  background: #331a0d; /* Updated to warm brown */
  color: #ff9800;
  text-align: center;
  padding: 16px;
  margin-top: 40px;
  border-top: 1px solid #ff9800;
}

.site-footer p,
.site-footer div {
  margin: 0 auto;
  display: block;
  text-align: center;
}

/* BACK TO TOP BUTTON */
#toTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #ff9800;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease;
}
#toTop:hover {
  background: #ef6c00;
}

/* PARAGRAPHS */
p {
  text-align: justify;
  text-justify: inter-word;
}

/* ULTRAWIDE CENTERING */
@media (min-width: 1800px) {
  .layout,
  .site-header .header-inner {
    max-width: 1600px;
  }
}

/* SUBTLE BACKGROUND EDGE FRAMING */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(26, 15, 10, 0.9) 60%, rgba(26, 15, 10, 1) 100%);
  z-index: -1;
}

/* Metrolagu Network Footer Section (GameArena Theme – Adjusted Colors) */
.metrolagu-network {
  background: none; /* inherits footer background */
  color: #FFE0B2; /* warm cream for readability */
  text-align: left;
  padding: 20px 0;
}

.network-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.metrolagu-network h3 {
  font-size: 1.2em;
  margin-bottom: 8px;
  color: #FFB74D; /* bright amber accent for header */
  font-weight: 600;
  text-align: center;
}

.metrolagu-network p {
  color: #FFF3E0; /* soft sand tone for paragraph */
  margin-bottom: 10px;
  line-height: 1.7;
  text-align: center;
}

.network-links {
  text-align: center;
}

.network-links a {
  color: #FFE0B2; /* warm gold link tone */
  text-decoration: none;
  transition: color 0.3s ease;
}

.network-links a:hover {
  color: #FF9800; /* vivid orange hover */
  text-decoration: none;
}

/* Footer copyright link styling */
.site-footer .copyright a,
.site-footer .copyright a:link,
.site-footer .copyright a:visited {
  color: #EAE6FF !important; /* same as base copyright text */
  text-decoration: none !important;
  transition: opacity 0.3s ease;
}

/* Match link color on hover to the parent hover state */
.site-footer .copyright:hover a,
.site-footer .copyright a:hover,
.site-footer .copyright a:active {
  color: #0B0B14 !important; /* same as text color when hovered */
  text-decoration: none !important;
}

/* Distinct, pill-styled copyright design (GameArena Theme) */
.site-footer .copyright {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  color: #EAE6FF;                      /* Soft violet-white for readability */
  background: #0B0B14;                 /* Deep space black base */
  padding: 8px 22px;
  border: 1.5px solid rgba(255, 0, 128, 0.6); /* Neon magenta border */
  border-radius: 999px;
  margin-top: 12px;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(0, 255, 255, 0.4); /* Cyber blue glow */
  transition: all 0.3s ease;
}

/* Hover tone and glow */
.site-footer .copyright:hover {
  background: #FF0080;                 /* Neon magenta hover */
  color: #0B0B14;                      /* Deep black contrast */
  box-shadow: 0 3px 12px rgba(0, 255, 255, 0.6); /* Vibrant cyan pulse */
  transform: translateY(-1px);
}

/* Reduced footer padding for close bottom alignment */
.site-footer {
  padding: 18px 0;
}
