/**
 * Alsharkia Can - Component Styles (components.css)
 * Hero Slider, Ken Burns, Cards, Marquee, Lightbox, Forms, and Modals
 */

/* =====================================================================
   1. HERO SLIDER
   ===================================================================== */
.hero-section {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: var(--header-height);
  background-color: var(--primary-900);
}

.hero-slider-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1000ms cubic-bezier(0.4, 0, 0.2, 1), visibility 1000ms;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transform-origin: center center;
}

/* Ken Burns subtle zoom */
.hero-slide.active .hero-slide-bg {
  animation: kenBurnsEffect 16s ease-out infinite alternate;
}

@keyframes kenBurnsEffect {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.active .hero-slide-bg {
    animation: none !important;
  }
  .hero-slide {
    transition: opacity 200ms ease;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(25, 9, 51, 0.88) 0%,
    rgba(37, 15, 74, 0.78) 55%,
    rgba(15, 23, 42, 0.85) 100%
  );
  z-index: 3;
}

.hero-container {
  position: relative;
  z-index: 4;
  padding-block: 80px;
}

.hero-content {
  max-width: 780px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 22px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-desc {
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 34px;
}

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

/* Hero Controls (Dots & Arrows) */
.hero-controls {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-dot.active {
  width: 34px;
  background: var(--primary-400);
}

.hero-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.hero-nav-btn:hover {
  background: #ffffff;
  color: var(--primary-900);
}

/* =====================================================================
   2. STATS SECTION
   ===================================================================== */
.stats-banner {
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.stats-card-wrap {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--metal-border);
  padding: 34px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 20px;
  border-inline-end: 1px solid var(--metal-shine);
  padding-inline-end: 20px;
}

.stat-item:last-child {
  border-inline-end: none;
  padding-inline-end: 0;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-number {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.1;
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* =====================================================================
   3. ABOUT PREVIEW SECTION
   ===================================================================== */
.about-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-preview-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--metal-border);
}

.about-preview-image img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-preview-image:hover img {
  transform: scale(1.03);
}

.about-preview-badge {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--primary-800);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 15px;
}

body[dir="rtl"] .about-preview-badge {
  right: auto;
  left: 24px;
}

/* =====================================================================
   4. PRODUCTS GRID & CARDS
   ===================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--metal-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

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

.product-card-img-wrap {
  position: relative;
  height: 240px;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

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

.product-category-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-700);
  box-shadow: var(--shadow-sm);
}

body[dir="rtl"] .product-category-badge {
  right: auto;
  left: 14px;
}

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: 10px;
}

.product-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.product-card-meta {
  background: var(--bg-alt);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--metal-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =====================================================================
   5. WHY US & APPLICATIONS
   ===================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.why-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  border: 1px solid var(--metal-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

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

.why-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.why-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: 10px;
}

.why-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Applications Cards */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--metal-border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  transition: all var(--transition-fast);
}

.app-card:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  transform: translateY(-3px);
}

.app-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
}

.app-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-900);
}

/* =====================================================================
   6. CLIENTS MARQUEE & GRID
   ===================================================================== */
.clients-section {
  overflow: hidden;
}

.clients-marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 24px;
  padding-block: 10px;
}

.clients-marquee-track {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 24px;
  min-width: 100%;
  animation: scrollMarquee 26s linear infinite;
}

.clients-marquee-container:hover .clients-marquee-track {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

body[dir="rtl"] @keyframes scrollMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

.client-logo-card {
  width: 170px;
  height: 100px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--metal-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.client-logo-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}

.client-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* =====================================================================
   7. GOOGLE REVIEWS SECTION
   ===================================================================== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid var(--metal-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-stars {
  display: flex;
  gap: 4px;
  color: #f59e0b;
  margin-bottom: 14px;
}

.review-text {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.review-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-900);
}

.review-badge {
  font-size: 12px;
  color: var(--text-muted);
}

/* =====================================================================
   8. QR CODE & CATALOG CTA
   ===================================================================== */
.qr-catalog-card {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  color: #ffffff;
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-xl);
}

.qr-box-wrap {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-main);
  max-width: 260px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.qr-code-img {
  width: 190px;
  height: 190px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-img img,
.qr-code-img svg {
  max-width: 100%;
  max-height: 100%;
}

.qr-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* =====================================================================
   9. GALLERY & LIGHTBOX
   ===================================================================== */
.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--metal-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 250px;
  background: var(--bg-surface);
  border: 1px solid var(--metal-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(25, 9, 51, 0.88) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: #ffffff;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.gallery-caption-cat {
  font-size: 12px;
  color: var(--primary-200);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox-caption {
  margin-top: 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 24px;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: #ffffff;
  color: #000000;
}

/* =====================================================================
   10. CONTACT FORM & INPUTS
   ===================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
}

.contact-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--metal-border);
  box-shadow: var(--shadow-md);
}

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

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--metal-border);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 15px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-control:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(98, 45, 184, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* Toast Alert Feedback */
.toast-alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  display: none;
}

.toast-alert.show {
  display: block;
}

.toast-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .stats-card-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .stat-item {
    border-inline-end: none;
    border-bottom: 1px solid var(--metal-shine);
    padding-bottom: 16px;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .about-preview-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .qr-catalog-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
}
