/* Custom CSS for PERFECT button alignment */
.site-nav {
  margin: 6px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav .btn {
  display: inline-block;
  padding: 4px 10px;
  background-color: #0366d6;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 70px;
  text-align: center;
  flex: 0 0 auto;
}

.site-nav .btn:hover {
  background-color: #0256b6;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.site-nav .btn.active {
  background-color: #024ea1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Blog title as home link - MINIMAL */
.project-name {
  margin-bottom: 0;
}

.project-name a {
  transition: color 0.3s;
  font-size: 1.1em;
}

.project-name a:hover {
  color: #159957;
  text-decoration: none;
}

/* Tagline compact */
.project-tagline {
  margin-top: 1px;
  margin-bottom: 2px;
  font-size: 0.7em;
}

/* Mobile responsive - PERFECT 3-BUTTON FIT */
@media screen and (max-width: 768px) {
  .site-nav {
    gap: 8px;
  }
  
  .site-nav .btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 80px;
    flex: 1;
    max-width: 120px;
  }
  
  .project-name a {
    font-size: 1.5em;
  }
  
  .project-tagline {
    font-size: 0.95em;
  }
}

/* Extra small mobile - TIGHT BUT PERFECT FIT */
@media screen and (max-width: 480px) {
  .site-nav {
    gap: 6px;
  }
  
  .site-nav .btn {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 70px;
  }
  
  .project-name a {
    font-size: 1.4em;
  }
}

/* Content padding */
section {
  padding: 0 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* Article content spacing */
article {
  line-height: 1.6;
  margin-bottom: 30px;
}

article h1, article h2, article h3, article h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

article p {
  margin-bottom: 1em;
}

article ul, article ol {
  margin-left: 20px;
  margin-bottom: 1em;
}

article li {
  margin-bottom: 0.5em;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
  .site-nav .btn {
    display: inline-block;
    margin: 5px;
    width: 45%;
    max-width: 150px;
    min-width: auto;
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .site-nav {
    margin: 15px 0;
  }
}

/* Content wrapper */
.content-wrapper {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}





/* Featured Section */
.featured-section {
  text-align: center;
  margin: 30px 20px 20px 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #0366d6;
  padding-top: 20px;
  clear: both;
}

.section-title {
  font-size: 1.6em;
  color: #024ea1;
  margin-bottom: 8px;
}

.section-description {
  color: #666;
  font-size: 1em;
}

/* Article Cards */
.article-card {
  width: 100%;
  max-width: 440px;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
}

/* Article Grid - 2 columns for tablet/desktop, 1 column for mobile */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 24px auto;
  max-width: 960px;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Tablet breakpoint */
@media (max-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    gap: 16px;
  }
}

/* Mobile breakpoint - 1 column */
@media (max-width: 540px) {
  .article-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 20px;
  }
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #ccc;
}

/* Article Image Wrapper - enforces 16:9 aspect ratio */
.article-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #159957 0%, #155799 100%);
}

.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
}

.article-content {
  padding: 4px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: -12px;
}

/* Remove whitespace between image and content */
.article-card {
  font-size: 0;
  line-height: 0;
}

.article-card > * {
  font-size: initial;
  line-height: normal;
}

.article-title {
  font-size: 1.1em;
  margin-bottom: 4px;
  color: #155799;
  line-height: 1.3;
  margin-top: 0;
}

.article-excerpt {
  color: #555;
  line-height: 1.4;
  margin-bottom: 6px;
  font-size: 0.85em;
  margin-top: 0;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8em;
  color: #777;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.article-date {
  color: #159957;
  font-weight: 500;
}

.article-category {
  background: #f0f7ff;
  color: #155799;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8em;
}

.read-more {
  display: inline-block;
  background: #159957;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
  font-size: 0.9em;
}

.read-more:hover {
  background: #1a7c47;
  text-decoration: none;
}

/* Mobile responsive for homepage */
@media screen and (max-width: 768px) {
  .homepage-hero {
    padding: 30px 15px;
    margin-bottom: 30px;
  }
  
  .hero-title {
    font-size: 2em;
  }
  
  .hero-subtitle {
    font-size: 1.1em;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
  
  .article-image-wrapper {
    aspect-ratio: 4 / 5;
  }
  
  .article-card {
    max-width: 100%;
  }
  
  .article-content {
    padding: 16px 18px;
  }
}

/* Fix header background solid - MINIMAL */
.page-header {
  background-color: #159957 !important;
  padding: 6px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: auto;
  width: 100%;
  box-sizing: border-box;
  cursor: grab;
  user-select: none;
}

.page-header:active {
  cursor: grabbing;
}

/* Ensure main content doesn't overlap with fixed header - MINIMAL */
body {
  padding-top: 80px;
}

/* ALL content sections must clear the fixed header */
.page-header + *,
.content-wrapper,
main,
.article-content,
article,
.homepage-hero,
.hero-section,
.page-content,
section,
.entry-content {
  margin-top: 85px !important;
  padding-top: 0 !important;
}

/* Cover/hero images must not be hidden behind fixed header */
.hero-image,
.cover-image,
.page-header + img,
.hero,
.cover {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Mobile responsive header spacing - MINIMAL */
@media screen and (max-width: 768px) {
  body {
    padding-top: 80px;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding-top: 85px;
  }
}

main, .main-content, .page-content, .content-wrapper {
  margin-top: 85px !important;
}

/* Hero spacing from fixed header */
.homepage-hero {
  margin: 20px !important;
}

/* Fix article page header spacing */
.article-content, article {
  padding-top: 40px !important;
}

/* Better spacing for all content */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

p {
  margin-bottom: 1.2em;
  line-height: 1.7;
}

ul, ol {
  margin-left: 1.5em;
  margin-bottom: 1.2em;
}

li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

blockquote {
  margin: 1.5em 0;
  padding-left: 1em;
  border-left: 3px solid #159957;
  color: #555;
}

code {
  background-color: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}

pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5em 0;
}

/* Image styling - FIXED SIZE */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Control image sizes */
img[src*="unsplash.com"] {
  max-width: 600px;
  width: 100%;
}

/* Featured image at top of article */
article img:first-of-type {
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

/* Inline images within content */
article p img,
article li img {
  max-width: 400px;
  margin: 1em auto;
}

/* Image containers for better control */
.image-container {
  text-align: center;
  margin: 1.5em 0;
}

.image-container img {
  margin: 0 auto;
}

/* Image captions */
.image-caption {
  display: block;
  text-align: center;
  font-size: 0.85em;
  color: #666;
  margin-top: 0.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  line-height: 1.4;
}

/* Responsive images */
@media screen and (max-width: 768px) {
  img[src*="unsplash.com"] {
    max-width: 100%;
  }
  
  article img:first-of-type {
    max-height: 300px;
  }
  
  article p img,
  article li img {
    max-width: 100%;
  }
  
  img {
    border-radius: 6px;
    margin: 1em auto;
  }
}

/* Mobile content spacing */
@media screen and (max-width: 768px) {
  .content-wrapper {
    padding: 15px;
  }
  
  section {
    padding: 0 15px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  h2 {
    font-size: 1.5em;
  }
}

/* Custom Footer Styling */
.custom-footer {
  margin-top: 60px;
  padding: 40px 20px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  border-top: 3px solid #0366d6;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h2 {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #fff;
}

.footer-brand p {
  color: #b0b7c3;
  line-height: 1.6;
  font-size: 0.95em;
}

.footer-links h3,
.footer-social h3 {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: #fff;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-social h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: #0366d6;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #b0b7c3;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.95em;
  display: inline-block;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2em;
  text-decoration: none;
  transition: all 0.3s;
}

.social-icons a:hover {
  background: #0366d6;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(3, 102, 214, 0.3);
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  color: #b0b7c3;
  font-size: 0.9em;
}

.footer-bottom p {
  margin: 0;
  opacity: 0.8;
}

/* Mobile responsive footer */
@media screen and (max-width: 768px) {
  .custom-footer {
    padding: 30px 15px 15px;
    margin-top: 40px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-brand h2 {
    font-size: 1.3em;
  }
  
  .social-icons {
    justify-content: flex-start;
  }
  
  .social-icons a {
    width: 36px;
    height: 36px;
    font-size: 1.1em;
  }
}
/* Homepage Hero Section */
.homepage-hero {
  text-align: center;
  padding: 20px 15px;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #159957 0%, #155799 100%);
  border-radius: 12px;
  color: #fff;
}

.hero-title {
  font-size: 1.8em;
  margin-bottom: 10px;
  color: #fff;
}

.hero-subtitle {
  font-size: 1em;
  max-width: 600px;
  margin: 0 auto 15px;
  opacity: 0.95;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-primary {
  background: #fff;
  color: #155799;
}

.btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

/* Categories Section */
.categories-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid #eee;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid #eee;
}

.category-card:hover {
  background: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.category-icon {
  font-size: 2em;
  margin-bottom: 10px;
}

.category-name {
  color: #155799;
  font-weight: 600;
  font-size: 0.95em;
}

/* Mobile responsive for homepage */
@media screen and (max-width: 768px) {
  .homepage-hero {
    padding: 30px 15px;
    margin-bottom: 30px;
  }
  
  .hero-title {
    font-size: 1.8em;
  }
  
  .hero-subtitle {
    font-size: 1em;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== POST PAGE STYLES ========== */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.post-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.post-title {
  font-size: 2.2em;
  color: #155799;
  margin-bottom: 15px;
  line-height: 1.3;
}

.post-meta {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 15px;
}

.post-meta span {
  margin: 0 8px;
}

.post-date {
  color: #159957;
  font-weight: 500;
}

.post-categories {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-tag {
  background: #f0f7ff;
  color: #155799;
  padding: 5px 14px;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 500;
}

.post-image {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.post-image img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  margin: 0;
}

.post-content {
  font-size: 1.1em;
  line-height: 1.8;
  color: #333;
}

.post-content h2 {
  color: #155799;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.post-content h3 {
  color: #159957;
  margin-top: 1.5em;
}

.post-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: #155799;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.back-link:hover {
  color: #159957;
  text-decoration: underline;
}

/* Table styling for post content */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.95em;
}

.post-content th,
.post-content td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid #ddd;
}

.post-content th {
  background: #155799;
  color: #fff;
  font-weight: 600;
}

.post-content tr:nth-child(even) {
  background: #f8f9fa;
}

/* Responsive post */
@media screen and (max-width: 768px) {
  .post {
    padding: 0 15px 30px;
  }
  
  .post-title {
    font-size: 1.8em;
  }
  
  .post-image img {
    max-height: 300px;
  }
  
  .post-content {
    font-size: 1em;
  }
}

/* ================= THE ULTIMATE SMALL IMAGE FIX ================= */
/* This ensures no image is "Gede" (Giant) on any screen */

img {
  max-width: 90% !important; /* Never full width */
  max-height: 250px !important; /* Strictly limit height */
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin: 10px auto !important;
  object-fit: contain !important; /* Ensure image isn't cropped or stretched */
  border-radius: 12px;
}

/* Fix thumbnails in cards so they don't break the layout */
.article-image-wrapper img {
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Fix Hero Banner on Home specifically */
img[alt*="Banner"] {
  max-height: 180px !important;
}

/* Remove the draggable script from header.html again */
sed -i '/<script>/,/<\/script>/d' _includes/header.html

# 7. Add Disclaimer Page back (it was in target_repo before reset)
cat <<EOF > disclaimer.md
---
layout: default
title: Disclaimer Affiliate
---

# Disclaimer Affiliate 📢

Beberapa link di **UlasanTekno** adalah link afiliasi. Jika Anda membeli melalui link tersebut, kami mungkin mendapat komisi tanpa biaya tambahan bagi Anda. Ini membantu kami terus memberikan ulasan jujur dan gratis.

---
[Kembali ke Beranda](/)

/* ================= HERO OVERLAY FIX ================= */
.hero-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  aspect-ratio: 16 / 9; /* FORCED 16:9 */
}

.hero-main-img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  margin: 0 !important;
}




@media (max-width: 600px) {
}

/* ================= FINAL HERO BANNER FIX ================= */
.hero-container {
  width: 100% !important;
  max-width: 1000px !important;
  margin: 0 auto 30px !important; /* CENTERING */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  aspect-ratio: 16 / 9 !important; /* FORCED 16:9 */
  background-color: #ffffff; /* White bg matches the user image */
  border-radius: 12px;
  overflow: hidden;
}

.hero-main-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* Ensure the whole image is visible without cropping */
  margin: 0 !important;
}

/* ================= THE FINAL PERFECT CENTERING FIX ================= */
.hero-container {
  width: 100% !important;
  max-width: 1000px !important;
  margin: 0 auto 30px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  aspect-ratio: 16 / 9 !important;
  background-color: #fcfcfc !important; /* Soft white to match image */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.hero-main-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* NO cropping, keep ratio */
  margin: 0 !important;
  display: block !important;
}

/* Ensure no other styles override the centering */
.hero-container img {
  margin-left: auto !important;
  margin-right: auto !important;
}
