/* landing-conversion-sections.css
 * High-converting, responsive landing page enhancements for AutoGrading AI
 * Complies with SOLID, mobile-first responsive guidelines (< 300 LOC)
 */

.landing-section-wrapper {
  max-width: 1240px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.landing-persona-nav-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.btn-landing-persona {
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--card-bg, #ffffff);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="dark"] .btn-landing-persona {
  border-color: rgba(255, 255, 255, 0.14);
  background: #1e293b;
  color: #94a3b8;
}

.btn-landing-persona.active {
  background: #00c5df;
  color: #082850;
  border-color: #00c5df;
  box-shadow: 0 2px 10px rgba(0, 197, 223, 0.35);
}

.btn-showcase-sample {
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--card-bg, #ffffff);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="dark"] .btn-showcase-sample {
  border-color: rgba(255, 255, 255, 0.14);
  background: #1e293b;
  color: #94a3b8;
}

.btn-showcase-sample.active {
  background: #00c5df;
  color: #082850;
  border-color: #00c5df;
  box-shadow: 0 2px 8px rgba(0, 197, 223, 0.25);
}

.landing-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 860px) {
  .landing-showcase-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

.red-pen-critique-box {
  border: 2px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
  border-radius: 12px;
  padding: 0.85rem;
  font-family: inherit;
}

.green-check-critique-box {
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 12px;
  padding: 0.85rem;
  font-family: inherit;
}

/* ROI Workload Calculator Responsive Layout */
.roi-card-wrapper {
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

[data-theme="dark"] .roi-card-wrapper {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.roi-grid-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

@media (max-width: 860px) {
  .roi-grid-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

.roi-stats-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .roi-stats-subgrid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.roi-slider-track {
  width: 100%;
  accent-color: #00c5df;
  cursor: pointer;
}

/* Embedded 3-Tier Pricing Cards Grid & Tabs */
.pricing-persona-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-pricing-persona {
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid rgba(0, 197, 223, 0.3);
  background: transparent;
  color: var(--text-secondary, #334155);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pricing-persona.active {
  background: #00c5df;
  color: #082850;
  border-color: #00c5df;
  box-shadow: 0 2px 10px rgba(0, 197, 223, 0.3);
}

[data-theme="dark"] .btn-pricing-persona {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .btn-pricing-persona.active {
  background: #00c5df;
  color: #082850;
  border-color: #00c5df;
}

.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 960px) {
  .landing-pricing-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

.landing-pricing-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .landing-pricing-card {
  background: var(--card-bg, #09234e);
  border-color: var(--border-color, rgba(0, 197, 223, 0.16));
}

.landing-pricing-card.hero-tier {
  border: 2px solid #00c5df;
  box-shadow: 0 8px 30px rgba(0, 197, 223, 0.15);
}

.btn-pricing-primary {
  width: 100%; display: inline-flex; align-items: center; justify-content: center;
  padding: 0.68rem 1rem; background: var(--primary, #00c5df); color: var(--brand-navy, #082850);
  font-weight: 800; font-size: 0.88rem; border-radius: 12px; margin-top: 1.5rem;
  border: 1px solid rgba(0, 197, 223, 0.5); box-shadow: 0 4px 14px rgba(0, 197, 223, 0.35);
  cursor: pointer; transition: all 0.2s ease;
}
.btn-pricing-primary:hover {
  background: var(--primary-hover, #00b4d8); color: var(--brand-navy-dark, #041839);
  box-shadow: 0 6px 18px rgba(0, 197, 223, 0.45); transform: translateY(-1px);
}
[data-theme="dark"] .btn-pricing-primary {
  background: var(--primary, #00c5df); color: #041839; border-color: rgba(34, 211, 238, 0.6);
}

.btn-pricing-outline {
  width: 100%; display: inline-flex; align-items: center; justify-content: center;
  padding: 0.68rem 1rem; background: var(--btn-secondary-bg, rgba(0, 197, 223, 0.1));
  color: var(--btn-secondary-fg, #0284c7); border: 1px solid var(--btn-secondary-border, rgba(0, 197, 223, 0.35));
  font-weight: 700; font-size: 0.88rem; border-radius: 12px; margin-top: 1.5rem;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-pricing-outline:hover {
  background: rgba(0, 197, 223, 0.18); border-color: #00c5df; transform: translateY(-1px);
}
[data-theme="dark"] .btn-pricing-outline {
  background: rgba(0, 197, 223, 0.16); color: #22d3ee; border-color: rgba(0, 197, 223, 0.4);
}

.pricing-feature-list {
  list-style: none; padding: 0; margin: 0; font-size: 0.82rem; line-height: 1.7;
  color: var(--text-secondary, #334155);
}
[data-theme="dark"] .pricing-feature-list { color: #cbd5e1; }

/* Modal Responsive Grid for Nudges */
.nudge-tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 520px) {
  .nudge-tiers-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Grade Calculator TT22 inline card */
.calc-tt22-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.calc-tt22-input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--canvas-bg, #f8fafc);
  font-size: 0.85rem;
  font-weight: 600;
  box-sizing: border-box;
}

[data-theme="dark"] .calc-tt22-input {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

/* Dynamic Badge Colors for Circular 22 Performance Levels */
.badge-tt22-tot { background: rgba(16, 185, 129, 0.12) !important; color: #059669 !important; border-color: rgba(16, 185, 129, 0.3) !important; }
.badge-tt22-kha { background: rgba(2, 132, 199, 0.12) !important; color: #0284c7 !important; border-color: rgba(2, 132, 199, 0.3) !important; }
.badge-tt22-dat { background: rgba(245, 158, 11, 0.12) !important; color: #d97706 !important; border-color: rgba(245, 158, 11, 0.3) !important; }
.badge-tt22-chuadat { background: rgba(239, 68, 68, 0.12) !important; color: #dc2626 !important; border-color: rgba(239, 68, 68, 0.3) !important; }

/* Dark Mode Text High Contrast Safeguards */
[data-theme="dark"] .pricing-price-val,
[data-theme="dark"] #roi-pages-month,
[data-theme="dark"] #roi-classes-val,
[data-theme="dark"] #roi-exams-val,
[data-theme="dark"] #tt22-result-avg,
[data-theme="dark"] #modal-free-signup-title,
[data-theme="dark"] #modal-quota-nudge-title { color: #f8fafc !important; }
[data-theme="dark"] #roi-plan-rec { color: #38bdf8 !important; }
[data-theme="dark"] .calc-card-stat-box { background: #0f172a !important; border-color: rgba(255, 255, 255, 0.08) !important; }

/* FAQ Accordion Styling */
.landing-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 860px;
  margin: 1.5rem auto 0;
}

.landing-faq-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: var(--card-bg, #ffffff);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

[data-theme="dark"] .landing-faq-item {
  border-color: rgba(255, 255, 255, 0.1);
  background: #1e293b;
}

.landing-faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main, #082850);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

[data-theme="dark"] .landing-faq-question {
  color: #f8fafc;
}

.landing-faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary, #475569);
}

[data-theme="dark"] .landing-faq-answer {
  color: #94a3b8;
}

.landing-faq-item.open .landing-faq-answer {
  display: block;
}

.landing-faq-item.open .landing-faq-icon {
  transform: rotate(180deg);
}

/* Header CTA, Hero Secondary CTA, Workspace Action Grid, Modal Overlay & Dark Mode Polish */
.landing-hero-cta-row {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-landing-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid rgba(0, 197, 223, 0.4);
  background: rgba(0, 197, 223, 0.08);
  color: #0e7490;
  transition: all 0.2s ease;
}

.btn-landing-hero-secondary:hover {
  background: rgba(0, 197, 223, 0.16);
  border-color: #00c5df;
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-landing-hero-secondary {
  background: rgba(0, 197, 223, 0.12);
  border-color: rgba(0, 197, 223, 0.45);
  color: #38bdf8;
}

/* Balanced Symmetrical Workspace Action Grid (1 Primary CTA + 3 Uniform Shortcuts + Quick Links) */
.gauth-workspace-actions {
  display: block !important;
}

.workspace-persona-action-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
}

.workspace-primary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.workspace-primary-row > * {
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  margin: 0 !important;
}

@media (max-width: 920px) {
  .workspace-primary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .workspace-primary-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.workspace-quick-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

[data-theme="dark"] .workspace-quick-links-row {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.workspace-quick-links-label {
  font-weight: 700;
  color: var(--text-secondary, #475569);
}

.workspace-quick-link {
  appearance: none;
  background: none;
  border: none;
  padding: 0.15rem 0.25rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #0284c7;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.16s ease;
}

.workspace-quick-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

[data-theme="dark"] .workspace-quick-link {
  color: #38bdf8;
}

/* Bento Full-Width Featured 7th Pillar Card (Zero Orphan Grid Gap) */
.gauth-bento-card.gauth-bento-card-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(0, 197, 223, 0.06) 0%, rgba(79, 70, 229, 0.05) 100%);
  border-color: rgba(0, 197, 223, 0.32);
}

[data-theme="dark"] .gauth-bento-card.gauth-bento-card-featured {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.22) 0%, rgba(49, 46, 129, 0.22) 100%);
  border-color: rgba(56, 189, 248, 0.35);
}

.gauth-bento-featured-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

@media (min-width: 860px) {
  .gauth-bento-card.gauth-bento-card-featured {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .gauth-bento-card.gauth-bento-card-featured .gauth-bento-footer {
    margin-top: 0;
    flex-shrink: 0;
    gap: 1rem;
  }
}

/* Unified Showcase Switcher Tabs */
.landing-showcase-switcher-wrap {
  max-width: 720px;
  margin: 2rem auto -1.75rem;
  padding: 0.35rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  box-sizing: border-box;
}

[data-theme="dark"] .landing-showcase-switcher-wrap {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-showcase-pane-tab {
  flex: 1 1 50%;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary, #475569);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-showcase-pane-tab.active {
  background: #ffffff;
  color: #082850;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .btn-showcase-pane-tab {
  color: #94a3b8;
}

[data-theme="dark"] .btn-showcase-pane-tab.active {
  background: #1e293b;
  color: #38bdf8;
}

@media (max-width: 600px) {
  .landing-showcase-switcher-wrap {
    margin: 1.5rem 0.75rem -1rem;
    border-radius: 16px;
    flex-direction: column;
  }
}

/* B2B Institutional Tier Banner */
.pricing-b2b-school-banner {
  margin-top: 1.5rem;
  padding: 1.35rem 1.6rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #082850 0%, #0f172a 100%);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pricing-b2b-copy {
  flex: 1 1 460px;
  min-width: 0;
}

.pricing-b2b-badge {
  background: rgba(0, 197, 223, 0.18) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.pricing-b2b-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0.4rem 0 0.3rem;
}

.pricing-b2b-desc {
  font-size: 0.82rem;
  color: #cbd5e1 !important;
  margin: 0;
  line-height: 1.55;
}

.pricing-b2b-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-b2b-consult-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  background: #00c5df;
  color: #082850;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn-b2b-consult-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Fixed Viewport Overlay for Starter 0đ Signup, Login & Contextual Quota Nudge Modals */
#modal-free-signup, #modal-quota-nudge-batch, #modal-login {
  position: fixed !important; inset: 0 !important; z-index: 10020 !important;
  align-items: center !important; justify-content: center !important; padding: 1rem !important;
  overflow-y: auto !important; background: rgba(15, 23, 42, 0.62) !important;
  backdrop-filter: blur(8px) !important; box-sizing: border-box !important;
}

#modal-login { z-index: 10025 !important; }
#modal-login:not(.active) { display: none !important; }
#modal-login.active { display: flex !important; }

#modal-free-signup .bento-modal-shell,
#modal-quota-nudge-batch .bento-modal-shell,
#modal-login .bento-modal-shell {
  background: var(--card-bg, #ffffff); border-radius: 20px; padding: 1.5rem;
  max-height: calc(100vh - 2rem); overflow-y: auto; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.08); box-sizing: border-box;
}

[data-theme="dark"] #modal-free-signup .bento-modal-shell,
[data-theme="dark"] #modal-quota-nudge-batch .bento-modal-shell,
[data-theme="dark"] #modal-login .bento-modal-shell {
  background: var(--card-bg, #09234e) !important; color: #f8fafc !important;
  border-color: var(--border-color, rgba(0, 197, 223, 0.16)) !important;
}

[data-theme="dark"] #modal-login-title, [data-theme="dark"] #modal-login .login-modal-label { color: #f8fafc !important; }
[data-theme="dark"] #modal-login .login-modal-subtitle, [data-theme="dark"] #modal-login .login-modal-remember { color: #cbd5e1 !important; }
[data-theme="dark"] #modal-login #btn-toggle-login-pass, [data-theme="dark"] #modal-login #btn-login-modal-to-free-signup { color: #38bdf8 !important; }
[data-theme="dark"] #modal-login #login-error-message { background: rgba(239, 68, 68, 0.16) !important; border-color: rgba(248, 113, 113, 0.35) !important; color: #fca5a5 !important; }

#modal-free-signup .modal-header-compact, #modal-quota-nudge-batch .modal-header-compact {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem;
}

/* Dark Mode High-Contrast Typography, Surfaces & Select Chevron Anti-Tile Fix */
[data-theme="dark"] .landing-section-wrapper h2,
[data-theme="dark"] .landing-section-wrapper h3,
[data-theme="dark"] .gauth-login-title,
[data-theme="dark"] .landing-pricing-card h3,
[data-theme="dark"] #showcase-student-title { color: #f8fafc !important; }

[data-theme="dark"] .landing-section-wrapper p,
[data-theme="dark"] .gauth-login-desc,
[data-theme="dark"] .landing-pricing-card ul,
[data-theme="dark"] #tt22-forecast-text { color: #cbd5e1 !important; }

[data-theme="dark"] .roi-summary-panel { background: #071d42 !important; border: 1px solid rgba(0, 197, 223, 0.16); }
[data-theme="dark"] .roi-rec-box { background: #09234e !important; border-color: #00c5df !important; }

[data-theme="dark"] select,
[data-theme="dark"] select.calc-tt22-input {
  background-color: #0f172a !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.7rem center !important;
  background-size: 12px 12px !important;
  padding-right: 2rem !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Ultra-Small Mobile Breakpoints (320px - 480px) Zero Horizontal Overflow */
@media (max-width: 480px) {
  .landing-section-wrapper {
    padding: 0 0.75rem;
    margin: 2.25rem auto;
  }

  .roi-card-wrapper,
  .landing-pricing-card {
    padding: 1.1rem;
    border-radius: 16px;
  }

  .calc-tt22-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .pricing-persona-switcher {
    flex-wrap: wrap;
  }

  .btn-pricing-persona {
    font-size: 0.76rem;
    padding: 0.45rem 0.85rem;
  }
}

body:not(.unauthenticated) #btn-gate-open-free-signup {
  display: none !important;
}
