/* Global Market News - Finance News Website Styles */

:root {
  /* Unique color scheme derived from site name hash */
  --primary: #2c7da0;
  --primary-dark: #1a5a7d;
  --primary-light: #61a5c2;
  --text: #1a1a2e;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --header-bg: #1a1a2e;
  --border: #e0e0e0;
}

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

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

/* Header Styles */
header {
  background: var(--header-bg);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--primary-light);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary-light);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: white;
}

.hero-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.hero a {
  color: white;
  text-decoration: none;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.article-card-content {
  padding: 1.5rem;
}

.category-badge {
  display: inline-block;
  background: var(--primary-light);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.article-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: var(--text);
}

.article-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  gap: 1rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.trending-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: var(--text);
}

.trending-item:last-child {
  margin-bottom: 0;
}

.trending-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  min-width: 30px;
}

.trending-item h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 0.3s;
}

.trending-item:hover h4 {
  color: var(--primary);
}

/* Category Page */
.category-header {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-align: center;
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.category-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Article Page */
.article-page {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  max-width: 900px;
  margin: 0 auto 3rem;
}

.article-header {
  margin-bottom: 2rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

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

.article-page h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.article-byline {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--text-light);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body p {
  margin-bottom: 1.5rem;
}

.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.related-articles h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.related-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.3s, background 0.3s;
}

.related-card:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
}

.related-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.related-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Footer */
footer {
  background: var(--header-bg);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary-light);
}

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

.footer-section a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 0.9rem;
  }

  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .hero {
    height: 400px;
  }

  .hero-overlay {
    padding: 2rem 1.5rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-header {
    padding: 2rem 1.5rem;
  }

  .category-header h1 {
    font-size: 2rem;
  }

  .article-page {
    padding: 2rem 1.5rem;
  }

  .article-page h1 {
    font-size: 2rem;
  }

  .article-byline {
    flex-direction: column;
    gap: 0.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
