/* SSC CGL Landing – Brand theme with professional gradient system */

:root {
  /* Brand palette */
  --brand-50: #eff6fc;
  --brand-100: #e0eff9;
  --brand-200: #b8daf0;
  --brand-300: #8bc4e6;
  --brand-400: #6aafdc;
  --brand-500: #5fa0d9;   /* Light accent */
  --brand-600: #3d85c6;   /* Primary */
  --brand-700: #2c6aa0;   /* Secondary (darker) */
  --brand-800: #245a8a;
  --brand-900: #1a4570;
  /* Legacy aliases (map to brand for compatibility) */
  --purple-50: var(--brand-50);
  --purple-100: var(--brand-100);
  --purple-200: var(--brand-200);
  --purple-300: var(--brand-300);
  --purple-400: var(--brand-400);
  --purple-500: var(--brand-500);
  --purple-600: var(--brand-600);
  --purple-700: var(--brand-700);
  --purple-800: var(--brand-800);
  --purple-900: var(--brand-900);
  --blue-500: var(--brand-500);
  --blue-600: var(--brand-600);
  /* Professional gradient system */
  --gradient-brand: linear-gradient(135deg, #3d85c6 0%, #2c6aa0 100%);
  --gradient-brand-soft: linear-gradient(160deg, #eff6fc 0%, #e0eff9 40%, #d4e9f6 70%, #e0eff9 100%);
  --gradient-brand-button: linear-gradient(135deg, #3d85c6 0%, #2c6aa0 100%);
  --gradient-brand-button-hover: linear-gradient(135deg, #2c6aa0 0%, #245a8a 100%);
  --gradient-brand-mesh: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 133, 198, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(95, 160, 217, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(44, 106, 160, 0.08), transparent);
  /* Green (success / positive actions) */
  --green-500: #22c55e;
  --green-600: #16a34a;
  /* UI */
  --card-bg: #ffffff;
  --text: #1e1b2e;
  --text-muted: #5a5568;
  --border: #dbeafe;
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #ffffff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Landing header (All Exams link) */
.landing-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.landing-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-700);
}

.landing-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(61, 133, 198, 0.4);
}

.landing-logo-text {
  font-size: 1rem;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.landing-home {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
}

.landing-home:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ----- Base (mobile) ----- */
.landing-section {
  padding: 1.5rem 1rem 2.5rem;
  min-height: 100vh;
}

.landing-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Back to All Exams – modern pill button */
.back-to-exams-wrap {
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (max-width: 768px) {
  .back-to-exams-wrap {
    display: none !important;
  }
}

/* Dynamic exam heading block */
.exam-heading-block {
  margin-bottom: 1.75rem;
  text-align: center;
}

.exam-main-heading {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand-700);
}

.exam-main-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.exam-heading-ad {
  margin-top: 1.25rem;
}

@media (max-width: 600px) {
  .exam-main-heading {
    font-size: 1.45rem;
  }

  .exam-main-subtitle {
    font-size: 0.9rem;
  }
}

/* Inline back pills in header (exam landing pages) */
.back-pills-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: stretch;
}

.back-pills-row .back-home-pill,
.back-pills-row .back-to-exams {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  line-height: 1.25;
  min-height: 2.25rem;
  box-sizing: border-box;
}

body.exam-landing-page .landing-section .back-to-exams-wrap {
  display: none;
}

@media (max-width: 768px) {
  .back-pills-row .back-home-pill,
  .back-pills-row .back-to-exams {
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    min-height: 2rem;
  }
}

.back-to-exams {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(61, 133, 198, 0.08);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.back-to-exams:hover {
  color: var(--brand-600);
  background: var(--brand-50);
  border-color: var(--brand-200);
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.15);
  transform: translateY(-1px);
}

.back-to-exams:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.back-to-exams-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
}

.back-to-exams:hover .back-to-exams-icon {
  color: var(--brand-700);
}

/* Feature grid – 1 column on mobile */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(61, 133, 198, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.feature-card:hover {
  box-shadow: 0 12px 28px rgba(61, 133, 198, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 133, 198, 0.35);
}

.feature-icon svg {
  flex-shrink: 0;
}

.feature-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* Info box – card style on gradient */
.info-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  color: var(--text);
  box-shadow: 0 4px 20px rgba(61, 133, 198, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
}

.info-box-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-700);
}

.exam-links-box .info-box-title {
  margin-bottom: 0.35rem;
}

.related-resources-subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.info-box-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Related Practice Resources – card grid */
.exam-links-box .related-resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-resource-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 20px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid #e6eef7;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 0;
}

.related-resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #3d85c6;
  color: #3d85c6;
}

.related-resource-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: var(--brand-600, #2563eb);
  opacity: 0.9;
}

.related-resource-card:hover .related-resource-icon {
  color: #3d85c6;
}

.related-resource-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.related-resource-arrow {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.related-resource-card:hover .related-resource-arrow {
  color: #3d85c6;
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .exam-links-box .related-resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .exam-links-box .related-resources-grid {
    grid-template-columns: 1fr;
  }

  .related-resource-card {
    padding: 18px 20px;
  }
}

.info-para {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Mode cards – 1 column on mobile */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  align-items: stretch; /* ensure equal height cards per row */
}

.mode-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(61, 133, 198, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  position: relative;
  transition: box-shadow 0.25s ease, border-color 0.2s ease;
  height: 100%; /* stretch to full grid cell height */
}

.mode-card:hover {
  box-shadow: 0 8px 24px rgba(61, 133, 198, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: var(--brand-200);
}

/* Most Popular – highlighted card + badge */
.mode-card-popular {
  border-color: var(--brand-300);
  box-shadow: 0 8px 28px rgba(61, 133, 198, 0.15), 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Most Popular badge – centered above card, premium feel */
.mode-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mode-icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
  line-height: 1;
  text-align: center;
}

/* Typography hierarchy: title > meta > features */
.mode-card-title {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mode-meta {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.01em;
}

.mode-features {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  /* Ensure equal vertical space above CTA so buttons align */
  min-height: 6.5rem;
}

.mode-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  padding: 0;
  line-height: 1.4;
}

/* Align check icon with first line when text wraps (e.g. Full Mock Test) */
.mode-features li .check-icon {
  margin-top: 0.15em;
  flex-shrink: 0;
}

/* CTA anchored to bottom with clear separation */
.mode-card .btn {
  margin-top: auto !important; /* force CTA to bottom of card */
  padding-top: 1.25rem;
  padding-bottom: 0.95rem;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(61, 133, 198, 0.2);
}

/* Feature check icons – clearer but subtle */
.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  background: rgba(61, 133, 198, 0.14);
  color: var(--brand-600);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

/* CTA buttons – brand gradient (primary actions use .btn-purple) */
.btn,
.mode-cta {
  display: block;
  text-align: center;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.btn:hover,
.mode-cta:hover {
  transform: translateY(-1px);
  color: #fff;
}

.btn-green {
  background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.btn-green:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-blue {
  background: var(--gradient-brand-button);
  color: #fff;
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.35);
}

.btn-blue:hover {
  background: var(--gradient-brand-button-hover);
  box-shadow: 0 6px 20px rgba(61, 133, 198, 0.4);
}

.btn-purple {
  background: var(--gradient-brand-button);
  color: #fff;
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.35);
}

.btn-purple:hover {
  background: var(--gradient-brand-button-hover);
  box-shadow: 0 6px 20px rgba(61, 133, 198, 0.4);
}


/* Exam pattern table – clean design */
.pattern-section {
  margin-bottom: 0;
}

.pattern-title {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.pattern-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: 0 4px 16px rgba(61, 133, 198, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.exam-pattern {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.exam-pattern thead th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.exam-pattern thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.exam-pattern thead th:not(:first-child) {
  text-align: center;
}

.exam-pattern tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.exam-pattern tbody td:not(:first-child) {
  text-align: center;
}

.exam-pattern tbody tr:hover td {
  background: var(--brand-50);
}

.exam-pattern tbody tr:last-child td {
  border-bottom: none;
}

.exam-pattern tr.total td {
  background: var(--brand-50);
  font-weight: 600;
  color: var(--brand-700);
  border-top: 2px solid var(--brand-200);
}

/* ----- Tablet and up ----- */
@media (min-width: 600px) {
  .landing-section {
    padding: 2rem 1.25rem 3rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .info-box {
    padding: 1.75rem 1.5rem;
    margin-bottom: 2rem;
  }

  .info-box-title {
    font-size: 1.25rem;
  }

  .info-para {
    font-size: 0.95rem;
  }

  .mode-cards {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .mode-card {
    padding: 1.75rem;
  }

  .mode-card-title {
    font-size: 1.75rem;
  }

  .pattern-title {
    font-size: 1.2rem;
  }

  .exam-pattern thead th,
  .exam-pattern tbody td {
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
  }
}

/* ----- Desktop ----- */
@media (min-width: 900px) {
  .landing-section {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .mode-cards {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 2.5rem;
  }

  .pattern-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  .exam-pattern {
    font-size: 0.95rem;
  }

  .exam-pattern thead th,
  .exam-pattern tbody td {
    padding: 1rem 1.25rem;
  }
}

