/* ============================================
   MR CALL OF - css/style.css
   استایل عمومی + صفحه اصلی
============================================ */

@font-face {
  font-family: 'Vazir';
  src: local('Vazir');
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Vazir', Tahoma, sans-serif;
  background: #ffffff;
  color: #1c1d22;
  direction: rtl;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- Top Bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid #eceef1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff3b30;
  border: 2px solid #ffffff;
  display: none;
}
.badge-dot.show { display: block; }

.topbar .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eceef1;
  font-size: 19px;
  position: relative;
  overflow: hidden;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffb800, #ff7a00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: #ffffff;
}

.topbar .brand-title {
  font-size: 15px;
  font-weight: 800;
  color: #15161a;
}

/* ---------- Ads Slider ---------- */
.ads-wrap {
  padding: 14px 16px 4px;
}

.ads-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ads-slider::-webkit-scrollbar { display: none; }

.ad-card {
  scroll-snap-align: start;
  min-width: 88%;
  height: 140px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f1f4, #f7f7f9);
  border: 1px solid #eceef1;
}

.ad-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ads-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 4px;
}
.ads-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e2e3e8;
  transition: all .2s ease;
}
.ads-dots span.active {
  background: #ffb800;
  width: 16px;
  border-radius: 4px;
}

/* ---------- Section Title ---------- */
.section-title {
  font-size: 14px;
  font-weight: 800;
  color: #15161a;
  padding: 18px 16px 10px;
}

/* ---------- Grid Menu ---------- */
.grid-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 16px 20px;
}

.grid-item {
  background: #fbfbfc;
  border: 1px solid #eceef1;
  border-radius: 16px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.grid-item .gi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #eceef1;
}

.grid-item .gi-label {
  font-size: 11px;
  color: #4b4c55;
  font-weight: 600;
  text-align: center;
}

/* رنگ‌بندی متفاوت آیکون هر آیتم */
.gi-icon.c1 { background: rgba(255,184,0,.14); color: #ffb800; }
.gi-icon.c2 { background: rgba(72,199,142,.14); color: #48c78e; }
.gi-icon.c3 { background: rgba(94,151,255,.14); color: #5e97ff; }
.gi-icon.c4 { background: rgba(255,107,107,.14); color: #ff6b6b; }
.gi-icon.c5 { background: rgba(180,120,255,.14); color: #b478ff; }
.gi-icon.c6 { background: rgba(255,159,67,.14); color: #ff9f43; }
.gi-icon.c7 { background: rgba(72,219,251,.14); color: #48dbfb; }
.gi-icon.c8 { background: rgba(255,180,220,.14); color: #ffb4dc; }

/* ---------- Ripple Click Animation ---------- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-anim .5s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(3.2); opacity: 0; }
}

.tap-scale { transition: transform .1s ease; }
.tap-scale:active { transform: scale(0.94); }

/* ---------- Bottom safe space ---------- */
.bottom-space { height: 24px; }

/* ============================================
   چیدمان جدید صفحه اصلی: کارت دوستونه + بنر تمام‌عرض
============================================ */

.home-layout {
  padding: 4px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- کارت متوسط (دوستونه) ---------- */
.home-tile {
  position: relative;
  height: 130px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(155deg, #f1f1f4, #fbfbfc 65%);
  border: 1px solid #eceef1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}

.home-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,184,0,0.12), transparent 60%);
}

.home-tile .ht-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,184,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  z-index: 2;
}

.home-tile .ht-title {
  position: relative;
  z-index: 2;
  font-size: 13.5px;
  font-weight: 900;
  color: #15161a;
  margin-bottom: 3px;
}

.home-tile .ht-sub {
  position: relative;
  z-index: 2;
  font-size: 10px;
  color: #71727c;
  line-height: 1.6;
}

/* ---------- بنر تمام‌عرض ---------- */
.home-banner {
  position: relative;
  height: 100px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(120deg, #fff8e6, #fbfbfc 60%);
  border: 1.5px solid rgba(255,184,0,.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.home-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 30%, rgba(255,184,0,0.15), transparent 55%);
}

.home-banner .hb-icon {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffb800, #ff7a00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.home-banner .hb-text {
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;
}

.home-banner .hb-title {
  font-size: 16px;
  font-weight: 900;
  color: #15161a;
  margin-bottom: 3px;
}

.home-banner .hb-sub {
  font-size: 10.5px;
  color: #5c5d66;
}

.home-banner .hb-arrow {
  position: relative;
  z-index: 2;
  font-size: 18px;
  color: #ffb800;
  flex-shrink: 0;
}


/* ============================================
   بنرهای رنگی دسته‌بندی
   ============================================ */
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 14px 6px; }
.mega-banner { position: relative; border-radius: 16px; padding: 16px 14px; min-height: 108px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 6px 18px rgba(0,0,0,.12); border: 1px solid rgba(0,0,0,.04); }
.mega-banner.full { grid-column: 1 / -1; min-height: 92px; flex-direction: row; align-items: center; justify-content: space-between; }
.mega-banner .mb-icon { position: absolute; left: 8px; top: 8px; font-size: 46px; opacity: .22; line-height: 1; }
.mega-banner.full .mb-icon { position: static; font-size: 40px; opacity: .9; }
.mega-banner .mb-title { font-size: 14.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.mega-banner .mb-sub { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.9); margin-top: 4px; }
.mega-banner .mb-cta { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.22); color: #fff; padding: 5px 12px; border-radius: 20px; width: fit-content; }
.mb-gold   { background: linear-gradient(135deg, #ffb800, #ff7a00); }
.mb-blue   { background: linear-gradient(135deg, #2ea6ff, #1b5fc9); }
.mb-purple { background: linear-gradient(135deg, #8a5cff, #4b2fbd); }
.mb-green  { background: linear-gradient(135deg, #2ea86e, #0f6b45); }
.mb-red    { background: linear-gradient(135deg, #ff6b6b, #c62828); }
.mb-dark   { background: linear-gradient(135deg, #2a2c34, #12131a); }
.bottom-nav-site { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-around; align-items: center; background: #ffffff; border-top: 1px solid #eceef1; padding: 9px 4px calc(9px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; flex: 1; }
.bn-item .bn-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.bn-item .bn-label { font-size: 10px; font-weight: 700; color: #4b4c55; }
.bn-icon.c1 { background: rgba(255,184,0,.15); }
.bn-icon.c2 { background: rgba(46,166,255,.15); }
.bn-icon.c3 { background: rgba(46,168,110,.15); }
.bn-icon.c4 { background: rgba(255,107,107,.15); }
.floating-contact { position: fixed; bottom: 78px; left: 16px; z-index: 29; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #2ea86e, #1c7a4d); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 6px 16px rgba(46,168,110,.4); cursor: pointer; }
