/* ======================================================
   Hub42 - Estilos do site público
   ====================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --card-bg:   #1a1a1a;
  --border:    #2a2a2a;
  --text:      #eeeeee;
  --muted:     #888888;
  --accent:    #e05533;

  --yt:        #FF0000;
  --ig:        #E1306C;
  --fb:        #1877F2;
  --tt:        #69C9D0;

  --radius:    10px;
  --shadow:    0 4px 20px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: inline-block; vertical-align: middle; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */
.site-header {
  background: linear-gradient(180deg, #111 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
  text-align: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo:hover { color: var(--accent); }

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* ---- Filter Bar ---- */
.filter-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}

.filter-btn .filter-icon { width: 16px; height: 16px; opacity: 0.8; }
.filter-btn .cnt { font-size: 0.75rem; background: var(--border); border-radius: 20px; padding: 1px 7px; }

.filter-btn:hover { color: var(--text); border-color: #555; }

.filter-btn.active        { color: #fff; border-color: transparent; }
.filter-btn.active.plat-all       { background: var(--accent); }
.filter-btn.active.plat-youtube   { background: var(--yt); }
.filter-btn.active.plat-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.filter-btn.active.plat-facebook  { background: var(--fb); }
.filter-btn.active.plat-tiktok    { background: #111; border: 1px solid var(--tt); color: var(--tt); }

/* ---- Main Content ---- */
.main-content { padding: 36px 0 60px; }

/* ---- Posts Grid ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ---- Post Card ---- */
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #3a3a3a;
}

/* Thumbnail */
.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .card-thumb img { transform: scale(1.04); }

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-placeholder .plat-icon-lg { width: 48px; height: 48px; opacity: 0.4; }

/* Platform badge */
.platform-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.platform-badge .badge-icon { width: 13px; height: 13px; }

.plat-youtube   .platform-badge, .platform-badge.plat-youtube   { background: rgba(255,0,0,0.85); color: #fff; }
.plat-instagram .platform-badge, .platform-badge.plat-instagram { background: rgba(188,24,136,0.85); color: #fff; }
.plat-facebook  .platform-badge, .platform-badge.plat-facebook  { background: rgba(24,119,242,0.85); color: #fff; }
.plat-tiktok    .platform-badge, .platform-badge.plat-tiktok    { background: rgba(0,0,0,0.8); color: var(--tt); border: 1px solid var(--tt); }

/* Play overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  font-size: 2.5rem;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transition: opacity 0.2s;
}

.post-card:hover .play-overlay { opacity: 1; }

/* Card body */
.card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 10px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.card-time { color: var(--muted); }
.card-link { color: #5b9cf6; }
.card-link:hover { text-decoration: underline; }

/* Expand button */
.expand-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  padding: 10px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.expand-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  transition: all 0.15s;
}

.page-btn:hover { border-color: #555; color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon { font-size: 4rem; margin-bottom: 20px; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 10px; }
.empty-state p  { color: var(--muted); margin-bottom: 24px; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-primary:hover { background: #c04828; }

/* ---- Modal ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.modal-box {
  position: relative;
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--text); }

#embed-content {
  padding: 20px;
}

#embed-content iframe,
#embed-content video {
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
}

#embed-content .card-title {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a { color: #5b9cf6; }
.site-footer a:hover { text-decoration: underline; }

/* ---- Responsivo ---- */
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .logo { font-size: 1.4rem; }
  .filter-btn { padding: 6px 12px; font-size: 0.82rem; }
}

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
