/* Marketedge - Finance News Website Styles */

:root {
  /* Unique color scheme derived from site name - deep financial blue/teal */
  --primary: #0A7EA4;
  --primary-dark: #065A7A;
  --primary-light: #1CA8DB;
  --text: #1a1a2e;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --header-bg: #1a1a2e;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
* {
  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;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header */
header {
  background: var(--header-bg);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px 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.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

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

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

nav a {
  color: rgba(255, 255, 255, 0.9);
  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;
  margin-top: 2rem;
}

/* 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-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 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

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

.hero-meta {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

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

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

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

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

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

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

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

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

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

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

.sidebar-section {
  background: var(--bg);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
}

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

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

.trending-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-alt);
}

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

.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;
  font-weight: 600;
  color: var(--text);
}

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

/* Category Page */
.category-header {
  background: var(--bg);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px var(--shadow);
}

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

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

/* Article Page */
.article-page {
  max-width: 800px;
  margin: 0 auto;
}

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

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

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

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

.article-title {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-meta-bar {
  color: var(--text-light);
  font-size: 0.95rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--bg-alt);
}

.article-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 20px var(--shadow);
}

.article-content {
  background: var(--bg);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 3rem;
}

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

.article-content p:first-of-type::first-letter {
  font-size: 3.5rem;
  font-weight: 700;
  float: left;
  line-height: 1;
  margin: 0.1rem 0.5rem 0 0;
  color: var(--primary);
}

/* Related Articles */
.related-articles {
  background: var(--bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 10px var(--shadow);
  margin-bottom: 3rem;
}

.related-articles h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

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

.related-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--bg-alt);
  transition: background 0.3s;
}

.related-card:hover {
  background: #e9ecef;
}

.related-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
}

.related-card-content h4 {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.related-card-content .category-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

/* 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);
}

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

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

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--primary-light);
}

.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);
}

/* 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) {
  .hero {
    height: 400px;
  }

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

  .hero-overlay {
    padding: 2rem;
  }

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

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

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .article-title {
    font-size: 2rem;
  }

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

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

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

@media (max-width: 480px) {
  nav ul {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .logo {
    font-size: 1.4rem;
  }

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

  .article-content p:first-of-type::first-letter {
    font-size: 2.5rem;
  }
}
