:root {
  --primary-color: #5389BA;
  --primary-light: #7BB1DB;
  --primary-dark: #3D6B92;
  --primary-ultra-light: #f0f7ff;
  
  --secondary-color: #64748B;
  --accent-color: #F59E0B;
  
  --bg-color: #F8FAFC;
  --surface-color: #FFFFFF;
  --glass-color: rgba(255, 255, 255, 0.7);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.75rem;
  --border-radius-lg: 1.5rem;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

a:hover, a:focus, a:active {
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
}

.section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6); /* Darker slate-blue for better contrast */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040; /* Below navbar (1100) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100; /* Higher than overlay (1040) */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem 0;
}

.navbar.scrolled {
  background: var(--glass-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.nav-brand img {
  width: 40px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-btn {
  background: var(--primary-color);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1200; /* Highest z-index */
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  margin: 5px 0;
  transition: 0.3s;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at top right, var(--primary-ultra-light), transparent),
              radial-gradient(circle at bottom left, #fff1f2, transparent);
  padding-top: 80px;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 80px 0 40px;
  }
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(83, 137, 186, 0.39);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(83, 137, 186, 0.23);
}

.btn-secondary {
  background: white;
  color: var(--text-primary);
  border: 2px solid var(--primary-ultra-light);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-ultra-light);
}

.hero-image {
  perspective: 1000px;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 2rem;
  border: 4px solid #1e293b;
  box-shadow: 
    -20px 20px 60px rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.1);
  transform: rotateY(-15deg) rotateX(5deg) rotateZ(2deg);
  filter: none;
  animation: float-3d 6s ease-in-out infinite;
  background: #000;
}

@keyframes float-3d {
  0%, 100% { transform: rotateY(-15deg) rotateX(5deg) rotateZ(2deg) translateY(0); }
  50% { transform: rotateY(-10deg) rotateX(2deg) rotateZ(1deg) translateY(-20px); }
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--surface-color);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  text-align: center;
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-ultra-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: var(--border-radius-md);
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: var(--primary-color);
  color: white;
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 480px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

.module-card {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--border-radius-md);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.module-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.module-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.module-card ul {
  padding-left: 1.25rem;
}

.module-card li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  position: relative;
}

.module-card li::before {
  content: '✓';
  position: absolute;
  left: -1.25rem;
  color: var(--primary-color);
  font-weight: bold;
}

/* Gallery Slider */
.gallery-container {
  overflow: hidden;
  padding: 2rem 0;
  position: relative;
}

.gallery-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100px;
  background: linear-gradient(to right, transparent, var(--bg-color));
  pointer-events: none;
  z-index: 2;
}

.gallery-grid {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 1rem 2rem 3rem;
  margin: 0 -2rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.gallery-grid::-webkit-scrollbar {
  height: 6px;
  display: block !important;
}

.gallery-grid::-webkit-scrollbar-track {
  background: var(--primary-ultra-light);
  border-radius: 10px;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.gallery-item {
  flex: 0 0 240px;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: #0f172a;
  border: 2px solid #1e293b;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  pointer-events: none;
}

.gallery-item:hover {
  transform: translateY(-12px);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.15),
    0 12px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.gallery-item img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Download Section */
.download-section {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 6rem 0;
  border-radius: var(--border-radius-lg);
  margin-bottom: 5rem;
}

.download-section h2 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.download-btns {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.download-btn img {
  height: 60px;
  transition: all 0.3s ease;
}

.download-btn:hover img {
  transform: scale(1.1);
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand h2 {
  color: white;
  margin-bottom: 1.5rem;
}

.footer-links h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-content p {
    margin: 0 auto 2.5rem;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 7rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1150;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.25rem;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .download-section h2 {
    font-size: 2rem;
  }
  
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .hero-image img {
    max-width: 280px;
  }
  
  .download-btns {
    gap: 1rem;
  }
  
  .download-btn img {
    height: 50px;
  }
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-content img.changing {
  opacity: 0;
  transform: scale(0.95);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  pointer-events: auto;
  transition: all 0.3s ease;
}

.lightbox-btn:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .lightbox-nav {
    bottom: -60px;
    top: auto;
    transform: none;
    justify-content: center;
    gap: 20px;
  }
}
