/* ============================================================
   selecao.art — CSS Global
   Fonte: Montserrat (Google Fonts)
   Paleta: Verde #009c3b | Azul #002776 | Amarelo #FFDF00
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ---- Variáveis ---- */
:root {
  --verde:       #009c3b;
  --verde-dark:  #007a2f;
  --verde-light: #e6f5ec;
  --azul:        #002776;
  --azul-dark:   #001a55;
  --azul-light:  #e6ebf5;
  --amarelo:     #FFDF00;
  --amarelo-dark:#c9ae00;

  --bg:          #f7f8fa;
  --bg-card:     #ffffff;
  --border:      #e5e7eb;
  --border-dark: #d1d5db;

  --text-primary:   #0f1923;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;

  --font:        'Montserrat', sans-serif;
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.13);

  --header-h:    64px;
  --sidebar-w:   300px;
  --content-max: 1200px;

  --transition:  .18s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: var(--font);
  font-size: inherit;
}
ul, ol { list-style: none; }

/* ---- Tipografia ---- */
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); font-weight: 700; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 600; }
h5 { font-size: .95rem; font-weight: 600; }
p  { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout principal ---- */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Grid com sidebar */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 28px;
  align-items: start;
  padding: 32px 20px 48px;
}
.layout-content { min-width: 0; }
.site-main    { flex: 1; padding-top: calc(var(--header-h) + 48px); }
.layout-sidebar  { min-width: 0; position: sticky; top: calc(var(--header-h) + 60px); }

/* Sem sidebar */
.layout-full { padding: 32px 20px 48px; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body  { padding: 20px; }
.card-img   { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* Card de notícia (lista) */
.post-card { display: flex; flex-direction: column; }
.post-card .card-img { aspect-ratio: 16/9; }
.post-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.post-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .card-title:hover { color: var(--verde); }
.post-card .card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Card destaque (featured) */
.post-card-featured {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/7;
}
.post-card-featured img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card-featured:hover img { transform: scale(1.03); }
.post-card-featured .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.post-card-featured .overlay-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 24px;
  color: #fff;
}
.post-card-featured .overlay-content h2 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-weight: 800; }

/* ---- Badges / Tags ---- */
.badge {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-verde   { background: var(--verde);  color: #fff; }
.badge-azul    { background: var(--azul);   color: #fff; }
.badge-amarelo { background: var(--amarelo);color: var(--azul); }
.badge-outline { background: transparent; border: 1.5px solid var(--border-dark); color: var(--text-secondary); }

/* ---- Section title ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--verde);
}
.section-header h2 { font-size: 1.15rem; font-weight: 800; color: var(--azul); }
.section-header a  { font-size: .82rem; font-weight: 600; color: var(--verde); }
.section-header a:hover { text-decoration: underline; }

/* ---- Grids de posts ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.posts-grid-3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px;
  font-size: .875rem; font-weight: 700;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-verde {
  background: var(--verde); color: #fff; border-color: var(--verde);
}
.btn-verde:hover { background: var(--verde-dark); border-color: var(--verde-dark); }

.btn-azul {
  background: var(--azul); color: #fff; border-color: var(--azul);
}
.btn-azul:hover { background: var(--azul-dark); border-color: var(--azul-dark); }

.btn-outline {
  background: transparent; color: var(--verde); border-color: var(--verde);
}
.btn-outline:hover { background: var(--verde-light); }

.btn-sm  { padding: 7px 16px; font-size: .8rem; }
.btn-lg  { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ---- Formulários ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .83rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  background: #fff;
  font-size: .9rem;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(0,156,59,.12);
}
textarea.form-control { resize: vertical; min-height: 100px; }

/* ---- Alert / Flash ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: var(--azul-light); color: var(--azul); border: 1px solid #c7d5f0; }

/* ---- Paginação ---- */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 36px;
}
.page-item {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-dark);
  font-size: .85rem; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.page-item:hover { border-color: var(--verde); color: var(--verde); }
.page-item.active { background: var(--verde); border-color: var(--verde); color: #fff; }
.page-item.disabled { opacity: .4; pointer-events: none; }

/* ---- Divider ---- */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---- Avatar ---- */
.avatar {
  border-radius: 50%; object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm  { width: 32px; height: 32px; }
.avatar-md  { width: 44px; height: 44px; }
.avatar-lg  { width: 64px; height: 64px; }
.avatar-xl  { width: 96px; height: 96px; }

/* ---- Sidebar widgets ---- */
.widget { margin-bottom: 24px; }
.widget-title {
  font-size: .85rem; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--azul);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--verde);
  margin-bottom: 14px;
}

/* ---- Utilitários ---- */
.text-center { text-align: center; }
.text-verde  { color: var(--verde); }
.text-azul   { color: var(--azul); }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: .85rem; }
.text-xs     { font-size: .75rem; }
.fw-bold     { font-weight: 700; }
.fw-black    { font-weight: 900; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* ---- Responsivo ---- */
@media (max-width: 1024px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }
  .layout-sidebar { position: static; }
  .posts-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .posts-grid, .posts-grid-3, .posts-grid-4 { grid-template-columns: 1fr; }
  .layout-with-sidebar { gap: 20px; padding: 20px 0 36px; }
  .post-card-featured { aspect-ratio: 4/3; }
}



/* Auth pages */
.auth-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px 36px; width: 100%; max-width: 440px; box-shadow: var(--shadow); }

/* Fix campo senha com botão olho */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; width: 100%; box-sizing: border-box; }
.password-wrap .btn-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 0; color: var(--text-muted); font-size: 1rem; }

/* Fix botão olho senha */
.input-eye { position: relative; }
.input-eye input { padding-right: 44px; width: 100%; box-sizing: border-box; }
.input-eye .eye-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-muted); font-size: 1rem; line-height: 1; }

/* Fix mobile padding */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-main { padding-left: 0; padding-right: 0; padding-top: calc(var(--header-h) + 48px); }
  .redes-section { display: none !important; }
  .header-inner { padding-right: 8px; }
  .btn-hamburger { flex-shrink: 0; }
  .header-actions { gap: 6px; }
  .btn-hamburger { margin-right: 4px; }
  .header-actions { gap: 8px; padding-right: 4px; }
}

/* ============================================================
   SELEÇÃO NAS REDES — barra compacta abaixo do nav
   ============================================================ */
.redes-bar {
  background: var(--azul-escuro, #001a4d);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 12px 0;
  overflow: hidden;
}
.redes-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.redes-label {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  writing-mode: horizontal-tb;
}
.redes-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
}
.redes-track::-webkit-scrollbar { display: none; }
.redes-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 200px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s;
}
.redes-item:hover { border-color: rgba(255,255,255,.2); }
.redes-embed { width: 100%; font-size: 0; line-height: 0; }
.redes-embed iframe { width: 100% !important; max-height: 160px !important; display: block; }
.redes-caption {
  padding: 6px 10px;
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hidden no mobile */
@media (max-width: 768px) {
  .redes-bar { display: none; }
}

/* Redes bar no topo da home */
.redes-bar {
  margin-top: calc(-1 * (var(--header-h) + 48px - var(--header-h)));
  margin-left: calc(-1 * 20px);
  margin-right: calc(-1 * 20px);
  width: calc(100% + 40px);
}

/* Seleção nas Redes */
.redes-section { padding: 0 0 8px; background: var(--azul-escuro, #001f5b); }
.redes-header { padding: 12px 0 8px; }
.redes-titulo { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.redes-track { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.redes-track::-webkit-scrollbar { display: none; }
.redes-item { flex: 0 0 auto; max-width: 320px; border-radius: 8px; overflow: hidden; }
@media (max-width: 768px) { .redes-section { display: none !important; } }
.redes-section:empty { display: none !important; }

/* ============================================================
   SELEÇÃO NAS REDES — carrossel de thumbnails
   ============================================================ */
.redes-section {
  background: #f0f4ff;
  padding: 12px 0 16px;
  border-bottom: 1px solid #dde4f0;
}
.redes-head { margin-bottom: 10px; }
.redes-titulo {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7a8aaa;
}
.redes-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.redes-track::-webkit-scrollbar { display: none; }

.redes-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  text-decoration: none;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dde4f0;
  transition: transform .18s, box-shadow .18s;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.redes-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.redes-thumb {
  position: relative;
  width: 180px;
  height: 110px;
  background-size: cover;
  background-position: center;
  background-color: #e8edf5;
}
.redes-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.45) 100%);
}

.redes-plat-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.6;
}

.redes-author-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 2;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,.4);
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redes-card-caption {
  padding: 5px 8px;
  font-size: .68rem;
  color: #556;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

@media (max-width: 768px) { .redes-section { display: none !important; } }
.redes-section:empty { display: none !important; }


