/* ====================================
   BLOG.CSS — Instrutor Rafa
   ==================================== */

/* ── Active link no menu do blog ── */
.nav-active {
  color: var(--primary-color) !important;
}
.nav-active::after {
  width: 100% !important;
}

/* ====================================
   HERO DO BLOG
   ==================================== */
.blog-hero {
  
  background: linear-gradient(135deg, rgba(0,78,137,.92), rgba(255,107,53,.85)),
              url('https://storage.googleapis.com/instrutorrafa/midias/FOTO3.JPG') center/cover no-repeat;
  display: flex;
  align-items: center;
  margin-top: 7rem;
  position: relative;
  text-align: center;
  color: var(--white);
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,46,.3);
  z-index: 0;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero-content { max-width: 720px; margin: 0 auto; padding: 3rem 1rem; }
.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: .4rem 1.2rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.blog-hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,.35);
  line-height: 1.2;
}
.blog-hero-content p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  opacity: .92;
  line-height: 1.7;
}
.blog-hero-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
  margin-bottom: 2rem;
}
.blog-hero-search input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--dark-color);
}
.blog-hero-search button {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0 1.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .3s;
}
.blog-hero-search button:hover { background: #e55a2b; }

/* ====================================
   FILTROS
   ==================================== */
.blog-filtros {
  background: var(--white);
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 7rem;
  z-index: 900;
}
.filtros-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.filtro-btn {
  background: var(--light-color);
  color: var(--dark-color);
  border: 2px solid transparent;
  padding: .5rem 1.3rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.filtro-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.filtro-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* ====================================
   TAGS DE CATEGORIA
   ==================================== */
.blog-tag {
  display: inline-block;
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: .3rem .9rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--white);
  z-index: 2;
}
.blog-tag.medo    { background: #e53e3e; }
.blog-tag.cnh     { background: var(--secondary-color); }
.blog-tag.transito{ background: #805ad5; }
.blog-tag.manobras{ background: var(--primary-color); }
.blog-tag.leis    { background: #319795; }

/* ====================================
   ARTIGO EM DESTAQUE
   ==================================== */
.blog-destaque {
  padding: 4rem 0;
  background: var(--light-color);
}
.blog-destaque-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.blog-destaque-img {
  position: relative;
  height: 360px;
  overflow: hidden;
}
.blog-destaque-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.blog-destaque-card:hover .blog-destaque-img img { transform: scale(1.04); }
.blog-destaque-info {
  padding: 2.5rem 2.5rem 2.5rem 0;
}
.blog-meta {
  display: flex;
  gap: 1.2rem;
  font-size: .85rem;
  color: var(--gray);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.blog-meta span {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.blog-destaque-info h2 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}
.blog-destaque-info p {
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 1.8rem;
}
.blog-destaque-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.blog-btn-ler { display: inline-flex; align-items: center; gap: .5rem; }

/* ====================================
   GRID DE ARTIGOS
   ==================================== */
.blog-lista {
  padding: 4rem 0 5rem;
  background: var(--white);
}
.blog-lista .section-title { margin-bottom: 2.5rem; }
.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.blog-card-page {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #f0f0f0;
}
.blog-card-page:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.blog-card-img {
  position: relative;
  height: 210px;
  overflow: hidden;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.blog-card-page:hover .blog-card-img img { transform: scale(1.06); }
.blog-card-body { padding: 1.5rem; }
.blog-card-body h3 {
  color: var(--secondary-color);
  font-size: 1.1rem;
  line-height: 1.4;
  margin: .6rem 0 .8rem;
}
.blog-card-body p {
  color: var(--gray);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.blog-link {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .95rem;
  transition: var(--transition);
}
.blog-link:hover { gap: .8rem; }

/* ====================================
   SEM RESULTADOS
   ==================================== */
.sem-resultados {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--gray);
  font-size: 1.1rem;
  text-align: center;
}
.sem-resultados i { font-size: 3rem; color: var(--primary-color); }

/* ====================================
   CTA BLOG
   ==================================== */
.blog-cta { padding: 4rem 0; background: var(--light-color); }

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 900px) {
  .blog-destaque-card {
    grid-template-columns: 1fr;
  }
  .blog-destaque-img { height: 280px; }
  .blog-destaque-info { padding: 2rem; }
  .blog-destaque-info h2 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
  .blog-hero { min-height: 320px; margin-top: 7rem; }
  .blog-hero-content h1 { font-size: 1.9rem; }
  .blog-hero-content p { font-size: 1rem; }
  .blog-filtros { top: 7rem; }
  .blog-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .blog-hero-content h1 { font-size: 1.5rem; }
  .blog-destaque-info h2 { font-size: 1.3rem; }
  .blog-destaque-actions { flex-direction: column; }
  .blog-destaque-actions .btn { width: 100%; text-align: center; justify-content: center; }
}
