/* ======================================================
   BIDARTIGOS - DICIONÁRIO FINANCEIRO
   Mesmo design system das páginas institucionais
====================================================== */

:root{
  --bg: #080d14;
  --card: #0f172a;
  --card-2: #111827;
  --border: rgba(148,163,184,.15);

  --text: #f8fafc;
  --muted: #94a3b8;

  --accent: #2dd4bf;
  --accent-soft: rgba(45,212,191,.10);

  --shadow: 0 10px 40px rgba(0,0,0,.28);
}

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

html{
  scroll-behavior:smooth;
}

body{
  font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at top left, rgba(45,212,191,.08), transparent 32rem),
    radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 30rem),
    #080d14;
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  line-height:1.7;
}


/* ================= MAIN ================= */

.dictionary-page{
  flex:1;
  width:100%;
  max-width:900px;
  margin:auto;
  padding:52px 24px 100px;
}

/* ================= HERO ================= */

.dictionary-hero{
  margin-bottom:34px;
}

.dictionary-kicker{
  color:var(--accent);
  font-size:.85rem;
  margin-bottom:14px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.5px;
}

.dictionary-hero h1{
  font-size:3rem;
  line-height:1.1;
  margin-bottom:22px;
  letter-spacing:-1px;
}

.dictionary-hero h1 span{
  color:var(--accent);
}

.dictionary-subtitle{
  max-width:700px;
  font-size:1.04rem;
  color:var(--muted);
  line-height:1.8;
}

/* ================= CARD ================= */

.dictionary-card{
  background:linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid var(--border);
  border-radius:26px;
  padding:34px;
  box-shadow:var(--shadow);
}

.dictionary-search-header{
  margin-bottom:22px;
}

.dictionary-search-header h2{
  font-size:1.28rem;
  margin-bottom:6px;
  color:var(--text);
  position:relative;
  padding-left:18px;
}

.dictionary-search-header h2::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  width:6px;
  height:20px;
  border-radius:30px;
  background:var(--accent);
}

.dictionary-search-header p{
  color:var(--muted);
  font-size:.95rem;
}

/* ================= SEARCH ================= */

.search-box{
  position:relative;
  margin-bottom:18px;
}

.search-icon{
  position:absolute;
  left:18px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  pointer-events:none;
}

.search-box input{
  width:100%;
  background:rgba(15,23,42,.95);
  color:var(--text);
  border:1px solid var(--border);
  padding:17px 18px 17px 52px;
  border-radius:18px;
  font-size:1rem;
  outline:none;
  transition:.25s;
}

.search-box input::placeholder{
  color:#64748b;
}

.search-box input:focus{
  border-color:rgba(45,212,191,.42);
  box-shadow:0 0 0 4px rgba(45,212,191,.08);
  background:#0b1220;
}

/* ================= CATEGORIAS ================= */

.category-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:22px;
}

.category-btn{
  background:rgba(15,23,42,.9);
  color:var(--muted);
  border:1px solid var(--border);
  padding:9px 14px;
  border-radius:999px;
  cursor:pointer;
  font-size:.84rem;
  transition:.25s;
}

.category-btn:hover{
  color:var(--text);
  border-color:rgba(45,212,191,.28);
}

.category-btn.active{
  background:var(--accent);
  color:#04110f;
  border-color:var(--accent);
  font-weight:700;
}

/* ================= STATUS ================= */

.status-message{
  color:var(--muted);
  font-size:.92rem;
  padding:16px 18px;
  background:rgba(15,23,42,.65);
  border:1px solid var(--border);
  border-radius:18px;
}

/* ================= RESULTADOS ================= */

.results{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:18px;
}

.term-card{
  position:relative;
  background:rgba(15,23,42,.78);
  border:1px solid var(--border);
  border-radius:20px;
  padding:20px 22px 20px 24px;
  transition:.25s;
}

.term-card::before{
  content:"";
  position:absolute;
  left:0;
  top:18px;
  bottom:18px;
  width:5px;
  border-radius:0 30px 30px 0;
  background:var(--accent);
}

.term-card:hover{
  transform:translateY(-2px);
  border-color:rgba(45,212,191,.25);
  background:rgba(15,23,42,.95);
}

.term-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:8px;
}

.term-card h2{
  font-size:1.22rem;
  line-height:1.25;
  color:var(--text);
  letter-spacing:-.3px;
}

.term-category{
  color:var(--accent);
  background:var(--accent-soft);
  border:1px solid rgba(45,212,191,.15);
  padding:5px 10px;
  border-radius:999px;
  font-size:.74rem;
  white-space:nowrap;
}

.term-card p{
  color:var(--muted);
  font-size:.96rem;
  line-height:1.75;
}

/* ================= FOOTER ================= */

.site-footer{
  border-top:1px solid var(--border);
  padding:26px 20px;
  margin-top:auto;
}

.footer-inner{
  max-width:1100px;
  margin:auto;
  text-align:center;
}

.footer-nav{
  margin-bottom:14px;
  display:flex;
  justify-content:center;
  gap:20px;
  flex-wrap:wrap;
}

.footer-nav a{
  text-decoration:none;
  color:var(--muted);
  font-size:.9rem;
  transition:.25s;
}

.footer-nav a:hover{
  color:var(--accent);
}

.site-footer p{
  color:#64748b;
  font-size:.82rem;
}

/* ================= MOBILE ================= */

@media(max-width:768px){


  .dictionary-page{
    padding:35px 16px 80px;
  }

  .dictionary-card{
    padding:26px 22px;
    border-radius:22px;
  }

  .dictionary-hero h1{
    font-size:2rem;
    line-height:1.2;
  }

  .dictionary-subtitle{
    font-size:.95rem;
  }

  .dictionary-search-header h2{
    font-size:1.08rem;
  }

  .term-top{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
  }

  .footer-nav{
    gap:14px;
  }
}

/* ================= AJUSTE FINAL - DICIONÁRIO MAIS COMPACTO ================= */

.dictionary-page{
  max-width:820px;
  padding:28px 24px 80px;
}

.dictionary-hero{
  margin-bottom:22px;
}

.dictionary-kicker{
  margin-bottom:10px;
  font-size:.78rem;
}

.dictionary-hero h1{
  font-size:2.35rem;
  margin-bottom:12px;
  line-height:1.08;
}

.dictionary-subtitle{
  max-width:560px;
  font-size:.98rem;
  line-height:1.65;
}

.dictionary-card{
  padding:24px;
  border-radius:22px;
}

.dictionary-search-header{
  margin-bottom:14px;
}

.dictionary-search-header h2{
  font-size:1.08rem;
  margin-bottom:4px;
}

.dictionary-search-header p{
  font-size:.88rem;
}

.search-box{
  margin-bottom:14px;
}

.search-box input{
  height:54px;
  padding:14px 16px 14px 48px;
  border-radius:15px;
}

.category-row{
  gap:8px;
  margin-bottom:16px;
}

.category-btn{
  padding:7px 11px;
  font-size:.78rem;
}

.status-message{
  padding:13px 15px;
  font-size:.86rem;
  border-radius:14px;
}

.results{
  gap:10px;
  margin-top:14px;
}

.term-card{
  padding:16px 18px 16px 20px;
  border-radius:16px;
}

.term-card::before{
  top:15px;
  bottom:15px;
  width:4px;
}

.term-top{
  margin-bottom:5px;
}

.term-card h2{
  font-size:1.08rem;
}

.term-card p{
  font-size:.91rem;
  line-height:1.62;
}

.term-category{
  font-size:.68rem;
  padding:4px 8px;
}

/* CELULAR */

@media(max-width:768px){

  .dictionary-page{
    padding:22px 16px 70px;
  }

  .dictionary-hero{
    margin-bottom:18px;
  }

  .dictionary-hero h1{
    font-size:1.75rem;
    margin-bottom:10px;
  }

  .dictionary-subtitle{
    font-size:.9rem;
    line-height:1.55;
  }

  .dictionary-card{
    padding:18px;
    border-radius:20px;
  }

  .dictionary-search-header{
    margin-bottom:12px;
  }

  .dictionary-search-header h2{
    font-size:1rem;
  }

  .dictionary-search-header p{
    font-size:.82rem;
  }

  .search-box input{
    height:50px;
    font-size:.92rem;
    border-radius:14px;
  }

  .category-row{
    margin-bottom:14px;
  }

  .category-btn{
    font-size:.73rem;
    padding:6px 10px;
  }

  .term-card{
    padding:14px 16px 14px 18px;
  }

  .term-card h2{
    font-size:1rem;
  }

  .term-card p{
    font-size:.88rem;
  }
}

.term-card{
  display:block;
  text-decoration:none;
  color:inherit;
}

.term-link{
  display:inline-flex;
  margin-top:.8rem;
  color:var(--accent);
  font-size:.86rem;
  font-weight:700;
}

.term-page{
  flex:1;
  width:100%;
  max-width:900px;
  margin:auto;
  padding:42px 24px 100px;
}

.back-link{
  display:inline-flex;
  margin-bottom:20px;
  color:var(--muted);
  text-decoration:none;
  font-size:.92rem;
  transition:.25s;
}

.back-link:hover{
  color:var(--accent);
}

.term-detail-card{
  background:linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid var(--border);
  border-radius:26px;
  padding:42px;
  box-shadow:var(--shadow);
}

.term-detail-title{
  font-size:3rem;
  line-height:1.05;
  letter-spacing:-1px;
  margin-bottom:18px;
}

.term-short-definition{
  color:#dbeafe;
  font-size:1.15rem;
  line-height:1.8;
  padding:22px;
  border-radius:20px;
  background:rgba(45,212,191,.06);
  border:1px solid rgba(45,212,191,.16);
  margin-bottom:34px;
}

.term-section{
  margin-top:34px;
}

.term-section h2{
  font-size:1.3rem;
  margin-bottom:14px;
  color:var(--text);
  position:relative;
  padding-left:18px;
}

.term-section h2::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  width:6px;
  height:20px;
  border-radius:30px;
  background:var(--accent);
}

.term-section p{
  color:var(--muted);
  font-size:1rem;
  line-height:1.9;
  margin-bottom:16px;
}

.term-example{
  padding:24px;
  border-radius:20px;
  background:rgba(15,23,42,.65);
  border:1px solid var(--border);
}

.related-terms{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.related-terms a{
  text-decoration:none;
  color:var(--accent);
  background:var(--accent-soft);
  border:1px solid rgba(45,212,191,.16);
  padding:8px 13px;
  border-radius:999px;
  font-size:.86rem;
  font-weight:700;
}

.related-terms a:hover{
  background:rgba(45,212,191,.16);
}

@media(max-width:768px){

  .term-page{
    padding:28px 16px 80px;
  }

  .term-detail-card{
    padding:26px 22px;
    border-radius:22px;
  }

  .term-detail-title{
    font-size:2.1rem;
  }

  .term-short-definition{
    font-size:1rem;
    padding:18px;
  }

  .term-section p{
    font-size:.95rem;
  }
}

/* ===== DICIONÁRIO MAIS LIMPO ===== */

.dictionary-page{
  max-width:840px;
  padding:34px 24px 90px;
}

.dictionary-hero{
  margin-bottom:24px;
}

.dictionary-kicker{
  font-size:.78rem;
  margin-bottom:10px;
}

.dictionary-hero h1{
  font-size:2.45rem;
  line-height:1.08;
  margin-bottom:12px;
}

.dictionary-subtitle{
  max-width:620px;
  font-size:.98rem;
  line-height:1.65;
}

.dictionary-card{
  padding:24px;
  border-radius:22px;
}

.dictionary-search-header{
  margin-bottom:14px;
}

.dictionary-search-header h2{
  font-size:1.08rem;
}

.dictionary-search-header p{
  font-size:.88rem;
}

.search-box input{
  height:54px;
  border-radius:16px;
}

.category-row{
  margin-bottom:18px;
}

.term-card{
  display:block;
  text-decoration:none;
  color:inherit;
  padding:18px 20px;
  border-radius:18px;
}

.term-card h2{
  font-size:1.12rem;
}

.term-card p{
  font-size:.92rem;
  line-height:1.65;
}

.term-link{
  display:inline-flex;
  margin-top:10px;
  color:var(--accent);
  font-size:.84rem;
  font-weight:700;
}

/* ===== PÁGINA DO TERMO ===== */

.term-page{
  flex:1;
  width:100%;
  max-width:820px;
  margin:auto;
  padding:34px 24px 90px;
}

.back-link{
  display:inline-flex;
  margin-bottom:18px;
  color:var(--muted);
  text-decoration:none;
  font-size:.9rem;
}

.back-link:hover{
  color:var(--accent);
}

.term-detail-card{
  background:linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid var(--border);
  border-radius:24px;
  padding:34px;
  box-shadow:var(--shadow);
}

.term-detail-title{
  font-size:2.6rem;
  line-height:1.05;
  margin-bottom:18px;
}

.term-short-definition{
  color:#dffbf7;
  background:rgba(45,212,191,.07);
  border:1px solid rgba(45,212,191,.16);
  border-radius:18px;
  padding:20px;
  font-size:1.05rem;
  line-height:1.75;
  margin-bottom:30px;
}

.term-section{
  margin-top:30px;
}

.term-section h2{
  font-size:1.2rem;
  margin-bottom:12px;
  padding-left:16px;
  position:relative;
}

.term-section h2::before{
  content:"";
  position:absolute;
  left:0;
  top:7px;
  width:5px;
  height:18px;
  border-radius:999px;
  background:var(--accent);
}

.term-section p{
  color:var(--muted);
  font-size:.98rem;
  line-height:1.85;
  margin-bottom:14px;
}

.term-example{
  padding:20px;
  border-radius:18px;
  background:rgba(15,23,42,.65);
  border:1px solid var(--border);
}

.related-terms{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}

.related-terms a{
  color:var(--accent);
  background:var(--accent-soft);
  border:1px solid rgba(45,212,191,.16);
  text-decoration:none;
  padding:7px 12px;
  border-radius:999px;
  font-size:.84rem;
  font-weight:700;
}

@media(max-width:768px){

  .dictionary-page,
  .term-page{
    padding:24px 16px 75px;
  }

  .dictionary-hero h1,
  .term-detail-title{
    font-size:1.9rem;
  }

  .dictionary-card,
  .term-detail-card{
    padding:22px;
    border-radius:20px;
  }

  .term-short-definition{
    font-size:.96rem;
    padding:17px;
  }
}

.category-row {
  transition: all 0.3s ease;
}

.category-row.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin: 0;
}