/* ==========================================================================
   Readixa Public Landing & Features CSS (3D Motion, Parallax, Glassmorphism)
   ========================================================================== */

/* Hero Section */
.hero-section {
  position: relative;
  padding: 60px 0 70px 0;
  overflow: hidden;
  text-align: right;
  background: transparent;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(13, 148, 136, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.1rem);
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  text-align: right;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.8;
  max-width: 720px;
  text-align: right;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 3D Visual Card Box */
.hero-visual-box {
  position: relative;
  perspective: 1000px;
  padding: 20px 10px;
}

.hero-3d-card {
  position: relative;
  z-index: 1;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 30px);
  box-shadow: var(--shadow-lg);
  transform: rotateY(-8deg) rotateX(6deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-3d-card:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.card-avatar-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.avatar-icon {
  font-size: 2.4rem;
  color: var(--primary);
  background: var(--primary-light);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.avatar-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.avatar-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Floating Badges — Displayed ON TOP of the Big 3D Card */
.floating-badge {
  position: absolute;
  z-index: 10;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  animation: float 4s ease-in-out infinite;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.badge-top-left {
  top: -10px;
  right: -10px;
  animation-delay: 0s;
}

.badge-bottom-right {
  bottom: -10px;
  left: -10px;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Methodology Section */
.section-header {
  text-align: right;
  max-width: 780px;
  margin: 0 0 45px 0;
}

.section-tag {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
  text-align: right;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 14px;
  text-align: right;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 32px) clamp(18px, 3vw, 24px);
  text-align: right;
  transition: all var(--transition-normal);
}

.feature-box:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
}

.feature-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: right;
}

.feature-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: right;
}

/* Workflow 4 Steps Timeline */
.workflow-section {
  padding: 70px 0;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  text-align: right;
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.timeline-number {
  position: absolute;
  top: -16px;
  right: 20px;
  background: var(--primary);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.timeline-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 8px;
  text-align: right;
}

.timeline-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: right;
}

/* Stats Simulation Section */
.stats-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  margin: 50px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-number {
  font-size: clamp(2.2rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Footer Section */
.footer-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 50px 0 30px 0;
  margin-top: auto;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: right;
  }
  .hero-subtitle {
    margin-left: 0;
    margin-right: 0;
  }
  .hero-cta-group {
    justify-content: flex-start;
  }
  .grid-3, .timeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 40px 0 60px 0;
  }
  .grid-3, .timeline-grid, .stats-banner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .badge-top-left {
    top: -15px;
    right: 0px;
  }
  .badge-bottom-right {
    bottom: -15px;
    left: 0px;
  }
}

/* ==========================================================================
   Milestone 3 Interactive Components Styles
   ========================================================================== */

/* 1. Floating Arabic Letters (Parallax Background Elements) */
.parallax-letter {
  position: absolute;
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-weight: 900;
  color: var(--primary);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: transform 0.1s ease-out;
}
.parallax-letter-lg { font-size: clamp(6rem, 12vw, 10rem); }
.parallax-letter-md { font-size: clamp(4rem, 8vw, 6rem); }
.parallax-letter-sm { font-size: clamp(2.5rem, 5vw, 4rem); }

/* 2. Interactive Sound Waves Animation */
.sound-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
}
.wave-bar {
  width: 3.5px;
  background: var(--primary);
  border-radius: 4px;
  height: 6px;
  transition: height 0.2s ease;
}
.sound-waves.active .wave-bar {
  animation: wavePulse 1.2s infinite ease-in-out alternate;
}
.sound-waves.active .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.sound-waves.active .wave-bar:nth-child(2) { animation-delay: 0.3s; }
.sound-waves.active .wave-bar:nth-child(3) { animation-delay: 0.5s; }
.sound-waves.active .wave-bar:nth-child(4) { animation-delay: 0.2s; }
.sound-waves.active .wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wavePulse {
  0% { height: 4px; }
  100% { height: 20px; }
}

/* 3. Interactive 15-Session Grid Preview */
.session-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .session-grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .session-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.session-node {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.session-node:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.2);
}
.session-node.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.session-node-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 4px;
}
.session-node.active .session-node-num {
  color: var(--primary);
}
.session-node-tag {
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 2px 6px;
  display: inline-block;
}

.cat-phonetic { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.cat-decoding { background: rgba(16, 185, 129, 0.15); color: #059669; }
.cat-speed { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.cat-comprehension { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }

/* 4. Dual Auth Comparison Component */
.dual-auth-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 30px;
}
@media (max-width: 768px) {
  .dual-auth-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.auth-comparison-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  transition: all 0.3s ease;
}
.auth-comparison-card.adult-auth {
  border-top: 4px solid var(--primary);
}
.auth-comparison-card.student-auth {
  border-top: 4px solid var(--accent);
}
.auth-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* 5. Role Hubs Tabbed Interface */
.role-hubs-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.role-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-tab-btn:hover {
  color: var(--primary);
}
.role-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.role-tab-pane {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.role-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 6. Glowing Inputs & Floating Labels */
.floating-label-wrapper {
  position: relative;
  margin-bottom: 20px;
}
.floating-input {
  width: 100%;
  padding: 16px 16px 8px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.25s ease;
}
.floating-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.floating-label {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.2s ease;
}
.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label,
select.floating-input ~ .floating-label {
  top: 4px;
  right: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

select.floating-input {
  padding-top: 20px !important;
  padding-bottom: 4px !important;
  height: 54px !important;
}

/* Custom Modal Backdrop Global Rules */
.custom-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.custom-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.88);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-backdrop.active .custom-modal-card {
  transform: scale(1);
}

/* Mobile Hero Section Center Alignment (< 768px) */
@media (max-width: 768px) {
  .hero-section {
    padding: 30px 0 45px 0;
    text-align: center;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
    text-align: center;
  }
  .hero-text {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
  }
  .hero-badge {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero-title,
  .hero-subtitle {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero-cta-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    gap: 14px !important;
  }
  .hero-cta-group .btn {
    width: 100% !important;
    max-width: 320px !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}

/* Simulator Perspective Toggle Buttons & Responsive Layout (< 768px) */
.sim-toggle-wrapper {
  background: var(--bg-main);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.sim-toggle-btn {
  border-radius: var(--radius-full) !important;
  padding: 10px 24px !important;
  white-space: nowrap;
}

.sim-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.sim-code-input {
  font-family: monospace;
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  background: var(--bg-surface) !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary-light, rgba(13, 148, 136, 0.3)) !important;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .sim-toggle-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    border-radius: var(--radius-md) !important;
    padding: 8px !important;
  }
  .sim-toggle-btn {
    width: 100% !important;
    justify-content: center !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
  }
  .sim-code-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .sim-code-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Global Program Modal Dark Mode & Mobile Responsive Inputs */
.modal-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.modal-readixa-input {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.modal-readixa-input:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.modal-readixa-input.code-input {
  font-family: monospace !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  background: var(--bg-surface) !important;
  border-color: rgba(13, 148, 136, 0.4) !important;
}

@media (max-width: 600px) {
  .modal-input-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .custom-modal-card {
    padding: 20px 16px !important;
    max-width: 94vw !important;
  }
}

/* Demo Access Student Launcher Button Mobile Fix */
@media (max-width: 640px) {
  .student-demo-btn-wrap {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 10px !important;
  }
  .student-demo-btn-wrap .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 12px 14px !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
  }
}

/* Homepage Demo CTA Banner Mobile Responsiveness */
.home-cta-banner {
  padding: clamp(36px, 6vw, 60px) clamp(20px, 4vw, 36px);
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  color: #ffffff;
  text-align: center;
  border-radius: var(--radius-lg);
  margin-bottom: 70px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(13, 148, 136, 0.25);
  box-sizing: border-box;
}

.home-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .home-cta-banner {
    padding: 32px 20px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 40px !important;
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
  }
  .home-cta-btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}


