/* Homepage-specific Styles */

/* Cover Section */
.cover {
  background: linear-gradient(135deg, var(--primary-darkest) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: #fff;
  padding: 64px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

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

.cover-logo {
  max-width: 120px;
  height: auto;
  margin: 0 auto 24px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.cover h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 16px;
  color: #fff;
}

.cover .subtitle { 
  opacity: 0.95; 
  font-size: 1.2rem; 
  font-weight: 300;
  margin-bottom: 8px;
}

.cover .company-name {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
  margin-top: 12px;
}

/* At a Glance */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 32px 0;
  padding: 24px;
  background: linear-gradient(135deg, rgba(72, 93, 117, 0.08) 0%, rgba(124, 146, 174, 0.08) 100%);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.at-a-glance .glance-item { 
  text-align: center; 
}

.at-a-glance .glance-item strong { 
  display: block; 
  color: var(--primary); 
  font-size: 1.5rem; 
  margin-bottom: 6px; 
  font-weight: 700;
}

.at-a-glance .glance-item span { 
  font-size: 0.9rem; 
  color: var(--text-muted); 
}

/* Enhanced Intro */
.enhanced-intro {
  background: linear-gradient(135deg, rgba(72, 93, 117, 0.05) 0%, rgba(124, 146, 174, 0.05) 100%);
  border-left: 4px solid var(--primary);
  padding: 32px;
  margin-bottom: 40px;
  border-radius: 12px;
}

body[dir="rtl"] .enhanced-intro {
  border-left: none;
  border-right: 4px solid var(--primary);
}

.intro-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

body[dir="rtl"] .intro-header {
  flex-direction: row-reverse;
}

.intro-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(72, 93, 117, 0.2);
}

.intro-text {
  flex: 1;
}

.intro-text strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.intro-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin: 0;
}

/* Why Choose Cards */
.why-choose-card {
  text-align: center;
  padding: 32px 24px;
}

.why-choose-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 8px 20px rgba(72, 93, 117, 0.2);
  transition: all 0.3s ease;
}

.card:hover .why-choose-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 28px rgba(72, 93, 117, 0.3);
}

.why-choose-card h4 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-weight: 700;
}

.why-choose-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-radius: 12px 0 0 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body[dir="rtl"] .feature-card::before {
  left: auto;
  right: 0;
  border-radius: 0 12px 12px 0;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 2em;
  box-shadow: 0 4px 12px rgba(72, 93, 117, 0.2);
  overflow: hidden;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.feature-icon.emoji {
  font-size: 2em;
}

.feature-card h3 {
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Footer Specific */
footer .footer-logo {
  max-width: 80px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.contact-info {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-info p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.contact-info a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.contact-info a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Screenshot Slider */
.screenshot-slider {
  margin: 48px 0;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  background: var(--card);
}

.slider-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.slider-wrapper {
  display: flex;
  flex-direction: row;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
  direction: ltr;
  position: relative;
}

body[dir="rtl"] .slider-wrapper {
  direction: ltr;
  flex-direction: row;
}

.slider-slide,
.slider-slide * {
  display: flex !important;
}

.slider-slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.slider-slide img {
  display: block !important;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(72, 93, 117, 0.9);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.slider-nav:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
  left: 20px;
}

.slider-nav.next {
  right: 20px;
}

/* Reverse arrow positions in RTL mode */
body[dir="rtl"] .slider-nav.prev {
  left: auto;
  right: 20px;
}
body[dir="rtl"] .slider-nav.next {
  right: auto;
  left: 20px;
}

/* Show/hide arrows based on language */
.slider-nav[data-lang] {
  display: none;
}
.slider-nav[data-lang="en"] {
  display: flex;
}
body[dir="rtl"] .slider-nav[data-lang="en"] {
  display: none;
}
body[dir="rtl"] .slider-nav[data-lang="ar"] {
  display: flex;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: var(--card);
}

.slider-dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.slider-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

.slider-dot:hover {
  background: var(--primary-light);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

body[dir="rtl"] .back-to-top {
  right: auto;
  left: 30px;
}

.slider-nav:focus,
.slider-dot:focus,
.back-to-top:focus {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .cover h1 { 
    font-size: 2rem; 
  }
  
  .cover .subtitle { 
    font-size: 1rem; 
  }
  
  .features-grid { 
    grid-template-columns: 1fr; 
  }
  
  .at-a-glance { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .why-choose-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  
  .why-choose-card {
    padding: 24px 20px;
  }
  
  .slider-nav {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  
  .slider-nav.prev {
    left: 10px;
  }
  
  .slider-nav.next {
    right: 10px;
  }
  
  body[dir="rtl"] .slider-nav.prev {
    left: auto;
    right: 10px;
  }
  
  body[dir="rtl"] .slider-nav.next {
    right: auto;
    left: 10px;
  }
  
  .back-to-top {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    bottom: 20px;
    right: 20px;
    font-size: 1.3rem;
  }
  
  body[dir="rtl"] .back-to-top {
    left: 20px;
  }
  
  .slider-dot {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
  }
  
  .slider-wrapper {
    touch-action: pan-y pinch-zoom;
  }
  
  .enhanced-intro {
    padding: 24px;
  }
  
  .intro-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .intro-text strong {
    font-size: 1.3rem;
  }
  
  .intro-description {
    font-size: 1rem;
  }
}
