/* ==========================================================================
   VESPASIANO.MG — TEMA CLARO (AZUL + BRANCO)
   - Visual moderno e acessível
   - Navegação com hambúrguer em mobile (ícone anima para “X”)
   - Cards elegantes e responsivos
   - Galeria com thumbs fixos (crop) + modal (imagem inteira via JS)
   ========================================================================== */

/* ============================= DESIGN TOKENS ============================== */
:root {
  /* Cores principais */
  --primary: #0b57d0;      /* Azul principal */
  --primary-700: #0a46ac;  /* Azul para hover */
  --primary-50: #e9f0ff;   /* Azul bem claro para fundos */

  /* Base da UI */
  --bg: #f6f8fc;           /* Fundo geral claro */
  --surface: #ffffff;      /* Cartões, nav, painéis */
  --text: #0f172a;         /* Texto principal */
  --muted: #475569;        /* Texto secundário */
  --border: #e5e7eb;       /* Bordas suaves */
  --ring: #93c5fd;         /* Foco/acessibilidade */

  /* Feedback */
  --ok: #16a34a;
  --warn: #f59e0b;
  --err: #dc2626;

  /* Efeitos e dimensões */
  --shadow: 0 6px 20px rgba(16, 24, 40, 0.08);
  --container-max: 1160px;
  --radius: 16px;
  --radius-sm: 12px;

  /* Galeria: altura do thumbnail (ajuste aqui) */
  --gallery-thumb-h: 240px;
}

/* ================================ BASE ==================================== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 16px; }
.small { font-size: 12px; color: var(--muted); }

/* Redução de movimento (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ================================ NAV ===================================== */
/* Header fixo no topo com sombra leve */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.04);
}

/* Linha interna do nav: marca + menu + hambúrguer */
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}

/* Marca (lado esquerdo) */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .2px;
}
.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
}

/* Menu horizontal (desktop) */
nav .menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
nav .menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
}
nav .menu a:hover { color: var(--primary); }

/* Foco de acessibilidade */
nav a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Link ativo (página atual) */
nav a.active {
  color: var(--primary);
  position: relative;
  font-weight: 700;
}
nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* ============================= HAMBÚRGUER ================================ */
/* Botão (escondido no desktop, visível no mobile) */
/* Botão hambúrguer (escondido no desktop) */
.hamburger {
  display: none;                 /* só mostramos no @media */
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: #f3f4f6;           /* cinza claro suave */
  border-radius: 10px;
  cursor: pointer;
}
.hamburger:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}


/* Ícone anima para “X” quando o menu abre */
nav.open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.open .hamburger span:nth-child(2) { opacity: 0; }
nav.open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay escurecido (atrás do painel mobile) */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  z-index: 40;
}
/* Overlay só aparece quando nav está “open” */
nav:not(.open) .nav-overlay { display: none; }

/* ========================= NAV — MOBILE (<= 860px) ======================== */
@media (max-width: 860px) {
  .hamburger {
    display: inline-flex;              /* aparece só no mobile */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;                          /* espaço entre as barras */
  }

  nav .menu { display: none; }         /* esconde menu horizontal */

  /* painel aberto */
  nav.open .menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 64px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(16,24,40,0.18);
    padding: 12px;
    z-index: 50;
  }
  nav.open .menu a {
    padding: 10px 8px;
    margin: 2px 0;
    border-radius: 10px;
  }
  nav.open .menu a:hover { background: var(--primary-50); }

  /* overlay visível só quando aberto */
  nav:not(.open) .nav-overlay { display: none; }

  /* trava o scroll do body quando o painel está aberto */
  body.menu-open { overflow: hidden; }
}


/* ================================= HERO ================================== */
/* Cabeçalho visual das páginas */
.hero {
  padding: 56px 16px;
  background:
    radial-gradient(1200px 400px at 20% -10%, #dbeafe 0%, transparent 60%),
    radial-gradient(800px 240px at 80% 0%, #e0f2fe 0%, transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 36px); color: var(--text); }
.hero p  { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* ============================== GRID & CARD =============================== */
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.12);
}
.card h3 { margin: 0 0 6px; }
.card p  { margin: 6px 0 0; color: var(--muted); }

/* =============================== FORM / UI ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .06s ease;
}
.btn:hover { background: var(--primary-50); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--primary-700); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.input::placeholder { color: #94a3b8; }

.btn:focus-visible, .input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* ================================ FEEDBACK ================================ */
.notice {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 500;
}
.notice.ok   { border-color: #c7f9d3; background: #ecfdf5; color: #065f46; }
.notice.err  { border-color: #fecaca; background: #fef2f2; color: #7f1d1d; }
.notice.warn { border-color: #fde68a; background: #fffbeb; color: #78350f; }

/* ================================ GALERIA ================================= */
/* Grid para as vagas aprovadas */
.gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .gallery { grid-template-columns: 1fr; } }

/* Card da galeria */
.gallery .item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Thumb com altura fixa e crop elegante (o modal abre a imagem inteira) */
.gallery .thumb {
  width: 100%;
  height: var(--gallery-thumb-h);
  object-fit: cover;
  cursor: zoom-in;
  background: #eef2ff;
}

/* Não exibimos nomes de arquivos (layout mais limpo) */
.gallery .caption { display: none; }

/* Dica “Clique para ampliar” (desktop) */
.gallery .item::after {
  content: 'Clique para ampliar';
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, .65);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: .18s ease;
  pointer-events: none;
}
.gallery .item:hover::after { opacity: 1; transform: translateY(0); }

/* ================================= CHAT ================================== */
.chat { display: flex; flex-direction: column; gap: 12px; }
.chat .messages {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  height: 420px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.msg { margin-bottom: 12px; }
.msg .from { font-size: 12px; color: var(--muted); }
.msg .bubble {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.msg.user .bubble {
  background: var(--primary-50);
  border-color: #c7d2fe;
}

/* ================================= FOOTER ================================= */
footer {
  margin-top: 40px;
  padding: 16px;
  text-align: center;
  color: #64748b;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
