/*
Theme Name: Vurixly
Theme URI: https://vurixly.com
Author: Felipe Ferreira
Author URI: https://vurixly.com
Description: Tema de portal de notícias de tecnologia. Dark mode com layout de revista (hero, últimas notícias, destaques, especiais e newsletter). Construído sob medida para o Vurixly.
Version: 1.0.3
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: vurixly
Tags: dark, magazine, news, technology, custom-colors, featured-images, threaded-comments
*/

/* =========================================================
   1. VARIÁVEIS / DESIGN SYSTEM
   ========================================================= */
:root {
  --bg:           #08080c;
  --bg-soft:      #0c0c12;
  --card:         #121219;
  --card-2:       #16161f;
  --card-hover:   #1c1c27;
  --border:       rgba(255, 255, 255, 0.07);
  --border-strong:rgba(255, 255, 255, 0.12);

  --accent:       #8b5cf6;
  --accent-2:     #a855f7;
  --accent-soft:  rgba(139, 92, 246, 0.15);
  --grad:         linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);

  --text:         #f4f4f6;
  --text-dim:     #a1a1ad;
  --text-muted:   #6b7280;

  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    20px;

  --maxw:         1200px;
  --gap:          24px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  --trans: 0.25s ease;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }

p { margin: 0 0 1rem; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}

/* Rótulos de categoria */
.cat-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }

/* Títulos de seção (DESTAQUES, MAIS RECENTES...) */
.section-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 22px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 42px; height: 3px;
  background: var(--grad);
  border-radius: 3px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-head .section-title { margin-bottom: 0; }

/* =========================================================
   3. HEADER / NAVEGAÇÃO
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 24px;
}

/* Logo */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 900; font-size: 22px; color: #fff;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.45);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-size: 22px; font-weight: 900; letter-spacing: 0.02em; color: #fff;
}
.brand-tagline { font-size: 11px; color: var(--text-muted); letter-spacing: 0.01em; }

/* Menu principal */
.main-nav ul { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.main-nav a:hover,
.main-nav .current-menu-item > a { color: #fff; }
.main-nav .sub-menu { display: none; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  transition: var(--trans);
}
.icon-btn:hover { color: #fff; border-color: var(--border-strong); background: var(--card-hover); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }

/* Menu mobile */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.mobile-nav.open { display: block; }
.mobile-nav ul { flex-direction: column; padding: 12px 24px; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 14px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

/* =========================================================
   4. LAYOUT GERAL
   ========================================================= */
.site-main { padding: 36px 0 60px; }
.block { margin-bottom: 56px; }

/* Cartão base */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--trans);
}
.card:hover { border-color: var(--border-strong); background: var(--card-2); transform: translateY(-2px); }

.thumb { position: relative; overflow: hidden; background: var(--card-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.thumb-ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a24, #0e0e16);
  display: grid; place-items: center;
}
.thumb-ph svg { width: 40px; height: 40px; opacity: 0.18; }

/* =========================================================
   5. TOPO: HERO + ÚLTIMAS NOTÍCIAS
   ========================================================= */
.top-grid {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: var(--gap);
}

/* Hero */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
}
.hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero .hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,12,0.97) 12%, rgba(8,8,12,0.55) 48%, rgba(8,8,12,0.15) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 40px; max-width: 640px; }
.hero-title {
  font-size: clamp(28px, 3.4vw, 44px);
  margin: 16px 0 14px;
  color: #fff;
}
.hero-title a:hover { color: #fff; opacity: 0.9; }
.hero-excerpt { color: var(--text-dim); font-size: 15.5px; margin-bottom: 18px; max-width: 540px; }
.hero .meta { font-size: 13px; }

/* Sidebar - Últimas notícias */
.latest { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.latest-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.latest-head .title { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.latest-head .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(139,92,246,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(139,92,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); }
}
.latest-head .see-all { font-size: 12.5px; color: var(--accent-2); font-weight: 600; }

.latest-list { display: flex; flex-direction: column; }
.latest-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.latest-item:last-child { border-bottom: 0; padding-bottom: 0; }
.latest-item:first-child { padding-top: 0; }
.latest-item .thumb { width: 84px; height: 64px; border-radius: var(--radius-sm); flex-shrink: 0; }
.latest-item .body { flex: 1; min-width: 0; }
.latest-item .cat-label { font-size: 10px; margin-bottom: 3px; }
.latest-item .l-title { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.35; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-item:hover .l-title { color: var(--accent-2); }
.latest-item .time { font-size: 11.5px; color: var(--text-muted); }

/* =========================================================
   6. EM ALTA AGORA
   ========================================================= */
.trending {
  display: flex; align-items: center; gap: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  overflow-x: auto;
}
.trending-label { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.trending-label .ico { color: var(--accent-2); display: grid; place-items: center; }
.trending-label .ico svg { width: 16px; height: 16px; }
.trending-list { display: flex; gap: 32px; }
.trending-item { white-space: nowrap; }
.trending-item .num { color: var(--accent-2); font-weight: 800; font-size: 12px; margin-right: 6px; }
.trending-item a { font-size: 13.5px; color: var(--text-dim); font-weight: 500; }
.trending-item a:hover { color: #fff; }

/* =========================================================
   7. DESTAQUES (grid grande + 2x2)
   ========================================================= */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.featured-grid .big { grid-row: span 1; }
.featured-grid .small-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }

.fcard .thumb { aspect-ratio: 16 / 10; }
.fcard.big .thumb { aspect-ratio: 4 / 3; }
.fcard .fbody { padding: 18px; }
.fcard .cat-label { margin-bottom: 9px; }
.fcard .f-title { font-size: 17px; color: #fff; margin-bottom: 12px; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fcard.big .f-title { font-size: 23px; }
.fcard:hover .f-title { color: var(--accent-2); }

/* =========================================================
   8. MAIS RECENTES + ESPECIAIS
   ========================================================= */
.bottom-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; }

/* Mais recentes (lista) */
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.recent-item:first-child { padding-top: 0; }
.recent-item .thumb { width: 116px; height: 84px; border-radius: var(--radius-sm); flex-shrink: 0; }
.recent-item .cat-label { font-size: 10px; margin-bottom: 5px; }
.recent-item .r-title { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 6px; }
.recent-item:hover .r-title { color: var(--accent-2); }
.recent-item .r-excerpt { font-size: 13.5px; color: var(--text-dim); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: #fff;
  transition: var(--trans);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { background: var(--card-hover); color: #fff; transform: translateX(2px); }
.btn-block { display: flex; justify-content: center; margin-top: 26px; }
.btn-primary { background: var(--grad); border: none; color: #fff; }
.btn-primary:hover { opacity: 0.92; filter: brightness(1.05); }

/* Especiais */
.special-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 280px; display: flex; align-items: flex-end; border: 1px solid var(--border); margin-bottom: 26px; }
.special-card .hero-bg { position: absolute; inset: 0; }
.special-card .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.special-card .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,8,12,0.96), rgba(8,8,12,0.2)); }
.special-card .sbody { position: relative; z-index: 1; padding: 26px; }
.special-card .s-title { font-size: 22px; color: #fff; margin: 10px 0 10px; }
.special-card .s-count { font-size: 12.5px; color: var(--text-muted); }

/* Newsletter */
.newsletter { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.newsletter h3 { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.newsletter p { font-size: 13.5px; color: var(--text-dim); margin-bottom: 16px; }
.newsletter form { display: flex; gap: 10px; margin-bottom: 14px; }
.newsletter input[type="email"] {
  flex: 1; min-width: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 13.5px;
}
.newsletter input[type="email"]::placeholder { color: var(--text-muted); }
.newsletter input[type="email"]:focus { outline: none; border-color: var(--accent); }
.newsletter .note { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); margin: 0; }
.newsletter .note svg { width: 14px; height: 14px; color: #34d399; }

/* =========================================================
   9. CONTEÚDO INTERNO (single / página / arquivo)
   ========================================================= */
.page-wrap { max-width: 820px; margin: 0 auto; }
.entry-header { margin-bottom: 28px; }
.entry-title { font-size: clamp(28px, 4vw, 42px); color: #fff; margin: 14px 0; }
.entry-cover { border-radius: var(--radius); overflow: hidden; margin: 0 0 30px; border: 1px solid var(--border); }
.entry-content { font-size: 17px; line-height: 1.8; color: #d7d7df; }
.entry-content h2 { font-size: 26px; margin: 38px 0 16px; color: #fff; }
.entry-content h3 { font-size: 21px; margin: 30px 0 12px; color: #fff; }
.entry-content a { color: var(--accent-2); text-decoration: underline; }
.entry-content img { border-radius: var(--radius); margin: 24px 0; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 20px; margin: 24px 0;
  color: var(--text-dim); font-style: italic;
}
.entry-content code { background: var(--card-2); padding: 2px 7px; border-radius: 6px; font-size: 0.9em; }
.entry-content pre { background: var(--card); border: 1px solid var(--border); padding: 18px; border-radius: var(--radius); overflow-x: auto; }

.archive-head { margin-bottom: 36px; }
.archive-title { font-size: 34px; color: #fff; }
.archive-title span { color: var(--accent-2); }
.archive-desc { color: var(--text-dim); margin-top: 8px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }

.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.pagination .page-numbers {
  display: grid; place-items: center;
  min-width: 42px; height: 42px; padding: 0 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-dim);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--grad); border: none; color: #fff; }

/* Comentários */
.comments-area { max-width: 820px; margin: 50px auto 0; }
.comments-area .comment-list { margin: 24px 0; }
.comments-area li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.comment-form input, .comment-form textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 14px; color: var(--text); font-family: inherit; margin-bottom: 12px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }

/* Estado vazio */
.empty-note {
  background: var(--card); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: 26px; color: var(--text-dim);
  font-size: 14px; text-align: center;
}
.empty-note strong { color: #fff; }

/* =========================================================
   10. FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 40px 0 28px; margin-top: 40px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.footer-nav ul { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-size: 13.5px; color: var(--text-dim); }
.footer-nav a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 38px; height: 38px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--text-dim); }
.footer-social a:hover { color: #fff; border-color: var(--border-strong); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { text-align: center; padding-top: 22px; font-size: 12.5px; color: var(--text-muted); }

/* =========================================================
   11. RESPONSIVO
   ========================================================= */
@media (max-width: 1024px) {
  .top-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; gap: 40px; }
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
}
@media (max-width: 720px) {
  .header-inner { height: 64px; }
  .brand-tagline { display: none; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-grid .small-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 420px; }
  .hero-content { padding: 24px; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; text-align: center; }
  .trending { gap: 16px; }
}
@media (max-width: 480px) {
  .featured-grid .small-grid { grid-template-columns: 1fr; }
  .recent-item .thumb { width: 92px; height: 70px; }
  .newsletter form { flex-direction: column; }
}
