/* =============================================================
   DARIMPO HELP CENTER — styles.css
   Page-specific styles. Requires base.css
   ============================================================= */


/* ─────────────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a8bbf 100%);
  color: white; text-align: center; padding: 60px 40px 80px;
  position: relative; overflow: hidden;
}
.hero::before { content:''; display:none; }
.hero::after  { content:''; display:none; }
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; position: relative; z-index: 1; }
.hero p  { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 32px; position: relative; z-index: 1; }

.search-wrap { max-width: 560px; margin: 0 auto; position: relative; z-index: 1; }
.search-wrap input {
  width: 100%; padding: 16px 52px 16px 20px;
  border-radius: var(--radius-pill); border: none;
  font-size: var(--font-size-md); font-family: var(--font); outline: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15); color: var(--text);
}
body.ltr .search-wrap input { padding: 16px 20px 16px 52px; direction: ltr; }
body.rtl .search-wrap input { direction: rtl; }
.search-icon { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; }
body.rtl .search-icon { left: 18px; }
body.ltr .search-icon { right: 18px; }

.stats-row { display: flex; justify-content: center; gap: 40px; margin-top: 40px; position: relative; z-index: 1; }
.stat { text-align: center; }
.stat-num   { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-top: 2px; }


/* ─────────────────────────────────────────────────────────────
   MAIN LAYOUT
   ───────────────────────────────────────────────────────────── */
.main-layout {
  max-width: 1200px; margin: -30px auto 0; padding: 0 24px 60px;
  display: grid; grid-template-columns: 240px 1fr; gap: 28px;
  position: relative; z-index: 2;
}


/* ─────────────────────────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 8px; }
.sidebar-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 16px 14px 8px; }
.cat-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 10px; cursor: pointer; transition: all 0.18s;
  border: 2px solid transparent; background: var(--card);
  font-family: var(--font); font-size: 0.92rem; font-weight: 500; color: var(--text);
  box-shadow: 0 1px 4px rgba(40,170,225,0.08);
}
body.rtl .cat-btn { text-align: right; }
body.ltr .cat-btn { text-align: left; }
.cat-btn:hover { background: var(--primary-light); border-color: #a8ddf4; }
.cat-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 16px rgba(40,170,225,0.30); }
.cat-icon { font-size: 1.15rem; }
.cat-badge { background: var(--accent-light); color: var(--accent); border-radius: 20px; padding: 1px 8px; font-size: 0.75rem; font-weight: 700; }
body.rtl .cat-badge { margin-right: auto; }
body.ltr .cat-badge { margin-left: auto; }
.cat-btn.active .cat-badge { background: rgba(255,255,255,0.2); color: white; }


/* ─────────────────────────────────────────────────────────────
   ARTICLE GRID
   ───────────────────────────────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.article-card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.22s;
  border: 2px solid transparent; position: relative; overflow: hidden;
}
.article-card::before { content:''; position:absolute; top:0; width:4px; height:100%; background:var(--primary); opacity:0; transition:opacity 0.22s; }
body.rtl .article-card::before { right: 0; }
body.ltr .article-card::before { left: 0; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #a8ddf4; }
.article-card:hover::before { opacity: 1; }
.article-card.featured::before { opacity: 1; background: var(--accent); }
.article-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--font-size-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); background: var(--primary-light); padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.article-card.featured .article-tag { color: var(--accent); background: var(--accent-light); }
.article-card h3 { font-size: var(--font-size-md); font-weight: 700; margin-bottom: 8px; line-height: 1.4; color: var(--text); }
.article-card p  { font-size: var(--font-size-sm); color: var(--muted); line-height: 1.5; }
.article-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.read-time { font-size: 0.78rem; color: var(--muted); }
.arrow-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--primary); transition: all 0.18s; }
.article-card:hover .arrow-btn { background: var(--primary); color: white; }


/* ─────────────────────────────────────────────────────────────
   ARTICLE VIEW
   ───────────────────────────────────────────────────────────── */
.article-view { display: none; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.article-view.show { display: block; }
.article-nav { background: var(--primary); color: white; padding: 16px 24px; display: flex; align-items: center; gap: 12px; }
.back-btn { background: rgba(255,255,255,0.18); border: none; color: white; padding: 6px 14px; border-radius: 20px; cursor: pointer; font-family: var(--font); font-size: 0.85rem; transition: background 0.18s; }
.back-btn:hover { background: rgba(255,255,255,0.28); }
.article-content { padding: 36px; }
.article-content h2 { font-size: var(--font-size-xl); font-weight: 800; margin-bottom: 8px; }
.article-meta { color: var(--muted); font-size: var(--font-size-sm); margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid var(--border); }
.article-note { background: #fff8e6; border-radius: var(--radius-sm); padding: 14px 18px; margin: 12px 0; font-size: 0.9rem; color: var(--text); }
body.rtl .article-note { border-right: 4px solid var(--accent); }
body.ltr .article-note { border-left:  4px solid var(--accent); }
.platform-tabs { display: flex; gap: 8px; margin: 16px 0 8px; }
.platform-tab { padding: 8px 20px; border-radius: var(--radius-pill); border: 2px solid var(--primary); background: white; color: var(--primary); font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.platform-tab.active { background: var(--primary); color: white; }
.platform-tab:hover:not(.active):not(:disabled) { background: var(--primary-light); }
.platform-tab:disabled { opacity: 0.35; cursor: not-allowed; border-color: #ccc; color: #999; }
.img-placeholder { background: linear-gradient(135deg, var(--primary-light), var(--primary-mid)); border-radius: 10px; height: 180px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.9rem; margin: 16px 0; border: 2px dashed #a8ddf4; }
.article-img { width: 100%; border-radius: 10px; margin: 16px 0; border: 1px solid var(--border); }


/* ─────────────────────────────────────────────────────────────
   CHAT
   ───────────────────────────────────────────────────────────── */
.chat-fab {
  position: fixed; bottom: 28px; left: 28px; width: 62px; height: 62px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 28px rgba(40,170,225,0.45);
  z-index: 1000; transition: transform 0.22s, box-shadow 0.22s; border: none; color: white; font-size: 1.5rem;
}
.chat-fab:hover { transform: scale(1.09); box-shadow: 0 8px 36px rgba(40,170,225,0.55); }
.chat-pulse { position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: var(--accent); border-radius: 50%; border: 2px solid white; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.3);opacity:0.7} }

.chat-window {
  position: fixed; bottom: 104px; left: 28px; width: 380px; height: 540px;
  background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 999; display: none; flex-direction: column; overflow: hidden;
  animation: slideUp 0.28s ease; border: 1.5px solid var(--border);
}
.chat-window.open { display: flex; }
@keyframes slideUp { from{opacity:0;transform:translateY(20px) scale(0.97)} to{opacity:1;transform:translateY(0) scale(1)} }
.chat-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 18px 20px; display: flex; align-items: center; gap: 12px; }
.agent-avatar { width: 42px; height: 42px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.agent-info h4 { font-size: var(--font-size-md); font-weight: 700; }
.agent-info p  { font-size: 0.78rem; color: rgba(255,255,255,0.75); }
.online-dot { width: 9px; height: 9px; background: var(--success); border-radius: 50%; display: inline-block; margin-left: 5px; }
.chat-close { background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; font-size: 1.2rem; padding: 4px; transition: color 0.18s; }
body.rtl .chat-close { margin-right: auto; }
body.ltr .chat-close { margin-left: auto; }
.chat-close:hover { color: white; }
.chat-messages { flex:1; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:14px; background: var(--bg); }
.msg { max-width: 88%; animation: msgIn 0.22s ease; }
@keyframes msgIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.msg.bot  { align-self: flex-start; }
.msg.user { align-self: flex-end; }
.msg-bubble { padding: 12px 16px; border-radius: 16px; font-size: 0.88rem; line-height: 1.6; }
.msg.bot  .msg-bubble { background: white; border: 1.5px solid var(--border); color: var(--text); box-shadow: 0 2px 8px rgba(40,170,225,0.08); }
body.rtl .msg.bot  .msg-bubble { border-bottom-right-radius: 4px; }
body.ltr .msg.bot  .msg-bubble { border-bottom-left-radius: 4px; }
.msg.user .msg-bubble { background: var(--primary); color: white; }
body.rtl .msg.user .msg-bubble { border-bottom-left-radius: 4px; }
body.ltr .msg.user .msg-bubble { border-bottom-right-radius: 4px; }
.msg-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; background: var(--primary-light); color: var(--primary); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.18s; }
.msg-link:hover { background: var(--primary-mid); }
.typing-indicator { display: none; align-self: flex-start; }
.typing-indicator.show { display: flex; }
.typing-bubble { background: white; border: 1.5px solid var(--border); border-radius: 16px; padding: 12px 18px; display: flex; gap: 5px; align-items: center; }
body.rtl .typing-bubble { border-bottom-right-radius: 4px; }
body.ltr .typing-bubble { border-bottom-left-radius: 4px; }
.typing-dot { width: 7px; height: 7px; background: var(--muted); border-radius: 50%; animation: typingBounce 1.2s infinite; }
.typing-dot:nth-child(2){animation-delay:0.2s} .typing-dot:nth-child(3){animation-delay:0.4s}
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }
.quick-questions { padding: 10px 18px; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--border); background: white; }
.quick-q { font-size: 0.78rem; background: var(--primary-light); color: var(--primary); border: none; border-radius: 20px; padding: 5px 12px; cursor: pointer; font-family: var(--font); font-weight: 600; transition: background 0.18s; }
.quick-q:hover { background: var(--primary-mid); }
.chat-input-area { padding: 14px 16px; border-top: 1.5px solid var(--border); display: flex; gap: 10px; background: white; }
.chat-input { flex:1; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 24px; font-family: var(--font); font-size: 0.9rem; outline: none; transition: border-color 0.18s; }
body.rtl .chat-input { direction: rtl; }
body.ltr .chat-input { direction: ltr; }
.chat-input:focus { border-color: var(--primary); }
.send-btn { width: 42px; height: 42px; background: var(--primary); border: none; border-radius: 50%; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: background 0.18s, transform 0.12s; }
.send-btn:hover { background: var(--primary-dark); transform: scale(1.06); }


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row; flex-wrap: nowrap; overflow-x: auto;
    gap: 8px; padding: 8px 16px 12px; margin: 0 -24px;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-title { display: none; }
  .cat-btn { flex-shrink: 0; white-space: nowrap; padding: 8px 14px; font-size: 0.85rem; }
  .cat-btn .cat-icon { display: none; }
  .hero { padding: 36px 16px 60px; }
  .hero h1 { font-size: 1.7rem; }
  .stats-row { gap: 20px; }
}

/* Header link to main site */
.header-main-link {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-weight: 400;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 10px;
  border-radius: 20px;
  transition: all 0.18s;
  white-space: nowrap;
}
.header-main-link:hover {
  color: white;
  border-color: rgba(255,255,255,0.5);
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE IMPROVEMENTS
   ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {

  /* Header */
  header { padding: 0 12px; height: 56px; }
  .logo { font-size: 1.15rem; }
  .logo img { height: 28px !important; width: 28px !important; }
  .header-main-link { display: none; }

  /* Hero */
  .hero { padding: 28px 16px 50px; }
  .hero h1 { font-size: 1.45rem; }
  .hero p  { font-size: 0.9rem; margin-bottom: 20px; }
  .search-wrap input { padding: 13px 46px 13px 16px; font-size: 0.95rem; }
  .stats-row { gap: 28px; margin-top: 24px; }
  .stat-num { font-size: 1.4rem; }
  .stat-label { font-size: 0.72rem; }

  /* Main layout */
  .main-layout { padding: 0 12px 40px; margin-top: -20px; }

  /* Sidebar horizontal scroll */
  .sidebar {
    padding: 8px 0 10px;
    margin: 0;
    gap: 6px;
  }
  .cat-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    box-shadow: none;
  }
  .cat-badge { font-size: 0.7rem; padding: 1px 6px; }

  /* Article cards */
  .articles-grid { grid-template-columns: 1fr; gap: 12px; }
  .article-card { padding: 16px; }
  .article-card h3 { font-size: 0.95rem; }
  .article-card p  { font-size: 0.8rem; }
  .article-tag { font-size: 0.65rem; padding: 2px 8px; }
  .read-time { font-size: 0.72rem; }

  /* Section header */
  .section-header { padding: 14px 16px; margin-bottom: 14px; }
  .section-icon { width: 40px; height: 40px; font-size: 1.5rem; }
  .section-header h2 { font-size: 1.05rem; }
  .section-header p  { font-size: 0.78rem; }

  /* Article view */
  .article-content { padding: 20px 16px; }
  .article-content h2 { font-size: 1.2rem; }
  .article-nav { padding: 12px 16px; }
  .step-img img { height: auto !important; }
}

/* ─────────────────────────────────────────────────────────────
   ARTICLE VIEW — MOBILE STEP IMAGES
   ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* Article view full width */
  .article-view.show { border-radius: 0; }
  .article-content { padding: 20px 14px; }
  .article-content h2 { font-size: 1.2rem; }
  .article-nav { padding: 12px 14px; gap: 8px; }
  .back-btn { padding: 5px 10px; font-size: 0.78rem; }

  /* Platform tabs */
  .platform-tab { padding: 7px 14px; font-size: 0.82rem; }

  /* Step images — full width on mobile */
  .step-img { margin-top: 12px; }
  .step-img > div { width: 100% !important; max-width: 100% !important; }
  .step-img img { width: 100% !important; height: auto !important; border-radius: 8px; }

  /* Step tip */
  .step-tip { font-size: 0.8rem; }

  /* Sidebar scroll on article page */
  .platform-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

  /* Footer on article pages */
  .article-footer { flex-direction: column; gap: 8px; text-align: center; }
}
