/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */
/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */

/* ==========================================================================
   Base Styles: Opinionated Defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/* Remove text-shadow in selection highlight and customize background */
::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/* Standardized horizontal rule styling */
hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/* Remove gaps between media elements and their containers */
audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/* Reset default fieldset styles */
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/* Restrict textarea resizing to vertical only */
textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's Custom Styles: Hakki Virtual Laboratory Platform
   ========================================================================== */

/* --- Core Design Tokens (Variables) --- */
:root {
  --bg-color: #050b14;
  --text-main: #ffffff;
  --text-muted: #8b9bb4;
  --accent-cyan: #00e5ff;
  --accent-green: #00e676;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --font-primary: 'Roboto', sans-serif;
  --font-arabic: 'Tajawal', 'Roboto', sans-serif;
}

/* --- Global Resets & Body Styling --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 230, 118, 0.05), transparent 25%);
}

/* --- Arabic (RTL): Tajawal, and no letter-spacing on Arabic UI text --- */
body.rtl {
  font-family: var(--font-arabic);
}

body.rtl .hero h1 {
  line-height: 1.5;
}

body.rtl .institution-badge,
body.rtl .persona-completion,
body.rtl .btn-launch,
body.rtl .scroll-cta-register,
body.rtl .gallery-open,
body.rtl .gallery-discipline {
  letter-spacing: 0;
}

/* --- Accessibility helpers --- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10000;
  background: var(--accent-cyan);
  color: #000;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

body.rtl .skip-link {
  left: auto;
  right: 16px;
}

.skip-link:focus {
  top: 16px;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

/* --- Main Navigation & Language Switcher --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  background: rgba(5, 11, 20, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 55px;
  width: auto;
  display: block;
}

/* Platform wordmark: heavy white Roboto, wide tracking, light cyan shadow. */
.logo-text {
  font-family: 'Roboto', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2.5px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.55);
}

.lang-switcher select {
  background: var(--glass-bg);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 8px 15px;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
}

.lang-switcher select option {
  background: var(--bg-color);
  color: var(--text-main);
}

/* --- Hero Section --- */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  margin-top: 100px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 900px;
}

/* --- Institution Badge --- */
.institution-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.15);
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Rotating persona word (e.g. "Students", "Teachers") */
.dynamic-persona {
  display: inline-block;
  color: var(--accent-cyan);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dynamic-persona.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

/* Static line that hosts the rotating persona */
.persona-completion {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 25px;
  letter-spacing: 0.5px;
}

@media (prefers-reduced-motion: reduce) {
  .dynamic-persona {
    transition: none;
  }
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 40px;
}

/* --- Search Container & Inputs --- */
.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 50px;
  padding: 5px 5px 5px 20px;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-container:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
  transform: translateY(-2px);
}

body.rtl .search-container {
  padding: 5px 20px 5px 5px;
}

.search-icon {
  color: var(--accent-cyan);
  opacity: 0.8;
}

.search-container input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.1rem;
  font-family: inherit;
  padding: 15px;
  outline: none;
}

.search-container input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.search-container input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* The container already shows a focus ring via :focus-within */
.search-container input:focus-visible {
  outline: none;
}

.search-container input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.search-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--accent-cyan);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.rtl .search-btn svg {
  transform: rotate(180deg);
}

.search-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 15px var(--accent-cyan);
}

/* --- Call to Action Button --- */
.btn-launch {
  background: linear-gradient(45deg, var(--accent-cyan), #00b3cc);
  color: #000;
  padding: 18px 45px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-launch:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

.btn-secondary {
  margin-top: 18px;
  padding: 12px 28px;
  color: var(--accent-cyan);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 30px;
  background: rgba(0, 229, 255, 0.05);
  transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
}

/* --- Interactive Lab Hubs Accordion --- */
.hubs-section {
  padding: 40px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.hubs-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 25px;
  align-items: start;
}

.track-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 25px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Discipline night gradients. Dark stop first, accent color at the far edge. */
.track-card[data-discipline="mathematics"] {
  background: linear-gradient(155deg, #170F2A 0%, #170F2A 42%, #9D174D 100%);
  border-color: rgba(157, 23, 77, 0.55);
}

.track-card[data-discipline="physics"] {
  background: linear-gradient(155deg, #0F172A 0%, #0F172A 42%, #1E40AF 100%);
  border-color: rgba(30, 64, 175, 0.65);
}

.track-card[data-discipline="chemistry"] {
  background: linear-gradient(155deg, #2A170F 0%, #2A170F 42%, #9A3412 100%);
  border-color: rgba(154, 52, 18, 0.6);
}

.track-card[data-discipline="biology"] {
  background: linear-gradient(155deg, #0F2A17 0%, #0F2A17 42%, #065F46 100%);
  border-color: rgba(6, 95, 70, 0.7);
}

.track-card[data-discipline="computer"] {
  background: linear-gradient(155deg, #0F2A2A 0%, #0F2A2A 42%, #004D40 100%);
  border-color: rgba(0, 77, 64, 0.75);
}

.track-card[data-discipline="earth"] {
  background: linear-gradient(155deg, #2A200F 0%, #2A200F 42%, #92400E 100%);
  border-color: rgba(146, 64, 14, 0.6);
}

.track-card[data-discipline="astronomy"] {
  background: linear-gradient(155deg, #1E0F2A 0%, #1E0F2A 42%, #5B21B6 100%);
  border-color: rgba(91, 33, 182, 0.6);
}

.track-card[data-discipline="engineering"] {
  background: linear-gradient(155deg, #2A100F 0%, #2A100F 42%, #BF360C 100%);
  border-color: rgba(191, 54, 12, 0.6);
}

.track-card[data-discipline="environment"] {
  background: linear-gradient(155deg, #0B2A14 0%, #0B2A14 42%, #14532D 100%);
  border-color: rgba(20, 83, 45, 0.7);
}

.track-card[data-discipline="aerospace"] {
  background: linear-gradient(155deg, #0A172A 0%, #0A172A 42%, #1E3A8A 100%);
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.12);
}

@media (hover: hover) {
  .track-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  }
}

.track-card .lab-list {
  color: rgba(255, 255, 255, 0.82);
}

.track-hub {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.track-hub::after {
  content: "→";
  margin-inline-start: 8px;
  color: var(--accent-cyan);
  transition: transform 0.25s ease;
}

body.rtl .track-hub::after {
  content: "←";
}

@media (hover: hover) {
  .track-hub:hover {
    color: var(--accent-cyan);
  }

  .track-hub:hover::after {
    transform: translateX(4px);
  }

  body.rtl .track-hub:hover::after {
    transform: translateX(-4px);
  }
}

.track-heading {
  font-size: inherit;
  font-weight: inherit;
}

/* The accordion header is a real <button> (keyboard + screen-reader friendly) */
.track-title {
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  text-align: start;
  font-size: 1.4rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.track-title::after {
  content: '+';
  content: '+' / '';
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

/* Accordion Content Handling */
.lab-list {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-height: 0;
  overflow: hidden;
  /* Collapsed links must not be reachable with the keyboard */
  visibility: hidden;
  transition: max-height 0.5s ease-out, margin-top 0.3s ease, visibility 0s linear 0.5s;
}

.track-card.active {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.track-card.active .track-title::after {
  transform: rotate(45deg);
  color: var(--accent-cyan);
}

.track-card.active .lab-list {
  max-height: 1200px;
  margin-top: 20px;
  visibility: visible;
  transition-delay: 0s;
}

.lab-list li {
  margin-bottom: 10px;
  padding-left: 15px;
  position: relative;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.lab-list li:hover {
  opacity: 1;
  color: var(--text-main);
}

.lab-list li::before {
  content: "•";
  color: var(--accent-green);
  position: absolute;
  left: 0;
}

body.rtl .lab-list li {
  padding-left: 0;
  padding-right: 15px;
}

body.rtl .lab-list li::before {
  left: auto;
  right: 0;
}

.lab-link {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  transition: color 0.3s;
}

.lab-link:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

/* --- Large Showcase Gallery Section --- */
.gallery-section {
  padding: 80px 5%;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.gallery-section h2 {
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: var(--text-main);
}

.large-gallery {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.gallery-frame {
  margin: 0;
}

.gallery-frame[data-discipline="chemistry"] { --frame-accent: #9A3412; }
.gallery-frame[data-discipline="physics"] { --frame-accent: #1E40AF; }
.gallery-frame[data-discipline="biology"] { --frame-accent: #065F46; }
.gallery-frame[data-discipline="earth"] { --frame-accent: #92400E; }
.gallery-frame[data-discipline="mathematics"] { --frame-accent: #9D174D; }
.gallery-frame[data-discipline="astronomy"] { --frame-accent: #5B21B6; }

.gallery-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid var(--frame-accent, rgba(255, 255, 255, 0.16));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.large-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.gallery-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 20, 0.42);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-open {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(45deg, var(--accent-cyan), #00b3cc);
  color: #000;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.55);
  opacity: 0;
  transform: translate(-50%, -42%);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.gallery-link:focus-visible .gallery-scrim,
.gallery-link:focus-visible .gallery-open {
  opacity: 1;
}

.gallery-link:focus-visible .gallery-open {
  transform: translate(-50%, -50%);
}

.gallery-link:focus-visible .large-img {
  transform: scale(1.03);
}

@media (hover: hover) {
  .gallery-link:hover .gallery-scrim,
  .gallery-link:hover .gallery-open {
    opacity: 1;
  }

  .gallery-link:hover .gallery-open {
    transform: translate(-50%, -50%);
  }

  .gallery-link:hover .large-img {
    transform: scale(1.035);
  }
}

.gallery-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 20px;
  margin-top: 14px;
  color: #ffffff;
  font-weight: 700;
  text-align: start;
}

.gallery-discipline {
  font-size: 0.82rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.gallery-lab {
  font-size: 1.05rem;
}

@media (max-width: 600px) {
  .gallery-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .gallery-open {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .large-img,
  .gallery-scrim,
  .gallery-open {
    transition: none;
  }

  .gallery-link:hover .large-img,
  .gallery-link:focus-visible .large-img,
  .gallery-link:hover .gallery-open,
  .gallery-link:focus-visible .gallery-open {
    transform: translate(-50%, -50%);
  }

  .gallery-link:hover .large-img,
  .gallery-link:focus-visible .large-img {
    transform: none;
  }
}

/* Respect the HTML `hidden` attribute */
[hidden] {
  display: none !important;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* ==========================================================================
   AI Lab Mentor, Roadmap & Teacher Program Sections
   ========================================================================== */
.mentor-section,
.roadmap-section,
.teachers-section {
  padding: 80px 5%;
  scroll-margin-top: 90px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
}

.section-head h2,
.teachers-copy h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 18px;
}

.section-head p,
.teachers-copy > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent-green);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.powered-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 6px 16px;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 50px;
}

/* --- Mentor: live demo card + steps --- */
.mentor-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 40px;
  align-items: center;
}

.mentor-demo {
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 40px rgba(0, 229, 255, 0.08);
}

.demo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text-main);
  font-weight: 700;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.metric {
  padding: 12px;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.metric-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.metric-value {
  display: block;
  color: var(--accent-cyan);
  font-size: 1.25rem;
  font-weight: 900;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  max-width: 92%;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  line-height: 1.5;
}

.bubble-who {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.bubble p {
  font-size: 0.98rem;
}

.bubble-student {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.05);
}

.bubble-mentor {
  align-self: flex-start;
  background: rgba(0, 229, 255, 0.07);
  border-color: rgba(0, 229, 255, 0.25);
}

.bubble-mentor .bubble-who {
  color: var(--accent-cyan);
}

.demo-note {
  margin-top: 16px;
  color: var(--accent-green);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.mentor-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-num {
  flex: 0 0 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  background: linear-gradient(45deg, var(--accent-cyan), var(--accent-green));
  border-radius: 50%;
}

.step h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.step p {
  color: var(--text-muted);
  line-height: 1.6;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 25px;
  margin-top: 50px;
}

.benefit-card {
  padding: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: transform 0.3s, border-color 0.3s;
}

.benefit-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 229, 255, 0.3);
}

.benefit-card h3 {
  margin-bottom: 10px;
  color: var(--accent-cyan);
  font-size: 1.3rem;
}

.benefit-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Roadmap timeline (logical properties follow the page direction) --- */
.timeline {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  padding-inline-start: 32px;
  border-inline-start: 2px solid var(--glass-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding: 22px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 28px;
  inset-inline-start: -41px;
  width: 16px;
  height: 16px;
  background: var(--bg-color);
  border: 3px solid var(--text-muted);
  border-radius: 50%;
}

.timeline-item h3 {
  margin: 12px 0 8px;
  font-size: 1.25rem;
}

.timeline-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

.status-pill {
  display: inline-block;
  padding: 3px 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--glass-border);
  border-radius: 50px;
}

.is-live::before {
  border-color: var(--accent-green);
  background: var(--accent-green);
}

.is-live .status-pill {
  color: var(--accent-green);
  border-color: rgba(0, 230, 118, 0.4);
}

.is-beta::before {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.is-beta {
  border-color: rgba(0, 229, 255, 0.35);
}

.is-beta .status-pill,
.is-next .status-pill {
  color: var(--accent-cyan);
  border-color: rgba(0, 229, 255, 0.4);
}

.is-next::before {
  border-color: var(--accent-cyan);
}

.is-pillar {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(0, 230, 118, 0.05));
  border-color: rgba(0, 229, 255, 0.3);
}

/* --- Teacher program: pitch + form --- */
.teachers-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 50px;
  align-items: start;
}

.perk-list {
  list-style: none;
  margin-top: 28px;
}

.perk-list li {
  position: relative;
  margin-bottom: 14px;
  padding-inline-start: 32px;
  line-height: 1.5;
}

.perk-list li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 0.8rem;
  font-weight: 900;
  background: var(--accent-green);
  border-radius: 50%;
}

.teacher-cta {
  padding: 36px 30px;
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 40px rgba(0, 229, 255, 0.08);
}

.teacher-cta h3 {
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.teacher-cta p {
  margin-bottom: 26px;
  color: var(--text-muted);
  line-height: 1.7;
}

.teacher-cta .btn-launch {
  display: inline-block;
}

@media (max-width: 600px) {
  .mentor-section,
  .roadmap-section,
  .teachers-section {
    padding: 50px 5%;
  }

  .teacher-cta {
    padding: 28px 22px;
  }

  .metric-value {
    font-size: 1.05rem;
  }

  .timeline {
    padding-inline-start: 24px;
  }

  .timeline-item::before {
    inset-inline-start: -33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
  }
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.site-footer {
  background: rgba(5, 11, 20, 0.95);
  border-top: 1px solid var(--glass-border);
  padding: 60px 5% 20px;
  margin-top: 80px;
}

/* Grid Layout for Even Distribution */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto 50px auto;
  text-align: left;
}

body.rtl .footer-content {
  text-align: right;
}

/* Column 1: Brand Styling */
.footer-brand .logo-text {
  font-size: 1.8rem;
  display: inline-block;
  margin-bottom: 15px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Column 2 & 3: Typography & Spacing */
.footer-about h3,
.footer-contact h3 {
  color: var(--text-main);
  margin-bottom: 25px;
  font-size: 1.2rem;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-contact .email-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 25px;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.footer-contact .email-link:hover {
  color: var(--accent-cyan);
}

/* Social Icons Enhancement */
.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3);
}

/* Minimal Legal Bottom Bar */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
}

.footer-bottom .copyright {
  color: var(--text-muted);
}

.legal-minimal {
  display: flex;
  gap: 20px;
}

.legal-minimal a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.legal-minimal a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Privacy consent banner (GDPR)
   ========================================================================== */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(960px, calc(100% - 32px));
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(5, 11, 20, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.consent-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.consent-text a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.consent-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.consent-accept {
  background: linear-gradient(45deg, var(--accent-cyan), #00b3cc);
  color: #000;
  border: 1px solid transparent;
}

.consent-accept:hover {
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

.consent-decline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.consent-decline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.consent-settings-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
}

.consent-settings-btn:hover {
  color: var(--text-main);
}

@media (max-width: 600px) {
  .consent-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 14px;
    gap: 12px;
  }

  .consent-btn {
    flex: 1;
  }
}

@media print {
  .consent-banner {
    display: none !important;
  }
}

/* ==========================================================================
   Responsive Overrides (must stay last so they win the cascade)
   ========================================================================== */

/* Tablet & below */
@media (max-width: 768px) {
  nav {
    padding: 12px 5%;
  }

  .logo-img {
    height: 40px;
  }

  .logo-text,
  .footer-brand .logo-text {
    font-size: 1.5rem;
  }

  .hero {
    min-height: auto;
    margin-top: 80px;
    padding: 40px 20px 20px;
  }

  .hero p {
    font-size: 1.05rem;
    margin-bottom: 30px;
  }

  .institution-badge {
    font-size: 0.8rem;
    padding: 8px 16px;
    letter-spacing: 0.5px;
  }

  .hubs-section {
    padding: 30px 5%;
  }

  .hubs-section h2,
  .gallery-section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  .gallery-section {
    padding: 50px 5%;
  }

  .large-gallery {
    gap: 40px;
  }

  .site-footer {
    margin-top: 40px;
    padding: 40px 5% 20px;
  }

  .footer-content {
    gap: 35px;
  }
}

/* Phones */
@media (max-width: 480px) {
  nav {
    gap: 10px;
  }

  .logo-link {
    gap: 8px;
  }

  .logo-img {
    height: 34px;
  }

  .logo-text {
    font-size: 1.3rem;
    letter-spacing: 2.5px;
  }

  .lang-switcher select {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .search-container input {
    font-size: 1rem;
    padding: 12px 8px;
    min-width: 0;
  }

  .btn-launch {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .track-card {
    padding: 18px;
  }

  .track-title {
    font-size: 1.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ==========================================================================
   Scroll conversion bar (shown only after the hero leaves the viewport)
   ========================================================================== */
.scroll-cta {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 22px;
  width: max-content;
  max-width: calc(100% - 440px);
  height: var(--nav-height, 96px);
  padding: 0 12px;
  background: transparent;
  transform: translateX(-50%) translateY(-120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
}

.scroll-cta.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Cyan edge appears on the existing nav once the conversion row is in it. */
body.has-scroll-cta nav {
  border-bottom-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 10px 28px rgba(0, 229, 255, 0.16);
}

.scroll-cta-message {
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.scroll-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-cta-register {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(45deg, var(--accent-cyan), #00b3cc);
  color: #000;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scroll-cta-teacher {
  color: var(--accent-cyan);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .scroll-cta-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.5);
  }

  .scroll-cta-teacher:hover {
    color: #ffffff;
  }
}

@media (max-width: 899px) {
  .scroll-cta {
    top: var(--nav-height, 72px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(5, 11, 20, 0.94);
    border-bottom: 1px solid rgba(0, 229, 255, 0.4);
    box-shadow: 0 12px 28px rgba(0, 229, 255, 0.16);
    backdrop-filter: blur(12px);
    transform: translateY(-120%);
  }

  .scroll-cta.is-visible {
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .scroll-cta {
    gap: 8px;
    padding: 8px 16px;
  }

  .scroll-cta-message {
    flex: 1 1 100%;
    font-size: 0.85rem;
  }

  .scroll-cta-register {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .scroll-cta-teacher {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cta,
  .scroll-cta-register,
  .track-hub::after {
    transition: none;
  }

  .scroll-cta.is-visible {
    transform: translateX(-50%);
  }

  .scroll-cta-register:hover,
  .track-hub:hover::after {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 899px) {
  .scroll-cta.is-visible {
    transform: none;
  }
}
