/*
 * Exam landing /exam/index.html — professional light design.
 * Full-bleed (no site navbar). Mobile-first; «بازگشت به سایت» first on small screens.
 */
html, body,
body.exam-index-page {
  margin: 0;
  padding: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 100%;
  background: #f4f6fb;
  font-family: var(--pe-font-ui), sans-serif;
  color: #0f172a;
}
body.exam-index-page .navbar,
body.exam-index-page .site-footer,
body.exam-index-page .bottom-tab-bar,
body.exam-index-page .site-sidebar {
  display: none !important;
}

.exam-landing { position: relative; z-index: 1; }
.exam-index-landing {
  padding: 1rem 0 2.5rem;
  min-height: 100dvh;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.12), transparent 55%),
    #f4f6fb;
}

.exam-landing.exam-index-landing .exam-landing-hero {
  padding: 1rem 1.25rem 1.25rem;
  margin: 0 auto;
  max-width: 720px;
  text-align: center;
}

/* Brand */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.brand-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.brand-logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand-logo-sub {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  display: block;
}

.exam-index-hero-title {
  color: #0f172a;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.exam-index-hero-sub {
  color: #475569;
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

.exam-index-cards-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.cards-glow {
  display: none; /* light theme: no dark glow */
}

/* Card grid */
.exam-circle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  justify-items: stretch;
  padding: 0.75rem 0 1rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .exam-circle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .exam-circle-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

.exam-circle-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  text-decoration: none;
  color: #0f172a;
  width: 100%;
  max-width: none;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  outline: none;
  min-height: 148px;
  box-sizing: border-box;
}
.exam-circle-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
  border-color: #c7d2fe;
}
.exam-circle-item:focus-visible {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
  border-color: #818cf8;
}

/* Hide decorative ring in light card layout */
.exam-circle-ring { display: none; }

.exam-circle-btn {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: none;
  background: #eef2ff;
  box-shadow: none;
  flex-shrink: 0;
}
.exam-circle-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: none;
}
.exam-circle-btn .er-svg-icon {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-center { background: #dbeafe; color: #1d4ed8; }
.icon-coupon { background: #fef3c7; color: #b45309; }
.icon-home { background: #dcfce7; color: #15803d; }
.icon-back { background: #f1f5f9; color: #334155; }
.icon-demo-coding { background: #ecfeff; color: #0e7490; }
.icon-demo-ielts { background: #fce7f3; color: #be185d; }
.icon-demo-mcq { background: #ede9fe; color: #6d28d9; }

.exam-circle-title {
  margin-top: 0.85rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.35;
}
.exam-circle-desc {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #64748b;
  max-width: none;
}

/* Mobile: Back to site first — always reachable without sidebar */
@media (max-width: 639px) {
  .exam-circle-grid.exam-main-grid .card-back { order: -1; }
  .exam-circle-grid.exam-main-grid .card-center { order: 1; }
  .exam-circle-grid.exam-main-grid .card-coupon { order: 2; }
  .exam-circle-grid.exam-main-grid .card-home { order: 3; }
  .exam-circle-item {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
  }
  .exam-circle-title { margin-top: 0; }
  .exam-circle-desc {
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .exam-circle-item > .exam-circle-btn { margin: 0; }
  .exam-circle-item > div.exam-circle-copy {
    flex: 1;
    min-width: 0;
  }
}

/* Desktop keeps natural DOM order (center, coupon, home, back) */

/* Demo section */
.exam-demo-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}
.exam-demo-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.35rem;
  text-align: center;
}
.exam-demo-section-sub {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin: 0 0 1rem;
  line-height: 1.6;
}
.exam-demo-grid {
  padding-bottom: 0.5rem;
}
@media (min-width: 1024px) {
  .exam-demo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Entrance animation helpers (JS may set inline opacity) */
.exam-circle-item.fade-in-up {
  animation: examIndexFadeUp 0.45s ease both;
}
@keyframes examIndexFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .exam-circle-item.fade-in-up { animation: none; }
  .exam-circle-item:hover { transform: none; }
}
