/* Marketbrief - Finance News Site Styles */

:root {
  /* Unique color scheme derived from 'marketbrief' */
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --text: #1a1a2e;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --header-bg: #1a1a2e;
  --border: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

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

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

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

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  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 Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

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

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

.hero-content {
  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-content .category-badge {
  margin-bottom: 1rem;
}

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

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

.hero-content .meta {
  font-size: 0.875rem;
  opacity: 0.8;
}

.hero-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Category Badge */
.category-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.35rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

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

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

.article-card-content .category-badge {
  margin-bottom: 0.75rem;
}

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

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

.article-card .meta {
  font-size: 0.8125rem;
  color: var(--text-light);
}

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

.sidebar-widget {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.trending-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: inherit;
}

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

.trending-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.trending-item-content h4 {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--text);
  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 8px var(--shadow);
  text-align: center;
}

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

.category-header p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Article Page */
.article-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.article-header h1 {
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--text-light);
  font-size: 0.9375rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-image {
  max-width: 1000px;
  margin: 0 auto 3rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.article-content p {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* Related Articles */
.related-articles {
  max-width: 1000px;
  margin: 3rem auto 0;
}

.related-articles h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

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

/* Back Link */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--primary-dark);
}

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

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

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9375rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

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

  .sidebar {
    position: static;
  }

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

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 0.875rem;
  }

  .hero {
    height: 400px;
  }

  .hero-content {
    padding: 2rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

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

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

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

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

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

  .category-header {
    padding: 2rem;
  }

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

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

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .hero {
    height: 300px;
    border-radius: 8px;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

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

  .article-content p {
    font-size: 1rem;
  }
}
