/*
Theme Name: SolucoesWeb Edital
Theme URI: https://example.com
Author: SolucoesWeb
Author URI: https://example.com
Description: Tema WordPress dark/roxo neon para agencias e orgaos que publicam editais, licitacoes e processos seletivos. Inclui Custom Post Type "Edital" com numero, status, datas, categoria e anexo em PDF.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: edital-theme
Tags: dark, purple, editais, licitacao, one-page, custom-post-type
*/

/* ==========================================================================
   0. RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root{
  --bg: #0a0a16;
  --bg-alt: #100f1e;
  --card: #15142a;
  --card-hover: #1b1a35;
  --border: rgba(167,139,250,.16);
  --border-strong: rgba(167,139,250,.35);
  --purple: #7c3aed;
  --purple-2: #a855f7;
  --purple-light: #c4b5fd;
  --pink: #e879f9;
  --text: #f4f3f9;
  --text-muted: #a3a1b8;
  --text-faint: #6f6d87;
  --green: #22c55e;
  --red: #f87171;
  --amber: #f59e0b;
  --blue: #60a5fa;
  --radius: 16px;
  --radius-sm: 10px;
  --grad: linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 55%, var(--pink) 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,58,237,.18), rgba(168,85,247,.10));
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(124,58,237,.45);
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive;
  --container: 1180px;
}

body{
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

h1,h2,h3,h4{ font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h1{ font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2{ font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3{ font-size: 1.25rem; }
p{ color: var(--text-muted); }

.container{ max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section{ padding: 96px 0; position: relative; }
.section-alt{ background: var(--bg-alt); }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.78rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color: var(--purple-light); margin-bottom:14px;
}
.eyebrow::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--grad); box-shadow:0 0 12px var(--purple-2); }

.grad-text{ background: var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }

.hand{ font-family: var(--font-hand); color: var(--purple-light); font-size:1.4rem; transform: rotate(-3deg); display:inline-block; }

/* glow blobs (substituem "fotos" por composicoes CSS nitidas) */
.blob{ position:absolute; border-radius:50%; filter: blur(90px); opacity:.35; pointer-events:none; z-index:0; }
.blob-purple{ background: var(--purple); }
.blob-pink{ background: var(--pink); }

/* ==========================================================================
   2. BUTTONS
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 14px 26px; border-radius: 999px; font-weight:600; font-size:.95rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary{ background: var(--grad); color:#fff; box-shadow: 0 8px 24px -8px rgba(168,85,247,.65); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(168,85,247,.8); }
.btn-outline{ border:1.5px solid var(--border-strong); color: var(--text); }
.btn-outline:hover{ border-color: var(--purple-light); background: rgba(124,58,237,.08); }
.btn-sm{ padding: 9px 18px; font-size: .85rem; }
.btn-block{ width:100%; }

/* ==========================================================================
   3. HEADER / NAV
   ========================================================================== */
.site-header{
  position: sticky; top:0; z-index:100;
  background: rgba(10,10,22,.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap{ display:flex; align-items:center; justify-content:space-between; padding: 18px 24px; max-width: var(--container); margin:0 auto; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:1.15rem; }
.brand-mark{
  width:34px; height:34px; border-radius:9px; background: var(--grad);
  display:flex; align-items:center; justify-content:center; box-shadow: 0 0 18px rgba(168,85,247,.55);
  transform: rotate(8deg);
}
.brand-mark svg{ width:18px; height:18px; transform: rotate(-8deg); }
.brand img.custom-logo{ height:34px; width:auto; }

.primary-menu{ display:flex; align-items:center; gap:34px; }
.primary-menu a{ font-size:.92rem; color: var(--text-muted); font-weight:500; position:relative; padding: 4px 0; transition: color .15s; }
.primary-menu a:hover, .primary-menu .current-menu-item > a{ color: var(--text); }
.primary-menu .current-menu-item > a::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px; background: var(--grad); border-radius:2px;
}
.nav-actions{ display:flex; align-items:center; gap:16px; }
.menu-toggle{ display:none; width:40px; height:40px; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:8px; color:var(--text); }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after{ display:none; }
.menu-toggle svg{ width:20px; height:20px; }

/* ==========================================================================
   4. HERO
   ========================================================================== */
.hero{ position:relative; padding: 90px 0 60px; overflow:hidden; }
.hero-grid{ display:grid; grid-template-columns: 1.05fr .95fr; gap:56px; align-items:center; position:relative; z-index:1; }
.hero p.lead{ font-size:1.08rem; max-width:520px; margin: 18px 0 28px; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:38px; }
.hero-stats{ display:flex; gap:34px; flex-wrap:wrap; }
.hero-stats .stat{ display:flex; align-items:center; gap:10px; }
.hero-stats .stat strong{ display:block; font-size:1.15rem; }
.hero-stats .stat span{ font-size:.8rem; color: var(--text-faint); }
.stat-ico{ width:30px; height:30px; border-radius:8px; background: var(--grad-soft); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color: var(--purple-light); flex-shrink:0; }

.hero-visual{ position:relative; }
.mock-card{
  background: linear-gradient(160deg, #1c1a38, #100f22 70%);
  border:1px solid var(--border-strong);
  border-radius: 22px; padding: 22px; box-shadow: var(--shadow-glow);
  position:relative; overflow:hidden;
}
.mock-card::before{
  content:""; position:absolute; inset:-40% -20% auto auto; width:260px; height:260px;
  background: var(--grad); filter: blur(70px); opacity:.35; border-radius:50%;
}
.mock-bar{ display:flex; gap:6px; margin-bottom:16px; }
.mock-bar span{ width:9px; height:9px; border-radius:50%; background: rgba(255,255,255,.15); }
.mock-line{ height:10px; border-radius:6px; background: rgba(255,255,255,.08); margin-bottom:10px; }
.mock-line.w60{ width:60%; } .mock-line.w80{ width:80%; } .mock-line.w40{ width:40%; }
.mock-chip{ display:inline-flex; padding:6px 14px; border-radius:999px; background: var(--grad-soft); border:1px solid var(--border-strong); font-size:.75rem; color: var(--purple-light); margin-top:14px; }
.hero-note{
  position:absolute; bottom:-18px; left:-10px; font-family: var(--font-hand); font-size:1.3rem; color: var(--purple-light);
  transform: rotate(-4deg);
}

/* ==========================================================================
   5. FEATURE / SERVICE PILLS + CARDS
   ========================================================================== */
.pill-row{ display:flex; gap:22px; flex-wrap:wrap; margin: 30px 0 0; }
.pill{ display:flex; align-items:center; gap:9px; font-size:.85rem; color: var(--text-muted); }
.pill svg{ width:18px; height:18px; color: var(--purple-light); flex-shrink:0; }

.cards-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:22px; margin-top:44px; }
.card{
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover{ transform: translateY(-4px); border-color: var(--border-strong); background: var(--card-hover); }
.card-icon{
  width:46px; height:46px; border-radius:12px; background: var(--grad);
  display:flex; align-items:center; justify-content:center; margin-bottom:18px; box-shadow: 0 8px 20px -8px rgba(168,85,247,.6);
}
.card-icon svg{ width:22px; height:22px; color:#fff; }
.card h3{ margin-bottom:8px; }
.card p{ font-size:.92rem; margin-bottom:14px; }
.card-link{ font-size:.85rem; font-weight:600; color: var(--purple-light); display:inline-flex; align-items:center; gap:6px; }

.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.section-head .btn{ flex-shrink:0; }

/* ==========================================================================
   6. SOBRE
   ========================================================================== */
.about-grid{ display:grid; grid-template-columns: .95fr 1.05fr; gap:56px; align-items:center; }
.about-visual{ position:relative; }
.about-photo{
  background: linear-gradient(160deg,#1a1830,#0d0c1c 75%); border:1px solid var(--border);
  border-radius: var(--radius); aspect-ratio: 4/3; position:relative; overflow:hidden; box-shadow: var(--shadow-glow);
}
.about-photo::after{ content:""; position:absolute; inset:0; background: var(--grad-soft); }
.about-float{
  position:absolute; right:-24px; bottom:-24px; background: var(--card); border:1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding:18px 22px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); min-width:170px;
}
.about-float strong{ display:block; font-size:1.3rem; }
.about-float span{ font-size:.78rem; color: var(--text-faint); }
.about-list{ display:grid; grid-template-columns: 1fr 1fr; gap:20px; margin: 26px 0 30px; }
.about-item{ display:flex; gap:12px; }
.about-item .tick{ width:26px; height:26px; border-radius:50%; background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--purple-light); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.about-item h4{ font-size:.95rem; margin-bottom:2px; }
.about-item p{ font-size:.83rem; }

/* ==========================================================================
   7. EDITAIS - filtros e cards
   ========================================================================== */
.edital-hero{ padding: 70px 0 40px; text-align:center; }
.edital-hero h1{ margin-bottom:12px; }
.edital-hero p{ max-width:600px; margin:0 auto; }

.filtro-editais{
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display:grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap:14px; margin: -10px 0 40px;
  box-shadow: var(--shadow-glow);
}
.filtro-editais input[type="text"],
.filtro-editais select{
  width:100%; background: var(--bg-alt); border:1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font-size:.9rem;
}
.filtro-editais input:focus, .filtro-editais select:focus{ outline:none; border-color: var(--purple-light); }
.filtro-editais button{ white-space:nowrap; }

.edital-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:22px; }
.edital-card{
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  padding:24px; display:flex; flex-direction:column; gap:12px; transition: border-color .2s, transform .2s;
}
.edital-card:hover{ transform: translateY(-3px); border-color: var(--border-strong); }
.edital-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.edital-num{ font-size:.78rem; color: var(--text-faint); font-weight:600; letter-spacing:.04em; }
.badge{
  display:inline-flex; align-items:center; gap:6px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  padding: 5px 12px; border-radius:999px; border:1px solid transparent;
}
.badge::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-aberto{ color: var(--green); background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.35); }
.badge-encerrado{ color: var(--red); background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.35); }
.badge-suspenso{ color: var(--amber); background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.35); }
.badge-prorrogado{ color: var(--blue); background: rgba(96,165,250,.12); border-color: rgba(96,165,250,.35); }

.edital-card h3{ font-size:1.08rem; }
.edital-card h3 a:hover{ color: var(--purple-light); }
.edital-meta{ display:flex; flex-direction:column; gap:6px; font-size:.82rem; color: var(--text-faint); }
.edital-meta span{ display:flex; align-items:center; gap:7px; }
.edital-meta svg{ width:15px; height:15px; color: var(--purple-light); flex-shrink:0; }
.edital-cat{ font-size:.72rem; font-weight:600; color: var(--purple-light); text-transform:uppercase; letter-spacing:.05em; }
.edital-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:10px; border-top:1px solid var(--border); }

.empty-state{ text-align:center; padding: 70px 20px; color: var(--text-faint); }

.pagination{ display:flex; justify-content:center; gap:8px; margin-top:48px; flex-wrap:wrap; }
.pagination a, .pagination span{
  min-width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  border-radius:10px; border:1px solid var(--border); font-size:.85rem; color: var(--text-muted);
}
.pagination .current{ background: var(--grad); color:#fff; border-color:transparent; }
.pagination a:hover{ border-color: var(--border-strong); color: var(--text); }

/* ==========================================================================
   8. SINGLE EDITAL
   ========================================================================== */
.edital-single-head{ padding: 60px 0 30px; }
.breadcrumb{ font-size:.82rem; color: var(--text-faint); margin-bottom:18px; }
.breadcrumb a{ color: var(--purple-light); }
.edital-title-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.edital-info-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:16px; margin:30px 0 40px; }
.info-box{ background: var(--card); border:1px solid var(--border); border-radius: var(--radius-sm); padding:18px; }
.info-box span{ display:block; font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color: var(--text-faint); margin-bottom:6px; }
.info-box strong{ font-size:1rem; }
.single-content{ max-width: 780px; }
.single-content p{ margin-bottom:16px; color: var(--text-muted); }
.single-content h2, .single-content h3{ margin: 28px 0 14px; }
.download-box{
  display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
  background: var(--grad-soft); border:1px solid var(--border-strong); border-radius: var(--radius);
  padding: 26px; margin: 34px 0;
}
.download-box h4{ margin-bottom:4px; } .download-box p{ font-size:.85rem; margin:0; }
.related-title{ margin: 60px 0 24px; }

/* ==========================================================================
   9. CONTATO
   ========================================================================== */
.contact-grid{ display:grid; grid-template-columns: .9fr 1.1fr; gap:50px; }
.contact-info-list{ display:flex; flex-direction:column; gap:22px; margin: 28px 0 34px; }
.contact-info-item{ display:flex; gap:14px; align-items:flex-start; }
.contact-ico{ width:42px; height:42px; border-radius:11px; background: var(--grad-soft); border:1px solid var(--border-strong); color: var(--purple-light); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.contact-info-item strong{ display:block; font-size:.95rem; }
.contact-info-item span{ font-size:.85rem; color: var(--text-faint); }
.social-row{ display:flex; gap:10px; }
.social-row a{ width:38px; height:38px; border-radius:10px; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color: var(--text-muted); transition: .2s; }
.social-row a:hover{ border-color: var(--purple-light); color: var(--purple-light); }

.contact-form-card{
  background: var(--card); border:1px solid var(--border-strong); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-glow);
}
.form-row{ margin-bottom:16px; }
.form-row label{ display:block; font-size:.82rem; margin-bottom:7px; color: var(--text-muted); }
.form-row input, .form-row select, .form-row textarea{
  width:100%; background: var(--bg-alt); border:1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; color: var(--text); font-size:.92rem;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus{ outline:none; border-color: var(--purple-light); }
.form-msg{ padding:14px 16px; border-radius: var(--radius-sm); font-size:.88rem; margin-bottom:18px; }
.form-msg.success{ background: rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.35); color: var(--green); }
.form-msg.error{ background: rgba(248,113,113,.12); border:1px solid rgba(248,113,113,.35); color: var(--red); }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer{ border-top:1px solid var(--border); padding: 50px 0 26px; background: var(--bg-alt); }
.footer-top{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; padding-bottom:30px; border-bottom:1px solid var(--border); margin-bottom:24px; }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; font-size:.82rem; color: var(--text-faint); }

/* ==========================================================================
   11. MISC / WP DEFAULTS
   ========================================================================== */
.screen-reader-text{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); }
.alignwide{ max-width:1180px; margin-left:auto; margin-right:auto; }

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */
@media (max-width: 960px){
  .hero-grid, .about-grid, .contact-grid{ grid-template-columns: 1fr; }
  .cards-grid, .edital-grid{ grid-template-columns: repeat(2,1fr); }
  .filtro-editais{ grid-template-columns: 1fr 1fr; }
  .edital-info-grid{ grid-template-columns: repeat(2,1fr); }
  .about-list{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .primary-menu{
    position: fixed; inset: 68px 16px auto 16px; background: var(--bg-alt); border:1px solid var(--border);
    border-radius: var(--radius); padding: 18px; flex-direction:column; align-items:flex-start; gap:16px;
    transform: translateY(-12px); opacity:0; pointer-events:none; transition: .2s ease; z-index:90;
  }
  .primary-menu.is-open{ transform: translateY(0); opacity:1; pointer-events:auto; }
  .menu-toggle{ display:flex; }
  .nav-actions .btn-primary{ display:none; }
  .cards-grid, .edital-grid{ grid-template-columns: 1fr; }
  .filtro-editais{ grid-template-columns: 1fr; }
  .edital-info-grid{ grid-template-columns: 1fr 1fr; }
  .section{ padding: 64px 0; }
}
