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

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* Scroll behavior moved to performance section */

body {
  font-family: var(--font-family);
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  font-weight: var(--font-weight-normal);
}

/* ================= DESIGN SYSTEM VARIABLES ================= */
:root {
  /* Primary Colors */
  --primary: #3ab0c5;
  --primary-dark: #2a8fa0;
  --primary-light: #4fc8dd;
  --primary-gradient: linear-gradient(135deg, #3ab0c5 0%, #2a8fa0 100%);
  
  /* Accent Colors */
  --accent: #f6d365;
  --accent-dark: #e6c355;
  --accent-light: #ffe275;
  --accent-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  
  /* Neutral Colors */
  --dark: #1a2332;
  --dark-light: #2d3e50;
  --light: #f8f9fa;
  --light-dark: #e9ecef;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  
  /* Text Colors */
  --text-primary: #1a2332;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 50px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  --shadow-primary: 0 10px 30px rgba(58, 176, 197, 0.3);
  --shadow-accent: 0 10px 30px rgba(246, 211, 101, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
}

/* ================= GLOBAL ================= */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

section {
  padding: clamp(60px, 8vw, 100px) 0;
  position: relative;
}

/* Performance optimizations */
* {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

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

/* Smooth scrolling performance */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography Hierarchy */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
}

.subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 44px;
  min-width: 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn.primary {
  background: var(--primary-gradient);
  color: var(--white);
  border-color: transparent;
}

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

.btn.primary:active {
  transform: translateY(-1px);
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary);
}

.btn.secondary:active {
  transform: translateY(-1px);
}

.btn.small {
  padding: 10px 22px;
  font-size: 14px;
  min-height: 40px;
}

.btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* ================= HEADER ================= */
.header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  background: rgba(26, 35, 50, 0.95);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: var(--font-weight-extrabold);
  color: var(--white);
  font-size: 1.25rem;
  text-decoration: none;
  transition: transform var(--transition-base);
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: transform var(--transition-base);
}

.logo:hover img {
  transform: rotate(5deg) scale(1.1);
}

/* NAV LINKS */
nav {
  display: flex;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 8px 0;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--accent);
}

nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  position: relative;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 18px;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active .menu-icon span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .menu-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    z-index: 100;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  nav.mobile-open {
    transform: translateX(0);
  }

  nav a {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: block;
    font-size: 16px;
  }

  nav a:last-child {
    border-bottom: none;
  }

  nav a::after {
    display: none;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* ================= HERO ================= */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 50%, var(--dark) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0;
}

/* Dynamic animated background */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(58, 176, 197, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(246, 211, 101, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
  animation: heroBackgroundRotate 20s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, 
      rgba(58, 176, 197, 0.05) 0%, 
      transparent 30%,
      transparent 70%,
      rgba(246, 211, 101, 0.05) 100%
    );
  animation: heroGradientShift 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroBackgroundRotate {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(5deg) scale(1.1);
  }
  50% {
    transform: rotate(0deg) scale(1.05);
  }
  75% {
    transform: rotate(-5deg) scale(1.1);
  }
}

@keyframes heroGradientShift {
  0% {
    opacity: 0.3;
    transform: translateX(0) translateY(0);
  }
  50% {
    opacity: 0.5;
    transform: translateX(20px) translateY(-20px);
  }
  100% {
    opacity: 0.3;
    transform: translateX(-20px) translateY(20px);
  }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--white);
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease;
}

.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero p {
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

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

/* ================= SUBTITLE ================= */
.subtitle {
  text-align: center;
  max-width: 700px;
  margin: var(--spacing-sm) auto var(--spacing-xl);
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
}

/* ================= PRODUCTS ================= */
.products {
  background: linear-gradient(to bottom, var(--white) 0%, var(--light) 50%, var(--white) 100%);
  position: relative;
}

.products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

/* Products Loading State */
.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.product-card {
  background: var(--white);
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-slow) cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--gray-200);
}

.product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  z-index: 1;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(58, 176, 197, 0.02) 0%, rgba(246, 211, 101, 0.02) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.product-card:hover::after {
  opacity: 1;
}

/* Product Badges */
.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-sm);
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  position: relative;
  z-index: 1;
}

.badge {
  font-size: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.badge-download {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.badge-code {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.badge-value {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-md);
}

/* Product Image Wrapper */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.product-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
  filter: brightness(1.05);
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 35, 50, 0.9) 0%, rgba(45, 62, 80, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(8px);
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.btn-overlay {
  padding: 12px 28px;
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  transition: all var(--transition-base);
  transform: translateY(10px);
  box-shadow: var(--shadow-md);
}

.product-card:hover .btn-overlay {
  transform: translateY(0);
}

.btn-overlay:hover {
  background: var(--accent-gradient);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-accent);
}

/* Product Info */
.product-info {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.product-card h3 {
  margin-bottom: var(--spacing-sm);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: var(--font-weight-bold);
}

.product-card .product-description {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  flex-grow: 1;
}

/* Product Features Preview */
.product-features-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.feature-tag {
  font-size: 11px;
  padding: 6px 14px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--gray-300);
  transition: all var(--transition-base);
  display: inline-block;
}

.feature-tag:hover {
  background: var(--primary-gradient);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Product Footer */
.product-footer {
  margin-top: auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.price {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: var(--font-weight-extrabold);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.price::before {
  content: '💰';
  font-size: 1.2rem;
  filter: grayscale(0);
}

.product-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.product-actions .btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
  min-height: 44px; /* Touch-friendly */
}

/* Touch-friendly improvements */
* {
  -webkit-tap-highlight-color: rgba(58, 176, 197, 0.1);
}

button, a.btn, .filter-btn {
  touch-action: manipulation; /* Prevents double-tap zoom */
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ================= PRODUCT IMAGES ================= */
/* Note: Product image styles are now in .product-image-wrapper above */

/* Single product preview */
.product-preview {
  width: 100%;
  max-width: 700px;
  margin: 30px auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,.12);
}

.product-preview img {
  width: 100%;
  display: block;
}

/* ================= HOW IT WORKS ================= */
.how {
  background: linear-gradient(to bottom, var(--white) 0%, var(--light) 100%);
  position: relative;
  overflow: hidden;
}

.how::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

.how::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

.steps {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  margin-top: 60px;
  position: relative;
  flex-wrap: wrap;
}

/* Step Card */
.step-card {
  background: var(--white);
  padding: var(--spacing-xl) var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-slow) cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  border: 2px solid var(--gray-200);
}

.step-card.step-visible {
  opacity: 1;
  transform: translateY(0);
}

.step-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 1;
}

.step-card:hover::before {
  transform: scaleX(1);
}

.step-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(58, 176, 197, 0.02) 0%, rgba(246, 211, 101, 0.02) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.step-card:hover::after {
  opacity: 1;
}

/* Step Number Badge */
.step-number {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  position: relative;
  z-index: 2;
}

.step-card:hover .step-number {
  transform: scale(1.15) rotate(8deg);
  box-shadow: var(--shadow-xl);
}

.step-number-text {
  font-size: 24px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,.2);
}

/* Step Icon */
.step-icon {
  font-size: 48px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.1));
}

.step-card:hover .step-icon {
  transform: scale(1.15) rotate(-5deg);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.2));
}

/* Step Content */
.step-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.step-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: clamp(14px, 2vw, 16px);
  margin: 0;
  flex-grow: 1;
}

/* Connecting Lines (Desktop Only) */
.step-connector {
  flex: 0 0 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
}

.step-connector::before {
  content: '→';
  font-size: 32px;
  color: var(--primary);
  opacity: 0.3;
  transition: all 0.3s ease;
}

.step-connector::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.2;
  transition: all 0.3s ease;
}

.steps:hover .step-connector::before {
  opacity: 0.6;
  transform: translateX(5px);
}

.steps:hover .step-connector::after {
  opacity: 0.4;
  width: 80px;
}

/* ================= CONTACT ================= */
.contact-hero {
  background: linear-gradient(135deg, var(--dark), #2d3e50);
  color: white;
  text-align: center;
  padding: 80px 0;
}

.contact-hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.contact-hero .subtitle {
  color: #ddd;
  max-width: 700px;
  margin: 0 auto;
}

.contact {
  background: var(--light);
  padding: 80px 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form-wrapper,
.contact-info-wrapper {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

.contact-form-wrapper h2,
.contact-info-wrapper h2 {
  margin-bottom: 30px;
  color: var(--dark);
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px; /* Prevents zoom on iOS */
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
  width: 100%;
  min-height: 44px; /* Touch-friendly */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 176, 197, 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
}

.field-error {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 5px;
}

.form-message {
  padding: 15px 20px;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 10px;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.contact-form .btn {
  width: 100%;
  margin-top: 10px;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.contact-details h4 {
  margin-bottom: 5px;
  color: var(--dark);
  font-size: 16px;
}

.contact-details a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--accent);
}

.contact-details p {
  color: #666;
  margin: 0;
  line-height: 1.6;
}

/* Business Hours */
.business-hours {
  margin: 30px 0;
  padding: 25px;
  background: var(--light);
  border-radius: 8px;
}

.business-hours h3 {
  margin-bottom: 15px;
  color: var(--dark);
  font-size: 18px;
}

.hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.hours-list li:last-child {
  border-bottom: none;
}

.hours-list .day {
  font-weight: 600;
  color: var(--dark);
}

.hours-list .time {
  color: #666;
}

/* Social Links */
.social-section {
  margin-top: 30px;
}

.social-section h3 {
  margin-bottom: 20px;
  color: var(--dark);
  font-size: 18px;
}

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

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--light);
  border-radius: 50px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(58, 176, 197, 0.3);
  border-color: var(--primary);
}

.social-icon {
  font-size: 20px;
}

.social-name {
  font-weight: 600;
  font-size: 14px;
}

/* ================= FOOTER ================= */
.footer {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  text-align: center;
  padding: var(--spacing-xl) 0;
  position: relative;
  margin-top: var(--spacing-2xl);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 14px;
}

/* ================= HR ================= */
hr {
  border: none;
  height: 1px;
  background: #eee;
  margin: 40px 0;
}

/* ================= CATEGORY FILTER ================= */
.category-filter {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--dark);
}

.product-count {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-btn {
  padding: 12px 28px;
  border: 2px solid var(--gray-300);
  background: var(--white);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.filter-btn.active {
  background: var(--primary-gradient);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
  transform: translateY(-2px);
}

.no-products {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-products p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.product-category-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(58, 176, 197, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  section {
    padding: 60px 0;
  }

  .container {
    padding: 0 15px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .product-image-wrapper {
    height: 200px;
  }

  .product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-actions .btn {
    width: 100%;
  }

  .product-badges {
    padding: 12px 15px 8px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* Category Filter - Mobile */
  .category-filter {
    padding: 20px 15px;
    margin-bottom: 30px;
  }

  .filter-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-buttons {
    width: 100%;
  }

  .filter-btn {
    flex: 1;
    min-width: calc(50% - 6px);
    font-size: 13px;
    padding: 12px 16px;
  }

  /* Typography - Mobile */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .btn {
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
  }

  .btn.small {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 900px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* Large Screens */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }
}

  /* How It Works - Mobile */
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 40px;
  }

  .step-card {
    min-width: 100%;
    max-width: 100%;
    padding: 30px 25px;
  }

  .step-connector {
    display: none;
  }

  .step-number {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
  }

  .step-number-text {
    font-size: 20px;
  }

  .step-icon {
    font-size: 40px;
    margin-bottom: 15px;
  }

  .step-title {
    font-size: 1.3rem;
  }

  .step-description {
    font-size: 14px;
  }

  /* Contact - Mobile */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form-wrapper,
  .contact-info-wrapper {
    padding: 30px 20px;
  }

  .contact-hero h1 {
    font-size: 2rem;
  }

  /* About - Mobile */
  .about-hero h1 {
    font-size: 2rem;
  }

  .mission-vision-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .stats-section {
    padding: 40px 20px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  /* Timeline - Mobile */
  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    padding-left: 70px !important;
    padding-right: 0 !important;
    text-align: left !important;
  }

  .timeline-marker {
    left: 30px;
  }

  .timeline-content {
    max-width: 100%;
    margin: 0 !important;
  }

  .technologies-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    padding: 30px 20px;
  }

  .testimonials-controls {
    flex-wrap: wrap;
  }
}
/* PRODUCT PAGE */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.product-left img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.product-title {
  font-size: 32px;
  margin-bottom: 12px;
}

.product-description {
  color: #555;
  line-height: 1.7;
}

.product-price {
  font-size: 28px;
  font-weight: bold;
  margin: 20px 0;
}

.buy-btn {
  margin: 10px 0;
  width: 100%;
}

.product-note {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

.product-features {
  margin: 15px 0;
}

.product-features li {
  margin-bottom: 8px;
}

/* Mobile */
@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}
.trust-badges {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.product-slider {
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  border-radius: 14px;
}

.product-slider img {
  width: 100%;
  display: block;
  transition: opacity 0.6s ease-in-out;
}

/* ================= LANGUAGE SWITCHER ================= */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--white);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  min-width: 40px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent);
}

.lang-btn.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

/* ================= RTL SUPPORT ================= */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* RTL Navigation */
html[dir="rtl"] nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] nav a {
  margin-left: 0;
  margin-right: 20px;
}

html[dir="rtl"] nav a::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .language-switcher {
  margin-left: 0;
  margin-right: 20px;
}

/* RTL Layout adjustments */
html[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

/* RTL Product cards */
html[dir="rtl"] .product-card {
  text-align: right;
}

html[dir="rtl"] .product-info {
  text-align: right;
}

html[dir="rtl"] .product-footer {
  flex-direction: row-reverse;
}

/* RTL Buttons */
html[dir="rtl"] .btn {
  text-align: center;
}

/* RTL Forms */
html[dir="rtl"] .form-group {
  text-align: right;
}

html[dir="rtl"] .form-group label {
  text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea {
  text-align: right;
}

/* RTL Hero section */
html[dir="rtl"] .hero {
  text-align: right;
}

html[dir="rtl"] .hero-actions {
  justify-content: flex-start;
}

/* RTL hero background animation - reverse direction */
html[dir="rtl"] .hero::before {
  animation: heroBackgroundRotateRTL 20s ease-in-out infinite;
}

html[dir="rtl"] .hero::after {
  animation: heroGradientShiftRTL 15s ease-in-out infinite alternate;
}

@keyframes heroBackgroundRotateRTL {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-5deg) scale(1.1);
  }
  50% {
    transform: rotate(0deg) scale(1.05);
  }
  75% {
    transform: rotate(5deg) scale(1.1);
  }
}

@keyframes heroGradientShiftRTL {
  0% {
    opacity: 0.3;
    transform: translateX(0) translateY(0);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-20px) translateY(-20px);
  }
  100% {
    opacity: 0.3;
    transform: translateX(20px) translateY(20px);
  }
}

/* RTL Product page */
html[dir="rtl"] .product-layout {
  flex-direction: row-reverse;
}

html[dir="rtl"] .product-right {
  text-align: right;
}

/* RTL Contact page */
html[dir="rtl"] .contact-layout {
  flex-direction: row-reverse;
}

html[dir="rtl"] .contact-form-wrapper,
html[dir="rtl"] .contact-info-wrapper {
  text-align: right;
}

/* RTL Footer */
html[dir="rtl"] .footer {
  text-align: right;
}

/* RTL Steps/How it works */
html[dir="rtl"] .steps {
  flex-direction: row-reverse;
}

html[dir="rtl"] .step {
  text-align: right;
}

/* RTL Filter buttons */
html[dir="rtl"] .filter-buttons {
  flex-direction: row-reverse;
}

html[dir="rtl"] .filter-btn {
  margin-left: 0;
  margin-right: 10px;
}

/* RTL Product grid */
html[dir="rtl"] .product-grid {
  direction: rtl;
}

/* RTL About page */
html[dir="rtl"] .about-section {
  text-align: right;
}

html[dir="rtl"] .mission-vision-grid {
  flex-direction: row-reverse;
}

html[dir="rtl"] .values-grid {
  direction: rtl;
}

html[dir="rtl"] .team-grid {
  direction: rtl;
}

/* Responsive RTL */
@media (max-width: 768px) {
  html[dir="rtl"] .language-switcher {
    margin-right: 10px;
    margin-left: 0;
  }
  
  html[dir="rtl"] nav a {
    margin-right: 10px;
    margin-left: 0;
  }
}