/* ══════════════════════════════════════
   cv.css — Wagner Gonçalves Costa
   
   Sistema proporcional: 1rem = font-size do body
   Para ajustar todos os textos no print,
   altere apenas font-size do body no @media print.
   
   Agrupamento de seletores por estilo similar:
   - Títulos primários:   .exp-company, .edu-course, .idioma-lingua, .proj-title
   - Títulos secundários: .skill-label, .exp-role, .edu-inst, .proj-desc-short
   - Texto corrido:       .resumo, .skill-value
   - Metadados:           .exp-location, .edu-period, .idioma-nivel, .proj-period
   ══════════════════════════════════════ */

/* ---------- Base ---------- */
body {
  font-size: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f8;
  color: #333;
  line-height: 1.6;
}

section.content {
  background-color: #e6e3e3;
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Container ---------- */
.container {
  max-width: 900px;
  margin: 40px auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 2px solid #ccc;
  overflow: hidden;
  padding: 0;
}

/* ---------- Cabeçalho do CV ---------- */
.cv-cabecalho {
  display: flex;
  align-items: stretch;
  background: linear-gradient(135deg, #1a3a5c 0%, #2e6da4 100%);
  padding: 2rem 2.5rem;
  gap: 1.75rem;
  flex-wrap: wrap;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.cv-cabecalho-esq {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cv-cabecalho-esq h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.3px;
}

.cv-subtitulo {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.82);
  margin: 0 0 0.4rem 0;
  line-height: 1.5;
}

.cv-cabecalho-divisor {
  width: 1px;
  background: rgba(255,255,255,0.28);
  align-self: stretch;
  flex-shrink: 0;
}

.cv-cabecalho-dir {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.375rem;
  min-width: 290px;
  margin-left: auto;
}

.cv-cabecalho-dir span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.90);
}

.cv-cabecalho-dir i {
  width: 14px;
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cv-cabecalho-dir a {
  color: rgba(255,255,255,0.90);
  text-decoration: none;
}

.cv-cabecalho-dir a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Seções ---------- */
.section { margin: 0 3.5rem 1.75rem; }

.cv-cabecalho + .section { margin-top: 1.75rem; }

/* Título de seção — padrão único para todas as seções */
.section-title {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #1A5276;
  border-bottom: 2px solid #1A5276;
  padding-bottom: 0.375rem;
  margin-bottom: 1rem;
  margin-top: 0;
}

/* ──────────────────────────────────────
   GRUPOS DE ESTILO
   ────────────────────────────────────── */

/* Grupo 1 — Texto corrido
   Descrições, valores de skills, resumo, cursos */
.resumo,
.skill-value,
.curso-list li {
  font-size: 13px;
  color: #555;
  line-height: 2;
  text-align: justify;
}

/* Exceções do grupo 1 */
.curso-list li {
  padding: 4px 0 2px 18px;
  position: relative;
}

/* Grupo 2 — Títulos primários
   Nome da empresa, instituição, idioma, projeto */
.exp-role,
.edu-course,
.idioma-lingua,
.proj-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: #1c1c1c;
  line-height: 1.3;
  margin-bottom: 3px;
}

/* Grupo 3 — Títulos secundários
   Cargo, curso, label de skill */
.skill-label,
.exp-company,
.edu-inst {
  font-weight: 600;
  font-size: 0.84rem;
  color: #1565c0;
  line-height: 1.3;
  margin-bottom: 3px;
}

/* Grupo 4 — Metadados
   Período, localidade, nível de idioma */
.exp-location,
.edu-period,
.idioma-nivel,
.proj-period {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 3px;
}

.proj-desc-short {
  font-style: italic;
  color: #1565c0;
  font-weight: 500;
  font-size: 12px;
  margin-bottom: 2px;
}

/* Exceções do grupo 4 */
.proj-period { white-space: nowrap; }

/* ──────────────────────────────────────
   BLOCOS E ESTRUTURAS
   ────────────────────────────────────── */

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.84rem;
}

/* Habilidades + Idiomas lado a lado */
.cv-hab-idiomas {
  display: flex;
  gap: 2rem;
}

.cv-hab-col { flex: 8; }
.cv-idiomas-hab-col { flex: 2; }

/* Experiência */
.exp-block { margin-bottom: 1.25rem; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0;
}

/* Projetos */
.proj-block { margin-bottom: 1rem; }

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1px;
}

.proj-desc-role { margin-top: -15px; }

/* Idiomas */
.idioma-block { margin-bottom: 0.5rem; }
.idioma-lingua { display: block; }
.idioma-nivel { display: block; }

/* Formação */
.edu-block { margin-bottom: 0.625rem; }

/* Formação + Idiomas lado a lado */
.cv-form-idiomas {
  display: flex;
  gap: 2rem;
}

.cv-form-col { 
  flex: 8;
  margin: 0;
}

.cv-idiomas-col { 
  flex: 2; 
  margin: 0; 
}

/* ── CURSOS ── */
.curso-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e0e0e0;
}

.curso-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.curso-name {
  font-weight: 600;
  font-size: 12.5px;
  color: #111111;
  margin-bottom: 1px;
}

.curso-inst {
  font-size: 11.5px;
  color: #666666;
}

.curso-hours {
  display: inline-block;
  margin-top: 3px;
  font-size: 10.5px;
  color: #111111;
  background: rgba(91, 138, 181, 0.2);
  border: 1px solid #bbbbbb;
  border-radius: 3px;
  padding: 1px 6px;
  font-weight: 500;
}

/* ---------- Botão Imprimir ---------- */
#btnImprimir {
  position: fixed;
  bottom: 20px;
  right: 25px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 9999;
}

#btnImprimir:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}

/* ── LAYOUT DUAS COLUNAS ── */
.cv-duas-colunas {
  display: grid;
  grid-template-columns: 60% 40%;
  border-top: 1px solid #e0e0e0;
}

.cv-col-esq {
  padding: 1.75rem 2rem 2rem 2.5rem;
  border-right: 1px solid #e0e0e0;
}

.cv-col-dir {
  padding: 1.75rem 2rem 2rem 1.75rem;
}

/* Seções dentro das colunas sem margin lateral (o padding da coluna já dá o espaço) */
.cv-col-esq .section,
.cv-col-dir .section {
  margin-left: 0;
  margin-right: 0;
}

/* ── BULLETS estilo dot para experiências/projetos ── */
.exp-bullets-cv {
  list-style: none;
  padding: 0;
  margin-top: 4px;
}

.exp-bullets-cv li {
  padding-left: 14px;
  position: relative;
  font-size: 0.82rem;
  color: #444;
  line-height: 1.55;
  margin-bottom: 3px;
  text-align: justify;
}

.exp-bullets-cv li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #1A5276;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
}

/* ── HARD SKILLS com badges ── */
.cv-skill-cat {
  margin-bottom: 10px;
}

.cv-skill-cat:last-child {
  margin-bottom: 0;
}

.cv-skill-cat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #5b8ab5;
  margin-bottom: 5px;
  margin-top: 6px;
}

.cv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cv-badge {
  background: rgba(91, 138, 181, 0.2);
  border: 1px solid #bbbbbb;
  color: #1c1c1c;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── IDIOMAS com dots ── */
.cv-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e0e0e0;
}

.cv-lang-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cv-lang-name {
  font-weight: 600;
  font-size: 12.5px;
  color: #111111;
}

.cv-lang-level {
  font-size: 0.72rem;
  color: #888;
  font-style: italic;
}

.cv-lang-dots {
  display: flex;
  gap: 4px;
}

.cv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0dce8;
}

.cv-dot-active {
  background: #1565c0;
}

/* ── CURSOS com badge de horas ── */
.curso-horas {
  display: inline-block;
  font-size: 0.68rem;
  background: rgba(91, 138, 181, 0.2);
  border: 1px solid #bbbbbb;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 500;
  color: #333;
  margin-left: 4px;
}

/* ── ONLINE ── */
.online-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.online-item:last-child { margin-bottom: 0; }

.online-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.online-icon svg { width: 16px; height: 16px; }

.online-label {
  font-weight: 600;
  font-size: 12px;
  color: #111111;
  margin-bottom: 1px;
}

.online-url {
  font-size: 11px;
  color: #1565c0;
  text-decoration: none;
  word-break: break-all;
}

.online-url:hover { text-decoration: underline; }

/* ──────────────────────────────────────
   RESPONSIVO
   ────────────────────────────────────── */
@media (max-width: 768px) {
  .cv-cabecalho {
    flex-direction: column;
    gap: 18px;
    padding: 24px 20px;
  }

  .cv-cabecalho-divisor {
    width: 100%;
    height: 1px;
    align-self: auto;
  }

  .cv-cabecalho-esq h1 { font-size: 1.5rem; margin-left: 0; }
  .cv-subtitulo { margin-left: 0; }

  .section { margin: 0 1rem 1.5rem; }

  .cv-hab-idiomas,
  .cv-form-idiomas { flex-direction: column; gap: 0; }

  .cv-duas-colunas { grid-template-columns: 1fr; }

  .cv-col-esq {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.25rem 1rem;
  }

  .cv-col-dir { padding: 1.25rem 1rem; }
}


/* ──────────────────────────────────────
   IMPRESSÃO
   ────────────────────────────────────── */
@media print {

  /* Ocultar elementos do site */
  #btnImprimir,
  header.hero,
  .navbar,
  .footer {
    display: none;
  }

  @page {
    size: A4;
    margin: 0;
  }

  html, body {
    font-size: 19px;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fff;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  section.content {
    background: #fff;
    padding: 0;
    margin: 0;
  }

  .container {
    overflow: visible;
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
  }

  .cv-cabecalho { padding: 1.5rem 2rem; }

  .cv-cabecalho-dir {
    align-items: flex-start;
    padding-left: 1rem;
  }

  .section-title { border-bottom-width: 1px; }

  .cv-cabecalho,
  .exp-block,
  .proj-block,
  .edu-block,
  .cv-form-idiomas {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .page-break-top {
    break-before: page;
    page-break-before: always;
    padding-top: 0;
    display: block;
  }
}