/* Trending News Page Styles - LIGHT THEME */

:root {
  --color-blog-card: #ffffff;
  --color-blog-border: #e2e8f0;
  --color-blog-hover-border: #3b82f6;
  --color-accent-blue: #3b82f6;
  --color-accent-blue-glow: rgba(59, 130, 246, 0.05);
  --color-accent-purple: #8b5cf6;
  --color-accent-red: #ef4444;
}

body.trending-news-page {
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Hero Section */
.news-hero {
  position: relative;
  padding: 48px 0 24px;
  background: linear-gradient(rgba(248, 250, 252, 0.95), rgba(248, 250, 252, 0.98));
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.news-hero .container {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.news-hero h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.news-hero p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Search and Filter Section */
.filter-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 96px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.filter-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .filter-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Search Bar */
.search-box {
  position: relative;
  flex: 1;
  max-width: 450px;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-input:focus + i {
  color: var(--color-accent-blue);
}

/* Category Pills */
.category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  padding: 8px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.25s ease;
  cursor: pointer;
}

.pill:hover {
  background: var(--bg-light);
  color: var(--text);
  border-color: var(--primary-light);
}

.pill.active {
  background: var(--color-accent-blue);
  color: #ffffff;
  border-color: var(--color-accent-blue);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* News Grid */
.news-grid-section {
  padding: 60px 0 100px;
  background-color: var(--bg);
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Article Card */
.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-light);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.article-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #f1f5f9;
}

.article-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.article-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
  z-index: 2;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.badge-threat { background: var(--color-accent-red); }
.badge-ai { background: var(--color-accent-purple); }
.badge-cloud { background: var(--color-accent-blue); }
.badge-compliance { background: #10b981; }

.article-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text);
  transition: color 0.25s ease;
}

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

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

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.read-more-btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s ease;
  text-decoration: none;
}

.article-card:hover .read-more-btn {
  gap: 10px;
}

/* No Results State */
.no-results {
  display: none;
  text-align: center;
  padding: 60px 0;
  grid-column: 1 / -1;
}

.no-results i {
  font-size: 3rem;
  color: var(--border);
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text);
}

.no-results p {
  color: var(--text-light);
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 0;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border);
}

.newsletter-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .newsletter-card {
    padding: 60px 80px;
  }
}

.newsletter-card h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.newsletter-card p {
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto 30px;
  font-size: 1rem;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 550px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: 999px;
  }
  
  .newsletter-form:focus-within {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  }
}

.newsletter-input {
  width: 100%;
  padding: 14px 24px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
}

@media (min-width: 640px) {
  .newsletter-input {
    background: transparent;
    border: none;
  }
}

.newsletter-btn {
  padding: 14px 28px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.newsletter-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
