/*
Theme Name: Empregos Recife
Theme URI: https://www.empregosrecife.com.br
Author: Empregos Recife
Author URI: https://www.empregosrecife.com.br
Description: Tema customizado no estilo do app Empregos Recife — cards de vagas, busca e visual idêntico ao aplicativo Flutter.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: empregosrecife
Tags: jobs, blog, custom-colors, custom-logo, featured-images
*/

/* =========================================================
   Design tokens — extraídos do app Flutter (AppTheme)
   ========================================================= */
:root {
  --er-primary: #1046B0;
  --er-primary-dark: #0D47A1;
  --er-secondary: #F59E0B;
  --er-bg: #FAFAFA;
  --er-card: #FFFFFF;
  --er-text: #374151;
  --er-muted: #6B7280;
  --er-muted-light: #9CA3AF;
  --er-heading: #1F2937;
  --er-heading-dark: #111827;
  --er-border: #E5E7EB;
  --er-success: #10B981;
  --er-error: #EF4444;
  --er-boost: #FF6B35;
  --er-boost-2: #FF8E53;
  --er-purple: #9333EA;
  --er-radius-card: 16px;
  --er-radius-input: 12px;
  --er-radius-btn: 8px;
  --er-radius-chip: 20px;
  --er-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --er-shadow-card-hover: 0 6px 16px rgba(16, 70, 176, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  --er-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--er-bg);
  color: var(--er-text);
  font-family: var(--er-font);
  font-size: 15px;
  line-height: 1.6;
}

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

a { color: var(--er-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  color: var(--er-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}

.er-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================================
   Header — barra azul do app (AppBar #1046B0, elevation 0)
   ========================================================= */
.er-header {
  background: var(--er-primary);
  color: #fff;
}

.er-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.er-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.er-header__brand:hover { text-decoration: none; color: #fff; }
.er-header__brand img { max-height: 44px; width: auto; display: block; }

.er-nav { display: flex; align-items: center; }
.er-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.er-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--er-radius-btn);
}
.er-nav a:hover,
.er-nav .current-menu-item > a {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
}
.er-nav .er-nav__app > a {
  background: var(--er-secondary);
  color: var(--er-heading-dark);
  font-weight: 700;
}
.er-nav .er-nav__app > a:hover { background: #FBBF24; color: var(--er-heading-dark); }
.er-nav a svg { flex: none; opacity: 0.92; }

.er-menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 8px;
  cursor: pointer;
}
.er-menu-toggle svg { display: block; }

@media (max-width: 782px) {
  .er-menu-toggle { display: block; }
  .er-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--er-primary-dark);
    padding: 8px 16px 16px;
    z-index: 50;
  }
  .er-header__inner { position: relative; }
  .er-nav.is-open { display: block; }
  .er-nav ul { flex-direction: column; gap: 0; }
  .er-nav a { display: flex; padding: 12px; }
}

/* =========================================================
   Hero de busca — como a search bar do app
   ========================================================= */
.er-hero {
  background: linear-gradient(160deg, var(--er-primary) 0%, var(--er-primary-dark) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 32px 0 56px;
  text-align: center;
}
.er-hero__title { color: #fff; font-size: 26px; margin-bottom: 6px; }
.er-hero__logo {
  display: block;
  max-height: 170px;
  width: auto;
  max-width: min(82%, 420px);
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}
.er-hero__subtitle { color: rgba(255, 255, 255, 0.85); font-size: 15px; margin: 0 0 20px; }

.er-search {
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--er-radius-input);
  padding: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.er-search__field {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--er-font);
  font-size: 15px;
  color: var(--er-text);
  padding: 10px 12px;
  min-width: 0;
}
.er-search__field::placeholder { color: var(--er-muted-light); }
.er-search__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--er-primary);
  color: #fff;
  border: 0;
  border-radius: var(--er-radius-btn);
  font-family: var(--er-font);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.er-search__btn:hover { background: var(--er-primary-dark); }
#buscar-vagas { scroll-margin-top: 24px; }

/* =========================================================
   Conteúdo principal
   ========================================================= */
.er-main { padding: 32px 0 48px; }

.er-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--er-heading);
  margin: 0 0 16px;
}

/* Grid responsivo — 1 col mobile, 2-3 cols desktop (como o app web) */
.er-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .er-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .er-grid { grid-template-columns: repeat(3, 1fr); } }

/* Google AdSense opcional: topo, listagem e laterais desktop. */
.er-ad {
  position: relative;
  width: 100%;
  min-height: 120px;
  padding: 22px 12px 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--er-border);
  border-radius: var(--er-radius-card);
  box-shadow: var(--er-shadow-card);
}
.er-ad__label {
  position: absolute;
  top: 5px;
  left: 12px;
  color: var(--er-muted-light);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.er-ad .adsbygoogle { width: 100%; min-height: 90px; }
.er-jobs-ad { grid-column: 1 / -1; }
.er-top-ad { margin: 0 0 24px; }
.er-side-ad { display: none; }

@media (min-width: 1500px) {
  .er-side-ad {
    display: block;
    position: fixed;
    z-index: 10;
    top: 112px;
    width: 160px;
    min-height: 600px;
    padding: 22px 4px 4px;
  }
  .er-side-ad--left { left: 12px; }
  .er-side-ad--right { right: 12px; }
  .er-side-ad .adsbygoogle { min-height: 560px; }
}

/* =========================================================
   Job card — réplica do job_card.dart
   ========================================================= */
.er-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--er-card);
  border-radius: var(--er-radius-card);
  box-shadow: var(--er-shadow-card);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.er-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--er-shadow-card-hover);
}

.er-card__media {
  position: relative;
  display: block;
  aspect-ratio: 5 / 2;
  background: #0F6F9F;
  overflow: hidden;
}

/* Arte em camadas, com a mesma area 820,0,1050,800 usada no app. */
.er-artwork {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  background: var(--er-artwork-bg, #0F6F9F);
}
.er-artwork__content {
  position: absolute;
  left: 41%;
  top: 0;
  width: 52.5%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.er-artwork .er-artwork__logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transform: scale(var(--er-artwork-zoom, 1));
  transform-origin: center;
}
.er-artwork .er-artwork__frame {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}

/* Badge "Nova" (verde) e "Destaque" (gradiente laranja) */
.er-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.er-badge--nova { background: var(--er-success); }
.er-badge--destaque { background: linear-gradient(90deg, var(--er-boost), var(--er-boost-2)); }

.er-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  flex: 1;
}

.er-card__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}
.er-card__title a { color: var(--er-heading); }
.er-card__title a:hover { color: var(--er-primary); text-decoration: none; }

.er-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--er-muted);
}
.er-card__meta svg { flex: none; }
.er-card__company { text-transform: uppercase; letter-spacing: 0.02em; }

.er-card__salary {
  font-size: 16px;
  font-weight: 600;
  color: var(--er-primary);
  margin-top: 2px;
}
.er-card__salary--none { color: var(--er-muted-light); font-weight: 400; font-size: 13px; }

.er-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.er-card__date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--er-muted-light);
}

/* Tags de modelo/CNH/PCD (cores semânticas do app) */
.er-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.er-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 3px 10px;
  border-radius: 10px;
}
.er-tag--remoto { background: var(--er-success); }
.er-tag--hibrido { background: var(--er-secondary); }
.er-tag--presencial { background: var(--er-primary); }
.er-tag--externo { background: var(--er-purple); }
.er-tag--cnh { background: #D97706; }
.er-tag--pcd { background: #2563EB; }

/* Card em destaque (featured_job_card.dart — sticky posts) */
.er-card--destaque {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF7 100%);
  border: 1.5px solid rgba(255, 107, 53, 0.25);
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.15), var(--er-shadow-card);
}

/* =========================================================
   Listagem clássica (estilo antigo do site) — lista vertical,
   imagem no tamanho original
   ========================================================= */
.er-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}
.er-item {
  background: var(--er-card);
  border-radius: var(--er-radius-card);
  box-shadow: var(--er-shadow-card);
  padding: 20px;
}
@media (min-width: 640px) { .er-item { padding: 24px; } }
.er-item__title { font-size: 20px; margin: 0 0 8px; }
.er-item__title a { color: var(--er-heading); }
.er-item__title a:hover { color: var(--er-primary); text-decoration: none; }
.er-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 12px;
}
.er-item__salary { font-size: 14px; font-weight: 600; color: var(--er-primary); }
.er-item__media { display: block; margin-bottom: 12px; overflow: hidden; border-radius: var(--er-radius-input); }
.er-item__media img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--er-radius-input);
  display: block;
}
.er-item__excerpt { font-size: 14.5px; color: var(--er-muted); margin-bottom: 14px; }
.er-item__excerpt p { margin: 0; }
.er-item__more { padding: 8px 18px; font-size: 14px; }

/* =========================================================
   Paginação — botões estilo app
   ========================================================= */
.er-pagination { margin-top: 32px; text-align: center; }
.er-pagination .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.er-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--er-border);
  border-radius: var(--er-radius-btn);
  color: var(--er-text);
  font-size: 14px;
  font-weight: 500;
}
.er-pagination .page-numbers:hover { border-color: var(--er-primary); color: var(--er-primary); text-decoration: none; }
.er-pagination .page-numbers.current { background: var(--er-primary); border-color: var(--er-primary); color: #fff; }
.er-pagination .page-numbers.dots { border: 0; background: transparent; }

/* =========================================================
   Página de vaga (single) — job_details_screen
   ========================================================= */
.er-single {
  background: var(--er-card);
  border-radius: var(--er-radius-card);
  box-shadow: var(--er-shadow-card);
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
}
.er-single__media { overflow: hidden; }
.er-single__media img { width: 100%; height: auto; display: block; }
.er-single__body { padding: 24px; }
@media (min-width: 640px) { .er-single__body { padding: 32px; } }

.er-single__title { font-size: 26px; color: var(--er-heading-dark); margin-bottom: 6px; }
.er-single__subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 14px;
  color: var(--er-muted);
  margin-bottom: 20px;
}
.er-single__subline > span { display: inline-flex; align-items: center; gap: 6px; }

/* Cards de informação da vaga (salário / local / modelo) */
.er-infogrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.er-infogrid__item {
  background: var(--er-bg);
  border: 1px solid var(--er-border);
  border-radius: var(--er-radius-input);
  padding: 12px 14px;
}
.er-infogrid__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--er-muted-light);
  margin-bottom: 2px;
}
.er-infogrid__value { font-size: 15px; font-weight: 600; color: var(--er-heading); }
.er-infogrid__value--salary { color: var(--er-primary); }

.er-content { font-size: 15.5px; color: var(--er-text); }
.er-content h2, .er-content h3 { margin-top: 1.4em; }
.er-content ul, .er-content ol { padding-left: 1.4em; }
.er-content img { border-radius: var(--er-radius-input); }

/* Botão candidatar-se */
.er-apply {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--er-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.er-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--er-primary);
  color: #fff;
  border: 0;
  border-radius: var(--er-radius-btn);
  font-family: var(--er-font);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.er-btn:hover { background: var(--er-primary-dark); color: #fff; text-decoration: none; }
.er-btn--secondary { background: var(--er-secondary); }
.er-btn--secondary:hover { background: #D97706; }
.er-btn--outline {
  background: transparent;
  color: var(--er-primary);
  border: 1.5px solid var(--er-primary);
}
.er-btn--outline:hover { background: rgba(16, 70, 176, 0.06); color: var(--er-primary); }

/* Navegação entre vagas */
.er-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 860px;
  margin: 24px auto 0;
}
.er-post-nav a {
  flex: 1;
  background: #fff;
  border: 1px solid var(--er-border);
  border-radius: var(--er-radius-input);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--er-text);
}
.er-post-nav a:hover { border-color: var(--er-primary); text-decoration: none; }
.er-post-nav__label { display: block; font-size: 11px; color: var(--er-muted-light); margin-bottom: 2px; }
.er-post-nav__title { font-weight: 600; color: var(--er-heading); }
.er-post-nav a:hover .er-post-nav__title { color: var(--er-primary); }

/* =========================================================
   Páginas estáticas
   ========================================================= */
.er-page {
  background: var(--er-card);
  border-radius: var(--er-radius-card);
  box-shadow: var(--er-shadow-card);
  padding: 24px;
  max-width: 860px;
  margin: 0 auto;
}
@media (min-width: 640px) { .er-page { padding: 32px; } }
.er-page__title { font-size: 26px; margin-bottom: 16px; }

/* =========================================================
   404 / sem resultados
   ========================================================= */
.er-empty {
  text-align: center;
  padding: 56px 16px;
  background: #fff;
  border-radius: var(--er-radius-card);
  box-shadow: var(--er-shadow-card);
}
.er-empty h2 { font-size: 20px; }
.er-empty p { color: var(--er-muted); }
.er-empty .er-search {
  box-shadow: none;
  border: 1px solid var(--er-border);
  margin-top: 20px;
}

/* =========================================================
   Footer
   ========================================================= */
.er-footer {
  background: var(--er-heading);
  color: #D1D5DB;
  padding: 32px 0;
  margin-top: 24px;
}
.er-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.er-footer a { color: #fff; }
.er-footer__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.er-footer__menu a { font-size: 13px; color: #D1D5DB; }
.er-footer__menu a:hover { color: #fff; }
.er-footer__copy { font-size: 13px; color: var(--er-muted-light); }

/* =========================================================
   Bottom nav mobile — como a bottom navigation do app
   ========================================================= */
.er-bottomnav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: #fff;
  border-top: 1px solid var(--er-border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}
.er-bottomnav__inner {
  display: flex;
  justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.er-bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--er-muted);
  padding: 4px 12px;
  min-width: 64px;
}
.er-bottomnav a:hover { text-decoration: none; }
.er-bottomnav a.is-active { color: var(--er-primary); }
.er-bottomnav svg { display: block; }

@media (max-width: 782px) {
  .er-bottomnav { display: block; }
  body { padding-bottom: 68px; }
}

/* =========================================================
   Alinhamentos padrão do WordPress
   ========================================================= */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { clear: both; display: block; margin: 0 auto 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--er-muted); text-align: center; }
.sticky { /* marcador exigido pelo WP; estilo aplicado via .er-card--destaque */ }
.gallery-caption { font-size: 13px; }
.bypostauthor { /* marcador exigido pelo WP */ }
