/**
 * Estilos para página de listagem de petições por área do direito
 * UI/UX Moderno com filtros e cards responsivos
 */

:root {
  --brand-green: #70bb52;
  --brand-green-dark: #5da940;
  --brand-green-darker: #4a8833;
  --primary-green: #203A24;
  --primary-green-light: #2d5433;
  --primary-green-dark: #162614;
  --accent-gold: #C9A961;
  --bg-white: #ffffff;
  --bg-light: #f5f5f5;
  --bg-lighter: #fafbfc;
  --border-light: #e1e4e8;
  --text-dark: #333333;
  --text-body: #586069;
  --text-muted: #666666;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 3px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --shadow-hover: 0 12px 32px rgba(32,58,36,0.18);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-main {
    margin-top: 60px;
}

.breadcrumb-custom {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Main Container */
.taxonomy-topics-main {
  background: linear-gradient(180deg, var(--bg-lighter) 0%, var(--bg-light) 100%);
  min-height: 100vh;
  padding-bottom: 4rem;
}

/* Hero Section */
.taxonomy-hero {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 50%, var(--primary-green-dark) 100%);
  color: white;
  padding: 4rem 0 3rem;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.taxonomy-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}

.taxonomy-hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: -0.02em;
  animation: fadeInUp 0.6s ease-out;
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.hero-icon {
  font-size: 2rem;
  opacity: 0.9;
}

.hero-title {
  margin-bottom: 0;
}

.hero-edit-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.25rem;
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s;
}
.hero-edit-link:hover {
  color: #fff;
}

.hero-description {
  font-size: 1.15rem;
  font-weight: 400;
  opacity: 0.95;
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* Hero Stats Cards */
.hero-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 180px;
  transition: var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.stat-card i {
  font-size: 1.75rem;
  opacity: 0.9;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.85;
  white-space: nowrap;
}

/* View News Button Container (outside hero) */
.view-news-container {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: -1.5rem 0 2rem;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn-view-news {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-white);
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-view-news:hover {
  background: var(--primary-green);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-view-news i {
  font-size: 1.1rem;
}

/* Responsive Hero Stats */
@media (max-width: 768px) {
  .hero-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-card {
    min-width: auto;
    width: 100%;
    padding: 0.875rem 1.25rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

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

  .view-news-container {
    padding: 0 1rem;
  }

  .btn-view-news {
    padding: 0.875rem 1.25rem;
  }
}

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

/* Content Section */
.content-section {
  padding: 0 1rem;
}

/* Filters Card */
.filters-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 100px;
}

.filters-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters-title i {
  color: var(--primary-green);
}

.filter-group {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 1.5rem;
  padding-bottom: 0;
}

.filter-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.form-check {
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
}

.form-check-input:checked {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--text-body);
  cursor: pointer;
}

.form-select {
  font-size: 0.9rem;
  border-color: var(--border-light);
  border-radius: 8px;
}

.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(32,58,36,0.25);
}

/* Search Within */
.search-within {
  position: relative;
}

.search-within input {
  padding-right: 45px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.btn-search-within {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-green);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-search-within:hover {
  background: var(--primary-green-light);
  transform: translateY(-50%) scale(1.05);
}

/* Clear Filters Button */
.btn-clear-filters {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--brand-green);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-clear-filters:hover {
  border-color: var(--brand-green);
  background-color: var(--bg-light);
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.results-info {
  font-size: 0.95rem;
  color: var(--text-body);
  font-weight: 500;
}

.results-sort {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.results-sort label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.sort-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  background: var(--bg-white);
  transition: border-color 0.2s;
  min-width: 180px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(32,58,36,0.15);
}

/* Products Grid */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 400px;
  margin-bottom: 2rem;
}

/* Product List Item (Estilo Magazine Luiza) */
.product-list-item {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
  position: relative;
}

.product-list-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-green);
}

/* Image Section */
.product-list-image {
  flex-shrink: 0;
  width: 130px;
  position: relative;
}

.product-list-image .product-image-placeholder {
  width: 100%;
  height: 130px;
  background: var(--bg-lighter);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.product-list-image .product-image-placeholder i {
  font-size: 4rem;
  color: var(--text-muted);
}

.product-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--brand-green);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  text-transform: uppercase;
}

.product-badge.kit {
  background: #2196F3;
}

.product-badge.free {
  background: #FF9800;
}

/* Content Section */
.product-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.product-list-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.product-list-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.product-list-title a:hover {
  color: var(--primary-green);
}

/* Favorite Button */
.btn-favorite-modern {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-favorite-modern:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

.btn-favorite-modern.favorited {
  color: #e74c3c;
}

.btn-favorite-modern i {
  pointer-events: none;
}

/* Meta Tags */
.product-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-lighter);
  /*border: 1px solid var(--border-light);*/
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-body);
  transition: all var(--transition-fast);
}

.meta-tag i {
  font-size: 0.875rem;
  color: var(--primary-green);
}

.product-list-description {
  margin: 0;
  color: var(--text-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar Section */
.product-list-sidebar {
  flex-shrink: 0;
  width: 245px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-light);
}

.product-list-price {
  text-align: right;
}

.product-list-price .price-current {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-green);
}

.product-list-price .price-free {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FF9800;
}

.product-list-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-view-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-view-list:hover {
  background: var(--brand-green);
  border: 2px solid var(--brand-green);
  color: white;
}

.btn-add-cart-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-add-cart-list:hover {
  background: var(--brand-green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-add-cart-list:active {
  transform: translateY(0);
}

.btn-add-cart-list:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
#productsLoading {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 3rem;
}

#productsLoading .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 3px;
  color: var(--primary-green);
}

#productsLoading p {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.btn-back-to-topics {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-white);
    color: var(--brand-green);
    border: 2px solid var(--brand-green);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back-to-topics:hover {
    background: var(--brand-green);
    color: white;
    transform: translateX(-4px);
}

/* Pagination */
.pagination-wrapper {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-item {
  list-style: none;
}

.page-link {
  padding: 0.6rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-body);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.page-link:hover {
  background: var(--bg-light);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.page-item.active .page-link {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: white;
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.empty-state i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 991px) {
  .filters-card {
    position: static;
    margin-bottom: 2rem;
  }

  .taxonomy-hero {
    padding: 3rem 0 2.5rem;
  }

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

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

  .product-list-item {
    flex-direction: column;
    padding: 1rem;
  }

  .product-list-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .product-list-image .product-image-placeholder {
    height: 200px;
  }

  .product-list-sidebar {
    width: 100%;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 0.5rem;
  }

  .product-list-actions {
    flex-direction: row;
    gap: 0.5rem;
  }

  .btn-view-list,
  .btn-add-cart-list {
    flex: 1;
  }
}

@media (max-width: 767px) {
  .taxonomy-hero {
    padding: 2.5rem 0 2rem;
  }

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

  .results-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .product-list-item {
    padding: 0.875rem;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .product-list-image {
    width: 100%;
    max-width: 150px;
  }

  .product-list-image .product-image-placeholder {
    height: 150px;
  }

  .product-list-content {
    gap: 0.5rem;
  }

  .product-list-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .product-list-description {
    font-size: 0.875rem;
    -webkit-line-clamp: 2;
  }

  .product-list-price .price-current {
    font-size: 1.5rem;
  }

  .product-list-price .price-free {
    font-size: 1.25rem;
  }

  .btn-view-list,
  .btn-add-cart-list {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 575px) {
  .content-section {
    padding: 0 0.5rem;
  }

  .filters-card {
    padding: 1rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   NEWS SECTION STYLES
   ============================================ */

.news-section {
  margin-top: 3rem;
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.news-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.news-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.news-section-title i {
  font-size: 1.5rem;
  color: var(--brand-green);
}

.news-section-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.news-badge {
  background: var(--brand-green);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.news-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-sort label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.news-sort .form-select {
  width: auto;
  font-size: 0.8125rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border-color: var(--border-light);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* News Card */
.news-card {
  background: var(--bg-lighter);
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card:hover {
  border-color: var(--brand-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-card-badge {
  background: var(--brand-green);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.news-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.news-card-date i {
  font-size: 0.75rem;
}

.news-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover .news-card-title {
  color: var(--brand-green);
}

.news-card-excerpt {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.news-card-readmore {
  font-size: 0.8125rem;
  color: var(--brand-green);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--transition-fast);
}

.news-card:hover .news-card-readmore {
  gap: 0.5rem;
}

.news-card-readmore i {
  font-size: 0.875rem;
}

/* Back to Topics Button */
.back-to-topics-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.btn-back-to-topics {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-white);
  border: 2px solid var(--brand-green);
  color: var(--brand-green);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.btn-back-to-topics:hover {
  background: var(--brand-green);
  color: white;
}

.btn-back-to-topics i {
  font-size: 1.125rem;
}

/* Responsive News Section */
@media (max-width: 767px) {
  .news-section {
    padding: 1rem;
  }

  .news-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .news-section-title h2 {
    font-size: 1.125rem;
  }
}

/* ========================================
   POSTS / ARTIGOS SECTION
   ======================================== */

.posts-section {
  margin-top: 3rem;
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.posts-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.posts-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.posts-section-title i {
  font-size: 1.5rem;
  color: var(--brand-green);
}

.posts-section-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.posts-badge {
  background: var(--brand-green);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.posts-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.posts-sort label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.posts-sort .form-select {
  width: auto;
  font-size: 0.8125rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border-color: var(--border-light);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Post Card */
.post-card {
  background: var(--bg-lighter);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card:hover {
  border-color: var(--brand-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card-thumbnail {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-light);
  flex-shrink: 0;
}

.post-card-thumbnail--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.post-card-thumbnail--empty i {
  font-size: 2.5rem;
  opacity: 0.4;
}

.post-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-card-badge {
  background: var(--brand-green);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.post-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.post-card-meta-item {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card-readmore {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-green);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

/* Responsive Posts Section */
@media (max-width: 767px) {
  .posts-section {
    padding: 1rem;
  }

  .posts-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .posts-section-title h2 {
    font-size: 1.125rem;
  }
}
