/*
Theme Name: Play Nova Geração V5
Theme URI: https://playnovageracao.com
Author: Play Nova Geração
Author URI: https://playnovageracao.com
Description: Tema moderno e dinâmico para notícias de games. Versão atualizada com busca antes dos Posts Recentes na barra lateral. Desenvolvido com foco em experiência do usuário e performance.
Version: 1.3.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: play-nova-geracao
Domain Path: /languages
Requires at least: 5.9
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ============================================
   VARIÁVEIS E CORES
   ============================================ */
:root {
  --primary-purple: #8B5CF6;
  --primary-dark: #7C3AED;
  --secondary-blue: #3B82F6;
  --dark-bg: #0F172A;
  --card-bg: #1E293B;
  --text-light: #E2E8F0;
  --text-muted: #94A3B8;
  --accent-orange: #F97316;
  --success: #10B981;
  --error: #EF4444;
  --border-color: #334155;
  --gradient-main: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
}

/* ============================================
   RESET E ESTILOS BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 400;
}

a {
  color: var(--secondary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-orange);
}

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

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-light);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.875rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 100%;
  padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: linear-gradient(180deg, var(--card-bg) 0%, rgba(30, 41, 59, 0.8) 100%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
}

.site-logo img {
  height: 45px;
  width: auto;
}

.site-logo a {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================
   NAVEGAÇÃO
   ============================================ */
.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--secondary-blue);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: var(--gradient-main);
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 60px;
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary-blue);
  box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1);
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.post-category {
  background: linear-gradient(135deg, var(--primary-purple), var(--secondary-blue));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
}

.post-date {
  color: var(--text-muted);
}

.post-title {
  margin: 0.5rem 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

.post-title a {
  color: var(--text-light);
  display: block;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--secondary-blue);
}

.post-excerpt {
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
  font-size: 0.95rem;
}

.read-more {
  color: var(--secondary-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.read-more:hover {
  gap: 0.75rem;
}

/* ============================================
   POST ÚNICO
   ============================================ */
.post-single {
  max-width: 800px;
  margin: 0 auto 3rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.post-single-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.post-single-content {
  padding: 3rem 2rem;
}

.post-single-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.post-single-content h1 {
  margin-bottom: 1rem;
}

.post-single-content p {
  margin-bottom: 1.25rem;
}

.post-single-content img {
  margin: 2rem 0;
  border-radius: 8px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.widget {
  margin-bottom: 2rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget h3 {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-blue);
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  display: block;
  color: var(--text-light);
}

.widget a:hover {
  color: var(--secondary-blue);
  padding-left: 0.5rem;
  transition: padding-left 0.3s ease;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-widget h4 {
  margin-bottom: 1rem;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 0.5rem;
}

.footer-widget a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-widget a:hover {
  color: var(--secondary-blue);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--secondary-blue);
  border: 2px solid var(--secondary-blue);
}

.btn-secondary:hover {
  background: var(--secondary-blue);
  color: white;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .header-content {
    padding: 0.75rem 0;
  }

  .main-nav {
    gap: 1.5rem;
    font-size: 0.95rem;
  }

  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-single-content {
    padding: 1.5rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .main-nav {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .posts-grid {
    gap: 1rem;
  }

  .post-meta {
    flex-wrap: wrap;
  }
}
