@charset "utf-8";

/* ========================================
   ESTILOS DOS CARDS
   ======================================== */

/* Cabeçalho de Seção */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

/* Grid de Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px; 
}

/* Card Base */
.card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Conteúdo do Card */
.card .content {
  padding: 1rem;
}

.card .category {
  font-size: 0.85rem;
  color: #888;
  display: block;
  margin-bottom: 0.5rem;
}

.card h2 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.4;
  font-weight: 600;
}

.card time {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.5rem;
  display: block;
}

/* ========================================
   CARDS OCULTOS E ANIMAÇÃO
   ======================================== */

/* Cards que iniciam ocultos */
.hidden-card {
  display: none;
}

/* Animação de entrada quando cards aparecem */
.fade-in {
  animation: fadeInUp 0.5s ease-in;
}

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

/* ========================================
   CARD OVERLAY (Destaque)
   ======================================== */

.card-overlay {
  grid-column: span 2;
  color: white;
  min-height: 350px;
  position: relative;
  isolation: isolate;
}

.card-overlay img {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.card-overlay .content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.95) 100%);
  padding: 1.5rem 1rem 1rem 1rem;
}

.card-overlay .category {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.card-overlay h2 {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.card-overlay time {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* ========================================
   CARD ANÚNCIO
   ======================================== */

.card-ad {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  display: block; /* garante comportamento de bloco */
  cursor: pointer;
}
.card-ad.hidden-card {
  display: none !important;
}
.card-ad .ad-placeholder {
  width: 100%;
  height: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-ad .ad-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
/* ========================================
   BOTÃO CARREGAR MAIS
   ======================================== */

.load-more-container {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem 0;
}

#loadMoreBtn {
  background: #000;
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#loadMoreBtn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#loadMoreBtn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* ========================================
   RESPONSIVO - TABLET (2 colunas)
   ======================================== */

@media(max-width: 1000px){
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-overlay {
    min-height: 350px;
  }
}

/* ========================================
   RESPONSIVO - MOBILE (1 coluna)
   ======================================== */

@media(max-width: 600px){
  .section-title {
    font-size: 1.2rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  /* Card Overlay - Altura fixa de 350px */
  .card-overlay {
    grid-column: span 1;
    min-height: 350px;
    height: 350px;
  }
  
  .card-overlay img {
    position: absolute;
    height: 350px !important;
    width: 100%;
    object-fit: cover;
  }
  
  /* Card Normal - Altura automática */
  .card {
    min-height: auto;
  }
  
  .card img {
    height: auto;
    object-fit: cover;
  }
  
  #loadMoreBtn {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
  }
}