
html {
  scroll-behavior: smooth;
}

/* ---------- Corpo da home ---------- */

.home-main {
  flex: 1;
  padding: var(--space-4) var(--space-6) var(--space-8);
  max-width: 1920px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.home-masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-5);
}

.home-masthead img {
  max-height: 108px;
  max-width: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.home-masthead__plus {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--peers-blue-03);
}

.home-masthead__tagline {
  text-align: center;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--peers-blue-02);
  margin: 0 0 var(--space-6);
}

.home-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--peers-blue);
  margin: 0 0 4px;
}

.home-section__title-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--peers-blue-02);
  background: var(--grey-200);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.home-section__subtitle {
  font-size: 0.82rem;
  color: var(--grey-600);
  margin: 0 0 var(--space-3);
}

/* ---------- Seção destaque (N cards, se adapta à quantidade) ---------- */

.home-hero-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* ---------- Cards ---------- */

.feature-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--peers-white);
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.feature-card--highlight {
  border-color: var(--peers-lime);
  box-shadow: 0 0 0 1px var(--peers-lime), var(--shadow-lg);
}

.feature-card--highlight:hover {
  box-shadow: 0 0 0 1.5px var(--peers-lime), var(--shadow-xl);
}

.feature-card--placeholder {
  border-style: dashed;
  box-shadow: none;
  cursor: default;
}

.feature-card--placeholder:hover {
  transform: none;
  box-shadow: none;
}

.feature-card--placeholder .feature-card__icon {
  background: var(--grey-100);
  color: var(--grey-500);
}

.feature-card--placeholder .feature-card__title {
  color: var(--grey-700);
}

.feature-card__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--peers-serene-02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--peers-blue);
}

.feature-card__body {
  flex: 1;
  min-width: 0;
}

.feature-card__title {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--peers-blue);
  margin: 0 0 4px;
}

.feature-card__desc {
  font-size: 0.85rem;
  color: var(--grey-600);
  margin: 0 0 var(--space-2);
  line-height: 1.45;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
}

.status-pill--lime { background: var(--peers-lime-02); color: #4a5a00; }
.status-pill--info { background: #cafdf5; color: #003768; }
.status-pill--warning { background: #fff5cc; color: #7a4100; }
.status-pill--error { background: #ffe9d5; color: #7a0916; }

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--peers-lime);
  background: var(--peers-blue);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  transition: background 0.15s ease;
}

.card-btn:hover {
  background: #133061;
}

.card-btn--disabled {
  color: var(--grey-500);
  background: var(--grey-200);
  cursor: default;
}

.card-btn--disabled:hover {
  background: var(--grey-200);
}

/* ---------- Toggle de visibilidade "Customer" (só admin, na home) ---------- */

.card-vis-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--peers-white);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-full);
  padding: 3px 9px 3px 3px;
  font-family: var(--font-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--grey-500);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(1, 19, 52, 0.12);
}

.card-vis-toggle__dot {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 11px;
  border-radius: var(--radius-full);
  background: var(--grey-300);
  transition: background 0.15s ease;
}

.card-vis-toggle__dot::after {
  content: "";
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--peers-white);
  transition: transform 0.15s ease;
}

.card-vis-toggle[data-visible="true"] {
  border-color: var(--peers-lime);
  color: #4a5a00;
}

.card-vis-toggle[data-visible="true"] .card-vis-toggle__dot {
  background: var(--peers-lime);
}

.card-vis-toggle[data-visible="true"] .card-vis-toggle__dot::after {
  transform: translateX(7px);
}

/* ---------- Domínios Tecnológicos ---------- */

.domain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

@media (max-width: 980px) {
  .domain-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .domain-grid { grid-template-columns: 1fr; }
}

.domain-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--peers-white);
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.domain-card:hover {
  transform: translateY(-3px);
  border-color: var(--peers-lime);
  box-shadow: var(--shadow-xl);
}

.domain-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--peers-serene-02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--peers-blue);
  margin-bottom: var(--space-2);
}

.domain-card__title {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1rem;
  color: var(--peers-blue);
  margin: 0 0 4px;
}

.domain-card__desc {
  font-size: 0.8rem;
  color: var(--grey-600);
  margin: 0 0 var(--space-2);
  line-height: 1.45;
  flex: 1;
}

.domain-card .card-btn {
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Menu sanduíche (navegação entre seções) ---------- */

.home-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(225, 255, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--peers-lime);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.home-nav-toggle:hover {
  background: rgba(225, 255, 0, 0.14);
  border-color: var(--peers-lime);
}

.home-nav-toggle__icon--close {
  display: none;
}

.home-nav-toggle.is-open .home-nav-toggle__icon--open {
  display: none;
}

.home-nav-toggle.is-open .home-nav-toggle__icon--close {
  display: block;
}

/* O painel comeca logo abaixo da .site-header (sticky, sempre visivel) --
   --site-header-h e medido e atualizado via assets/js/home-nav.js. So
   fecha por acao deliberada no botao sanduiche (sem backdrop, sem Esc,
   sem fechar ao clicar num link), entao o conteudo por baixo continua
   navegavel/clicavel com o painel aberto. */
.home-side-nav {
  position: fixed;
  top: var(--site-header-h, 60px);
  bottom: 0;
  left: 0;
  width: min(300px, 84vw);
  background: var(--peers-white);
  box-shadow: var(--shadow-xl);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 400;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.home-side-nav.is-open {
  transform: translateX(0);
}

.home-side-nav__title {
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-500);
  padding: var(--space-3) var(--space-3) var(--space-2);
  margin: 0;
  border-bottom: 1px solid var(--grey-200);
  flex-shrink: 0;
}

.home-side-nav a {
  display: block;
  padding: 13px var(--space-3);
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--grey-700);
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.home-side-nav a:hover {
  background: var(--grey-100);
}

.home-side-nav a.is-active {
  background: var(--peers-serene-02);
  color: var(--peers-blue);
  border-left-color: var(--peers-lime);
  font-weight: 700;
}
