/*
Theme Name: Conexão Nerd
Theme URI: https://nerdoscopiobrasil.com.br/
Description: Tema WordPress adaptado do projeto Conexão Nerd. Design escuro com neon vermelho, focado em cultura pop.
Version: 21.0 (Original Restaurado)
Author: Manus
Text Domain: conexao-nerd
*/

:root {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 84.2% 60.2%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 0 84.2% 60.2%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 0 84.2% 60.2%;
  --radius-sm: 0.125rem;
  --radius-md: calc(0.5rem - 2px);
  --radius-lg: 0.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0a0a0c;
  color: hsl(var(--foreground));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(8px);
}

.header-social-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
}

.header-social-bar .container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.header-social-bar svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted-foreground);
}

.header-social-bar a:hover svg {
  color: hsl(var(--primary));
}

.header-main {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-logo-name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.site-logo-country {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ff0000;
  text-transform: uppercase;
}

.header-search {
  flex: 1;
  max-width: 30rem;
  display: none;
}

@media (min-width: 768px) {
  .header-search { display: block; }
}

.search-form { position: relative; }
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #666;
}

.search-form input {
  width: 100%;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 1rem 0 2.5rem;
  color: white;
  outline: none;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .header-nav { display: flex; }
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-list a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #999;
}

.nav-list a:hover { color: white; }

.btn-primary {
  background: #ff0000;
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
}

/* ============================================================
   HOME & BACKGROUND
   ============================================================ */
.home-wrapper, .single-post-wrapper {
  min-height: 100vh;
  position: relative;
  background: transparent !important;
}

body.custom-background {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.home-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 0;
}

.home-content {
  position: relative;
  z-index: 1;
}

.hero-section {
  padding: 5rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-title .accent { color: #ff0000; }

.hero-subtitle {
  font-size: 1.25rem;
  color: #aaa;
  max-width: 45rem;
  margin: 0 auto;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding-bottom: 4rem;
}

.cta-inner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 3rem 2rem;
  backdrop-filter: blur(4px);
}

.cta-title { font-size: 2rem; margin-bottom: 0.5rem; }
.cta-subtitle { color: #999; margin-bottom: 3rem; }

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

.cta-benefit { text-align: center; }
.cta-benefit-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: #ff0000;
}

.cta-benefit h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.cta-benefit p { font-size: 0.9rem; color: #888; }

.cta-btn-wrapper { text-align: center; }

/* ============================================================
   POSTS GRID
   ============================================================ */
.posts-section { padding-bottom: 5rem; }
.posts-section h2 { font-size: 1.75rem; margin-bottom: 2rem; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.post-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, border-color 0.3s;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: #ff0000;
}

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.post-card:hover .post-card-image img { transform: scale(1.05); }

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

.post-card-tag {
  color: #ff0000;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-card-excerpt {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #666;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-article { padding: 4rem 0; }
.single-post-inner {
  max-width: 800px;
  margin: 0 auto;
  background: #000;
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid #222;
}

.post-header { margin-bottom: 2.5rem; }
.post-category-badge {
  background: #ff0000;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: inline-block;
}

.post-title { font-size: 2.75rem; line-height: 1.1; margin-bottom: 1.5rem; }
.post-author-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: #888; }
.post-author-name { font-weight: 700; color: white; }

.post-cover { margin-bottom: 2.5rem; border-radius: 12px; overflow: hidden; }

.post-content { font-size: 1.15rem; line-height: 1.8; color: #ccc; }
.post-content p { margin-bottom: 1.5rem; }
.post-content img { border-radius: 8px; margin: 2rem 0; }

.post-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 3rem 0; }
.post-tag {
  background: #1a1a1c;
  border: 1px solid #333;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #222;
}

.share-btn {
  background: #1a1a1c;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #000;
  border-top: 1px solid #1a1a1c;
  padding: 4rem 0;
}

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

.footer-section h3 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: #888; }
.footer-links a:hover { color: white; }

.newsletter-form p { color: #888; margin-bottom: 1rem; }
.form-row { display: flex; gap: 0.5rem; }
.form-row input {
  flex: 1 !important;
  background: #1a1a1c !important;
  border: 1px solid #333 !important;
  border-radius: 6px !important;
  padding: 0.15rem 0.4rem !important;
  color: white !important;
  font-size: 0.7rem !important;
  height: 1.5rem !important;
  line-height: 1 !important;
}
.form-row button {
  background: #ff0000;
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 6px;
  font-weight: 700;
}

.footer-bottom { text-align: center; border-top: 1px solid #1a1a1c; padding-top: 3rem; }
.footer-tagline { color: #ff0000; font-weight: 800; margin-bottom: 0.5rem; }
.footer-copyright { font-size: 0.8rem; color: #555; }

/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav {
  display: none;
  background: #0a0a0c;
  padding: 2rem 0;
}

.mobile-nav.open { display: block; }
.mobile-nav-list { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; }
.mobile-nav-list a { font-size: 1.25rem; font-weight: 600; }

.mobile-menu-btn { background: none; border: none; color: white; cursor: pointer; }
.mobile-menu-btn svg { width: 1.75rem; height: 1.75rem; }

/* SR ONLY */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
