/* 356news Premium CSS - Professional News Publication Styles */

:root {
  /* Primary Color - Derived from "356news" - Deep amber/gold accent */
  --primary: #c49a3b;
  --primary-dark: #a17f2d;
  --primary-light: #e6c877;

  /* Text Colors */
  --text: #1a1a2e;
  --text-secondary: #555;
  --text-light: #888;

  /* Background Colors */
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --bg-dark: #1a1a2e;

  /* UI Colors */
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: all 0.2s ease;

  /* Category Colors */
  --cat-world: #2563eb;
  --cat-business: #059669;
  --cat-politics: #dc2626;
  --cat-technology: #7c3aed;
  --cat-lifestyle: #db2777;
  --cat-breaking: #ea580c;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1.5rem;
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 3rem 0;
}

.main-content {
  min-width: 0;
}

/* Top Bar */
.top-bar {
  background: var(--primary);
  height: 4px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

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

.header-date {
  font-size: 0.875rem;
  color: var(--text-light);
  display: none;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Breaking News Ticker */
.breaking-ticker {
  background: var(--bg-dark);
  color: white;
  padding: 0.75rem 0;
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-label {
  background: var(--cat-breaking);
  color: white;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  flex-shrink: 0;
}

.ticker-text {
  font-size: 0.875rem;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Hero Section */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  max-height: 700px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem;
  color: white;
  max-width: 800px;
}

.hero-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-excerpt {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

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

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

.article-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.article-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

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

.article-card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 3px;
}

.article-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Category Badge Colors */
.cat-world { background: var(--cat-world); color: white; }
.cat-business { background: var(--cat-business); color: white; }
.cat-politics { background: var(--cat-politics); color: white; }
.cat-technology { background: var(--cat-technology); color: white; }
.cat-lifestyle { background: var(--cat-lifestyle); color: white; }
.cat-breaking { background: var(--cat-breaking); color: white; }

/* Featured Card (Larger) */
.article-card.featured {
  grid-column: span 2;
}

.article-card.featured .article-card-title {
  font-size: 1.5rem;
}

.article-card.featured .article-card-excerpt {
  -webkit-line-clamp: 3;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.sidebar-section {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

/* Trending Items */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.trending-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.trending-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  min-width: 2.5rem;
}

.trending-content {
  flex: 1;
}

.trending-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

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

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

/* Editor's Picks */
.editors-picks {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.editors-pick-item {
  display: flex;
  gap: 1rem;
}

.editors-pick-image {
  width: 80px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.editors-pick-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editors-pick-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.editors-pick-title:hover {
  color: var(--primary);
}

/* Category Section on Homepage */
.category-section {
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.category-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.category-section-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.category-section-link {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
}

.category-section-link:hover {
  text-decoration: underline;
}

.category-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Category Page Styles */
.category-hero {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
}

.category-hero-content {
  position: relative;
  z-index: 1;
}

.category-hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.category-hero-desc {
  font-size: 1.125rem;
  opacity: 0.8;
  max-width: 600px;
}

/* Article Page Styles */
.article-header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

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

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

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

.breadcrumb span {
  margin: 0 0.5rem;
}

.article-category {
  display: inline-block;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 3px;
  margin-bottom: 1.5rem;
}

.article-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.article-excerpt-header {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.article-meta-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.article-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

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

/* Share Buttons */
.share-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  background: var(--primary);
  color: white;
}

/* Related Stories */
.related-stories {
  padding: 3rem 0;
  background: var(--bg-alt);
  margin-top: 3rem;
}

.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

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

/* Footer */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-about h3 span {
  color: var(--primary);
}

.footer-about p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-section h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 0.5rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

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

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

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-section {
    flex: 1;
    min-width: 280px;
  }

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

  .article-card.featured {
    grid-column: span 2;
  }

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

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

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

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .header-date {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    height: 50vh;
    min-height: 400px;
  }

  .hero-content {
    padding: 1.5rem;
  }

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

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

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

  .article-card.featured {
    grid-column: span 1;
  }

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

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

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

  .article-excerpt-header {
    font-size: 1.1rem;
  }

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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

@media (min-width: 1025px) {
  .header-date {
    display: block;
  }
}

/* Focus States */
a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .sidebar,
  .share-section,
  .related-stories,
  .breaking-ticker {
    display: none !important;
  }

  .article-content {
    max-width: 100%;
  }

  body {
    font-size: 12pt;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-card {
  animation: fadeInUp 0.5s ease forwards;
}

.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }
.article-card:nth-child(7) { animation-delay: 0.35s; }
.article-card:nth-child(8) { animation-delay: 0.4s; }
.article-card:nth-child(9) { animation-delay: 0.45s; }
.article-card:nth-child(10) { animation-delay: 0.5s; }
