:root {
  --bg: #ffffff;
  --tile: #f4f6f5;
  --tile-border: #e7eaee;

  --icon-base: #8a9590;
  --text-base: #3a4742;

  --brand: #216a4f;
  --brand-strong: #1b5841;

  --radius: 18px;
  --easing: 260ms cubic-bezier(.2, .7, .2, 1);
}

/* Reset/estrutura básica */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-base);
}

/* ====== SECTION COM TÍTULO CENTRAL ====== */
.acesso-institucional {
  max-width: 1200px;     
  margin: 40px auto 56px;
  padding: 0 20px;
  text-align: center;
}

.acesso-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 40px;
  position: relative;
}

/* linha discreta abaixo do título (opcional) */
.acesso-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  border-radius: 999px;
  opacity: .25;
}

/* ====== GRID ====== */
.tiles {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-content: center; 
}

/* ====== TILE ====== */
.tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius);
  min-height: 150px;
  transition: box-shadow var(--easing), transform var(--easing), border-color var(--easing);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  isolation: isolate;
}

/* Barrinha lateral esquerda no hover */
.tile::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 0;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
  opacity: 0;
  transition: width var(--easing), opacity var(--easing);
  z-index: 0;
}
.tile:hover::before,
.tile:focus-visible::before {
  width: 4px;
  opacity: 1;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(33, 106, 79, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Conteúdo interno */
.tile-media {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px;
  text-align: center;
}

.tile-img {
  width: 102px;
  height: 102px;
  object-fit: contain;
  display: block;
  transition: filter var(--easing), transform var(--easing), opacity var(--easing);
}

/* Filtro cinza > cor no hover */
.tile-img.revela-cor {
  filter: grayscale(1) saturate(0) brightness(.95) contrast(1.05);
  opacity: 0.9;
}
.tile:hover .tile-img.revela-cor,
.tile:focus-visible .tile-img.revela-cor {
  filter: none;
  opacity: 1;
  transform: translateY(-1px);
}

/* Título do botão */
.tile-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--icon-base);
  text-transform: uppercase;
  transition: color var(--easing);
}
.tile:hover .tile-title,
.tile:focus-visible .tile-title {
  color: var(--brand);
}

/* Acessibilidade */
.tile:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px rgba(33, 106, 79, 0.45),
    0 14px 30px rgba(0, 0, 0, 0.16);
}

/* Placeholder */
.tile-placeholder {
  visibility: hidden;
  pointer-events: none;
}

/* ====== Responsivo ====== */
@media (max-width: 420px) {
  .acesso-title { font-size: 22px; margin-bottom: 28px; }
  .tile-img { width: 64px; height: 64px; }
  .tile-title { font-size: 14px; }
}
