/*
Theme Name: Termical Premium
Author: Henrique Emiliano Santos
Description: Tema Industrial de Alta Performance.
Version: 3.2
Text Domain: termical
*/


/* ============================================
   RESET E VARIÁVEIS (BASE)
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg: hsl(220, 25%, 7%);
  --fg: hsl(210, 20%, 90%);
  --card: hsl(220, 20%, 11%);
  --card-fg: hsl(210, 20%, 90%);
  --primary: hsl(28, 95%, 55%);
  --primary-fg: hsl(220, 25%, 7%);
  --secondary: hsl(220, 15%, 16%);
  --secondary-fg: hsl(210, 20%, 85%);
  --muted: hsl(220, 15%, 16%);
  --muted-fg: hsl(215, 15%, 55%);
  --border: hsl(220, 15%, 18%);
  --radius: 0.375rem;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Raleway', sans-serif;
  --font-script: 'Dancing Script', cursive;
  --gradient-hero: linear-gradient(135deg, hsla(220, 25%, 7%, 0.85), hsla(220, 25%, 7%, 0.4));
  --gradient-primary: linear-gradient(135deg, hsl(28, 95%, 55%), hsl(35, 100%, 60%));
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================
   UTILITÁRIOS E BOTÕES
   ============================================ */
.font-script { font-family: var(--font-script); }
.font-display { font-family: var(--font-display); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  min-height: 48px;
  padding: 0.9rem 1.6rem;

  border-radius: 0.5rem;
  border: 1px solid transparent;

  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;

  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;

  white-space: nowrap;
  cursor: pointer;

  transition: transform 0.25s ease,
              box-shadow 0.25s ease,
              background-color 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease;
}
.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
/* ============================================
   NAVBAR (CABEÇALHO)
   ============================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: hsla(220, 25%, 7%, 0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid hsla(220, 15%, 18%, 0.5);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.navbar-brand { display: flex; align-items: center; gap: 0.25rem; }
.logo-text { font-size: 1.5rem; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.15em; color: var(--fg); }
.logo-accent { color: var(--primary); }
.logo-sub { display: none; font-size: 0.625rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-fg); margin-left: 0.25rem; margin-top: 0.5rem; }
@media (min-width: 640px) { .logo-sub { display: block; } }

.nav-links { display: none; align-items: center; gap: 2rem; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: none; align-items: center; gap: 0.75rem; }
@media (min-width: 1024px) { .nav-actions { display: flex; } }

.mobile-toggle { display: block; color: var(--fg); }
@media (min-width: 1024px) { .mobile-toggle { display: none; } }

.mobile-menu {
  display: none; flex-direction: column; gap: 1rem;
  padding: 1.5rem; background: var(--bg); border-top: 1px solid var(--border);
}
.mobile-menu.active { display: flex; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
.mobile-menu a { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); transition: color 0.3s; }
.mobile-menu a:hover { color: var(--primary); }

/* ============================================
   HERO (FAIXA ESTREITA E CONTEÚDO)
   ============================================ */
.hero { 
  position: relative; 
  display: block; 
  min-height: auto; 
  padding-top: 5rem; 
  padding-bottom: 4rem;
  background: var(--bg);
}

.hero-bg { 
  position: relative; 
  width: 100%;
  height: 400px;
  margin-bottom: 3.5rem; 
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(to bottom, rgba(7,9,15,0.05) 50%, var(--bg) 100%); 
}

.hero-content { 
  position: relative; 
  z-index: 10; 
  max-width: 800px; 
  margin: 0 auto; 
  text-align: center; 
  padding: 0 1.5rem; 
}

.hero-script { 
  font-family: var(--font-script); 
  color: var(--primary); 
  font-size: 1.875rem; 
  display: block; 
  margin-bottom: 0.5rem; 
}
@media (min-width: 768px) { .hero-script { font-size: 2.25rem; } }

.hero h1 { 
  font-size: 2.25rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: -0.01em; 
  line-height: 1.1; 
  color: var(--fg); 
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); } }

.hero p { 
  margin: 1.5rem auto 2.5rem; 
  font-size: 1.125rem; 
  color: hsla(210, 20%, 85%, 0.8); 
  line-height: 1.7; 
}
@media (min-width: 768px) { .hero p { font-size: 1.25rem; } }

.hero-actions { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 1rem; 
  justify-content: center; 
  margin-bottom: 2.5rem;
}

.hero-watermark { display: none; }

/* ============================================
   SOBRE NÓS & ESTATÍSTICAS
   ============================================ */
.about { padding: 6rem 0; background: var(--bg); }
.about-grid { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-script { font-family: var(--font-script); color: var(--primary); font-size: 1.5rem; }
.about h2 { font-size: 1.875rem; font-weight: 700; color: var(--fg); margin-top: 0.5rem; line-height: 1.2; }
@media (min-width: 768px) { .about h2 { font-size: 2.5rem; } }
.about p { margin-top: 1.5rem; color: var(--muted-fg); font-size: 1.125rem; line-height: 1.7; }

/* CORREÇÃO APLICADA AQUI: overflow visible e padding extra */
.stats-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1.5rem; 
  overflow: visible !important; /* Força a exibição de elementos que vazam */
  padding: 5px; /* Cria uma "almofada" para a borda não ser cortada */
}

/* CORREÇÃO APLICADA AQUI: box-sizing e margin */
.stat-card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  padding: 2rem; 
  text-align: center; 
  transition: border-color 0.3s;
  box-sizing: border-box; /* Garante que a borda seja calculada para dentro */
  margin: 1px; /* Respiro de segurança */
}
.stat-card:hover { border-color: hsla(28, 95%, 55%, 0.4); }
.stat-value { font-size: 2.25rem; font-family: var(--font-display); font-weight: 700; color: var(--primary); }
@media (min-width: 768px) { .stat-value { font-size: 3rem; } }
.stat-label { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted-fg); letter-spacing: 0.08em; text-transform: uppercase; }

/* ============================================
   SERVIÇOS (ACORDEÃO)
   ============================================ */
.services { position: relative; padding: 0; }
.services-grid { display: grid; min-height: 700px; }
@media (min-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr; } }

.services-image { position: relative; overflow: hidden; }
.services-image img { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }
.services-image::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); z-index: 2; }

.services-content { background: var(--card); display: flex; flex-direction: column; justify-content: center; padding: 4rem 2rem; }
@media (min-width: 768px) { .services-content { padding: 4rem; } }

.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0; text-align: left; }
.accordion-header:hover .accordion-title { color: var(--primary); }
.accordion-header-left { display: flex; align-items: center; gap: 1rem; }
.accordion-bar { width: 4px; height: 2rem; border-radius: 9999px; background: var(--primary); opacity: 0; transition: opacity 0.3s; }
.accordion-header:hover .accordion-bar { opacity: 1; }
.accordion-title { font-size: 1.125rem; font-family: var(--font-display); font-weight: 700; color: var(--fg); transition: color 0.3s; }
@media (min-width: 768px) { .accordion-title { font-size: 1.25rem; } }
.accordion-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--muted-fg); transition: color 0.3s; }
.accordion-item.active .accordion-icon { color: var(--primary); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s ease; opacity: 0; }
.accordion-item.active .accordion-body { max-height: 300px; opacity: 1; }
.accordion-body p { padding: 0 0 1.5rem 1.25rem; color: var(--muted-fg); line-height: 1.7; }

/* ============================================
   PROJETOS (ESTUDOS DE CASO)
   ============================================ */
.projects { 
  padding: 2rem 0 6rem; /* Tira a gordura de dentro (topo) */
  margin-top: -4rem; /* Puxa a seção inteira para cima */
  background: var(--card); 
}
.projects-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 4rem; }
.projects-header .script { font-family: var(--font-script); color: var(--primary); font-size: 1.5rem; }
.projects-header h2 { font-size: 1.875rem; font-weight: 700; color: var(--fg); margin-top: 0.5rem; }
@media (min-width: 768px) { .projects-header h2 { font-size: 3rem; } }
.projects-all { display: none; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--primary); letter-spacing: 0.08em; text-transform: uppercase; transition: gap 0.3s; }
@media (min-width: 768px) { .projects-all { display: inline-flex; } }
.projects-all:hover { gap: 0.75rem; }

.projects-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card { cursor: pointer; }
.project-card:hover .project-img img { transform: scale(1.05); }
.project-card:hover .project-img .project-overlay { background: transparent; }
.project-img { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4/3; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-overlay { position: absolute; inset: 0; background: hsla(220, 25%, 7%, 0.2); transition: background 0.3s; }
.project-info { margin-top: 1.25rem; }
.project-category { font-size: 0.75rem; font-weight: 600; color: var(--primary); letter-spacing: 0.08em; text-transform: uppercase; }
.project-title { font-size: 1.25rem; font-family: var(--font-display); font-weight: 700; color: var(--fg); margin-top: 0.25rem; }
.project-link { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.875rem; font-weight: 600; color: var(--primary); letter-spacing: 0.05em; transition: gap 0.3s; }
.project-link:hover { gap: 0.75rem; }

/* ============================================
   CTA (CHAMADA PARA AÇÃO)
   ============================================ */
.cta { position: relative; padding: 6rem 0; background: var(--bg); overflow: hidden; }
.cta-watermark { position: absolute; right: -5%; top: 50%; transform: translateY(-50%); font-size: 18rem; font-family: var(--font-display); font-weight: 700; color: hsla(210, 20%, 90%, 0.02); line-height: 1; user-select: none; pointer-events: none; display: none; white-space: nowrap; }
@media (min-width: 1280px) { .cta-watermark { display: block; } }
.cta-content { position: relative; z-index: 10; max-width: 42rem; }
.cta-script { font-family: var(--font-script); color: var(--primary); font-size: 1.875rem; }
.cta h2 { font-size: 2.25rem; font-weight: 700; color: var(--fg); text-transform: uppercase; margin-top: 0.5rem; }
@media (min-width: 768px) { .cta h2 { font-size: 3.75rem; } }
.cta p { margin-top: 1.5rem; font-size: 1.125rem; color: var(--muted-fg); line-height: 1.7; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

/* ============================================
   RODAPÉ (FOOTER)
   ============================================ */
.footer { background: var(--card); border-top: 1px solid var(--border); padding: 4rem 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; } }

.footer h4 { font-family: var(--font-display); font-weight: 700; color: var(--fg); margin-bottom: 1rem; }
.footer-contact { font-size: 0.875rem; color: var(--muted-fg); }
.footer-contact p { margin-bottom: 0.25rem; }
.footer-contact .contact-line { display: flex; align-items: center; gap: 0.5rem; color: var(--fg); margin-top: 0.5rem; }
.footer-contact .contact-line svg { color: var(--primary); }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.875rem; color: var(--muted-fg); transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-links a.active { color: var(--primary); }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.75rem; color: var(--muted-fg); }
.scroll-top { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted-fg); transition: all 0.3s; }
.scroll-top:hover { color: var(--primary); border-color: var(--primary); }

/* ============================================
   ANIMAÇÕES (SCROLL)
   ============================================ */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left { opacity: 0; transform: translateX(-30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-left.visible { opacity: 1; transform: translateX(0); }
.fade-right { opacity: 0; transform: translateX(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-right.visible { opacity: 1; transform: translateX(0); }

/* ============================================
   ESTILOS DO DEPOIMENTO E SEÇÃO SOBRE NÓS
   ============================================ */
.about { 
  padding: 0 0 6rem !important; 
  margin-top: -2rem; 
}

.texto-diretor {
  font-style: italic; 
  border-left: 4px solid var(--primary); 
  padding-left: 1rem; 
  margin: 1.5rem 0; 
  color: var(--muted-fg); 
  font-size: 1.125rem; 
  line-height: 1.7;
}

.assinatura-diretor {
  font-weight: 700; 
  color: var(--fg); 
  margin-top: 0.5rem; 
  font-family: var(--font-body);
}

.assinatura-diretor span {
  color: var(--primary); 
  font-size: 0.75rem; 
  text-transform: uppercase; 
  letter-spacing: 0.08em; 
  font-weight: 600;
}

/* ============================================
   CORREÇÕES ANTI-ESTOURO PARA MOBILE
   ============================================ */
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

p, h1, h2, h3, h4, h5, h6, a, span, li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .hero-bg {
    height: 240px !important; 
    min-height: 150px !important;
    max-height: 150px !important;
    margin-bottom: 1.5rem !important;
  }

  .container { padding: 0 15px; width: 100%; overflow-x: hidden; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero h1 { 
  font-size: 2rem;
  line-height: 1.2;
}
  
  /* --- PUXA A SEÇÃO BEM MAIS PARA CIMA NO CELULAR --- */
  .about { 
    padding: 0 0 4rem !important; 
    margin-top: -5rem !important; /* <--- Puxa como um ímã para cima! */
  }
  
  /* --- PUXA OS PROJETOS PARA CIMA NO CELULAR --- */
  .projects { 
    padding: 1rem 0 4rem !important; 
    margin-top: -3rem !important; 
  }
  
  .cta, .footer { padding: 4rem 0; }
  
  /* --- AJUSTE PARA A PALAVRA "REFRIGERAÇÃO" NÃO QUEBRAR NO CELULAR --- */
  .cta h2 { 
    font-size: 1.8rem !important; 
  }

  .services-content { padding: 3rem 1.5rem; }
  
  /* --- LETRA AINDA MENOR NO CELULAR (0.75rem) --- */
  .texto-diretor {
    font-size: 0.75rem !important; 
    line-height: 1.4;
  }
  
  /* --- MÁGICA: 2 COLUNAS NO CELULAR SEM ESTOURAR --- */
  .stats-grid { 
    grid-template-columns: 1fr 1fr !important; 
    gap: 0.5rem !important; 
  }
  .stat-card { padding: 1rem 0.5rem !important; }
  .stat-value { font-size: 1.5rem !important; }
  .stat-label { 
    font-size: 0.65rem !important; 
    letter-spacing: 0 !important; 
  }

  .fade-left, .fade-right { transform: translateY(30px) !important; }
  .fade-left.visible, .fade-right.visible { transform: translateY(0) !important; }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .fade-up,
  .fade-left,
  .fade-right,
  .fade-up.visible,
  .fade-left.visible,
  .fade-right.visible {
    opacity: 1 !important;
    transform: none !important;
  }
}
#sobre,
#solucoes,
#projetos,
#contato {
  scroll-margin-top: 10px;
}
#sobre{
  opacity: 1 !important;
  transform: none !important;
  position: relative;
  z-index: 2;
  scroll-margin-top: 140px;
}