
/* ===== HERO ===== */

.representatives-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 28px 90px;
  background: linear-gradient(180deg, #081224 0%, #0d2345 100%);
  color: #fff;
  text-align: center;
}

.representatives-hero .page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(5, 12, 25, 0.32) 0%,
      rgba(5, 12, 25, 0.72) 100%
    ),
    linear-gradient(
      90deg,
      rgba(13, 35, 69, 0.18) 0%,
      rgba(13, 35, 69, 0.12) 100%
    );
}

.representatives-hero .page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.representatives-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.representatives-hero p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.84);
}

/* ===== LAYOUT PRINCIPAL ===== */

.reps-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

/* ===== MAPA ===== */

.map-card,
.rep-info-card,
.rep-highlight-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(13, 35, 69, 0.08);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(13, 35, 69, 0.08);
}

.map-card {
  padding: 30px;
}

.map-head {
  margin-bottom: 20px;
}

.map-head h3 {
  font-size: 1.35rem;
  color: #0d2345;
}

.brazil-map-wrap {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #f4f7fc 0%, #eef3fa 100%);
  border: 1px solid rgba(13, 35, 69, 0.06);
  padding: 20px;
}

.brazil-map {
  width: 100%;
  height: auto;
  display: block;
}

.state {
  fill: #e7edf6;
  stroke: #ffffff;
  stroke-width: 3;
  cursor: default;
  transition: fill 0.25s ease;
  transform-origin: center;
}

.state.rep-active { cursor: pointer; }
.state.rep-none { cursor: not-allowed; }

.state.active {
  fill: #0d2345;
}

.map-legend {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.map-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #5c6b82;
  font-size: 0.92rem;
}

.map-legend .legend-dot {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  display: inline-block;
  border: 1px solid rgba(13, 35, 69, 0.12);
  flex-shrink: 0;
}
.map-legend .legend-dot.is-rep { background: #c9d6ea; }
.map-legend .legend-dot.is-none { background: #e7edf6; }

/* ===== CARD DO REPRESENTANTE ===== */

.rep-info-card {
  padding: 30px;
  position: sticky;
  top: 110px;
}

.rep-info-card h3 {
  font-size: 1.7rem;
  line-height: 1.15;
  color: #0d2345;
  margin-bottom: 10px;
}

.rep-city {
  color: #5c6b82;
  font-size: 1rem;
  margin-bottom: 26px;
}

.rep-info-list {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.rep-info-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(13, 35, 69, 0.03);
  border: 1px solid rgba(13, 35, 69, 0.06);
}

.rep-info-item span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a768c;
  margin-bottom: 8px;
}

.rep-info-item a,
.rep-info-item p {
  color: #0d2345;
  text-decoration: none;
  line-height: 1.6;
}

.rep-actions {
  display: grid;
  gap: 12px;
}

.rep-actions .btn {
  width: 100%;
}

/* ===== HIGHLIGHTS ===== */

.reps-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rep-highlight-card {
  padding: 28px;
}

.rep-highlight-card h3 {
  font-size: 1.18rem;
  line-height: 1.4;
  color: #0d2345;
  margin-bottom: 12px;
}

.rep-highlight-card p {
  color: #5c6b82;
  line-height: 1.8;
}

/* ===== CTA ===== */

.reps-cta-section {
  padding-top: 60px;
}

/* Contatos gerais da empresa (3 números) */
.reps-general {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 620px;
}

.reps-general-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--navy, #0d2345);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.reps-general-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(13, 35, 69, 0.22);
}

.reps-general-card .rg-name {
  font-weight: 600;
  font-size: 1.02rem;
}

.reps-general-card .rg-phone {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 920px) {
  .reps-general {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

/* ===== RESPONSIVO ===== */

@media (max-width: 1100px) {
  .reps-layout,
  .reps-highlight-grid {
    grid-template-columns: 1fr;
  }

  .rep-info-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 640px) {
  .representatives-hero {
    min-height: auto;
    padding: 120px 18px 72px;
  }

  .representatives-hero h1 {
    font-size: 2.3rem;
  }

  .map-card,
  .rep-info-card,
  .rep-highlight-card {
    padding: 22px;
    border-radius: 22px;
  }

  .brazil-map-wrap {
    padding: 12px;
  }
}

.state path,
path.state {
  fill: #e7edf6;            /* estado sem representante: apagado */
  stroke: #ffffff;
  stroke-width: 1.5;
  transition: fill 0.25s ease;
}

.state.rep-active path {
  fill: #c9d6ea;           /* estado com representante: disponível */
}

.state.rep-active:hover path {
  fill: #9fb6d8;
}

.state.active path,
path.state.active {
  fill: #0d2345;           /* selecionado */
}

/* ===== ENTRADAS DE REPRESENTANTE (1 ou mais por estado) ===== */
.rep-entry + .rep-entry {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(13, 35, 69, 0.1);
}
.rep-entry h3 {
  font-size: 1.4rem;
  line-height: 1.2;
  color: #0d2345;
  margin-bottom: 6px;
}
.rep-entry .rep-city {
  margin-bottom: 20px;
}
.rep-entry .rep-cta {
  width: 100%;
  margin-top: 18px;
}
.rep-geral {
  width: 100%;
  margin-top: 16px;
}
.rep-empty p {
  color: #5c6b82;
  line-height: 1.7;
  margin-bottom: 4px;
}
.rep-empty .rep-cta {
  margin-top: 14px;
}

/* ===== SELETOR DE ESTADO (so no mobile) ===== */
/* No celular o mapa SVG fica pequeno e dificil de tocar. Em telas <=767px
   escondemos o mapa e mostramos um dropdown de estados (mesmos dados).
   Tablet e PC continuam com o mapa clicavel. */
.rep-state-picker {
  display: none;
  margin-bottom: 4px;
}
.rep-state-picker label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0d2345;
  margin-bottom: 10px;
}
.rep-state-picker select {
  width: 100%;
  padding: 16px 44px 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(13, 35, 69, 0.12);
  background-color: #fff;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%230d2345" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  color: #0d2345;
  font-size: 1rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

@media (max-width: 767px) {
  .rep-state-picker { display: block; }
  .reps-map-section .brazil-map-wrap { display: none; }
  /* sem mapa no mobile -> esconde o titulo "Mapa do Brasil" e a legenda */
  .reps-map-section .map-head { display: none; }
  .reps-map-section .map-legend { display: none; }
}
/* AJUSTES MOBILE -------------------------------------------------- */
/* 10: "Selecione seu estado" maior */
.rep-state-picker label{ font-size:1.05rem; }
.rep-state-picker select{ font-size:1rem; padding:14px 16px; }
/* 11: contato geral - CTA claro (botao) dentro de cada card */
.reps-general-card{ gap:8px; }
.rg-go{
  margin-top:6px; align-self:flex-start;
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:999px;
  background:#fff; color:#0d2345;
  font-size:.85rem; font-weight:600;
}
/* Aproxima o titulo "Rede de atendimento" do seletor/mapa */
.reps-intro-section{ padding-bottom:0; }
.reps-intro-section .section-head{ margin-bottom:0; }
.reps-map-section{ padding-top:26px; }
@media (max-width:640px){
  .reps-map-section{ padding-top:16px; }
}