/* ============================================
   Ask About Israel – Custom Styles
   ============================================ */

:root {
  --primary:    #1a3a5c;
  --primary-l:  #24537f;
  --accent:     #3b82f6;
  --accent-d:   #2563eb;
  --success:    #16a34a;
  --danger:     #dc2626;
  --bg-light:   #f4f6fa;
  --text-dark:  #1e293b;
  --text-muted: #64748b;
  --radius:     12px;
}

/* ---- Base ---- */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: #fff;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; }

.section-heading {
  font-size: 1.75rem;
  position: relative;
  display: inline-block;
}

/* ---- Navbar ---- */
.bg-primary-custom {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-l) 100%);
}
.navbar-brand { font-size: 1.3rem; letter-spacing: -.3px; }

/* Language Toggle */
.btn-lang-toggle {
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .5px;
  transition: background .2s, border-color .2s, transform .15s;
  line-height: 1.6;
}
.btn-lang-toggle:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
  transform: scale(1.05);
}
.btn-lang-toggle:active {
  transform: scale(.97);
}
.btn-lang-toggle i {
  font-size: .9rem;
}

/* ---- Hero ---- */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1e4976 50%, var(--accent-d) 100%);
  padding: 0.3rem 0 2rem;
}
.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.3;
}
.hero-subtitle {
  font-size: 1.1rem;
  opacity: .85;
}

/* ---- Search ---- */
.search-wrapper {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  z-index: 2;
}
.search-input {
  padding-left: 50px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.95);
  font-size: 1.05rem;
  height: 56px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  transition: border-color .2s, box-shadow .2s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 4px 30px rgba(59,130,246,.25);
}
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
}
.search-result-item {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-dark);
  border-bottom: 1px solid #f1f5f9;
  transition: background .15s;
}
.search-result-item:hover {
  background: var(--bg-light);
  color: var(--accent-d);
}
.search-result-item .result-category {
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .5px;
}

/* ---- Category Cards ---- */
.category-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  text-align: center;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  border-color: var(--accent);
}
.category-card .cat-icon {
  font-size: 1.85rem;
  color: var(--accent);
  margin-bottom: .55rem;
}
.category-card h5 {
  font-size: 1rem;
  margin-bottom: .25rem;
}
.category-card p {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* Non-webkit fallback */
  max-height: calc(2 * 1.35em);
}
.category-card .myth-count {
  display: inline-block;
  margin-top: .4rem;
  font-size: .75rem;
  padding: 2px 10px;
  border-radius: 50px;
  background: var(--bg-light);
  color: var(--accent);
  font-weight: 600;
}

/* ---- Myth List Cards ---- */
.myth-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%;
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
}
.myth-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  border-color: var(--danger);
  color: var(--text-dark);
}
.myth-card .myth-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--danger);
  font-weight: 600;
  margin-bottom: .5rem;
}
.myth-card h5 {
  font-size: 1rem;
  line-height: 1.45;
  flex: 1;
}
.myth-card .myth-arrow {
  text-align: right;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ---- Myth Detail Page ---- */
.myth-header-section {
  border-bottom: 1px solid #e2e8f0;
}
.myth-title {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--danger);
  font-style: italic;
  line-height: 1.35;
}

/* Rebuttal cards */
.rebuttal-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.rebuttal-card .rebuttal-number {
  font-size: .75rem;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .5rem;
}
.rebuttal-card .rebuttal-text {
  flex: 1;
  font-size: .95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.rebuttal-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rebuttal-actions .btn {
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Evidence */
.evidence-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color .15s;
}
.evidence-item:hover {
  border-color: var(--accent);
}
.evidence-item .ev-icon {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.evidence-item a {
  color: var(--accent-d);
  text-decoration: none;
  font-weight: 500;
  font-size: .92rem;
  word-break: break-word;
}
.evidence-item a:hover {
  text-decoration: underline;
}
.evidence-item .ev-source {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Related myths */
.related-myth-card {
  display: block;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text-dark);
  transition: background .15s, box-shadow .15s;
  height: 100%;
}
.related-myth-card:hover {
  background: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  color: var(--text-dark);
}

/* ---- Contribute ---- */
.bg-light-custom {
  background: var(--bg-light);
}

/* ---- Chatbot ---- */
.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0,0,0,.2);
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 520px;
}
.chatbot-header {
  background: linear-gradient(135deg, var(--primary), var(--accent-d));
  color: #fff;
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 260px;
}
.chat-msg {
  margin-bottom: 12px;
}
.chat-msg p {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  margin: 0;
  max-width: 85%;
  font-size: .9rem;
  line-height: 1.5;
}
.chat-msg.bot p {
  background: var(--bg-light);
  color: var(--text-dark);
  border-bottom-left-radius: 2px;
}
.chat-msg.user {
  text-align: right;
}
.chat-msg.user p {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 2px;
}
.chatbot-input {
  display: flex;
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  gap: 8px;
}
.chatbot-input .form-control {
  border-radius: 50px;
  font-size: .9rem;
}

/* ---- Footer ---- */
.footer-section {
  background: var(--primary);
}

/* ---- Question type styling ---- */
.myth-label-question {
  color: var(--accent) !important;
}
.myth-card:has(.myth-label-question) {
  border-left-color: var(--accent);
}

/* ---- Rebuttal images ---- */
.rebuttal-image {
  margin-top: .5rem;
  margin-bottom: .75rem;
}
.rebuttal-image img {
  max-height: 280px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
}

/* ---- Long Content / Deeper Dive ---- */
#longContentSection {
  border-top: 1px solid #e2e8f0;
}
.long-content-preview {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-dark);
  overflow: hidden;
  max-height: 3.6em; /* ~2 lines at line-height 1.8 */
}
.long-content-preview:empty {
  display: none;
}
.long-content-body {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-dark);
}
.long-content-body p {
  margin-bottom: 1rem;
}
.long-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.long-content-gallery img {
  max-height: 300px;
  object-fit: cover;
  width: 100%;
}
#readMoreBtn,
#readLessBtn {
  border-radius: 50px;
  padding: 8px 24px;
  font-weight: 600;
  transition: background-color .08s, border-color .08s, color .08s;
}
#readMoreBtn:hover,
#readLessBtn:hover {
  transform: none;
  box-shadow: none;
}

#seeAllMythsBtn {  
  padding: 5px;
  font-weight: 600;
  transition: all .2s;
  margin-top: 10px;
  width: 400px;
  height: 40px;
  color: var(--bs-btn-active-color);
  background-color: var(--bs-btn-active-bg);
  border-color: var(--bs-btn-active-border-color);
}

#seeAllMythsBtn:hover {
  /*background: rgba(255,255,255,.15);
  border-color: #fff; 
  color: #fff;*/
  transform: scale(1.05);
}

/* ---- Utilities / Animations ---- */
.fade-in {
  animation: fadeIn .35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .hero-section { padding: 2.5rem 0 2rem; }
  .chatbot-widget { width: calc(100vw - 20px); right: 10px; bottom: 10px; }
}
