/* ==============================================================
   BAVINCKLAB LÉXICO BÍBLICO STRONG - ESTILOS E TIPOGRAFIA
   ============================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --primary-light: #ccfbf1;
  --primary-dark: #134e4a;
  
  --strong-bg: #dbeafe;
  --strong-border: #bfdbfe;
  --strong-text: #1e3a8a;

  --cross-bg: #fae8ff;
  --cross-border: #f0abfc;
  --cross-text: #86198f;

  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Lora', 'Georgia', serif;
  --font-greek: 'Gentium Plus', 'Times New Roman', serif;
  --font-hebrew: 'SBL Hebrew', 'Ezra SIL', 'David', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.lex-page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==============================================================
   HEADER
   ============================================================== */
.lex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.lex-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: block;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
  display: block;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.lex-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  transition: all 0.15s ease;
}

.nav-pill:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ==============================================================
   MAIN & HERO
   ============================================================== */
.lex-main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 60px 20px;
}

.lex-hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==============================================================
   SEARCH BOX
   ============================================================== */
.search-box-wrapper {
  position: relative;
  max-width: 760px;
  margin: 0 auto 16px auto;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 4px 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.search-input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15), var(--shadow-md);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

.lex-search-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--text-main);
  background: transparent;
  padding: 12px 0;
  font-family: inherit;
}

.lex-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.92rem;
}

.btn-clear-search {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-clear-search:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.search-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 118, 110, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==============================================================
   DROPDOWN SUGGESTIONS
   ============================================================== */
.lex-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 380px;
  overflow-y: auto;
  text-align: left;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.12s;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.selected {
  background-color: #f0fdfa;
}

.drop-orig {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-right: 8px;
}

.drop-orig.hebrew {
  font-family: var(--font-hebrew);
  direction: rtl;
}

.drop-orig.greek {
  font-family: var(--font-greek);
}

.drop-translit {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.drop-meaning {
  font-size: 0.82rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.drop-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.drop-badge.strong-gr {
  background: #e0f2fe;
  color: #0369a1;
}

.drop-badge.strong-he {
  background: #fef3c7;
  color: #b45309;
}

/* ==============================================================
   FILTER CHIPS & EXAMPLES
   ============================================================== */
.filter-chips-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.examples-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 820px;
  margin: 0 auto;
}

.examples-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.example-tag {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
}

.example-tag:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--primary);
  transform: translateY(-1px);
}

/* ==============================================================
   RECENT SECTION
   ============================================================== */
.recent-section {
  max-width: 760px;
  margin: 0 auto 24px auto;
  padding: 10px 16px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.recent-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-text-muted {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: #94a3b8;
  cursor: pointer;
  text-decoration: underline;
}

.btn-text-muted:hover {
  color: var(--text-main);
}

.recent-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.recent-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.recent-chip:hover {
  background: #e2e8f0;
  color: var(--primary);
}

/* ==============================================================
   RESULT CARD (DETALHES DO VERBETE)
   ============================================================== */
.result-section {
  max-width: 760px;
  margin: 0 auto;
}

.empty-state-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f0fdfa;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.empty-state-card h3 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 8px;
  font-weight: 700;
}

.empty-state-card p {
  font-size: 0.88rem;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Cartão do Verbete Ativo */
.word-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 32px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.word-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.word-heading-wrap {
  display: flex;
  flex-direction: column;
}

.word-original-text {
  font-size: 2.2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 4px;
}

.word-original-text.hebrew {
  font-family: var(--font-hebrew);
  direction: rtl;
}

.word-original-text.greek {
  font-family: var(--font-greek);
}

.word-translit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.word-pronounce {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
}

.card-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  letter-spacing: 0.02em;
}

.badge-pill.strong {
  font-family: var(--font-mono);
  background: var(--strong-bg);
  border: 1px solid var(--strong-border);
  color: var(--strong-text);
  font-size: 0.82rem;
}

.badge-pill.lang-greek {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.badge-pill.lang-hebrew {
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #a16207;
}

.badge-pill.grammar {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.btn-copy-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-card:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: var(--primary);
}

/* Seções do Verbete */
.card-section {
  margin-bottom: 22px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

.main-meaning-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
  background: #f8fafc;
  padding: 12px 16px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Etimologia Box */
.etymology-box {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.5;
}

.etymology-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
}

/* Definições Estruturadas */
.structured-defs-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.def-line {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #1e293b;
}

.def-line.level-1 {
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.def-line.level-2 {
  padding-left: 18px;
  color: #334155;
}

.def-line.level-3 {
  padding-left: 36px;
  color: #64748b;
}

/* Similar Cruzado Card */
.cross-similar-card {
  background: var(--cross-bg);
  border: 1px solid var(--cross-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cross-similar-card:hover {
  background: #f5d0fe;
  transform: translateY(-1px);
}

.cross-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cross-tag-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--cross-text);
  text-transform: uppercase;
}

.cross-term-orig {
  font-size: 1.25rem;
  font-weight: 700;
  color: #581c87;
}

.cross-term-orig.hebrew {
  font-family: var(--font-hebrew);
}

.cross-term-orig.greek {
  font-family: var(--font-greek);
}

.cross-meaning {
  font-size: 0.82rem;
  color: #701a75;
}

.cross-arrow {
  color: var(--cross-text);
}

/* Ocorrências */
.occ-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  max-height: 280px;
  overflow-y: auto;
}

.occ-snippet-row {
  font-size: 0.82rem;
  color: #334155;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
  line-height: 1.45;
}

.occ-snippet-row:last-child {
  border-bottom: none;
}

.occ-snippet-row strong {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ==============================================================
   FOOTER
   ============================================================== */
.lex-footer {
  text-align: center;
  padding: 24px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Toast */
.lex-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toastIn 0.2s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsividade Mobile e Tablet */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.45rem;
  }
  .word-card {
    padding: 20px 18px;
  }
  .word-card-header {
    flex-direction: column;
    gap: 12px;
  }
  .word-original-text {
    font-size: 1.8rem;
  }
  .lex-nav {
    display: none;
  }
}
