/**
 * H Dias Extintores & LA Projetos - Components
 * Arquivo separado para componentes específicos do site
 */

/* ===============================================
   HERO SECTION
   =============================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.4)), 
              url('../images/hero-bg.jpg') center/cover no-repeat,
              linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  background-attachment: fixed;
  overflow: hidden;
}

/* Parallax no hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  transform: translateZ(0) scale(1.1);
  transition: transform 0.1s ease-out;
  z-index: -1;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 4fr 1fr;
  align-items: center;
  z-index: 2;
  padding: 40px var(--spacing-md) 0;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.2rem;
  margin: 0 0 var(--spacing-lg);
  line-height: 1.15;
  padding: 0 var(--spacing-sm);
}

.hero-title .highlight {
  color: var(--cta-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin: 0 0 var(--spacing-xl);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 95%;
  padding: 0 var(--spacing-sm);
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding: 0 var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.trust-bar { 
  margin-bottom: var(--spacing-sm); 
  font-size: 0.875rem; 
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===============================================
   SPLIT SECTION (NOSSA HISTÓRIA)
   =============================================== */
.history-expertise {
  display: flex;
  flex-wrap: wrap;
}

.half {
  flex: 1 1 50%;
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 0;
}

/* Overlay escuro para contraste */
.half .overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.65);
  z-index: 1;
  transition: background var(--transition);
}

/* Container do logo */
.half .logo-wrapper {
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Dica de hover sutil */
.hover-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.7;
  transition: opacity 0.3s ease;
  font-style: italic;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Logo das empresas */
.company-logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Informações ocultas por padrão */
.half .info {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  text-align: center;
}

/* Título da empresa */
.company-title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  margin: 0;
  color: var(--cta-primary);
}

/* Subtítulo */
.company-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Lista de serviços */
.company-bullets {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  text-align: left;
}

.company-bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.company-bullets li::before {
  content: '✔';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cta-primary);
  font-size: 1rem;
  font-weight: bold;
}

/* Estados de hover e focus */
.half:hover .info,
.half:focus-within .info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.half:hover .logo-wrapper,
.half:focus-within .logo-wrapper {
  transform: scale(0.9);
  opacity: 0.3;
}

.half:hover .hover-hint,
.half:focus-within .hover-hint {
  opacity: 0;
}

.half:hover .overlay,
.half:focus-within .overlay {
  background: rgba(18, 18, 18, 0.85);
}

/* Backgrounds específicos */
.half-left {
  background-image: url('../images/hero-h-dias-bg.jpg');
}

.half-right {
  background-image: url('../images/hero-la-projetos-bg.jpg');
}

/* Acessibilidade - outline para foco */
.half:focus {
  outline: 2px solid var(--cta-primary);
  outline-offset: -2px;
}

/* Touch devices - classe para ativação manual */
@media (hover: none) {
  .hover-hint {
    font-size: 0.8rem;
  }
  
  .half.touch-active .info {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  
  .half.touch-active .logo-wrapper {
    transform: scale(0.9);
    opacity: 0.3;
  }
  
  .half.touch-active .hover-hint {
    opacity: 0;
  }
  
  .half.touch-active .overlay {
    background: rgba(18, 18, 18, 0.85);
  }
}

/* ===============================================
   CONTADORES DE CREDIBILIDADE
   =============================================== */
.section-counters {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-base);
}

.counters-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.counters-header h2 {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
  line-height: 1.6;
}

.badge-trust {
  display: inline-block;
  background: linear-gradient(135deg, var(--cta-primary), #FFEA85);
  color: var(--bg-base);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.counters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
  align-items: flex-end;
}

.counter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 220px;
}

.counter-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.counter-card.highlight {
  flex: 1.5 1 280px;
  border: 2px solid var(--cta-primary);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
  max-width: 300px;
}

.counter-card .icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.counter-number {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  color: var(--cta-primary);
  margin-bottom: var(--spacing-sm);
  display: block;
}

.counter-label {
  font-size: 1.1rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin: 0;
}

.counters-footnote {
  text-align: center;
  margin-top: var(--spacing-xl);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ===============================================
   TESTIMONIALS - DEPOIMENTOS COM FOTOS
   =============================================== */
.testimonials-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slide {
  display: none;
  text-align: center;
  padding: var(--spacing-2xl);
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.testimonial-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.testimonial-photo {
  margin: 0 auto var(--spacing-lg);
  display: flex;
  justify-content: center;
}

.testimonial-photo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cta-primary);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
}

.testimonial-photo img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.testimonial-content {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
  position: relative;
}

.testimonial-content::before,
.testimonial-content::after {
  content: '"';
  font-size: 3rem;
  color: var(--cta-primary);
  opacity: 0.3;
  position: absolute;
  font-family: serif;
}

.testimonial-content::before {
  top: -10px;
  left: -20px;
}

.testimonial-content::after {
  bottom: -30px;
  right: -20px;
}

.testimonial-author {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
}

.testimonial-position {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.slider-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.slider-btn:hover {
  background: var(--cta-primary);
  color: var(--bg-base);
  border-color: var(--cta-primary);
  transform: translateY(-2px);
}

/* ===============================================
   LOGOS DOS ÓRGÃOS - LAYOUT VERTICAL LIMPO
   =============================================== */
.cert-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: var(--spacing-lg) !important;
  transition: all 0.3s ease !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.cert-item img {
  transition: all 0.3s ease;
  filter: grayscale(30%) opacity(0.8);
  object-fit: contain;
}

.cert-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

.cert-item:hover {
  transform: translateY(-4px);
}

.cert-info {
  line-height: 1.4;
}

.cert-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===============================================
   SERVICES TIMELINE
   =============================================== */
.services-timeline {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-base);
  position: relative;
}

.services-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.services-header h2 {
  margin-bottom: var(--spacing-md);
}

.services-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

.timeline-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.vertical-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(212, 175, 55, 0.4);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
}

.timeline-item.left {
  justify-content: flex-end;
  padding-right: calc(50% + 30px);
}

.timeline-item.right {
  justify-content: flex-start;
  padding-left: calc(50% + 30px);
}

.timeline-card {
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.08);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.timeline-card:hover {
  transform: translateY(-4px);
  filter: brightness(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.timeline-card.highlight {
  background: linear-gradient(135deg, #FFAA33 0%, #D38C14 100%);
  border: none;
  box-shadow: 0 30px 70px rgba(212, 175, 55, 0.25);
}

.timeline-card.highlight .card-content {
  position: relative;
  z-index: 2;
}

.timeline-card.highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.15);
  border-radius: 12px;
  z-index: 1;
}

.timeline-card.highlight:hover {
  transform: scale(1.02);
  filter: brightness(1.08);
  box-shadow: 0 35px 80px rgba(212, 175, 55, 0.35);
}

.timeline-card.highlight .card-sub {
  color: rgba(255, 255, 255, 0.85);
}

.timeline-card.highlight ul li {
  color: var(--text-primary);
}

.card-content h3 {
  margin: 0 0 var(--spacing-sm);
  color: var(--text-primary);
  font-size: 1.3rem;
}

.card-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.timeline-card ul {
  list-style: none;
  padding: 0;
  margin: var(--spacing-md) 0;
}

.timeline-card ul li {
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
  position: relative;
  padding-left: 20px;
}

.timeline-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--cta-primary);
  font-weight: bold;
  font-size: 1rem;
}

.card-actions {
  margin-top: var(--spacing-md);
}

.timeline-card .btn.btn-outline.small {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.timeline-card .btn.btn-outline.small:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.timeline-card.highlight .btn.btn-outline.small {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

.timeline-card.highlight .btn.btn-outline.small:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: var(--cta-primary);
  border: 2px solid var(--bg-base);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.2);
}

.timeline-dot span {
  font-weight: bold;
  font-size: 0.75rem;
  color: var(--bg-base);
}

.timeline-cta {
  text-align: center;
  margin-top: var(--spacing-3xl);
}