/* Tradespheredaily - AI News Website Styles */

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

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

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

.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: 700;
  letter-spacing: -0.5px;
  color: white;
}

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

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

nav a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hero:hover {
  transform: translateY(-4px);
}

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

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

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

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-excerpt {
  font-size: 1.1rem;
  opacity: 0.95;
  line-height: 1.5;
}

/* Layout Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin-bottom: 3rem;
}

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

/* Article Card */
.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

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

.article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.article-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text);
}

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

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-author {
  font-weight: 500;
}

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

.trending-box {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.trending-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.trending-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.trending-item:hover {
  background: rgba(45, 125, 210, 0.05);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 8px;
}

.trending-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.6;
}

.trending-text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

/* Category Page */
.category-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 0;
  background: var(--bg-alt);
  border-radius: 12px;
}

.category-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.category-description {
  font-size: 1.2rem;
  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-full-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.article-byline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

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

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

.article-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
}

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

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

/* Related Articles */
.related-articles {
  max-width: 1000px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 2px solid var(--border);
}

.related-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
}

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

/* Back Button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 2rem;
  transition: gap 0.3s ease;
}

.back-link:hover {
  gap: 0.75rem;
}

/* Footer */
footer {
  background-color: 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 h3 {
  font-size: 1.1rem;
  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.7);
  transition: color 0.3s ease;
}

.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.9rem;
}

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

  .sidebar {
    position: static;
  }

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

@media (max-width: 768px) {
  nav ul {
    gap: 1rem;
  }

  nav a {
    font-size: 0.9rem;
  }

  .hero {
    height: 400px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

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

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

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

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

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

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

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

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .article-body {
    font-size: 1.05rem;
  }
}
