/* Apple-inspired Minimalist Design */
/* Design principles: Simplicity, whitespace, elegant typography, subtle shadows */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent-blue: #0066cc;
  --accent-hover: #004499;
  --border-color: #d2d2d7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

/* Dark Mode */
.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --accent-blue: #5aa9ff;
  --accent-hover: #80bcff;
  --border-color: #4a4a4a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 40px;
}

.content {
  flex: 1;
  min-width: 0;
}

/* Header - Apple style minimal */
.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.search-toggle:hover {
  color: var(--text-primary);
}

/* Hero Section - Apple style */
.hero {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 60px 40px;
  border-radius: var(--radius-lg);
  margin: 30px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Ad Container */
.ad-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.sidebar-ad-container {
  min-height: 600px;
  margin-bottom: 24px;
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.85rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent-blue);
  text-decoration: none;
}

.breadcrumb span[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* ZA Bank Promo Banner */
.promo-banner {
  background: linear-gradient(135deg, #fef9e7 0%, #fff9e6 100%);
  border: 2px solid #ffd700;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 0 0 24px;
  box-shadow: var(--shadow-md);
}

/* Sidebar promo - compact version */
.sidebar-promo {
  margin-bottom: 24px;
}

.sidebar-promo .promo-header {
  margin-bottom: 16px;
}

.sidebar-promo .promo-icon {
  font-size: 2.5rem;
}

.sidebar-promo .promo-title h2 {
  font-size: 1.2rem;
}

.sidebar-promo .promo-subtitle {
  font-size: 0.85rem;
}

.sidebar-promo .promo-reasons {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.sidebar-promo .reason-card {
  padding: 10px 14px;
}

.sidebar-promo .reason-text {
  font-size: 0.85rem;
}

.sidebar-promo .promo-cta {
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.sidebar-promo .promo-code {
  font-size: 0.85rem;
}

.sidebar-promo .promo-code code {
  font-size: 1.1rem;
  padding: 6px 12px;
}

.sidebar-promo .promo-btn {
  padding: 12px 20px;
  font-size: 0.95rem;
  width: 100%;
}

.sidebar-promo .promo-disclaimer {
  font-size: 0.7rem;
  margin-top: 12px;
}

.promo-content {
  max-width: 900px;
  margin: 0 auto;
}

.promo-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.promo-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.promo-title h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.promo-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.promo-subtitle .highlight {
  color: #d4a017;
  font-weight: 700;
}

.promo-reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.reason-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.8);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.reason-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.reason-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.promo-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.promo-code {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-secondary);
}

.promo-code code {
  background: #fff;
  border: 2px dashed #d4a017;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #d4a017;
  letter-spacing: 0.1em;
}

.promo-buttons {
  display: flex;
  gap: 12px;
}

.promo-btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
  transition: all 0.2s;
}

.promo-btn.primary {
  background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.promo-btn.primary:hover {
  background: linear-gradient(135deg, #ffb800 0%, #ffa000 100%);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
}

.promo-btn.primary .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.2s;
}

.promo-btn.primary:hover .arrow {
  transform: translateX(4px);
}

.promo-btn.secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.promo-btn.secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
  text-decoration: none;
}

.promo-disclaimer {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .promo-banner {
    padding: 24px;
  }

  .promo-header {
    flex-direction: column;
    text-align: center;
  }

  .promo-icon {
    font-size: 2.5rem;
  }

  .promo-title h2 {
    font-size: 1.4rem;
  }

  .promo-reasons {
    grid-template-columns: 1fr;
  }

  .promo-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .promo-buttons {
    flex-direction: column;
  }

  .promo-btn {
    width: 100%;
  }
}

/* News Section */
.news-section {
  margin-bottom: 48px;
}

.news-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-card-content {
  padding: 20px;
}

.news-card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
}

.news-card h2,
.news-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.news-card h2 a,
.news-card h3 a {
  color: var(--text-primary);
}

.news-card h2 a:hover,
.news-card h3 a:hover {
  color: var(--accent-blue);
}

.news-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Category Badge - Apple style */
.category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.category-badge.stocks { background: #e3f2fd; color: #1565c0; }
.category-badge.forex { background: #e8f5e9; color: #2e7d32; }
.category-badge.crypto { background: #fff3e0; color: #ef6c00; }
.category-badge.economy { background: #fce4ec; color: #c2185b; }

.view-all {
  display: inline-block;
  margin-top: 20px;
  font-weight: 500;
  color: var(--accent-blue);
}

.view-all:hover {
  color: var(--accent-hover);
}

/* Sidebar */
.sidebar {
  width: 320px;
  flex-shrink: 0;
}

.affiliate-promo,
.trending {
  background: var(--bg-primary);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.affiliate-promo h3,
.trending h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.affiliate-promo ul,
.trending ul {
  list-style: none;
}

.affiliate-promo li,
.trending li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.affiliate-promo li:last-child,
.trending li:last-child {
  border-bottom: none;
}

.affiliate-promo li a,
.trending li a {
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.affiliate-promo li a:hover,
.trending li a:hover {
  color: var(--accent-blue);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 40px 0;
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

/* Article Page */
.article {
  background: var(--bg-primary);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.article-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.reading-time {
  color: var(--accent-blue);
  font-weight: 500;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 20px;
}

.read-full {
  display: inline-block;
  background: var(--accent-blue);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-weight: 500;
  transition: background 0.2s;
}

.read-full:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.affiliate-cta {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: var(--radius-md);
  margin-top: 30px;
  text-align: center;
}

.affiliate-cta h3 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.affiliate-btn {
  display: inline-block;
  background: var(--text-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  margin: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.affiliate-btn:hover {
  background: var(--text-secondary);
  text-decoration: none;
}

/* Related Section */
.related {
  margin-top: 48px;
}

.related h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-primary);
}

/* Search Bar */
.search-bar {
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
  padding: 24px;
  position: sticky;
  top: 60px;
  z-index: 99;
  border-bottom: 1px solid var(--border-color);
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--accent-blue);
}

.search-btn {
  background: var(--text-primary);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--text-secondary);
}

.search-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  padding: 8px 12px;
  color: var(--text-secondary);
}

.search-close:hover {
  color: var(--text-primary);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s, transform 0.2s;
}

.dark-mode-toggle:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.dark-mode-toggle svg {
  width: 20px;
  height: 20px;
}

.search-results {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 16px 0;
}

.search-result-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item a {
  display: block;
  color: var(--text-primary);
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 1rem;
}

.search-result-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.search-no-results {
  text-align: center;
  color: var(--text-secondary);
  padding: 30px;
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--text-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
  z-index: 100;
}

.scroll-top:hover {
  background: var(--text-secondary);
  transform: translateY(-2px);
}

/* 404 Page */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.error-content {
  text-align: center;
  max-width: 600px;
}

.error-content h1 {
  font-size: 5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.error-content h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 600;
}

.error-content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.error-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.2s;
}

.error-btn.primary {
  background: var(--text-primary);
  color: #fff;
}

.error-btn.primary:hover {
  background: var(--text-secondary);
  text-decoration: none;
}

.error-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.error-btn.secondary:hover {
  background: var(--border-color);
  text-decoration: none;
}

.error-tips {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: left;
}

.error-tips h3 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.error-tips ul {
  margin-left: 20px;
  color: var(--text-secondary);
}

.error-tips li {
  margin-bottom: 8px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    padding: 0 16px;
  }

  .sidebar {
    width: 100%;
  }

  .nav {
    display: none;
  }

  .header-container {
    justify-content: center;
  }

  .search-toggle {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 40px 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .article {
    padding: 24px;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}
