/* ============================================================
   INDEX.CSS - Homepage-specific styles for Pharos8K
   Shared styles (nav, footer, buttons, typography) are in global.css
   ============================================================ */


/* ==========================================================
   1. HERO SECTION
   ========================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Animated gradient mesh background */
.hero-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(245,200,66,0.1) 0deg,
    rgba(76,201,240,0.06) 90deg,
    rgba(168,85,247,0.05) 180deg,
    rgba(245,200,66,0.1) 360deg);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  animation: meshRotate 25s linear infinite;
}

/* Second glow for depth */
.hero-glow-2 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(76,201,240,0.06) 0%, transparent 70%);
  top: 30%;
  right: -10%;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 8s ease-in-out infinite reverse;
}

/* Floating decorative elements */
.hero-float {
  position: absolute;
  opacity: 0.1;
  animation: float 5s ease-in-out infinite;
  pointer-events: none;
  color: var(--gold);
  font-size: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245,200,66,0.1);
  border: 1px solid rgba(245,200,66,0.3);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero h1 .highlight {
  color: var(--gold); /* fallback */
  background: linear-gradient(90deg, var(--gold), #ffe5a0, var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroGradientText 4s ease-in-out infinite;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}


/* ==========================================================
   2. STATS SECTION
   ========================================================== */

.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: 'Tajawal', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}


/* ==========================================================
   3. FEATURES GRID
   ========================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 800px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Top gradient line on hover */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  border-color: rgba(245,200,66,0.4);
  box-shadow: 0 25px 50px rgba(0,0,0,0.35), 0 0 30px rgba(245,200,66,0.08);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(245,200,66,0.15), rgba(245,200,66,0.05));
  border: 1px solid rgba(245,200,66,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 8px 20px rgba(245,200,66,0.2);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--gold);
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon svg {
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}


/* ==========================================================
   4. DEVICES GRID
   ========================================================== */

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.device-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245,200,66,0.4);
  box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

.device-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--text-muted);
  transition: stroke 0.3s ease, transform 0.3s ease;
}

.device-card:hover .device-icon svg {
  stroke: var(--gold);
  transform: scale(1.15);
}

.device-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.device-card:hover .device-name {
  color: var(--text);
}


/* ==========================================================
   5. STEPS SECTION (Timeline style)
   ========================================================== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.step-num {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Tajawal', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #000;
  margin: 0 auto 1.2rem;
  box-shadow: 0 8px 20px rgba(245,200,66,0.25);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.step-card:hover .step-num {
  box-shadow: 0 10px 30px rgba(245,200,66,0.4);
  transform: scale(1.05);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}


/* ==========================================================
   6. PRICING CARDS (Premium design with shimmer)
   ========================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0,0,0,0.3);
}

/* Featured card with rotating border */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.pricing-card.featured {
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image:
    linear-gradient(var(--bg-card2), var(--bg-card2)),
    conic-gradient(from var(--border-angle), var(--gold), transparent 30%, transparent 70%, var(--gold));
  transform: scale(1.03);
  animation: rotateBorder 3s linear infinite;
  box-shadow: 0 0 60px rgba(245,200,66,0.12), 0 20px 40px rgba(0,0,0,0.3);
}

@keyframes rotateBorder {
  to { --border-angle: 360deg; }
}

.pricing-card.featured::after {
  content: attr(data-badge);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.9rem;
  border-radius: 50px;
  white-space: nowrap;
}

.pricing-card:hover:not(.featured) {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.plan-label {
  display: inline-block;
  background: rgba(245,200,66,0.1);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.plan-name {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.plan-price {
  font-family: 'Tajawal', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin: 1rem 0 0.3rem;
}

.plan-price sup {
  font-size: 1.2rem;
  vertical-align: top;
  margin-top: 0.5rem;
  display: inline-block;
}

.plan-duration {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.plan-features {
  list-style: none;
  margin-bottom: 1.5rem;
  text-align: right;
}

.plan-features li {
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.check {
  color: var(--green);
  font-size: 0.9rem;
  flex-shrink: 0;
}


/* ==========================================================
   7. "WHY PHAROS8K" SECTION
   ========================================================== */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.why-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

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

.why-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.why-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.why-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
}


/* ==========================================================
   8. TESTIMONIALS SECTION (Grid / Carousel)
   ========================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.2;
  font-family: serif;
  line-height: 1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.testimonial-card:hover::before {
  transform: scale(1.2);
  opacity: 0.3;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #000;
  font-size: 0.85rem;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.testimonial-country {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.testimonial-stars {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
}


/* ==========================================================
   9. GUARANTEE SECTION
   ========================================================== */

.guarantee-section {
  background: linear-gradient(135deg, rgba(6,214,160,0.08), rgba(245,200,66,0.05));
  border: 1px solid rgba(6,214,160,0.2);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem auto;
  max-width: 800px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

.guarantee-icon {
  width: 64px;
  height: 64px;
  background: rgba(6,214,160,0.15);
  border: 1px solid rgba(6,214,160,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.guarantee-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--green);
}

.guarantee-section h3 {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.guarantee-section p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
}


/* ==========================================================
   10. CTA SECTION
   ========================================================== */

.cta-section {
  background: linear-gradient(135deg, rgba(245,200,66,0.08), rgba(76,201,240,0.05));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 2rem auto;
}

.cta-section h2 {
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}


/* ==========================================================
   11. KEYFRAME ANIMATIONS (Index-specific)
   ========================================================== */

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

@keyframes meshRotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes heroGradientText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}


/* ==========================================================
   STAGGER ANIMATIONS ON GRIDS
   ========================================================== */

.features-grid .feature-card,
.devices-grid .device-card,
.pricing-grid .pricing-card,
.testimonials-grid .testimonial-card,
.why-grid .why-item,
.steps-grid .step-card {
  opacity: 0;
  animation: fadeInUp 0.5s ease both;
}

.features-grid .feature-card:nth-child(1) { animation-delay: 0s; }
.features-grid .feature-card:nth-child(2) { animation-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { animation-delay: 0.15s; }
.features-grid .feature-card:nth-child(4) { animation-delay: 0.2s; }
.features-grid .feature-card:nth-child(5) { animation-delay: 0.25s; }
.features-grid .feature-card:nth-child(6) { animation-delay: 0.3s; }

.devices-grid .device-card:nth-child(1) { animation-delay: 0s; }
.devices-grid .device-card:nth-child(2) { animation-delay: 0.05s; }
.devices-grid .device-card:nth-child(3) { animation-delay: 0.1s; }
.devices-grid .device-card:nth-child(4) { animation-delay: 0.15s; }
.devices-grid .device-card:nth-child(5) { animation-delay: 0.2s; }
.devices-grid .device-card:nth-child(6) { animation-delay: 0.25s; }
.devices-grid .device-card:nth-child(7) { animation-delay: 0.3s; }
.devices-grid .device-card:nth-child(8) { animation-delay: 0.35s; }

.pricing-grid .pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-grid .pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-grid .pricing-card:nth-child(3) { animation-delay: 0.3s; }

.testimonials-grid .testimonial-card:nth-child(1) { animation-delay: 0s; }
.testimonials-grid .testimonial-card:nth-child(2) { animation-delay: 0.1s; }
.testimonials-grid .testimonial-card:nth-child(3) { animation-delay: 0.15s; }
.testimonials-grid .testimonial-card:nth-child(4) { animation-delay: 0.2s; }
.testimonials-grid .testimonial-card:nth-child(5) { animation-delay: 0.25s; }
.testimonials-grid .testimonial-card:nth-child(6) { animation-delay: 0.3s; }


/* ==========================================================
   12. RESPONSIVE - Homepage-specific breakpoints
   ========================================================== */

@media (max-width: 768px) {
  .stat-divider {
    display: none;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .hero {
    min-height: auto;
    padding: 7rem 1.5rem 3rem;
  }

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

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .stats {
    gap: 1rem;
  }

  .stat-num {
    font-size: 1.6rem;
  }

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

  .devices-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
