@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
  --bg-primary: #ffffff;     /* Pure White Background */
  --bg-secondary: #ffffff;   /* Pure White Background */
  --bg-card: #ffffff;        /* Pure White Card Background */
  --border-card: #000000;    /* Solid Black Border */
  
  --primary: #000000;        /* Pure Black */
  --primary-glow: transparent;
  --secondary: #000000;      /* Pure Black */
  --secondary-glow: transparent;
  
  --text-main: #000000;      /* Solid Black Text */
  --text-muted: #000000;     /* Solid Black Text */
  --text-white: #000000;     /* Solid Black Text */
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide Scrollbars completely */
::-webkit-scrollbar {
  display: none;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

html.lightbox-open, body.lightbox-open {
  overflow: hidden !important;
  height: 100% !important;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
}

/* Background Glow Effects */
.glow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0;
  pointer-events: none;
}

.glow-1 {
  top: 10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-2 {
  top: 40%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  animation-delay: -3s;
}

.glow-3 {
  bottom: 10%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-30px) scale(1.1); }
}

/* Layout Elements */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
.gradient-text {
  color: #000000;
}

.gradient-accent {
  color: #000000;
}

/* Header */
header {
  position: fixed;
  top: 16px;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent !important;
  transition: var(--transition-smooth);
}

.nav-bar-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background-color: #ffffff;
  border: 3px solid #000000;
  border-radius: 0.4em;
  padding: 8px 16px;
  box-shadow: 5px 5px 0px 0px #999999, 5px 5px 0px 3px #000000;
  position: relative;
  min-height: 64px;
}

.nav-logo-left {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  margin-left: 10px;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 22px;
  text-decoration: none;
  color: #000000 !important;
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

@media (min-width: 769px) {
  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.nav-links a {
  text-decoration: none;
  color: #000000;
  font-weight: 800;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 0.3em;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  display: block;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: #ffffff;
  color: #000000;
  border-color: #000000;
  box-shadow: 3px 3px 0px #000000;
  transform: translate(-2px, -2px);
}


/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
}

/* Buttons & OriginButton Styling */
.btn, .nav-btn, button, .button {
  position: relative;
  padding-block: 0.8em !important;
  padding-inline: 1.8em !important;
  font-family: inherit;
  font-weight: 900;
  font-size: 18px;
  border: 3px solid black !important;
  border-radius: 0.4em !important;
  background-color: #ffffff !important; /* Pure White face */
  color: #000000 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
  
  /* Straight 3D block look using monochrome grays */
  transform: translate(0, 0);
  box-shadow: 8px 8px 0px 0px #999999, 8px 8px 0px 3px black !important;
}

.btn:hover, .nav-btn:hover, button:hover, .button:hover {
  transform: translate(-3px, -3px) !important;
  box-shadow: 11px 11px 0px 0px #999999, 11px 11px 0px 3px black !important;
  background-color: #ffffff !important;
  color: #000000 !important;
}

.btn:active, .nav-btn:active, button:active, .button:active {
  transform: translate(8px, 8px) !important;
  box-shadow: 0px 0px 0px 0px transparent, 0px 0px 0px 0px black !important;
}

/* Sections Base */
section {
  padding: 60px 0;
  position: relative;
  border: none !important;
  scroll-margin-top: 30px; /* Accounts for padding-top to bring section title closer below the header card */
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-white);
}

.section-desc {
  color: var(--text-muted);
  font-size: 16px;
}

/* Hero Section */
.hero {
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
}

#antigravity-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #000000;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 14px;
}

.hero-badge svg {
  stroke: #000000;
  width: 16px;
  height: 16px;
}

.hero-title {
  font-size: 78px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 30px;
  font-family: 'Cairo', sans-serif;
}

.hero-desc {
  font-size: 24px;
  color: var(--text-muted);
  margin-bottom: 50px;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 80px;
  }
  .hero-title {
    font-size: 42px;
  }
  .hero-desc {
    font-size: 18px;
  }
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 80px;
  perspective: 1200px; /* Enable 3D depth */
  transform-style: preserve-3d;
}

.btn-hero-main {
  font-size: 26px !important;
  padding: 0.8em 2.2em !important;
}

@media (max-width: 768px) {
  .btn-hero-main {
    font-size: 18px !important;
    padding: 0.6em 1.4em !important;
  }
}

/* Hero Brand Logos Section */
.hero-brand-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 90px;
  margin-bottom: 60px;
}

.brand-logos-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

.brand-logo-item {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 105px;
  transition: transform 0.2s ease;
}

.brand-logo-item:hover {
  transform: translateY(-4px);
}

.brand-logo-item img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  border: 2px solid #000000;
  border-radius: 0.4em;
  box-shadow: 6px 6px 0px 0px #999999, 6px 6px 0px 2px #000000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo-item:hover img {
  box-shadow: 8px 8px 0px 0px #999999, 8px 8px 0px 2px #000000;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 0, 0, 0.45);
}

.stat-number {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Services Story-Telling Layout (Alternating Steps) --- */
.services-story-flow {
  display: flex;
  flex-direction: column;
  gap: 120px;
  margin-top: 60px;
}

.story-step {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  width: 100%;
}

@media (min-width: 992px) {
  .story-step {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
  }
  .story-step:nth-child(even) {
    flex-direction: row-reverse;
  }
  .story-content, .story-visual {
    width: 48%;
  }
}

.story-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
}

.story-num {
  font-size: 56px;
  font-weight: 800;
  color: #000000;
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 12px;
}

.story-title {
  font-size: 26px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 16px;
}

.story-desc {
  font-size: 15px;
  color: #000000;
  opacity: 0.8;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* Services Grid & Tilt Cards */
.services-grid {
  display: none;
}

.tilt-card {
  position: relative;
  height: 380px;
  width: 100%;
  border-radius: 24px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  cursor: pointer;
  border: 1px solid var(--border-card);
  background: transparent;
}

.tilt-card-inner {
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  transform: translateZ(25px);
  transform-style: preserve-3d;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.tilt-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.35) contrast(1.1);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tilt-card:hover .tilt-card-img {
  transform: scale(1.06);
}

.tilt-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

.tilt-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.tilt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.tilt-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  transform: translateZ(40px);
}

.tilt-card-subtitle {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
  transform: translateZ(30px);
}

.tilt-card-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  backdrop-filter: blur(8px);
  transform: translateZ(50px);
  transition: background 0.3s ease, transform 0.2s ease;
}

.tilt-card-link:hover {
  background: rgba(255,255,255,0.25);
  transform: translateZ(50px) scale(1.1);
}

.tilt-card-btn {
  width: 100%;
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  transform: translateZ(30px);
  transition: background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.tilt-card-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.3);
}

/* Workflow Timeline (Vertical Story Telling) */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
  margin-top: 60px;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 40px;
  bottom: 40px;
  right: 40px; /* Aligned with circles in RTL */
  left: auto;
  width: 2px;
  background: #000000;
  z-index: 0;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  text-align: right;
  position: relative;
  z-index: 1;
}

.step-number {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #000000;
  transition: var(--transition-smooth);
}

.timeline-step:hover .step-number {
  background-color: #000000;
  color: #ffffff;
}

.step-content {
  padding-top: 14px;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: #000000;
  opacity: 0.7;
}

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

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 32px;
  transition: var(--transition-smooth);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.2);
}

.stars {
  color: #fbbf24;
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.testimonial-quote {
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 24px;
  font-style: italic;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-card);
}

.user-name {
  font-weight: 700;
  color: var(--text-white);
  font-size: 15px;
}

.user-role {
  font-size: 13px;
  color: var(--text-muted);
}

/* Contact Section & Form */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-white);
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
}

.contact-text h4 {
  font-size: 14px;
  color: var(--text-muted);
}

.contact-text p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
  margin: 0;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(8px);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  color: var(--text-white);
  font-size: 15px;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* Footer — same style as nav bar */
footer {
  background: #ffffff;
  border-top: none;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

.footer-nav {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  text-decoration: none;
  color: #000000;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
}

.footer-nav a:hover {
  border-bottom: 2px solid #000000;
}

.footer-copy {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  white-space: nowrap;
}

.footer-privacy-link {
  font-size: 11px;
  font-weight: 700;
  color: #777777;
  text-decoration: none;
  border-bottom: 2px solid #777777;
  padding-bottom: 2px;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-privacy-link:hover {
  color: #444444;
  border-color: #444444;
}

.footer-social-link {
  color: #777777;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
}

.footer-social-link:hover {
  color: #777777;
}

/* Privacy Policy Modal Body */
.privacy-body h4 {
  font-size: 15px;
  font-weight: 800;
  color: #000000;
  margin: 18px 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid #000;
  display: inline-block;
}

.privacy-body p {
  font-size: 14px;
  color: #333333;
  line-height: 1.8;
  margin: 0 0 8px;
}

@media (max-width: 768px) {
  .footer-bar {
    flex-direction: column;
    height: auto;
    padding: 24px 0;
    gap: 16px;
    text-align: center;
  }
  .footer-nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.social-link:hover {
  color: var(--secondary);
  border-color: var(--secondary);
  background: rgba(6, 182, 212, 0.05);
}

/* --- ScrollReelTestimonials Styling (Pure Black & White) --- */
.testimonials-carousel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #000000;
  background: #ffffff;
  min-height: 320px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  outline: none;
  position: relative;
}

@media (min-width: 768px) {
  .testimonials-carousel {
    flex-direction: row;
  }
}

/* Reel Section */
.testi-reel-wrapper {
  position: relative;
  height: 224px; /* 56 * 4 */
  width: 100%;
  flex-shrink: 0;
  align-self: stretch;
  overflow: hidden;
  /* Masking for fade effect at top/bottom/left/right */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000000 14%, #000000 86%, transparent 100%), 
                      linear-gradient(to bottom, transparent 0%, #000000 10%, #000000 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000000 14%, #000000 86%, transparent 100%), 
              linear-gradient(to bottom, transparent 0%, #000000 10%, #000000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

@media (min-width: 768px) {
  .testi-reel-wrapper {
    height: auto;
    width: 380px;
  }
}

.testi-reel-wrapper > div {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.testi-reel-col {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  gap: 8px;
  will-change: transform;
}

.testi-cell {
  width: 121.33px;
  height: 121.33px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid #000000;
  background: #ffffff;
}

.testi-featured {
  position: relative;
  width: 121.33px;
  height: 121.33px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #000000;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.testi-featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(100%);
}

.testi-featured .sheen {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  mix-blend-mode: overlay;
  background: linear-gradient(220.99deg, rgba(255,255,255,0) 32%, rgba(255,255,255,0.8) 47%, rgba(255,255,255,0) 65%);
}

/* Content Section */
.testi-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  flex: 1;
  min-width: 0;
  padding: 28px 20px;
}

@media (min-width: 768px) {
  .testi-content-wrapper {
    padding: 40px 20px;
  }
}

.testi-quote-icon {
  margin-bottom: 9px;
}

.testi-quote-icon svg {
  display: block;
  width: 48px;
  height: 48px;
  color: rgba(0, 0, 0, 0.15);
}

/* Text Stage */
.testi-text-stage {
  position: relative;
  width: 100%;
  max-width: 390px;
  overflow: hidden;
}

.testi-text-sizer {
  visibility: hidden;
  display: flex;
  min-height: 140px;
  flex-direction: column;
  gap: 19px;
  pointer-events: none;
}

.testi-text-active {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 19px;
  will-change: transform, opacity;
}

.testi-quote-text,
.testi-active-quote {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #000000;
}

@media (min-width: 640px) {
  .testi-quote-text,
  .testi-active-quote {
    font-size: 22px;
  }
}

.testi-author-text,
.testi-active-author {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: #000000;
  opacity: 0.7;
}

/* Character Animation classes */
.scroll-reel-char {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-reel-exit {
  animation: exit 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rise {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes exit {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

/* Controls */
.testi-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 768px) {
  .testi-controls {
    margin-top: 0;
  }
}

.testi-control-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid #000000;
  background: transparent;
  padding: 0;
  color: #000000;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s, color 0.2s;
}

.testi-control-btn:hover:not(:disabled) {
  transform: scale(1.08);
  background-color: #000000;
  color: #ffffff;
}

.testi-control-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.testi-control-btn:disabled {
  cursor: default;
  opacity: 0.3;
}

.testi-control-btn svg {
  width: 12px;
  height: 12px;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.94);
  transition: opacity 0.4s ease-in, transform 0.4s ease-in;
  will-change: transform, opacity;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.85s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Staggered Delay Utilities */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 46px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline {
    flex-wrap: wrap;
    gap: 32px;
  }
  .timeline::before {
    display: none;
  }
  .timeline-step {
    width: 45%;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
  .hero {
    padding-top: 140px;
    padding-bottom: 80px;
  }
  .hero-title {
    font-size: 36px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 85px;
    left: 5%;
    width: 90%;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    box-shadow: 6px 6px 0px 0px #999999, 6px 6px 0px 3px #000000;
    border: 3px solid #000000;
    border-radius: 16px;
    transform: none;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .timeline-step {
    width: 100%;
  }
}

/* Text Glitch Effect */
.text-glitch {
  position: relative;
  display: inline-block;
  color: #000000;
  font-weight: 800;
}

.text-glitch::before,
.text-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  clip-path: inset(0 0 0 0);
  opacity: 0.8;
}

.text-glitch::before {
  left: 2px;
  text-shadow: -1.5px 0 #000000;
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.text-glitch::after {
  left: -1.5px;
  text-shadow: 1.5px 0 #000000;
  animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 70% 0); }
  10% { clip-path: inset(60% 0 10% 0); }
  20% { clip-path: inset(10% 0 85% 0); }
  30% { clip-path: inset(80% 0 5% 0); }
  40% { clip-path: inset(5% 0 90% 0); }
  50% { clip-path: inset(90% 0 3% 0); }
  60% { clip-path: inset(15% 0 75% 0); }
  70% { clip-path: inset(75% 0 15% 0); }
  80% { clip-path: inset(30% 0 50% 0); }
  90% { clip-path: inset(45% 0 45% 0); }
  100% { clip-path: inset(60% 0 30% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(85% 0 5% 0); }
  10% { clip-path: inset(10% 0 80% 0); }
  20% { clip-path: inset(70% 0 20% 0); }
  30% { clip-path: inset(15% 0 75% 0); }
  40% { clip-path: inset(90% 0 5% 0); }
  50% { clip-path: inset(35% 0 55% 0); }
  60% { clip-path: inset(55% 0 35% 0); }
  70% { clip-path: inset(5% 0 85% 0); }
  80% { clip-path: inset(40% 0 45% 0); }
  90% { clip-path: inset(20% 0 65% 0); }
  100% { clip-path: inset(80% 0 10% 0); }
}

/* Text Generate (Pullup Style) styling */
.text-generate-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transition: opacity 0.25s ease-in, transform 0.25s ease-in;
  transition-delay: 0s !important;
}

.text-generate.revealed .text-generate-word {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: var(--delay) !important;
}

/* BoxReveal Effect */
.box-reveal-container {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}

.box-reveal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  transform: scaleX(0);
  transform-origin: right;
  z-index: 10;
}

.box-reveal-container.revealed .box-reveal-overlay {
  animation: box-reveal-rtl 0.8s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.box-reveal-text {
  opacity: 0;
  transition: opacity 0.05s ease 0.4s;
}

.box-reveal-container.revealed .box-reveal-text {
  opacity: 1;
}

@keyframes box-reveal-rtl {
  0% {
    transform: scaleX(0);
    transform-origin: right;
  }
  50% {
    transform: scaleX(1);
    transform-origin: right;
  }
  50.1% {
    transform-origin: left;
  }
  100% {
    transform: scaleX(0);
    transform-origin: left;
  }
}

/* --- Showcase Testimonials Layout --- */
.testimonials-showcase {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Quote Panel */
.testi-quote-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: right;
  min-height: 120px;
}

.testi-quote-panel .testi-quote-icon svg {
  width: 48px;
  height: 48px;
  color: rgba(0, 0, 0, 0.15);
}

.testi-active-quote {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  color: #000000;
  margin: 0;
}

/* Split Layout */
.showcase-split {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

@media (min-width: 768px) {
  .showcase-split {
    flex-direction: row;
    gap: 60px;
    align-items: flex-start;
  }
}

/* Asymmetric Photo Grid */
.showcase-grid {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  overflow-x: auto;
  padding-bottom: 8px;
  width: 100%;
  justify-content: center;
}

@media (min-width: 768px) {
  .showcase-grid {
    width: auto;
    overflow-x: visible;
    padding-bottom: 0;
    justify-content: flex-start;
  }
}

.showcase-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Specific offsets for visual rhythm */
.col-2 {
  margin-top: 48px;
}

.col-3 {
  margin-top: 24px;
}

.photo-card {
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
  border: 1px solid #000000;
  background: #ffffff;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.77);
  transition: filter 0.5s ease, transform 0.5s ease;
}

/* Card sizes */
.col-1 .photo-card {
  width: 110px;
  height: 120px;
}

.col-2 .photo-card {
  width: 122px;
  height: 132px;
}

.col-3 .photo-card {
  width: 115px;
  height: 125px;
}

@media (min-width: 640px) {
  .col-1 .photo-card { width: 130px; height: 140px; }
  .col-2 .photo-card { width: 145px; height: 155px; }
  .col-3 .photo-card { width: 136px; height: 146px; }
}

@media (min-width: 992px) {
  .col-1 .photo-card { width: 155px; height: 165px; }
  .col-2 .photo-card { width: 172px; height: 182px; }
  .col-3 .photo-card { width: 162px; height: 172px; }
}

/* Showcase List (Right Panel) */
.showcase-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  width: 100%;
}

.member-row {
  cursor: pointer;
  transition: opacity 0.3s ease;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.member-name-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-bar {
  width: 16px;
  height: 2px;
  background: #000000;
  opacity: 0.25;
  transition: width 0.3s ease, opacity 0.3s ease;
  flex-shrink: 0;
}

.member-name {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  transition: color 0.3s ease;
}

.member-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px; /* RTL margin left replacement */
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: #000000;
  transition: background-color 0.2s, transform 0.2s;
}

.social-icon svg {
  width: 12px;
  height: 12px;
}

.social-icon:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.member-role {
  margin-top: 6px;
  padding-right: 28px; /* RTL padding left replacement */
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #000000;
  opacity: 0.6;
}

/* Dimmed / Hover States */
.testimonials-showcase.has-hover .photo-card:not(.active),
.testimonials-showcase.has-hover .member-row:not(.active) {
  opacity: 0.55;
}

.testimonials-showcase.has-hover .photo-card.active img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.03);
}

.testimonials-showcase.has-hover .member-row.active .member-bar {
  width: 28px;
  opacity: 1;
}

.testimonials-showcase.has-hover .member-row.active .member-socials {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Letter Pullup typography layout */
.letter-pullup-word {
  display: inline-block;
  white-space: nowrap;
}

.letter-pullup-char {
  display: inline-block;
  transform: translateY(100%) scale(0.9);
  opacity: 0;
  animation: letter-pullup-anim 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letter-pullup-anim {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Image Trail Cursor */
#testimonials {
  position: relative;
  overflow: hidden;
}

.testimonials-trail-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 5; /* Behind content but above background */
}

.content__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 170px;
  height: 155px; /* aspect-[1.1] or w-[170px] h-[155px] */
  overflow: hidden;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, filter, opacity;
  border: 1px solid rgba(0, 0, 0, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.content__img-inner {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%); /* Maintain monochrome theme */
}

/* Scroll Balance Slider Progress Bar */
.scroll-balance-slider {
  position: fixed;
  top: 80px; /* Below scrolled header */
  left: 0;
  width: 100%;
  height: 24px;
  background: #ffffff;
  border-bottom: 1px solid #000000;
  z-index: 99; /* Below header */
  pointer-events: none;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  --value: 0;
  --leftColor: rgba(0, 0, 0, 0.95);
  --rightColor: rgba(0, 0, 0, 0.04);
  --indicatorColor: #000000;
}

header.scrolled + .scroll-balance-slider {
  opacity: 1; /* Show when header is scrolled */
}

.scroll-balance-slider .slider-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.scroll-balance-slider .slider-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--value, 0) * 1%);
  background: var(--leftColor);
  transition: width 0.15s ease-out;
}

.scroll-balance-slider .slider-track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: calc((100 - var(--value, 0)) * 1%);
  background: var(--rightColor);
  transition: width 0.15s ease-out;
}

.scroll-balance-slider .slider-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--indicatorColor);
  left: calc(var(--value, 0) * 1%);
  transform: translateX(-50%);
  transition: left 0.15s ease-out;
  z-index: 2;
}

.scroll-balance-slider .slider-value-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.scroll-balance-slider .slider-value-labels .label-left {
  color: #ffffff;
  mix-blend-mode: difference;
}

.scroll-balance-slider .slider-value-labels .label-right {
  color: #ffffff;
  mix-blend-mode: difference;
}

@media (max-width: 768px) {
  .scroll-balance-slider {
    top: 80px;
    height: 18px;
  }
}

/* Link Preview Hover Element */
.link-preview-trigger {
  position: relative;
  color: #000000;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.link-preview-trigger:hover {
  opacity: 0.7;
}

.link-preview-popover {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  display: block;
  opacity: 0;
  transform: scale(0.26);
  transform-origin: center bottom;
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: transform, opacity;
}

.link-preview-popover.active {
  opacity: 1;
  animation: link-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.link-preview-card {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #000000;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  width: 200px;
  height: 125px;
}

.link-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

@keyframes link-pop {
  0% {
    transform: scale3d(0.26, 0.26, 1);
  }
  50% {
    transform: scale3d(1.08, 1.08, 1);
  }
  100% {
    transform: scale3d(1, 1, 1);
  }
}

/* ==========================================
   Books Section (3D Book Component)
   ========================================== */
.books-section {
  padding: 100px 0;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-card);
  position: relative;
  overflow: hidden;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
  justify-items: center;
}

@media (max-width: 992px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 3D Book Component Styles */
.book-wrapper {
  perspective: 1200px;
  cursor: default;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px; /* Vertical spacing to prevent 3D cover overlaps */
}

Book {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 170px;
  height: 250px;
  background: #ffffff;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
  box-shadow: 10px 10px 0px #000000;
  border: 2px solid #000000;
  border-radius: 4px;
  padding: 16px;
  text-align: center;
  z-index: 10;
}

/* 3D Spine effect */
Book::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -12px;
  width: 12px;
  height: calc(100% + 4px);
  background: #000000;
  transform: rotateY(-90deg);
  transform-origin: right center;
  border-radius: 2px 0 0 2px;
}

/* 3D Pages depth effect */
Book::after {
  content: '';
  position: absolute;
  top: 2%;
  right: -10px;
  width: 10px;
  height: 96%;
  background: repeating-linear-gradient(90deg, #f9f9f9, #f9f9f9 2px, #000000 2px, #000000 3px);
  transform: rotateY(90deg);
  transform-origin: left center;
  border: 2px solid #000000;
  border-left: none;
}

/* Hover effects */
.book-wrapper:hover Book {
  transform: none;
  box-shadow: 10px 10px 0px #000000;
}

BookHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #000000;
  padding-bottom: 12px;
}

.book-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #000000;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 2px;
}

BookHeader svg {
  color: #000000;
  transition: transform 0.3s ease;
}

.book-wrapper:hover BookHeader svg {
  transform: scale(1.15) rotate(-10deg);
}

BookTitle {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

BookTitle h3 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  color: #000000;
  text-align: center;
}

BookDescription {
  border-top: 1px dashed #000000;
  padding-top: 12px;
}

BookDescription p {
  font-size: 12px;
  color: #555555;
  line-height: 1.5;
  text-align: center;
}

/* ==========================================
   ImagesBadge Showcase Components
   ========================================== */
.app-images-badge-container {
  position: relative;
  width: 100%;
  height: 380px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 12px;
  box-shadow: 8px 8px 0px #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-images-badge-container:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0px #000000;
}

.images-badge {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.badge-folder {
  position: relative;
  width: 160px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.badge-image {
  position: absolute;
  width: 120px;
  height: 160px;
  border: 2px solid #000000;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 4px 4px 0px #000000;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), z-index 0.3s;
}

.badge-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Stacked state */
.badge-folder .img-1 {
  transform: translate(-15px, 10px) rotate(-8deg);
  z-index: 1;
}

.badge-folder .img-2 {
  transform: translate(15px, -5px) rotate(6deg);
  z-index: 2;
}

.badge-folder .img-3 {
  transform: translate(0px, 0px) rotate(0deg);
  z-index: 3;
}

/* Hover Spread State */
.app-images-badge-container:hover .badge-folder .img-1 {
  transform: translate(-70px, -25px) rotate(-16deg) scale(1.05);
  z-index: 4;
}

.app-images-badge-container:hover .badge-folder .img-2 {
  transform: translate(0px, -45px) rotate(0deg) scale(1.12);
  z-index: 6;
}

.app-images-badge-container:hover .badge-folder .img-3 {
  transform: translate(70px, -25px) rotate(16deg) scale(1.05);
  z-index: 5;
}

.badge-label {
  position: absolute;
  bottom: 24px;
  background: #000000;
  color: #ffffff;
  padding: 6px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #000000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.15);
}

.app-images-badge-container:hover .badge-label {
  transform: scale(1.08) translateY(-4px);
  background: #222222;
}

/* ==========================================
   Courses Section (3D Card Showcase)
   ========================================== */
.courses-section {
  padding: 100px 0;
  border-top: 1px solid var(--border-card);
  position: relative;
  overflow: hidden;
}

.courses-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin-top: 60px;
}

/* 3D Card Container */
.card-container-3d {
  perspective: 1000px;
  width: 100%;
  max-width: 480px;
}

.card-body-3d {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 12px;
  box-shadow: 8px 8px 0px #000000;
  padding: 30px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: right;
}

.card-container-3d:hover .card-body-3d {
  box-shadow: 15px 15px 0px #000000;
}

/* 3D Float Elements */
.card-item-3d {
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-title {
  font-size: 22px;
  font-weight: 800;
  color: #000000;
  line-height: 1.4;
}

.course-desc {
  font-size: 14px;
  color: #555555;
  line-height: 1.6;
}

.course-levels {
  margin-top: 10px;
  margin-right: 20px;
  padding-right: 0;
  list-style-type: square;
}

.course-levels li {
  margin-bottom: 6px;
  font-weight: 600;
  color: #222222;
}

.course-img {
  width: 100%;
  height: 200px;
  border: 2px solid #000000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
  margin: 10px 0;
}

.course-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.btn-visit {
  font-size: 13px;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  border-bottom: 2px solid #000000;
  padding-bottom: 2px;
  transition: opacity 0.3s;
}

.btn-visit:hover {
  opacity: 0.7;
}

.btn-enroll {
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 700;
}

/* Hover pop out transitions */
.card-container-3d:hover .course-title {
  transform: translateZ(50px);
}

.card-container-3d:hover .course-desc {
  transform: translateZ(35px);
}

.card-container-3d:hover .course-img {
  transform: translateZ(65px);
}

.card-container-3d:hover .course-footer {
  transform: translateZ(40px);
}

/* ==========================================
   Portfolio Service Section
   ========================================== */
.portfolio-service-section {
  padding: 100px 0;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-card);
  position: relative;
  overflow: hidden;
}

.portfolio-service-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 992px) {
  .portfolio-service-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.service-details {
  text-align: right;
}

.service-features {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-features li {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Animated Notification List Styles */
.service-animation-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.animated-list-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 400px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 12px;
  box-shadow: 8px 8px 0px #000000;
  padding: 24px;
  overflow: hidden;
}

/* Top & Bottom Fade Overlays */
.animated-list-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, #ffffff 30%, rgba(255, 255, 255, 0) 100%);
  z-index: 10;
  pointer-events: none;
}

.animated-list-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to top, #ffffff 30%, rgba(255, 255, 255, 0) 100%);
  z-index: 10;
  pointer-events: none;
}

.animated-list-inner {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  justify-content: flex-end;
}

/* Animated Notification Card */
.animated-notification {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 8px;
  box-shadow: 4px 4px 0px #000000;
  margin-bottom: 12px;
  direction: ltr;
  text-align: left;
  transform: translateY(40px) scale(0.9);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.animated-notification.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.notification-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
  border: 2px solid #000000;
  flex-shrink: 0;
}

.notification-content {
  flex-grow: 1;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.notification-name {
  font-weight: 700;
  font-size: 14px;
  color: #000000;
}

.notification-time {
  font-size: 11px;
  color: #666666;
}

.notification-desc {
  font-size: 12px;
  color: #555555;
  margin-top: 2px;
}

/* --- Loader Main Title --- */
.loader {
  --ANIMATION-DELAY-MULTIPLIER: 70ms;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  gap: 12px;
  direction: ltr; /* Fix reversed letter order in RTL pages */
}
.loader span {
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation-delay: 0s;
  transform: translateY(6rem);
  animation: hideAndSeek 1.2s alternate infinite cubic-bezier(0.86, 0, 0.07, 1);
  font-size: 5.5rem;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffffff;
  -webkit-text-stroke: 3px #000000;
  text-shadow: 6px 6px 0px #000000; /* Neo-brutalist 3D Shadow */
  font-family: 'Cairo', sans-serif;
}
.loader .f {
  animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 0);
}
.loader .u {
  animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 1);
}
.loader .t {
  animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 2);
}
.loader .u2 {
  animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 3);
}
.loader .r {
  animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 4);
}
.loader .e {
  animation-delay: calc(var(--ANIMATION-DELAY-MULTIPLIER) * 5);
}
.letter {
  width: auto;
  height: 5.5rem;
}
@media (max-width: 768px) {
  .loader span {
    font-size: 3rem;
    -webkit-text-stroke: 2px #000000;
    text-shadow: 2px 2px 0px #000000;
  }
  .letter {
    height: 3rem;
  }
}
.i {
  margin-inline: 5px;
}
@keyframes hideAndSeek {
  0% {
    transform: translateY(6rem);
  }
  100% {
    transform: translateY(0rem);
  }
}



/* --- Website Preloader Style --- */
.preloader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #ffffff; /* pure white background matching monochrome theme */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s ease;
}

.preloader-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-preloader {
  width: 48px;
  height: 48px;
  margin: auto;
  position: relative;
}

.site-preloader:before {
  content: '';
  width: 48px;
  height: 5px;
  background: #00000050;
  position: absolute;
  top: 60px;
  left: 0;
  border-radius: 50%;
  animation: shadow324 0.5s linear infinite;
}

.site-preloader:after {
  content: '';
  width: 100%;
  height: 100%;
  background: #000000;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px;
  animation: jump7456 0.5s linear infinite;
}

@keyframes jump7456 {
  15% {
    border-bottom-right-radius: 3px;
  }

  25% {
    transform: translateY(9px) rotate(22.5deg);
  }

  50% {
    transform: translateY(18px) scale(1, .9) rotate(45deg);
    border-bottom-right-radius: 40px;
  }

  75% {
    transform: translateY(9px) rotate(67.5deg);
  }

  100% {
    transform: translateY(0) rotate(90deg);
  }
}

@keyframes shadow324 {
  0%, 100% {
    transform: scale(1, 1);
  }

  50% {
    transform: scale(1.2, 1);
  }
}

/* --- Course Retro TV Card --- */
.tv-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 350px;
  height: 230px;
  cursor: default;
  perspective: 1000px;
}

.tv-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transform: scale(0.8);
  transform-origin: center center;
}

.tv-wrapper:hover .tv-main {
  transform: scale(0.8);
}

.tv-antenna {
  width: 5.5em;
  height: 5.5em;
  border-radius: 50%;
  border: 2px solid black;
  background-color: #000000;
  margin-bottom: -7em;
  margin-left: 0em;
  z-index: -1;
  position: relative;
}

.tv-antenna-shadow {
  position: absolute;
  background-color: transparent;
  width: 55px;
  height: 60px;
  margin-left: 1.6em;
  border-radius: 45%;
  transform: rotate(140deg);
  border: 4px solid transparent;
  box-shadow:
    inset 0px 16px #222,
    inset 0px 16px 1px 1px #222;
}

.tv-antenna::after {
  content: "";
  position: absolute;
  margin-top: -10em;
  margin-left: 0.4em;
  transform: rotate(-25deg);
  width: 1.1em;
  height: 0.55em;
  border-radius: 50%;
  background-color: #333;
}

.tv-antenna::before {
  content: "";
  position: absolute;
  margin-top: 0.2em;
  margin-left: 1.4em;
  transform: rotate(-20deg);
  width: 1.65em;
  height: 0.85em;
  border-radius: 50%;
  background-color: #333;
}

.tv-a1 {
  position: relative;
  top: -102%;
  left: -130%;
  width: 14em;
  height: 6em;
  border-radius: 50px;
  background-image: linear-gradient(
    #171717,
    #171717,
    #353535,
    #353535,
    #171717
  );
  transform: rotate(-29deg);
  clip-path: polygon(50% 0%, 49% 100%, 52% 100%);
}

.tv-a1d {
  position: relative;
  top: -211%;
  left: -35%;
  transform: rotate(45deg);
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  border: 2.2px solid black;
  background-color: #979797;
  z-index: 99;
}

.tv-a2 {
  position: relative;
  top: -210%;
  left: -10%;
  width: 14em;
  height: 5em;
  border-radius: 50px;
  background-image: linear-gradient(
    #171717,
    #171717,
    #353535,
    #353535,
    #171717
  );
  margin-right: 5.5em;
  clip-path: polygon(
    47% 0,
    47% 0,
    34% 34%,
    54% 25%,
    32% 100%,
    29% 96%,
    49% 32%,
    30% 38%
  );
  transform: rotate(-8deg);
}

.tv-a2d {
  position: relative;
  top: -294%;
  left: 94%;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  border: 2.2px solid black;
  background-color: #979797;
  z-index: 99;
}

.retro-tv {
  width: 440px;
  height: 260px;
  margin-top: 2.5em;
  border-radius: 20px;
  background-color: #000000;
  display: flex;
  justify-content: center;
  border: 4px solid #111;
  box-shadow: inset 0.3em 0.3em rgba(255, 255, 255, 0.1);
  position: relative;
}

.retro-tv::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background:
    repeating-radial-gradient(#111 0 0.0001%, rgba(0,0,0,0.15) 0 0.0002%) 50% 0/2500px 2500px;
  background-blend-mode: difference;
  opacity: 0.08;
  pointer-events: none;
}

.tv-curve {
  position: absolute;
  top: 0.35em;
  left: 0.35em;
}

.tv-curve-svg {
  height: 18px;
  width: 18px;
  fill: #fff;
  opacity: 0.15;
}

.tv-display-div {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  border-radius: 12px;
  margin-right: 90px;
}

.tv-screen-out {
  width: auto;
  height: auto;
  border-radius: 10px;
}

.tv-screen-out1 {
  width: 300px;
  height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.tv-screen {
  width: 300px;
  height: 215px;
  font-family: "Cairo", sans-serif;
  border: 2px solid black;
  background:
    repeating-radial-gradient(#000 0 0.0001%, #ffffff 0 0.0002%) 50% 0/2500px 2500px,
    repeating-conic-gradient(#000 0 0.0001%, #ffffff 0 0.0002%) 60% 60%/2500px 2500px;
  background-blend-mode: difference;
  animation: tv-static-anim 0.2s infinite alternate;
  border-radius: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  text-align: center;
  overflow: hidden;
  position: relative;
}

@keyframes tv-static-anim {
  100% {
    background-position:
      50% 0,
      60% 50%;
  }
}

.tv-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 15px;
  width: 92%;
  height: 92%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #000;
  box-shadow: 2px 2px 0px #000;
}

.tv-badge {
  font-size: 11px;
  font-weight: 800;
  background: #000;
  color: #fff;
  padding: 3px 12px;
  border-radius: 4px;
}

.tv-content h3 {
  font-size: 18px;
  font-weight: 800;
  color: #000;
  margin: 0;
  line-height: 1.4;
}

.tv-content p {
  font-size: 13.5px;
  color: #222;
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
}

.tv-action {
  font-size: 13px;
  font-weight: 800;
  color: #000000;
  text-decoration: underline;
}

.tv-lines {
  display: flex;
  column-gap: 2px;
  align-self: flex-end;
  position: absolute;
  bottom: 8px;
  left: 145px;
}

.tv-line1,
.tv-line3 {
  width: 2px;
  height: 8px;
  background-color: #555;
  border-radius: 2px 2px 0px 0px;
}

.tv-line2 {
  width: 2px;
  height: 16px;
  background-color: #555;
  border-radius: 2px 2px 0px 0px;
}

.tv-buttons-div {
  width: 72px;
  align-self: center;
  height: 215px;
  background-color: #171717;
  border: 2px solid #000;
  padding: 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  row-gap: 20px;
  position: absolute;
  right: 16px;
  top: 18px;
  box-shadow: inset 1px 1px 0px rgba(255,255,255,0.1);
}

.tv-b1 {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #444;
  border: 2px solid black;
  box-shadow:
    inset 2.5px 2.5px 1px #666,
    -1px 0px #222,
    -1px 0px 0px 1px black;
  position: relative;
}

.tv-b1 div {
  content: "";
  position: absolute;
  top: 3px;
  left: 12px;
  transform: rotate(45deg);
  width: 4px;
  height: 22px;
  background-color: #000;
}

.tv-b2 {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #444;
  border: 2px solid black;
  box-shadow:
    inset 2.5px 2.5px 1px #666,
    -1px 0px #222,
    -1px 0px 0px 1px black;
  position: relative;
}

.tv-b2::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 12px;
  transform: rotate(-45deg);
  width: 4px;
  height: 22px;
  background-color: #000;
}

.tv-speakers {
  display: flex;
  flex-direction: column;
  row-gap: 6px;
  width: 100%;
}

.tv-speakers .tv-g1 {
  display: flex;
  column-gap: 3px;
  justify-content: center;
}

.tv-speakers .tv-g1 .tv-g11,
.tv-g12,
.tv-g13 {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #444;
  border: 1px solid black;
}

.tv-speakers .tv-g {
  width: 90%;
  height: 2px;
  background-color: #000;
  margin: 0 auto;
}

.tv-bottom {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 230px;
}

.tv-base1 {
  height: 20px;
  width: 35px;
  border: 2.2px solid black;
  background-color: #333;
  margin-top: -2px;
  z-index: -1;
  transform: rotate(-15deg);
}

.tv-base2 {
  height: 20px;
  width: 35px;
  border: 2.2px solid black;
  background-color: #333;
  margin-top: -2px;
  z-index: -1;
  transform: rotate(15deg);
}

.tv-base3 {
  position: absolute;
  height: 4px;
  width: 390px;
  background-color: black;
  margin-top: 15px;
}

/* --- Apps Gallery Grid & Fanning Polaroid Stacks --- */
.apps-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
  margin-top: 60px;
  width: 100%;
}

.app-gallery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  direction: rtl;
}

.app-gallery-row.row-reverse {
  flex-direction: row-reverse;
}

@media (max-width: 992px) {
  .app-gallery-row,
  .app-gallery-row.row-reverse {
    flex-direction: column;
    text-align: center;
    gap: 50px;
  }
}

.app-info-panel {
  flex: 1;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

@media (max-width: 992px) {
  .app-info-panel {
    align-items: center;
  }
}

.app-badge {
  font-size: 13px;
  font-weight: 800;
  background-color: #000000;
  color: #fff;
  padding: 4px 14px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-title-heading {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.2;
  font-family: 'Cairo', sans-serif;
}

.app-desc-text {
  font-size: 16px;
  color: #000000;
  line-height: 1.6;
  margin: 0;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
}

.app-privacy-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  color: #999;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: 'Cairo', sans-serif;
  font-weight: 400;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}

.app-privacy-link:hover {
  color: #555;
}

/* --- Platform download buttons (Browser / Android / iPhone) --- */
.plat-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  align-items: flex-start;
}

.plat-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  padding: 10px 16px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 0.4em;
  box-shadow: 4px 4px 0px 0px #999999, 4px 4px 0px 2px #000000;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #000000;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plat-link .plat-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.plat-link .plat-name { font-weight: 800; }

.plat-link .plat-status {
  margin-inline-start: auto;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.55;
  white-space: nowrap;
}
.plat-link .plat-status.live {
  opacity: 1;
  color: #1a7a3c;
}

.plat-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px 0px #999999, 6px 6px 0px 2px #000000;
}
.plat-link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px 0px #999999, 1px 1px 0px 2px #000000;
}

.plat-link.is-soon {
  cursor: default;
  color: #555;
}
.plat-link.is-soon:hover {
  transform: none;
  box-shadow: 4px 4px 0px 0px #999999, 4px 4px 0px 2px #000000;
}

.app-photo-stack-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 320px;
  position: relative;
}

.app-photo-stack {
  position: relative;
  width: 150px;
  height: 260px;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.stack-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 260px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #ffffff;
  border-radius: 20px;
  border: 4px solid #fff;
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease-out, z-index 0.3s;
  cursor: grab;
  transform-origin: bottom center;
}

.dark-stack .stack-photo {
  background-color: #000000;
  border-color: #000000;
}

.green-stack .stack-photo {
  background-color: #f2f7f4;
  border-color: #f2f7f4;
}


.stack-photo:active {
  cursor: grabbing;
}

/* --- Certificate Verification Modal --- */
.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 10000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.cert-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cert-modal-card {
  background: #ffffff;
  border: 3px solid #000000;
  border-radius: 14px;
  box-shadow: 10px 10px 0px 0px #999999, 10px 10px 0px 3px black;
  width: 100%;
  max-width: 540px;
  padding: 45px 40px 35px;
  position: relative;
  text-align: right;
  direction: rtl;
  transform: scale(0.88);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cert-modal-overlay.active .cert-modal-card {
  transform: scale(1);
}

.cert-modal-close {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  color: #000000;
  padding: 0.35em 0.75em !important;
}

.cert-modal-close:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 10px 10px 0px 0px #999999, 10px 10px 0px 3px black !important;
}

.cert-modal-card h3 {
  font-size: 24px;
  font-weight: 900;
  margin-top: 0;
  margin-bottom: 10px;
  color: #000;
}

.cert-modal-card > p {
  font-size: 14px;
  color: #444444;
  margin-bottom: 24px;
  line-height: 1.7;
}

.cert-input-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  width: 100%;
}

#cert-input {
  flex: 1;
  padding: 18px 16px;
  font-size: 17px;
  border: 3px solid #000000 !important;
  border-radius: 8px !important;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  text-align: left;
  box-shadow: none !important;
  transition: background 0.15s ease;
  min-height: 60px;
}

#cert-input:focus {
  background-color: #f7f7f7;
}

#cert-verify-submit {
  flex-shrink: 0;
  font-size: 14px !important;
  padding: 0.55em 1.2em !important;
  align-self: flex-start;
}

.cert-result-container {
  font-size: 15px;
  font-weight: 700;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.6;
  text-align: center;
  transition: all 0.2s ease;
  display: none;
}

.cert-result-container.success,
.cert-result-container.error {
  display: block;
}

.cert-result-container.success {
  background-color: #e6f4ea;
  border: 2px solid #137333;
  color: #137333;
}

.cert-result-container.error {
  background-color: #fce8e6;
  border: 2px solid #c5221f;
  color: #c5221f;
}

/* --- Neo-Brutalist Chat Conversation Section --- */
.chat-section-container {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.chat-section-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #000000;
  text-align: center;
}

.chat-section-subtitle {
  font-size: 17px;
  color: #666666;
  margin-bottom: 50px;
  text-align: center;
}

.chat-window {
  width: 100%;
  max-width: 900px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  direction: rtl;
}

.chat-messages-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  width: 100%;
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  transition: opacity 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-message.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.chat-align-end {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  flex-shrink: 0;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #000000;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
  box-shadow: 2px 2px 0px 0px #000000;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 85%;
}

.chat-bubble {
  border: 3px solid #000000;
  background: #ffffff;
  padding: 14px 22px;
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  position: relative;
  box-shadow: 4px 4px 0px 0px #000000;
}

.chat-align-start .chat-bubble {
  border-radius: 20px 20px 0 20px;
}

.chat-align-end .chat-bubble {
  border-radius: 20px 20px 20px 0;
}

.chat-bubble.chat-variant-primary {
  background-color: #000000;
  color: #ffffff;
  box-shadow: 4px 4px 0px 0px #999999;
}

.chat-bubble-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble-group .chat-bubble {
  margin-bottom: 0;
}

.chat-bubble-reactions {
  position: absolute;
  bottom: -12px;
  left: 14px;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 20px;
  padding: 3px 8px;
  display: flex;
  gap: 4px;
  font-size: 13px;
  z-index: 2;
  box-shadow: 2px 2px 0px 0px #000000;
}

.chat-message-footer {
  font-size: 12px;
  color: #888888;
  margin-top: 4px;
  align-self: flex-start;
}

.chat-align-end .chat-message-footer {
  align-self: flex-end;
}

.chat-marker {
  display: flex;
  justify-content: center;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.chat-marker.show {
  opacity: 1;
  transform: translateY(0);
}

.chat-marker-content {
  border: 3px dashed #000000;
  border-radius: 12px;
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #555555;
  background: #fafafa;
  box-shadow: 3px 3px 0px 0px rgba(0,0,0,0.05);
}

/* Shimmer Effect for typing */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Lightbox Modal --- */
.lightbox-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 20000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 0;
}

.lightbox-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Enlarged 3D Stack container */
.lightbox-large-stack {
  position: relative;
  width: 320px;
  height: 550px;
  transform-style: preserve-3d;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.large-stack-photo {
  position: absolute;
  width: 320px;
  height: 550px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), z-index 0.6s ease, filter 0.4s ease;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

/* --- 3D Fanning Active Index Positions (Desktop) --- */

/* State 0: Photo 1 (index 0) is active */
.lightbox-large-stack.active-idx-0 .photo-1 { transform: translate3d(0, 0, 100px) scale(1.15) rotate(0deg); z-index: 50; }
.lightbox-large-stack.active-idx-0 .photo-2 { transform: translate3d(120px, 15px, 50px) scale(0.95) rotate(6deg); z-index: 40; }
.lightbox-large-stack.active-idx-0 .photo-3 { transform: translate3d(220px, 30px, 0) scale(0.85) rotate(12deg); z-index: 30; }
.lightbox-large-stack.active-idx-0 .photo-4 { transform: translate3d(310px, 45px, -50px) scale(0.75) rotate(18deg); z-index: 20; }
.lightbox-large-stack.active-idx-0 .photo-5 { transform: translate3d(390px, 60px, -100px) scale(0.65) rotate(24deg); z-index: 10; }

/* State 1: Photo 2 (index 1) is active */
.lightbox-large-stack.active-idx-1 .photo-1 { transform: translate3d(-120px, 15px, 50px) scale(0.95) rotate(-6deg); z-index: 40; }
.lightbox-large-stack.active-idx-1 .photo-2 { transform: translate3d(0, 0, 100px) scale(1.15) rotate(0deg); z-index: 50; }
.lightbox-large-stack.active-idx-1 .photo-3 { transform: translate3d(120px, 15px, 50px) scale(0.95) rotate(6deg); z-index: 40; }
.lightbox-large-stack.active-idx-1 .photo-4 { transform: translate3d(220px, 30px, 0) scale(0.85) rotate(12deg); z-index: 30; }
.lightbox-large-stack.active-idx-1 .photo-5 { transform: translate3d(310px, 45px, -50px) scale(0.75) rotate(18deg); z-index: 20; }

/* State 2: Photo 3 (index 2) is active */
.lightbox-large-stack.active-idx-2 .photo-1 { transform: translate3d(-220px, 30px, 0) scale(0.85) rotate(-12deg); z-index: 30; }
.lightbox-large-stack.active-idx-2 .photo-2 { transform: translate3d(-120px, 15px, 50px) scale(0.95) rotate(-6deg); z-index: 40; }
.lightbox-large-stack.active-idx-2 .photo-3 { transform: translate3d(0, 0, 100px) scale(1.15) rotate(0deg); z-index: 50; }
.lightbox-large-stack.active-idx-2 .photo-4 { transform: translate3d(120px, 15px, 50px) scale(0.95) rotate(6deg); z-index: 40; }
.lightbox-large-stack.active-idx-2 .photo-5 { transform: translate3d(220px, 30px, 0) scale(0.85) rotate(12deg); z-index: 30; }

/* State 3: Photo 4 (index 3) is active */
.lightbox-large-stack.active-idx-3 .photo-1 { transform: translate3d(-310px, 45px, -50px) scale(0.75) rotate(-18deg); z-index: 20; }
.lightbox-large-stack.active-idx-3 .photo-2 { transform: translate3d(-220px, 30px, 0) scale(0.85) rotate(-12deg); z-index: 30; }
.lightbox-large-stack.active-idx-3 .photo-3 { transform: translate3d(-120px, 15px, 50px) scale(0.95) rotate(-6deg); z-index: 40; }
.lightbox-large-stack.active-idx-3 .photo-4 { transform: translate3d(0, 0, 100px) scale(1.15) rotate(0deg); z-index: 50; }
.lightbox-large-stack.active-idx-3 .photo-5 { transform: translate3d(120px, 15px, 50px) scale(0.95) rotate(6deg); z-index: 40; }

/* State 4: Photo 5 (index 4) is active */
.lightbox-large-stack.active-idx-4 .photo-1 { transform: translate3d(-390px, 60px, -100px) scale(0.65) rotate(-24deg); z-index: 10; }
.lightbox-large-stack.active-idx-4 .photo-2 { transform: translate3d(-310px, 45px, -50px) scale(0.75) rotate(-18deg); z-index: 20; }
.lightbox-large-stack.active-idx-4 .photo-3 { transform: translate3d(-220px, 30px, 0) scale(0.85) rotate(-12deg); z-index: 30; }
.lightbox-large-stack.active-idx-4 .photo-4 { transform: translate3d(-120px, 15px, 50px) scale(0.95) rotate(-6deg); z-index: 40; }
.lightbox-large-stack.active-idx-4 .photo-5 { transform: translate3d(0, 0, 100px) scale(1.15) rotate(0deg); z-index: 50; }


/* --- Responsive Adjustments for Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  .lightbox-large-stack,
  .large-stack-photo {
    width: 210px;
    height: 360px;
  }

  /* Reduce translation steps on mobile to fit the viewport width */
  /* State 0 */
  .lightbox-large-stack.active-idx-0 .photo-1 { transform: translate3d(0, 0, 60px) scale(1.1) rotate(0deg); }
  .lightbox-large-stack.active-idx-0 .photo-2 { transform: translate3d(60px, 10px, 30px) scale(0.9) rotate(6deg); }
  .lightbox-large-stack.active-idx-0 .photo-3 { transform: translate3d(110px, 20px, 0) scale(0.8) rotate(12deg); }
  .lightbox-large-stack.active-idx-0 .photo-4 { transform: translate3d(150px, 30px, -30px) scale(0.7) rotate(18deg); }
  .lightbox-large-stack.active-idx-0 .photo-5 { transform: translate3d(180px, 40px, -60px) scale(0.6) rotate(24deg); }

  /* State 1 */
  .lightbox-large-stack.active-idx-1 .photo-1 { transform: translate3d(-60px, 10px, 30px) scale(0.9) rotate(-6deg); }
  .lightbox-large-stack.active-idx-1 .photo-2 { transform: translate3d(0, 0, 60px) scale(1.1) rotate(0deg); }
  .lightbox-large-stack.active-idx-1 .photo-3 { transform: translate3d(60px, 10px, 30px) scale(0.9) rotate(6deg); }
  .lightbox-large-stack.active-idx-1 .photo-4 { transform: translate3d(110px, 20px, 0) scale(0.8) rotate(12deg); }
  .lightbox-large-stack.active-idx-1 .photo-5 { transform: translate3d(150px, 30px, -30px) scale(0.7) rotate(18deg); }

  /* State 2 */
  .lightbox-large-stack.active-idx-2 .photo-1 { transform: translate3d(-110px, 20px, 0) scale(0.8) rotate(-12deg); }
  .lightbox-large-stack.active-idx-2 .photo-2 { transform: translate3d(-60px, 10px, 30px) scale(0.9) rotate(-6deg); }
  .lightbox-large-stack.active-idx-2 .photo-3 { transform: translate3d(0, 0, 60px) scale(1.1) rotate(0deg); }
  .lightbox-large-stack.active-idx-2 .photo-4 { transform: translate3d(60px, 10px, 30px) scale(0.9) rotate(6deg); }
  .lightbox-large-stack.active-idx-2 .photo-5 { transform: translate3d(110px, 20px, 0) scale(0.8) rotate(12deg); }

  /* State 3 */
  .lightbox-large-stack.active-idx-3 .photo-1 { transform: translate3d(-150px, 30px, -30px) scale(0.7) rotate(-18deg); }
  .lightbox-large-stack.active-idx-3 .photo-2 { transform: translate3d(-110px, 20px, 0) scale(0.8) rotate(-12deg); }
  .lightbox-large-stack.active-idx-3 .photo-3 { transform: translate3d(-60px, 10px, 30px) scale(0.9) rotate(-6deg); }
  .lightbox-large-stack.active-idx-3 .photo-4 { transform: translate3d(0, 0, 60px) scale(1.1) rotate(0deg); }
  .lightbox-large-stack.active-idx-3 .photo-5 { transform: translate3d(60px, 10px, 30px) scale(0.9) rotate(6deg); }

  /* State 4 */
  .lightbox-large-stack.active-idx-4 .photo-1 { transform: translate3d(-180px, 40px, -60px) scale(0.6) rotate(-24deg); }
  .lightbox-large-stack.active-idx-4 .photo-2 { transform: translate3d(-150px, 30px, -30px) scale(0.7) rotate(-18deg); }
  .lightbox-large-stack.active-idx-4 .photo-3 { transform: translate3d(-110px, 20px, 0) scale(0.8) rotate(-12deg); }
  .lightbox-large-stack.active-idx-4 .photo-4 { transform: translate3d(-60px, 10px, 30px) scale(0.9) rotate(-6deg); }
  .lightbox-large-stack.active-idx-4 .photo-5 { transform: translate3d(0, 0, 60px) scale(1.1) rotate(0deg); }
}


/* Disable text selection and tap highlight globally, except on inputs/textareas */
* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

input, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Disable interactive clicks/drags on polaroid image stacks globally */
.stack-photo {
  pointer-events: none !important;
  cursor: default !important;
}

/* Prevent double-tap zoom or pinch zoom layout shifts in mobile browsers */
html, body {
  touch-action: pan-x pan-y;
}

/* Custom Mobile Responsiveness Enhancements (max-width: 768px) */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  /* Header adjustments */
  header {
    top: 8px;
  }
  
  .nav-bar-card {
    padding: 6px 12px;
    min-height: 54px;
    gap: 8px;
  }

  .logo {
    font-size: 16px !important;
  }

  .logo-img {
    height: 28px !important;
  }

  .nav-logo-left {
    display: none !important;
  }

  .nav-toggle {
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-width: 1.5px !important;
    border-radius: 4px !important;
  }

  .nav-links {
    z-index: 9999 !important;
  }

  /* Section title sizes */
  .section-title, .chat-section-title {
    font-size: 22px !important;
  }

  /* Global container margins on mobile */
  .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  /* Hero Section adjustments */
  .hero-title {
    margin-bottom: 12px;
  }

  .hero-desc {
    font-size: 15px !important;
    padding: 0 20px !important;
    line-height: 1.5;
  }

  .section-desc {
    padding: 0 20px !important;
  }

  /* Hero Brand Logos on Mobile */
  .hero-brand-logos {
    margin-top: 35px !important;
    margin-bottom: 45px !important;
  }

  .brand-logos-grid {
    gap: 18px !important;
  }

  .brand-logo-item {
    height: 48px !important;
  }

  /* Retro TV scaling for small mobile viewports */
  .tv-wrapper {
    width: 100% !important;
    max-width: 270px !important;
    height: 195px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: visible !important;
  }

  .tv-main {
    transform: scale(0.58) !important;
    transform-origin: center center !important;
    margin-top: 0 !important;
    width: 440px !important;
  }

  /* App stacks layout & order adjustments on mobile */
  .app-gallery-row,
  .app-gallery-row.row-reverse {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    text-align: center !important;
    flex-direction: column !important;
  }
  
  .app-info-panel {
    display: contents !important;
  }

  .app-title-heading {
    order: 1 !important;
    font-size: 24px !important;
    width: 100% !important;
    text-align: center !important;
    color: #000000 !important; /* Ensure visibility if background differs */
  }

  /* Polaroid Image Stack comes second */
  .app-photo-stack-wrapper {
    order: 2 !important;
    height: 190px !important;
    margin-block: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* App Description comes third */
  .app-desc-text {
    order: 3 !important;
    font-size: 14px !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 10px !important;
  }

  .app-photo-stack, 
  .app-photo-stack .stack-photo {
    width: 95px !important;
    height: 165px !important;
  }

  /* Buttons come last */
  .app-info-panel .btn {
    order: 4 !important;
    align-self: center !important;
    margin: 10px auto 0 !important;
  }

  .plat-links {
    order: 4 !important;
    align-self: center !important;
    align-items: center !important;
    margin: 12px auto 0 !important;
  }

  /* Privacy link sits directly under the buttons */
  .app-privacy-link {
    order: 5 !important;
    align-self: center !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 8px !important;
  }

  /* Certificate Modal Responsiveness */
  .cert-modal-card {
    padding: 30px 20px 20px !important;
    max-width: 90% !important;
    box-shadow: 6px 6px 0px 0px #999999, 6px 6px 0px 3px black !important;
  }

  .cert-modal-card h3 {
    font-size: 20px !important;
    margin-bottom: 12px !important;
  }

  .cert-modal-card > p {
    font-size: 13px !important;
    margin-bottom: 15px !important;
  }

  .cert-input-wrapper {
    flex-direction: column !important;
    gap: 10px !important;
  }

  #cert-input {
    padding: 12px 14px !important;
    font-size: 15px !important;
    width: 100% !important;
  }

  #cert-verify-submit {
    width: 100% !important;
    margin: 0 !important;
  }

  /* Section padding equalized and reduced for mobile */
  .services-section, .books-section {
    padding: 45px 0 !important;
  }
  
  .courses-section {
    padding: 45px 0 0 0 !important;
  }

  .chat-section-container {
    margin-top: 45px !important;
    padding-bottom: 45px !important;
  }

  /* Chat window adjustments */
  .chat-messages-list {
    gap: 22px !important;
  }

  .chat-message {
    gap: 8px !important;
  }

  .chat-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 11px !important;
    border-width: 2px !important;
  }

  .chat-bubble {
    font-size: 13px !important;
    padding: 8px 14px !important;
    border-width: 2px !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
  }

  .chat-bubble.chat-variant-primary {
    box-shadow: 2px 2px 0px 0px #999999 !important;
  }

  .chat-bubble-content {
    font-size: 13px !important;
  }

  /* Prevent hover zoom/rotate zoom animations on mobile taps */
  .btn:hover, .nav-btn:hover, button:hover, .button:hover,
  .book-wrapper:hover Book, .stat-card:hover {
    transform: none !important;
    box-shadow: 4px 4px 0px 0px #999999, 4px 4px 0px 2px black !important;
  }

  .tv-wrapper:hover .tv-main {
    transform: scale(0.58) !important;
  }

  .btn:active, .nav-btn:active, button:active, .button:active {
    transform: translate(4px, 4px) !important;
    box-shadow: 0px 0px 0px 0px transparent, 0px 0px 0px 0px black !important;
  }

  /* Buttons default sizing for mobile */
  .btn, .nav-btn, button, .button {
    font-size: 15px !important;
    padding-block: 0.6em !important;
    padding-inline: 1.4em !important;
    box-shadow: 4px 4px 0px 0px #999999, 4px 4px 0px 2px black !important;
  }
}

/* Extra small devices (max-width: 360px) */
@media (max-width: 360px) {
  .logo {
    font-size: 14px !important;
  }

  .logo-img {
    height: 24px !important;
  }

  .tv-main {
    transform: scale(0.48) !important;
  }

  .tv-wrapper:hover .tv-main {
    transform: scale(0.48) !important;
  }
  
  .tv-wrapper {
    height: 160px !important;
  }

  .app-photo-stack,
  .app-photo-stack .stack-photo {
    width: 80px !important;
    height: 138px !important;
  }
}

/* =========================================================
   Fluid Typography — scales smoothly with screen size
   (clamp: minimum for small phones, fluid vw in the middle,
    maximum for large desktop screens)
   ========================================================= */
.hero-title {
  font-size: clamp(30px, 8.2vw, 78px) !important;
}
.hero-desc {
  font-size: clamp(15px, 3.4vw, 24px) !important;
}
.section-title,
.chat-section-title {
  font-size: clamp(22px, 5.4vw, 30px) !important;
}
.section-desc {
  font-size: clamp(14px, 3.4vw, 16px) !important;
}
.app-title-heading {
  font-size: clamp(22px, 5.6vw, 32px) !important;
}
.app-desc-text {
  font-size: clamp(14px, 3.6vw, 16px) !important;
}


