/* ============================================================
   NFPainel - Segment Page CSS
   Páginas específicas por segmento
   ============================================================ */

/* ── Navbar forçada como scrolled nas páginas internas ─────── */
.segment-page .navbar {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.segment-page .navbar .nav-logo { color: var(--text-primary); }
.segment-page .navbar .nav-link { color: var(--text-secondary); }
.segment-page .navbar .nav-link:hover {
  color: var(--primary);
  background: var(--primary-ultra-light);
}
.segment-page .navbar .nav-toggle span { background: var(--text-primary); }

/* ══════════════════════════════════════════════════════════
   HERO DO SEGMENTO — Versão gradiente (padrão)
   ══════════════════════════════════════════════════════════ */
.segment-hero {
  background: linear-gradient(145deg, var(--primary-darker) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  padding: calc(var(--nav-height) + 48px) 0 80px;
  position: relative;
  overflow: hidden;
}

.segment-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* ── Hero Grade ───────────────────────────────────────────── */
.segment-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Hero Badge ───────────────────────────────────────────── */
.segment-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 20px;
}

.segment-hero-badge .material-icons-outlined { font-size: 16px; }

/* ── Hero Título e Descrição ──────────────────────────────── */
.segment-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 48px);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.segment-hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-bottom: 32px;
}

.segment-hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   HERO COM FOTO DE FUNDO — Variante para quermesse
   ══════════════════════════════════════════════════════════ */
.segment-hero--photo {
  position: relative;
  overflow: hidden;
  background: none;
}

/* Remove o pattern SVG no hero com foto */
.segment-hero--photo::before {
  display: none;
}

.segment-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(4, 120, 87, 0.92) 0%,
    rgba(5, 150, 105, 0.88) 40%,
    rgba(16, 185, 129, 0.85) 100%
  );
}

/* ── Prova social no hero ─────────────────────────────────── */
.hero-proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
}

.hero-proof .material-icons-outlined {
  color: #34D399;
  font-size: 18px;
}

/* ══════════════════════════════════════════════════════════
   MOCKUP DO SEGMENTO
   ══════════════════════════════════════════════════════════ */
.segment-hero-visual {
  display: flex;
  justify-content: center;
}

.segment-mockup {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 360px;
  animation: float 6s ease-in-out infinite;
}

.sm-header {
  background: var(--primary);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.sm-header .material-icons-outlined { font-size: 18px; }

.sm-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sm-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.sm-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.sm-badge.green  { background: var(--primary-ultra-light); color: var(--primary-darker); }
.sm-badge.blue   { background: #EFF6FF; color: #1E40AF; }
.sm-badge.orange { background: #FFFBEB; color: #92400E; }

.sm-service {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sm-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.sm-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--primary-ultra-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-light);
}

.sm-total span   { font-size: 12px; color: var(--primary-dark); font-weight: 600; }
.sm-total strong { font-size: 18px; color: var(--primary-darker); font-family: var(--font-display); }

/* ══════════════════════════════════════════════════════════
   FUNCIONALIDADES DO SEGMENTO
   ══════════════════════════════════════════════════════════ */
.segment-features {
  background: var(--bg-secondary);
  padding: 100px 0;
}

/* ══════════════════════════════════════════════════════════
   FLUXO DA OPERAÇÃO (COMO FUNCIONA)
   ══════════════════════════════════════════════════════════ */
.operation-flow {
  background: white;
  padding: 100px 0;
}

.flow-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Linha vertical conectora */
.flow-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 80px;
  bottom: 80px;
  width: 3px;
  background: var(--primary-light);
  transform: translateX(-50%);
}

.flow-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 40px 0;
  position: relative;
}

.flow-step--reverse {
  direction: rtl;
}

.flow-step--reverse > * {
  direction: ltr;
}

/* ── Imagem do step ───────────────────────────────────────── */
.flow-step-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.flow-step-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.flow-step:hover .flow-step-image img {
  transform: scale(1.03);
}

.flow-step-number {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  box-shadow: var(--shadow-green);
  z-index: 2;
}

.flow-step--reverse .flow-step-number {
  left: auto;
  right: 16px;
}

/* ── Conteúdo do step ─────────────────────────────────────── */
.flow-step-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.flow-step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ── Highlight do step ────────────────────────────────────── */
.flow-highlight {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--primary-ultra-light);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
}

.flow-highlight .material-icons-outlined {
  color: var(--primary);
  font-size: 20px;
}

/* ══════════════════════════════════════════════════════════
   GALERIA OPERACIONAL
   ══════════════════════════════════════════════════════════ */
.operation-gallery {
  background: var(--bg-secondary);
  padding: 100px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* Card grande — ocupa 2 colunas */
.gallery-card--large {
  grid-column: span 2;
}

.gallery-image {
  position: relative;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card--large .gallery-image img {
  height: 300px;
}

.gallery-card:hover .gallery-image img {
  transform: scale(1.05);
}

.gallery-content {
  padding: 20px 24px;
}

.gallery-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.gallery-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   CONTEÚDO INFORMATIVO SEO
   ══════════════════════════════════════════════════════════ */
.segment-content-section {
  background: white;
  padding: 100px 0;
}

.segment-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.segment-content-text h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.segment-content-text h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 14px;
}

.segment-content-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ── Lista de benefícios ──────────────────────────────────── */
.segment-benefit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.segment-benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.segment-benefit-list .material-icons-outlined {
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ══════════════════════════════════════════════════════════
   NÚMEROS DE PROVA
   ══════════════════════════════════════════════════════════ */
.proof-numbers {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  padding: 24px;
  background: var(--primary-ultra-light);
  border-radius: var(--radius-xl);
  border: 1px solid var(--primary-light);
}

.proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.proof-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-darker);
  line-height: 1;
}

.proof-label {
  font-size: 12px;
  color: var(--primary-dark);
  margin-top: 6px;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   CTA BOX LATERAL
   ══════════════════════════════════════════════════════════ */
.segment-content-cta-box {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.scb-inner {
  background: var(--primary-ultra-light);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
}

.scb-icon {
  color: var(--primary);
  font-size: 48px !important;
  display: block;
  margin-bottom: 16px;
}

.scb-inner h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-darker);
  margin-bottom: 10px;
  line-height: 1.3;
}

.scb-inner p {
  font-size: 14px;
  color: var(--primary-dark);
  line-height: 1.6;
  margin-bottom: 20px;
}

.scb-price {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.scb-price span {
  font-size: 13px;
  color: var(--primary-dark);
}

.scb-price strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-darker);
  font-family: var(--font-display);
}

/* ── Depoimento no CTA box ────────────────────────────────── */
.scb-testimonial {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--primary-light);
}

.scb-testimonial p {
  font-size: 13px;
  font-style: italic;
  color: var(--primary-dark);
  line-height: 1.5;
  margin-bottom: 6px !important;
}

.scb-testimonial-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-darker);
}

/* ══════════════════════════════════════════════════════════
   OUTROS SEGMENTOS
   ══════════════════════════════════════════════════════════ */
.other-segments {
  background: var(--bg-secondary);
  padding: 80px 0;
}

/* ══════════════════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
}

.breadcrumb a:hover { color: white; }
.breadcrumb .sep { color: rgba(255,255,255,0.4); }
.breadcrumb span:last-child { color: white; font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVO
   ══════════════════════════════════════════════════════════ */

/* ── 900px ────────────────────────────────────────────────── */
@media (max-width: 900px) {

  /* Hero */
  .segment-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .segment-hero-badge { justify-content: center; }
  .segment-hero-ctas  { justify-content: center; }
  .hero-proof         { justify-content: center; }
  .segment-hero-visual { order: -1; }

  /* Conteúdo */
  .segment-content-grid {
    grid-template-columns: 1fr;
  }

  .segment-content-cta-box {
    position: static;
  }

  /* Fluxo */
  .flow-timeline::before {
    display: none;
  }

  .flow-step,
  .flow-step--reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    direction: ltr;
  }

  .flow-step--reverse .flow-step-number {
    left: 16px;
    right: auto;
  }

  .flow-step-image img {
    height: 220px;
  }

  /* Galeria */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card--large {
    grid-column: span 1;
  }

  .gallery-card--large .gallery-image img {
    height: 240px;
  }
}

/* ── 600px ────────────────────────────────────────────────── */
@media (max-width: 600px) {

  /* Hero */
  .segment-hero {
    padding: calc(var(--nav-height) + 24px) 0 56px;
  }

  .segment-mockup { max-width: 300px; }

  .sm-item {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .sm-service { grid-column: 1 / -1; }

  .hero-proof {
    font-size: 12px;
    padding: 8px 14px;
  }

  /* Fluxo */
  .flow-step-content h3 {
    font-size: 18px;
  }

  .flow-step-image img {
    height: 180px;
  }

  /* Galeria */
  .gallery-image img {
    height: 180px;
  }

  /* Números */
  .proof-numbers {
    flex-direction: column;
    gap: 16px;
  }
}