/* Hero Section V2 - Imagem em cima, texto embaixo */
.treinamentos-hero-v2 {
  padding: 7rem 0 4rem;
  background: var(--gradient-dark);
}

@media (min-width: 768px) {
  .treinamentos-hero-v2 {
    padding: 9rem 0 4rem;
  }
}

.hero-image-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: var(--shadow-card), 0 0 20px rgba(255, 215, 0, 0.2);
}

.hero-reference-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-text-box {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  border: 3px solid rgba(255, 215, 0, 0.5);
  border-radius: 1rem;
  background: rgba(255, 215, 0, 0.03);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
  position: relative;
}

.hero-text-box::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 1rem;
  background: var(--gradient-gold-shine);
  z-index: -1;
  opacity: 0.3;
}

.hero-text-box .section-badge {
  margin: 0 auto 1.5rem;
}

.hero-text-box h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-text-box p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.hero-text-box .hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .hero-text-box h1 {
    font-size: 3rem;
  }
}

/* Estilos para a seção Segurança no Trabalho */
.seguranca-section{padding:5rem 0}
.seguranca-grid{display:grid;gap:2rem}
@media(min-width:1024px){.seguranca-grid{grid-template-columns:repeat(2,1fr);align-items:center}}
.seg-image{position:relative}
.seg-image .image-wrap img{border-radius:1rem;box-shadow:var(--shadow-card)}
.seg-badge{position:absolute;right:-1.25rem;bottom:-1rem;background:var(--gradient-gold);color:#fff;border-radius:12px;padding:1rem;box-shadow:var(--shadow-gold-intense);text-align:center}
.section-badge{display:inline-flex;align-items:center;gap:.5rem;background:rgba(255,191,0,0.08);color:hsl(var(--primary));padding:.5rem 1rem;border-radius:999px;margin-bottom:1rem}
.tips-grid{display:grid;gap:1rem}
@media(min-width:640px){.tips-grid{grid-template-columns:repeat(2,1fr)}}
.tip{display:flex;gap:1rem;padding:1rem;border-radius:.75rem;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.03)}
.tip-icon svg{width:1.5rem;height:1.5rem}
.tip-body h4{margin:0;font-weight:700;font-size:0.95rem}
.tip-body p{margin:0;font-size:0.85rem;color:hsl(var(--muted-foreground))}

/* Ajuste para borda arredondada no responsivo */
@media (max-width: 767px) {
  .seg-badge {
    border-radius: 1.5rem !important;
  }
}

/* Estilo especial para o primeiro card de treinamento (NR 01 - Psicossocial) */
.treinamentos-grid .treinamento-card:first-child {
  position: relative;
  background-image: url('../assets/images/treinamentos/ambiente-trabalho.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:first-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Segundo card - NR 05 - CIPA */
.treinamentos-grid .treinamento-card:nth-child(2) {
  position: relative;
  background-image: url('../assets/images/treinamentos/cipa-seguranca.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(2)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.5);
  border-radius: 1rem;
  z-index: 0;
}

.treinamentos-grid .treinamento-card:nth-child(2) h3,
.treinamentos-grid .treinamento-card:nth-child(2) p,
.treinamentos-grid .treinamento-card:nth-child(2) .treinamento-features li {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
}

/* Terceiro card - NR 06 - EPI */
.treinamentos-grid .treinamento-card:nth-child(3) {
  position: relative;
  background-image: url('../assets/images/treinamentos/epis.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(3)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

.treinamentos-grid .treinamento-card:nth-child(3) h3,
.treinamentos-grid .treinamento-card:nth-child(3) p,
.treinamentos-grid .treinamento-card:nth-child(3) .treinamento-features li {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
}

/* Quarto card - NR 10 - Básico e SEP */
.treinamentos-grid .treinamento-card:nth-child(4) {
  position: relative;
  background-image: url('../assets/images/treinamentos/nr10.jpeg');
  background-size: cover;
  background-position: 35% center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(4)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Quinto card - NR 11 - Empilhadeira e Trator */
.treinamentos-grid .treinamento-card:nth-child(5) {
  position: relative;
  background-image: url('../assets/images/treinamentos/empilhadeira.jpeg');
  background-size: 148%;
  background-position: 45% center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(5)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Sexto card - NR 23 - Brigada de Incêndio */
.treinamentos-grid .treinamento-card:nth-child(6) {
  position: relative;
  background-image: url('../assets/images/treinamentos/bombeiro.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(6)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Sétimo card - NR 33 - Espaços Confinados */
.treinamentos-grid .treinamento-card:nth-child(7) {
  position: relative;
  background-image: url('../assets/images/treinamentos/espaco-confinado.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(7)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Oitavo card - NR 35 - Trabalho em Altura */
.treinamentos-grid .treinamento-card:nth-child(8) {
  position: relative;
  background-image: url('../assets/images/treinamentos/altura.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(8)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Nono card - NR 20 - Inflamáveis e Combustíveis */
.treinamentos-grid .treinamento-card:nth-child(9) {
  position: relative;
  background-image: url('../assets/images/treinamentos/nr20.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.treinamentos-grid .treinamento-card:nth-child(9)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 18, 0.6);
  border-radius: 1rem;
  z-index: 0;
}

/* Estilo de texto para todos os cards de treinamento */
.treinamentos-grid .treinamento-card > * {
  position: relative;
  z-index: 1;
}

.treinamentos-grid .treinamento-card h3 {
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.treinamentos-grid .treinamento-card > p {
  font-weight: 600;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.treinamentos-grid .treinamento-card .treinamento-features li {
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Estilo de texto aprimorado para cards com imagem de fundo */
.treinamentos-grid .treinamento-card:nth-child(1) h3,
.treinamentos-grid .treinamento-card:nth-child(1) p,
.treinamentos-grid .treinamento-card:nth-child(1) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(2) h3,
.treinamentos-grid .treinamento-card:nth-child(2) p,
.treinamentos-grid .treinamento-card:nth-child(2) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(3) h3,
.treinamentos-grid .treinamento-card:nth-child(3) p,
.treinamentos-grid .treinamento-card:nth-child(3) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(4) h3,
.treinamentos-grid .treinamento-card:nth-child(4) p,
.treinamentos-grid .treinamento-card:nth-child(4) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(5) h3,
.treinamentos-grid .treinamento-card:nth-child(5) p,
.treinamentos-grid .treinamento-card:nth-child(5) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(6) h3,
.treinamentos-grid .treinamento-card:nth-child(6) p,
.treinamentos-grid .treinamento-card:nth-child(6) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(7) h3,
.treinamentos-grid .treinamento-card:nth-child(7) p,
.treinamentos-grid .treinamento-card:nth-child(7) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(8) h3,
.treinamentos-grid .treinamento-card:nth-child(8) p,
.treinamentos-grid .treinamento-card:nth-child(8) .treinamento-features li,
.treinamentos-grid .treinamento-card:nth-child(9) h3,
.treinamentos-grid .treinamento-card:nth-child(9) p,
.treinamentos-grid .treinamento-card:nth-child(9) .treinamento-features li {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
}

/* Gallery Section - Estilo similar aos cards de produtos */
.gallery-section {
  padding: 4rem 0;
  background: var(--gradient-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media(min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media(min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.gallery-item {
  position: relative;
  background: var(--gradient-card);
  border-radius: 1rem;
  overflow: hidden;
  border: 3px solid rgba(255, 215, 0, 0.7);
  box-shadow: var(--shadow-card), 0 0 20px rgba(255, 215, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 1;
}

.gallery-item:hover {
  border-color: rgba(255, 215, 0, 0.9);
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-gold-intense), 0 0 30px rgba(255, 215, 0, 0.4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* Overlay com gradiente gold */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
  opacity: 1;
}

/* Borda gold animada */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.6), transparent, rgba(255, 215, 0, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Ícone de zoom no hover */
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item .gallery-overlay svg {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
