/**
 * Estilos G1 - News Soberano
 * Layout e componentes inspirados no portal G1
 *
 * @package News_Soberano
 */

/* ========================================
   BREAKING NEWS BAR (Últimas Notícias)
   ======================================== */
.breaking-news-bar {
  background: #c00;
  color: #fff;
  padding: 0.75rem 0;
  position: relative;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breaking-news-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.breaking-news-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.breaking-news-slider {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 24px;
}

.breaking-news-item {
  position: absolute;
  width: 100%;
  white-space: nowrap;
  animation: slideNews 15s linear infinite;
}

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

.breaking-news-item:nth-child(2) { animation-delay: 3s; }
.breaking-news-item:nth-child(3) { animation-delay: 6s; }
.breaking-news-item:nth-child(4) { animation-delay: 9s; }
.breaking-news-item:nth-child(5) { animation-delay: 12s; }

.breaking-news-item a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.breaking-news-item a:hover {
  text-decoration: underline;
}

.breaking-time {
  background: rgba(255,255,255,0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
}

.breaking-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.breaking-news-prev,
.breaking-news-next {
  display: none; /* Oculto por padrão, animação automática */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background-color 0.2s;
}

.breaking-news-prev:hover,
.breaking-news-next:hover {
  background: rgba(255,255,255,0.3);
}

.breaking-news-prev { left: -15px; }
.breaking-news-next { right: -15px; }

/* ========================================
   SEÇÕES POR CATEGORIA
   ======================================== */
.category-sections {
  margin-top: 2rem;
}

.category-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.category-section:last-child {
  border-bottom: none;
}

.category-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid #e74c3c;
}

.category-section-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.category-section-title a {
  text-decoration: none;
  transition: opacity 0.2s;
}

.category-section-title a:hover {
  opacity: 0.8;
  text-decoration: none;
}

.category-section-more {
  color: #666;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.category-section-more:hover {
  color: #333;
  text-decoration: underline;
}

.category-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.category-post-featured {
  grid-row: span 2;
}

.category-post {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-post-featured {
  flex-direction: column;
}

.category-post:not(.category-post-featured) {
  flex-direction: row;
  gap: 1rem;
}

.category-post-image {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  flex-shrink: 0;
}

.category-post-featured .category-post-image {
  aspect-ratio: 16/9;
}

.category-post:not(.category-post-featured) .category-post-image {
  width: 140px;
  height: 90px;
}

.category-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.category-post-image:hover img {
  transform: scale(1.05);
}

.category-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-post-title {
  margin: 0;
  line-height: 1.3;
}

.category-post-featured .category-post-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.category-post:not(.category-post-featured) .category-post-title {
  font-size: 1rem;
  font-weight: 600;
}

.category-post-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.category-post-title a:hover {
  color: var(--color-primary-green);
  text-decoration: none;
}

.category-post-excerpt {
  color: #666;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

.category-post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #999;
}

.category-post-meta time {
  font-weight: 500;
}

/* ========================================
   POST BADGES (VÍDEO, AO VIVO, etc)
   ======================================== */
.post-badge {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.post-badge-video {
  background: #c00;
}

.post-badge-video::before {
  content: '▶';
  font-size: 0.625rem;
}

.post-badge-live {
  background: #f00;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.post-badge-live::before {
  content: '●';
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.3; }
}

.post-badge-urgent {
  background: #ff6b00;
}

/* ========================================
   WIDGET MAIS LIDAS (Estilo G1)
   ======================================== */
.most-read-widget {
  background: #f8f8f8;
  padding: 1.5rem;
  border-radius: 4px;
}

.most-read-widget .widget-title {
  border-bottom: 3px solid var(--color-primary-green);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.most-read-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: most-read-counter;
}

.most-read-item {
  counter-increment: most-read-counter;
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

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

.most-read-item::before {
  content: counter(most-read-counter);
  font-size: 1.75rem;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1;
  flex-shrink: 0;
  width: 30px;
}

.most-read-item:nth-child(1)::before,
.most-read-item:nth-child(2)::before,
.most-read-item:nth-child(3)::before {
  color: var(--color-primary-green);
}

.most-read-content {
  flex: 1;
}

.most-read-content a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  display: block;
}

.most-read-content a:hover {
  color: var(--color-primary-green);
  text-decoration: underline;
}

.most-read-time {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
  display: block;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
  .breaking-news-label {
    font-size: 0.75rem;
  }

  .breaking-title {
    font-size: 0.8125rem;
  }

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

  .category-post-featured {
    grid-row: auto;
  }

  .category-post:not(.category-post-featured) {
    flex-direction: column;
  }

  .category-post:not(.category-post-featured) .category-post-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

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

@media (max-width: 480px) {
  .breaking-news-bar {
    padding: 0.5rem 0;
  }

  .breaking-news-label {
    display: none;
  }

  .category-post-featured .category-post-title {
    font-size: 1.25rem;
  }
}
