/* =========================================
   2. TRENDING SECTION CSS
   File: assets/css/sections/trending.css
========================================= */

.trending-section {
  background: var(--background-light);
  padding: var(--space-12) 0;
  margin: var(--space-12) 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.trending-section .container {
  width: var(--global-width-percent);
  max-width: var(--global-max-width);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.trending-title {
  font-size: var(--font-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-8);
  position: relative;
  display: inline-block;
  font-family: var(--font-family);
}

.trending-title::after {
  content: '→';
  margin-left: var(--space-3);
  font-weight: var(--font-regular);
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--space-8);
}

.trending-article {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.trending-thumb {
  flex-shrink: 0;
  display: block;
  width: 120px;
  height: 120px;
  overflow: hidden;
}

.trending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.trending-article:hover .trending-thumb img {
  transform: scale(1.05);
}

.trending-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trending-category {
  color: var(--brand-primary);
  font-size: var(--font-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color var(--transition-fast);
  font-family: var(--font-family);
}

.trending-category:hover {
  color: var(--brand-primary-dark);
}

.trending-headline {
  font-size: 15px;
  line-height: 1.4;
  font-weight: var(--font-semibold);
  margin: 0 0 var(--space-2);
  font-family: var(--font-family);
}

.trending-headline a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.trending-headline a:hover {
  color: var(--brand-primary);
}

/* Headline - 3 Line Clamp */
.trending-headline-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.2em; /* 1.4 × 3 lines */
}

/* Meta Container - Category + Time */
.trending-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: var(--font-medium);
  font-family: var(--font-family);
}

.trending-meta-category {
  color: var(--brand-primary);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.trending-meta-category:hover {
  color: var(--brand-primary-dark);
}

.trending-separator {
  color: var(--text-muted);
}

.trending-time {
  color: var(--text-muted);
}

/* =========================================
   TRENDING SECTION - MOBILE CSS
========================================= */

@media (max-width: 1024px) {
  .trending-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
  }
}

@media (max-width: 768px) {
  .trending-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .trending-section {
    padding: var(--space-8) 0;
  }
}

@media (max-width: 480px) {
  .trending-thumb {
    width: 100px;
    height: 100px;
  }
  
  .trending-headline {
    font-size: var(--font-sm);
  }
}


/* =========================================
   BRANDPOST SECTION CSS
   File: assets/css/sections/brandpost.css
========================================= */

.brandpost-section {
  background: transparent;
  padding: var(--space-12) 0;
  margin: var(--space-12) 0;
  position: relative;
}

.brandpost-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  height: 1px;
  background: var(--border-light);
}

.brandpost-section .container {
  width: var(--global-width-percent);
  max-width: var(--global-max-width);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.brandpost-title {
  font-size: var(--font-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-8);
  display: inline-block;
  font-family: var(--font-family);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.brandpost-title::after {
  content: '→';
  margin-left: var(--space-3);
  font-weight: var(--font-regular);
}

.brandpost-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--space-6);
}

.brandpost-article {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.brandpost-headline {
  font-size: var(--font-sm);
  line-height: 1.4;
  font-weight: var(--font-semibold);
  margin: 0;
  font-family: var(--font-family);
}

.brandpost-headline a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.brandpost-headline a:hover {
  color: var(--brand-primary);
}

.brandpost-author {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: var(--font-medium);
  font-family: var(--font-family);
}

.brandpost-author a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.brandpost-author a:hover {
  color: var(--brand-primary);
}

/* =========================================
   RESPONSIVE STYLES
========================================= */

@media (max-width: 1200px) {
  .brandpost-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

@media (max-width: 768px) {
  .brandpost-section {
    padding: var(--space-8) 0;
  }
  
  .brandpost-title {
    font-size: var(--font-xl);
  }
  
  .brandpost-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (max-width: 480px) {
  .brandpost-grid {
    grid-template-columns: 1fr;
  }
  
  .brandpost-headline {
    font-size: var(--font-base);
  }
}