/* ========================================
   PASSIVE WEALTH - Modern Design
   ======================================== */

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2128;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --accent: #3fb950;
  --accent-hover: #2ea043;
  --accent-light: #dafbe1;
  --border: #30363d;
  --border-light: #484f58;
  --gradient-start: #3fb950;
  --gradient-end: #58a6ff;
  --success: #3fb950;
  --danger: #f85149;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --max-w: 1280px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.main-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}


.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(63,185,80,0.1);
}

.lang-selector { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--border-light); color: var(--text); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  display: none;
  box-shadow: var(--shadow);
  z-index: 1001;
}
.lang-menu.active { display: block; }
.lang-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-menu button:hover { background: var(--bg-hover); color: var(--text); }

/* ===== HERO / FEATURED ===== */
.hero-section {
  padding: 48px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.featured-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.featured-main .card-img {
  height: 240px;
  background: linear-gradient(135deg, #0d2818 0%, #0a1628 100%);
  position: relative;
  overflow: hidden;
}

.featured-main .card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--bg-card));
}

.featured-main .card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-main .category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.featured-main h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.featured-main h2 a {
  color: inherit;
  text-decoration: none;
}

.featured-main h2 a:hover { color: var(--accent); }

.featured-main p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
}

.featured-main .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

.section-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.section-link:hover { text-decoration: underline; }

/* ===== ARTICLES GRID ===== */
.articles-section {
  padding: 32px 0 48px;
}

.articles-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

@media (max-width: 960px) {
  .articles-layout { grid-template-columns: 1fr; }
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; }
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.article-card .card-img {
  height: 180px;
  background: linear-gradient(135deg, #0d2818 0%, #0d1421 100%);
  position: relative;
  overflow: hidden;
}

.article-card .card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(63,185,80,0.08) 0%, transparent 60%);
}

.article-card .card-body {
  padding: 20px;
}

.article-card .category-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}


/* ===== LINK RESET FOR CARDS ===== */
.article-card a,
.article-card h2 a,
.article-card h3 a,
.article-card h3 a:link,
.article-card h3 a:visited,
.article-card h3 a:active {
  color: var(--text) !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
}

.article-card h3 a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}
.article-card h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-card h3 a { color: var(--text) !important; text-decoration: none !important; }
  color: var(--text);
  text-decoration: none;
}

.article-card h3 a:hover { color: var(--accent) !important; }
.article-card h3 a:visited { color: var(--text) !important; }

.article-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.article-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.article-card .read-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-widget h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.popular-list {
  list-style: none;
}

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

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

.popular-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  transition: color 0.2s;
}

.popular-list a:hover { color: var(--accent); }

.popular-list .num {
  font-size: 18px;
  font-weight: 800;
  color: var(--border-light);
  min-width: 24px;
  line-height: 1;
}

.popular-list a:hover .num { color: var(--accent); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  font-size: 12px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.tag-cloud a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(63,185,80,0.08);
}

.newsletter-widget p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.newsletter-form input:focus { border-color: var(--accent); }

.newsletter-form input::placeholder { color: var(--text-dim); }

.newsletter-form button {
  padding: 10px 18px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: var(--accent-hover); }

/* ===== ADS ===== */
.ad-container {
  text-align: center;
  padding: 16px 0;
}

.ad-top {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.ad-bottom {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  margin-top: 24px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 32px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-section h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer-section h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-section p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== ARTICLE PAGE ===== */
.article-page {
  padding: 32px 0 48px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
}

.article-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border);
}

.article-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.article-header .breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.article-header .breadcrumb a:hover { text-decoration: underline; }

.article-header .category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.article-header .excerpt {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-header .meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

.article-header .meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-body {
  padding: 32px 40px;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
}

.article-body h2 {
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

.article-body a {
  color: var(--accent);
  text-decoration: none;
}

.article-body a:hover { text-decoration: underline; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--bg-hover);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text);
}

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

.article-body li {
  margin-bottom: 10px;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.article-body code {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent);
}

.article-footer-section {
  padding: 24px 40px;
  border-top: 1px solid var(--border);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-tags .tag {
  font-size: 12px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.article-tags .tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== RELATED ARTICLES ===== */
.related-section {
  margin-top: 40px;
}

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

@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ===== CATEGORY PAGE ===== */
.category-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.category-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.category-header p {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 16px;
}

/* ===== 404 ===== */
.not-found {
  text-align: center;
  padding: 80px 20px;
}

.not-found h1 {
  font-size: 120px;
  font-weight: 800;
  color: var(--border-light);
  line-height: 1;
}

.not-found h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0;
}

.not-found p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.not-found a {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.not-found a:hover { background: var(--accent-hover); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== MOBILE ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links { display: none; }
  .lang-selector { display: none; }
  
  .article-header {
    padding: 24px 20px;
  }
  
  .article-header h1 {
    font-size: 24px;
  }
  
  .article-body {
    padding: 24px 20px;
    font-size: 16px;
  }
  
  .featured-main .card-body {
    padding: 20px;
  }
  
  .featured-main h2 {
    font-size: 20px;
  }
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== ADSENSE STYLES ===== */
.ad-container {
  text-align: center;
  padding: 16px 0;
  min-height: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-container ins {
  display: block;
  margin: 0 auto;
}

.ad-article-top {
  margin: 0 0 20px 0;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}

.ad-article-mid {
  margin: 32px 0;
}

.ad-article-bottom {
  margin: 20px 0 0 0;
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: none;
}

.ad-sidebar {
  min-height: 250px;
}

.ad-home {
  max-width: var(--max-w);
  margin: 0 auto 24px;
  padding: 0 24px;
}

/* ===== IMAGE PLACEHOLDERS ===== */
.card-img {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-placeholder {
  font-size: 48px;
  opacity: 0.3;
}

/* ===== BETTER RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .articles-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: 2;
  }
  
  .articles-main {
    order: 1;
  }
  
  .article-layout {
    grid-template-columns: 1fr;
  }
  
  .article-header {
    padding: 24px 20px;
  }
  
  .article-header h1 {
    font-size: 24px;
  }
  
  .article-body {
    padding: 24px 20px;
    font-size: 16px;
  }
  
  .article-body h2 {
    font-size: 20px;
  }
  
  .featured-main {
    min-height: auto;
  }
  
  .featured-main .card-img {
    height: 180px;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== ARTICLE IMAGES ===== */
.article-image {
  margin: 0 -40px 24px;
  border-radius: 0;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .article-image {
    margin: 0 -20px 20px;
  }
  .article-image img {
    max-height: 250px;
  }
}
