/* CSS Reset e Variáveis */
:root {
  --red: #8B0000;
  --red-hover: #A00000;
  --graphite: #1a1a1a;
  --text: #374151;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--graphite);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--red);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--graphite);
}

.brand:hover {
  color: var(--red);
}

.logo-master {
  display: block;
  transition: var(--transition);
}

.logo-k {
  display: none;
}

/* Navigation */
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-toggle:hover {
  background: var(--bg-alt);
}

.hamburger {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  background: var(--graphite);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 0.125rem;
  background: var(--graphite);
  transition: var(--transition);
}

.hamburger::before {
  top: -0.5rem;
}

.hamburger::after {
  bottom: -0.5rem;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-menu a {
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-menu a:not(.btn):hover {
  color: var(--red);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--graphite);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--graphite);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.link {
  font-weight: 600;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.link:hover {
  color: var(--red-hover);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(139, 0, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  color: var(--graphite);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.2vw, 1.25rem);
  color: var(--text-light);
  margin: 0 0 2rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-bullets {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-light);
  font-size: 0.875rem;
}

.hero-bullets li {
  position: relative;
  padding-left: 1rem;
}

.hero-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 600;
}

.portrait {
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.portrait:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section h2 {
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  color: var(--graphite);
  margin: 0 0 3rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.content h2 {
  text-align: left;
  margin-bottom: 2rem;
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.content strong {
  color: var(--graphite);
  font-weight: 600;
}

/* Sidebar */
.sidebar {
  display: grid;
  gap: 1.5rem;
}

.info-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.info-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  color: var(--red);
}

.info-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--graphite);
}

.info-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-light);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transition: var(--transition);
}

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

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius);
  color: var(--red);
  margin-bottom: 1.5rem;
}

.card h3 {
  margin: 0 0 1rem;
  color: var(--graphite);
  font-size: 1.25rem;
  font-weight: 600;
}

.card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card li {
  padding: 0.25rem 0;
  color: var(--text-light);
  font-size: 0.875rem;
  position: relative;
  padding-left: 1rem;
}

.card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: bold;
}

/* Cases */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.case-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

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

.case-number {
  position: absolute;
  top: -1rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  background: var(--red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.case-card h3 {
  margin: 0 0 1.5rem;
  color: var(--graphite);
  font-size: 1.25rem;
  font-weight: 600;
}

.case-details p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.case-details strong {
  color: var(--graphite);
  font-weight: 600;
}

.disclaimer {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  margin: 0;
  font-style: italic;
}

/* Posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.post-card h3 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.post-card a {
  color: var(--graphite);
  text-decoration: none;
}

.post-card a:hover {
  color: var(--red);
}

.post-tags {
  color: var(--text-light);
  font-size: 0.75rem;
  margin: 0;
  font-weight: 500;
}

/* Contact Form */
.contact-form {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--graphite);
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  transition: var(--transition);
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkmark {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 0.25rem;
  position: relative;
  transition: var(--transition);
}

.checkbox-label input:checked + .checkmark {
  background: var(--red);
  border-color: var(--red);
}

.checkbox-label input:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.btn-submit {
  justify-self: start;
  min-width: 120px;
}

.form-note {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

.error-message {
  color: #dc2626;
  font-size: 0.75rem;
  display: none;
}

/* Footer */
.site-footer {
  background: var(--graphite);
  color: #d1d5db;
  padding: 3rem 0;
  margin-top: 2rem;
}

.site-footer a {
  color: #d1d5db;
  transition: var(--transition);
}

.site-footer a:hover {
  color: white;
}

.footer-content {
  text-align: center;
  display: grid;
  gap: 1rem;
}

.footer-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-grid,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero {
    padding: 4rem 0;
    text-align: center;
  }
  
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .logo-master {
    display: none;
  }
  
  .logo-k {
    display: block;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 240px;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .cards-grid,
  .cases-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-bullets {
    justify-content: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .header-inner {
    height: 4rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .card,
  .case-card,
  .post-card {
    padding: 1.5rem;
  }
  
  .info-card {
    padding: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Animation and Loading States */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.case-card,
.post-card,
.info-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .contact-form {
    display: none;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .card,
  .case-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}


/* Marca d'água logo K na seção Sobre */
#profissionais {
  position: relative;
}

#profissionais::before {
  content: "";
  position: absolute;
  inset: 0;
  /* removido */
  background-repeat: no-repeat;
  background-position: 40px center; /* ajuste a margem esquerda */
  background-size: 220px;           /* ajuste o tamanho da marca d'água */
  opacity: 0.06;                     /* intensidade da marca d'água */
  pointer-events: none;
  z-index: 0;
}

/* Garante que o conteúdo fique acima da marca d'água */
#profissionais .container,
#profissionais .grid-2,
#profissionais .content,
#profissionais .sidebar {
  position: relative;
  z-index: 1;
}

/* ===== Responsividade marca d'água K (seção Sobre) ===== */
@media (max-width: 1024px) {
  #profissionais::before {
    background-size: 180px;
    background-position: 28px center;
    opacity: 0.06;
  }
}

@media (max-width: 768px) {
  #profissionais::before {
    background-size: 140px;
    background-position: 20px center;
    opacity: 0.055;
  }
}

@media (max-width: 480px) {
  #profissionais::before {
    background-size: 110px;
    background-position: 16px center;
    opacity: 0.05; /* mantém discreto no mobile */
  }
}

/* ===== Hero com logo K ===== */
.hero .hero-photo { display: flex; align-items: center; justify-content: center; }
.hero .hero-photo .hero-logo { max-width: 260px; height: auto; display: block; }

/* ===== Foto em Profissionais ===== */
#profissionais .profile-photo { display: flex; align-items: center; justify-content: center; }
#profissionais .profile-photo img.portrait { max-width: 420px; height: auto; border-radius: 8px; }

/* Layout: mantém bom equilíbrio em telas largas */
@media (min-width: 900px) {
  #profissionais .grid-2 { gap: 2rem; }
  #profissionais .profile-photo { order: 2; }   /* conteúdo à esquerda, foto ao centro/direita */
  #profissionais .sidebar { order: 3; }         /* sidebar após a foto */
}

/* Ajuste leve no mobile */
@media (max-width: 899px) {
  #profissionais .profile-photo { margin-top: 24px; }
}

/* ===== HERO em bloco com marca d'água K à esquerda ===== */
.hero {
  position: relative;
  overflow: hidden; /* evita scroll se a marca d'água ultrapassar */
}

/* marca d'água */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* removido */
  background-repeat: no-repeat;
  background-position: 40px center;   /* esquerda + central vertical */
  background-size: 440px;             /* tamanho da marca d'água */
  opacity: 0.06;                      /* intensidade discreta */
  pointer-events: none;
  z-index: 0;
}

/* garante que o conteúdo fique acima da marca d'água */
.hero .container {
  position: relative;
  z-index: 1;
  /* reserva espaço interno à esquerda para não colidir com a marca d'água */
  padding-left: clamp(120px, 24vw, 480px);
}

/* unifica o layout do hero em bloco */
.hero-grid { 
  display: block; 
}

/* título sem quebra em telas largas; libera no mobile */
@media (min-width: 1200px) {
  .hero h1 { white-space: nowrap; }
}

/* responsividade da marca d'água e do padding à esquerda */
@media (max-width: 1024px) {
  .hero::before { background-size: 360px; background-position: 28px center; }
  .hero .container { padding-left: clamp(80px, 20vw, 360px); }
}
@media (max-width: 768px) {
  .hero::before { background-size: 260px; background-position: 20px center; opacity: 0.055; }
  .hero .container { padding-left: clamp(24px, 8vw, 140px); }
}
@media (max-width: 480px) {
  .hero::before { background-size: 200px; background-position: 16px center; opacity: 0.05; }
  .hero .container { padding-left: 20px; }
}

/* === FIX HERO: remover K duplicado à direita e evitar corte do título === */
.hero { 
  background: none !important;            /* remove background-image antigo do hero */
  background-image: none !important;
}

.hero h1 { 
  white-space: normal;                     /* não corta em telas médias/menores */
}

/* Em telas bem largas, mantemos o título numa linha só (opcional) */
@media (min-width: 1400px) {
  .hero h1 { white-space: nowrap; }
}

/* === HERO unificado, marca d'água à esquerda (override final) === */
.hero{position:relative;overflow:hidden;background:none !important;background-image:none !important;}
.hero::before{
  content:"";position:absolute;inset:0;
  background-image:url("../img/logo-k.png");
  background-repeat:no-repeat;
  background-position:40px center;   /* esquerda */
  background-size:440px;              /* tamanho do K */
  opacity:.06;pointer-events:none;z-index:0;
}
.hero .container{position:relative;z-index:1;padding-left:clamp(120px,24vw,480px);}
.hero-grid{display:block;}            /* não dividir em 2 colunas */
.hero h1{white-space:normal;}         /* evita corte do título */
@media (min-width:1400px){.hero h1{white-space:nowrap;}} /* linha única só em telas bem largas */
@media (max-width:1024px){
  .hero::before{background-size:360px;background-position:28px center;}
  .hero .container{padding-left:clamp(80px,20vw,360px);}
}
@media (max-width:768px){
  .hero::before{background-size:260px;background-position:20px center;opacity:.055;}
  .hero .container{padding-left:clamp(24px,8vw,140px);}
}
@media (max-width:480px){
  .hero::before{background-size:200px;background-position:16px center;opacity:.05;}
  .hero .container{padding-left:20px;}
}

/* === HERO: override final (somente marca d'água à ESQUERDA) === */
.hero{position:relative;overflow:hidden;background:none !important;background-image:none !important;}
/* apaga qualquer after que tenha ficado em cache */
.hero::after{content:none !important;background:none !important;background-image:none !important;}
/* mantém APENAS a marca d’água à ESQUERDA no ::before */
.hero::before{
  content:"";position:absolute;inset:0;
  background-image:url("../img/logo-k.png");background-repeat:no-repeat;
  background-position:40px center;background-size:440px;
  opacity:.06;pointer-events:none;z-index:0;
}
/* conteúdo acima da marca d’água + respiro à esquerda */
.hero .container{position:relative;z-index:1;padding-left:clamp(96px,22vw,420px);}
/* grid vira bloco único */
.hero-grid{display:block;}
/* título adapta ao espaço, sem cortar; em telas muito largas, pode ficar numa linha só */
.hero h1{white-space:normal;font-size:clamp(2.2rem,5.2vw,4.2rem);line-height:1.05;word-break:normal;hyphens:auto;}
@media (min-width:1400px){.hero h1{white-space:nowrap;}}
/* responsividade da marca d’água e do padding */
@media (max-width:1024px){
  .hero::before{background-size:360px;background-position:28px center;}
  .hero .container{padding-left:clamp(72px,18vw,320px);}
}
@media (max-width:768px){
  .hero::before{background-size:260px;background-position:20px center;opacity:.055;}
  .hero .container{padding-left:clamp(20px,8vw,120px);}
}
@media (max-width:480px){
  .hero::before{background-size:200px;background-position:16px center;opacity:.05;}
  .hero .container{padding-left:20px;}
}

/* === HERO: texto adaptável (largura e tipografia) === */
.hero .container{
  /* reduz o "empurra" da marca d’água à esquerda */
  padding-left: clamp(72px, 16vw, 360px);
  padding-right: min(4vw, 32px);
}

/* limita o bloco textual para evitar linhas longas e facilitar a quebra */
.hero .hero-copy{
  max-width: 32ch;   /* ajuste fino: 28–36ch conforme seu gosto */
}

/* título com quebras elegantes e tamanhos graduais */
.hero h1{
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  line-height: 1.05;
  white-space: normal;
  text-wrap: balance;       /* navegadores modernos */
  overflow-wrap: anywhere;  /* não deixa cortar fora da tela */
  hyphens: auto;
}

@media (max-width: 1200px){
  .hero h1{ font-size: clamp(2rem, 4.2vw, 3.4rem); }
}

@media (max-width: 992px){
  .hero h1{ font-size: clamp(1.9rem, 4.0vw, 3.1rem); }
}

@media (max-width: 768px){
  .hero .container{ padding-left: clamp(20px, 6vw, 120px); }
  .hero .hero-copy{ max-width: 36ch; } /* um pouquinho mais solto no mobile */
}

@media (max-width: 480px){
  .hero h1{ font-size: clamp(1.6rem, 6vw, 2.2rem); }
}

/* ==== HERO Tuning v2: texto proporcional e largura útil ==== */
.hero .container{
  /* dá mais espaço pro texto e reduz empurrão da marca d'água */
  padding-left: clamp(56px, 14vw, 300px);
  padding-right: min(4vw, 32px);
}

.hero .hero-copy{
  /* aumenta a largura útil do bloco textual */
  max-width: min(60ch, 100%);
}

.hero h1{
  /* reduz o tamanho máximo e deixa quebrar naturalmente */
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.12;
  white-space: normal !important; /* garante que não force uma linha só */
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* telas grandes */
@media (min-width: 1200px){
  .hero .hero-copy{ max-width: 46ch; }
  .hero::before{ background-size: 400px; background-position: 32px center; }
}

/* telas muito grandes */
@media (min-width: 1600px){
  .hero h1{ font-size: clamp(2.2rem, 3.2vw, 3.8rem); }
  .hero .container{ padding-left: clamp(80px, 18vw, 420px); }
  .hero .hero-copy{ max-width: 52ch; }
}

/* mobile / tablet */
@media (max-width: 768px){
  .hero .container{ padding-left: clamp(20px, 6vw, 120px); }
  .hero .hero-copy{ max-width: 34ch; }
  .hero h1{ font-size: clamp(1.6rem, 6vw, 2.2rem); }
}

/* ====== HERO • largura útil calibrada para desktop e mobile ====== */
/* Se existir uma .container global com max-width pequeno, sobrepõe aqui no hero */
.hero .container{
  /* mais espaço para texto sem encostar na marca d’água */
  padding-left: clamp(48px, 12vw, 280px);
  padding-right: min(4vw, 40px);
  /* limita o container do hero a uma largura agradável em telas grandes */
  max-width: min(1200px, 94vw);
  margin-left: auto;
  margin-right: auto;
}

/* Bloco textual com linha mais longa no desktop (reduz quebras) */
.hero .hero-copy{
  max-width: 58ch; /* antes ~32–46ch; agora mais solto no desktop */
}

/* Título mantém tamanho atual, só garantindo que não force uma linha só */
.hero h1{
  white-space: normal !important;
  text-wrap: balance;
}

/* Telas bem grandes: dá ainda um pouco mais de espaço */
@media (min-width: 1400px){
  .hero .container{
    max-width: min(1320px, 92vw);
    padding-left: clamp(64px, 14vw, 360px);
  }
  .hero .hero-copy{ max-width: 62ch; }
}

/* Tablets */
@media (max-width: 1024px){
  .hero .container{
    max-width: 92vw;
    padding-left: clamp(28px, 8vw, 160px);
  }
  .hero .hero-copy{ max-width: 46ch; }
}

/* Mobile */
@media (max-width: 768px){
  .hero .container{
    max-width: 96vw;
    padding-left: clamp(16px, 6vw, 120px);
  }
  .hero .hero-copy{ max-width: 36ch; }
}

/* === HERO v3: largura útil maior e K com leve bleed à esquerda === */
.hero{
  padding-block: clamp(48px, 8vh, 96px);
  min-height: 62vh;
}

.hero .container{
  /* mais largura e menos “empurra” sem encostar no K */
  max-width: min(1360px, 96vw);
  padding-left: clamp(36px, 10vw, 220px);
  padding-right: min(4vw, 48px);
  margin-inline: auto;
}

.hero .hero-copy{
  /* linhas mais longas no desktop */
  max-width: 62ch;
}

@media (min-width: 1400px){
  .hero .container{
    max-width: min(1480px, 95vw);
    padding-left: clamp(40px, 12vw, 240px);
  }
  .hero .hero-copy{ max-width: 66ch; }
  /* faz o K “sangrar” um pouco para fora, liberando área de texto */
  .hero::before{
    background-size: 520px;
    background-position: -40px center;
  }
}

@media (min-width: 1600px){
  .hero .container{
    max-width: min(1600px, 94vw);
    padding-left: clamp(48px, 12vw, 260px);
  }
  .hero .hero-copy{ max-width: 68ch; }
  .hero::before{
    background-size: 560px;
    background-position: -64px center;
  }
}

/* Tablets e mobile: mantém conforto e quebra natural */
@media (max-width: 1024px){
  .hero .container{
    max-width: 92vw;
    padding-left: clamp(24px, 8vw, 140px);
  }
  .hero .hero-copy{ max-width: 46ch; }
}
@media (max-width: 768px){
  .hero .container{
    max-width: 96vw;
    padding-left: clamp(16px, 6vw, 110px);
  }
  .hero .hero-copy{ max-width: 36ch; }
}

/* ===== HERO v4 — mais largura útil, bleed maior do K e espaçamento calibrado ===== */

/* container mais largo no desktop */
.hero .container{
  max-width: min(1480px, 96vw);
  padding-left: clamp(28px, 9vw, 200px); /* menos empurra da esquerda */
  padding-right: min(5vw, 56px);
  margin-inline: auto;
}

/* título: linhas um pouco mais longas e altura de linha ligeiramente maior */
.hero h1{
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.15;
  white-space: normal !important;
  text-wrap: balance;
}

/* bloco textual abre mais no desktop */
.hero .hero-copy{
  max-width: 68ch; /* 62→68ch reduz as quebras sem ficar cansativo */
}

/* espaçamento vertical: menos altura total; aproxima a dobra */
.hero{
  padding-block: clamp(40px, 7vh, 80px);
  min-height: 56vh;
}

/* K com bleed maior à esquerda em telas grandes: libera área pro texto */
@media (min-width: 1400px){
  .hero::before{
    background-size: 580px;
    background-position: -96px center; /* sangra mais pra fora */
  }
  .hero .container{
    max-width: min(1560px, 95vw);
    padding-left: clamp(24px, 8vw, 180px);
  }
  .hero .hero-copy{ max-width: 72ch; }
}

/* telas muito grandes */
@media (min-width: 1680px){
  .hero::before{
    background-size: 640px;
    background-position: -128px center;
  }
  .hero .container{
    max-width: min(1680px, 94vw);
    padding-left: clamp(24px, 7.5vw, 180px);
  }
  .hero .hero-copy{ max-width: 74ch; }
}

/* tablet */
@media (max-width: 1024px){
  .hero .container{
    max-width: 92vw;
    padding-left: clamp(22px, 7vw, 140px);
  }
  .hero .hero-copy{ max-width: 48ch; }
}

/* mobile */
@media (max-width: 768px){
  .hero{
    padding-block: clamp(28px, 6vh, 56px);
    min-height: auto;
  }
  .hero .container{
    max-width: 96vw;
    padding-left: clamp(16px, 6vw, 110px);
  }
  .hero .hero-copy{ max-width: 36ch; }
}

/* === HERO • realce da marca d'água (visível sem competir com o texto) === */
.hero::before{
  /* desktop padrão */
  background-size: 520px;
  background-position: 0px center;     /* traz o K mais para dentro da área útil */
  opacity: .085;                        /* 8.5%: aparece sem poluir */
}

/* laptops/tablets grandes */
@media (min-width: 1200px){
  .hero::before{
    background-size: 560px;
    background-position: -20px center;  /* leve bleed à esquerda */
    opacity: .09;
  }
}

/* telas muito grandes */
@media (min-width: 1600px){
  .hero::before{
    background-size: 620px;
    background-position: -40px center;  /* sangra mais, libera texto */
    opacity: .095;
  }
}

/* mobile/tablet: mantém discreto */
@media (max-width: 768px){
  .hero::before{
    background-size: 240px;
    background-position: 12px center;
    opacity: .06;
  }
}

/* ===== Marca d'água fixa global (parallax simples) ===== */
body { position: relative; background-color: #fff; }

/* Elemento fixo com o K — fica abaixo do conteúdo */
.wm-k{
  position: fixed;
  top: 0; left: 0;
  width: 60vw;           /* largura base ocupada na esquerda */
  height: 100vh;
  background-image: url("../img/logo-k.png");
  background-repeat: no-repeat;
  background-size: clamp(320px, 36vw, 640px);
  background-position: -48px center;    /* leve bleed para a esquerda */
  opacity: .09;                         /* visível sem competir */
  pointer-events: none;
  z-index: 0;                           /* fica por trás do conteúdo */
}

/* Conteúdo acima da marca d'água */
.site-header, main, .site-footer, footer { position: relative; z-index: 1; }

/* Desliga a marca d'água do HERO para evitar duplicidade */
.hero::before { content: none !important; background: none !important; }

/* Ajustes por breakpoint */
@media (min-width: 1400px){
  .wm-k{
    background-size: clamp(380px, 32vw, 720px);
    background-position: -64px center;
    opacity: .095;
  }
}
@media (min-width: 1680px){
  .wm-k{
    background-size: clamp(420px, 30vw, 780px);
    background-position: -84px center;
    opacity: .10;
  }
}
/* Tablets: reduz um pouco a presença para dar mais área de texto */
@media (max-width: 1024px){
  .wm-k{
    width: 54vw;
    background-size: clamp(260px, 40vw, 420px);
    background-position: -24px center;
    opacity: .075;
  }
}
/* Mobile: discreto para não poluir */
@media (max-width: 768px){
  .wm-k{
    width: 48vw;
    background-size: clamp(200px, 42vw, 320px);
    background-position: 0 48%;
    opacity: .06;
  }
}

/* HERO alinhado com o K fixo */
.hero .container{
  padding-left: clamp(28px, 8vw, 180px);
  max-width: min(1500px, 96vw);
}
@media (min-width: 1600px){
  .hero .container{
    padding-left: clamp(24px, 7.5vw, 160px);
    max-width: min(1640px, 94vw);
  }
}

/* ===== Header fixo com blur leve e boa legibilidade ===== */
.site-header{
  position: sticky;       /* “fixo” moderno; mantém layout sem precisar de padding-top no body */
  top: 0;
  z-index: 20;            /* acima do .wm-k (z-index:0) e do conteúdo */
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Garante largura total do conteúdo do header */
.site-header .header-inner{ max-width: min(1500px, 96vw); margin-inline: auto; }

/* ===== Offset das âncoras: títulos não ficam escondidos sob o header ===== */
section[id]{ scroll-margin-top: clamp(72px, 9vh, 104px); }

/* Ajuste fino do espaçamento do topo do hero, já que o header fica por cima ao rolar */
.hero{ scroll-margin-top: clamp(80px, 10vh, 112px); }

/* ===== Offset global para âncoras com header fixo ===== */
:root{
  /* Altura “lógica” do header (desktop) */
  --header-h: 96px;
}

html{
  /* Faz o navegador respeitar a altura do header ao rolar para âncoras */
  scroll-padding-top: var(--header-h);
  scroll-behavior: smooth;
}

/* Garante altura do header de acordo com a variável (mantém consistência) */
.site-header{ min-height: var(--header-h); }

/* Mobile/tablet: header menor → offset menor */
@media (max-width: 1024px){
  :root{ --header-h: 84px; }
}
@media (max-width: 768px){
  :root{ --header-h: 72px; }
}

/* Se algum título ficar “grudado”, damos uma folguinha extra apenas nos sections */
section[id]{ scroll-margin-top: calc(var(--header-h) + 8px); }

/* Fallback de ancoragem: quando a seção está como :target, cria um espaçador fantasma
   com a altura do header para evitar que o título fique escondido */
section[id]:target::before{
  content:"";
  display:block;
  height:var(--header-h, 96px);
  margin-top: calc(var(--header-h, 96px) * -1);
}

/* === Neutraliza fallbacks para evitar espaço DUPLICADO nas âncoras === */
html{ scroll-padding-top: 0 !important; }        /* desliga padding global */
section[id]{ scroll-margin-top: 0 !important; }  /* desliga margin-top de âncoras */
section[id]:target::before{
  content: none !important; display: none !important; height: 0 !important; margin: 0 !important;
}

/* ===== Header compacto + alinhamento vertical ===== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-block: 8px;                 /* deixa o header baixo */
}

.site-header .header-inner{
  max-width: min(1500px, 96vw);
  margin-inline: auto;
  display: flex;
  align-items: center;                /* alinha marca e menu verticalmente */
  gap: 16px;
}

/* Marca: garante altura “real” próxima de 42px */
.brand .logo-master{
  height: 42px; width: auto; display: block;
}
.brand .logo-k{ display: none; }      /* só mostra no mobile */

/* Navegação: itens na mesma linha da marca, centrados verticalmente */
.nav{ margin-left: auto; }
.nav-menu{
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-menu a{
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;                 /* área de clique confortável */
  line-height: 1;
}

/* ===== Mobile / Tablet ===== */
.nav-toggle{ display: none; }        /* escondido no desktop */

@media (max-width: 980px){
  .brand .logo-master{ display: none; }
  .brand .logo-k{ display: block; }  /* K compacto no mobile */

  .nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 0; background: transparent; cursor: pointer;
    margin-left: auto;
  }

  /* menu fechado por padrão no mobile */
  .nav-menu{
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(255,255,255,0.96);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 8px;
  }
  .nav-menu.is-open{ display: flex; } /* abre com JS */
}

/* altura “lógica” do header para navegação suave — será atualizada pelo JS */
:root{ --header-h: 64px; }            /* base para o primeiro paint */
.site-header{ min-height: var(--header-h); }

/* Diminuímos também as seções para que o título passe logo abaixo do header */
section[id]{ scroll-margin-top: calc(var(--header-h) + 8px); }

/* === Ajuste de espaçamento superior — Áreas de atuação e Contato === */
/* Reduz o respiro do bloco da seção */
#areas .container,
#contato .container{
  padding-top: clamp(8px, 1.6vh, 20px) !important;
}

/* Aproxima o título do topo do bloco */
#areas h2,
#contato h2{
  margin-top: clamp(6px, 1vh, 14px) !important;
  padding-top: 0 !important;
}
