/* BlanjaMobil.com - Portal Otomotif Indonesia */
/* Color: Primary #1a3a5c, Secondary #e63946, Accent #f4a261 */

:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2640;
  --primary-light: #2a5a8c;
  --secondary: #e63946;
  --accent: #f4a261;
  --accent-dark: #e08b3e;
  --bg: #f5f6fa;
  --bg-white: #ffffff;
  --text: #1a1a2e;
  --text-light: #555;
  --text-muted: #888;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1200px;
  --header-height: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }

img { max-width: 100%; height: auto; display: block; }

/* === HEADER === */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-top {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-height);
}

.logo img {
  height: 45px;
  width: auto;
}

.logo-text {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--accent); }

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 25px;
  padding: 6px 16px;
}

.header-search input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  width: 200px;
  outline: none;
}

.header-search input::placeholder { color: rgba(255,255,255,0.6); }

.header-search button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 0 2px 8px;
}

/* === NAVIGATION === */
.main-nav {
  background: var(--primary-dark);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar { display: none; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-links li { position: relative; }

.nav-links a {
  display: block;
  padding: 12px 18px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s;
  border-bottom: 3px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-bottom-color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* === AD BANNER === */
.ad-banner {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 20px;
}

.ad-banner-inner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 30px 40px;
  text-align: center;
  color: #fff;
}

.ad-banner-inner h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.ad-banner-inner p {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* === FEATURED ARTICLES === */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--secondary);
  display: inline-block;
}

.featured-section {
  max-width: var(--max-width);
  margin: 30px auto;
  padding: 0 20px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.featured-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
  background: var(--bg-white);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.featured-card .card-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.featured-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 60px 20px 20px;
  color: #fff;
}

.featured-card .card-category {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.featured-card .card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.featured-card .card-title:hover { color: var(--accent); }

.featured-card .card-meta {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 6px;
}

/* === MAIN LAYOUT === */
.main-container {
  max-width: var(--max-width);
  margin: 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
}

/* === ARTICLE CARDS (List) === */
.articles-list { display: flex; flex-direction: column; gap: 24px; }

.article-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  transition: transform .2s, box-shadow .2s;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.article-card .card-img-wrap {
  flex: 0 0 280px;
  overflow: hidden;
}

.article-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.article-card:hover .card-img-wrap img { transform: scale(1.05); }

.article-card .card-body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-card .card-category {
  display: inline-block;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.article-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}

.article-card .card-title:hover { color: var(--secondary); }

.article-card .card-excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.article-card .card-meta .author { color: var(--primary); font-weight: 600; }

/* === SIDEBAR === */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar-widget .widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--secondary);
}

/* Popular articles */
.popular-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.popular-item:last-child { border-bottom: none; }

.popular-item .popular-num {
  flex: 0 0 30px;
  height: 30px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.popular-item .popular-info { flex: 1; }

.popular-item .popular-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.popular-item .popular-title:hover { color: var(--secondary); }

.popular-item .popular-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Categories list */
.category-list { list-style: none; }

.category-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.category-list li:last-child { border-bottom: none; }

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.category-list a:hover { color: var(--secondary); }

.category-count {
  background: var(--bg);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* Recent posts */
.recent-post {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.recent-post:last-child { border-bottom: none; }

.recent-post img {
  flex: 0 0 70px;
  height: 55px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.recent-post .recent-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.recent-post .recent-title:hover { color: var(--secondary); }

.recent-post .recent-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}

.pagination a {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}

.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.pagination .dots {
  background: none;
  border: none;
  color: var(--text-muted);
}

/* === ARTICLE PAGE === */
.article-page {
  max-width: var(--max-width);
  margin: 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
}

.article-content-area {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-content-area .article-hero-img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.article-content-area .article-body {
  padding: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--text-muted); }

.article-content-area .article-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 14px;
}

.article-content-area .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-content-area .article-meta .meta-author {
  color: var(--primary);
  font-weight: 600;
}

.article-content-area .article-meta .meta-cat a {
  background: var(--secondary);
  color: #fff;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

/* Article body prose */
.article-prose { font-size: 16px; line-height: 1.8; color: var(--text); }

.article-prose h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin: 30px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

.article-prose p { margin-bottom: 16px; }

.article-prose ul,
.article-prose ol {
  margin: 0 0 16px 24px;
}

.article-prose li { margin-bottom: 6px; }

.article-prose blockquote {
  border-left: 4px solid var(--secondary);
  padding: 12px 20px;
  background: var(--bg);
  margin: 20px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-light);
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.article-prose th,
.article-prose td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-prose th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.article-prose tr:nth-child(even) { background: var(--bg); }

.article-prose img {
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.article-tags a {
  display: inline-block;
  background: var(--bg);
  color: var(--text-light);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all .2s;
}

.article-tags a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Related articles */
.related-articles {
  margin-top: 30px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.related-articles .section-title { margin-bottom: 16px; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: transform .2s;
}

.related-card:hover { transform: translateY(-3px); }

.related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.related-card .related-info { padding: 12px; }

.related-card .related-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card .related-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === CATEGORY PAGE === */
.category-header {
  max-width: var(--max-width);
  margin: 30px auto 0;
  padding: 0 20px;
}

.category-header-inner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 30px;
  color: #fff;
}

.category-header-inner h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.category-header-inner p {
  opacity: 0.85;
  font-size: 14px;
}

/* === FOOTER === */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  margin-top: 50px;
}

.footer-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color .2s;
}

.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  z-index: 999;
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--secondary); }

/* === SEARCH PAGE === */
.search-results-header {
  max-width: var(--max-width);
  margin: 30px auto 0;
  padding: 0 20px;
}

.search-results-header h1 { font-size: 1.4rem; color: var(--primary); }

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results h2 { font-size: 1.3rem; color: var(--text); margin-bottom: 10px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .main-container,
  .article-page {
    grid-template-columns: 1fr;
  }
  
  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary-dark);
  }
  
  .nav-links.active { display: flex; }
  
  .nav-container { flex-wrap: wrap; }
  .nav-container .hamburger { margin-left: auto; }
  
  .header-search { display: none; }
  
  .article-card { flex-direction: column; }
  .article-card .card-img-wrap {
    flex: none;
    height: 200px;
  }
  
  .article-content-area .article-body { padding: 20px; }
  .article-content-area .article-title { font-size: 1.4rem; }
  
  .footer-main { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  
  .featured-card .card-img { height: 200px; }
}

@media (max-width: 480px) {
  .header-top { padding: 0 12px; }
  .main-container { padding: 0 12px; }
  .article-page { padding: 0 12px; }
  .article-content-area .article-title { font-size: 1.2rem; }
  .article-prose { font-size: 15px; }
}

/* === PRINT === */
@media print {
  .site-header, .main-nav, .sidebar, .site-footer, .back-to-top, .ad-banner, .related-articles { display: none !important; }
  .main-container, .article-page { grid-template-columns: 1fr !important; }
  body { background: #fff; }
}
