/* ================================================================
   WHY-US.CSS — "Why Choose Us" Feature Cards
   Elite Egypt Tours — Brand Identity 2025
   Navy #0A2340 + Teal #0FB1A2 + Cairo font
   ================================================================ */

/* ================================================================
   1. SECTION SHELL
   ================================================================ */
.why-us {
  background: #F4F5F7;
  position: relative;
  overflow: hidden;
}

/* Faint teal grid texture behind the cards */
.why-us::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15,177,162,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,177,162,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.why-us .section-header,
.why-us .features-grid {
  position: relative;
  z-index: 1;
}

.why-us .section-header {
  margin-bottom: 52px;
}

.why-us .section-tag {
  background: rgba(15, 177, 162, 0.10);
  color: #0D9E91;
  border: 1px solid rgba(15, 177, 162, 0.28);
}

/* ================================================================
   2. GRID — strict 3 × 2
   ================================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ================================================================
   3. CARD BASE
   ================================================================ */
.feature-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(10, 35, 64, 0.08);
  border-radius: 20px;
  padding: 36px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  cursor: default;

  /* Entrance animation — opacity handled by animation backwards fill, not base style */
  animation: feature-in 0.50s cubic-bezier(0.22, 1, 0.36, 1) both;

  /* Hover transitions */
  transition:
    border-color  0.30s ease,
    transform     0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow    0.30s ease;
}

@keyframes feature-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Teal top-bar accent — sweeps in on hover */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #0FB1A2 30%, #9FD6C7 70%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.40s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Corner shine */
.feature-card::after {
  content: '';
  position: absolute;
  top: -60%; right: -30%;
  width: 160px; height: 220px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.52) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(25deg) translateX(50px);
  opacity: 0;
  transition: opacity 0.40s ease, transform 0.60s ease;
  pointer-events: none;
}

/* ── Hover state ── */
.feature-card:hover {
  border-color: rgba(15, 177, 162, 0.45);
  transform: translateY(-6px);
  box-shadow:
    0 20px 50px rgba(15, 177, 162, 0.12),
    0 4px 14px rgba(10, 35, 64, 0.06);
}

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

.feature-card:hover::after {
  opacity: 1;
  transform: rotate(25deg) translateX(0);
}

/* ================================================================
   4. CARD NUMBER (decorative — top-right)
   ================================================================ */
.feature-card-num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(10, 35, 64, 0.07);
  line-height: 1;
  letter-spacing: -2px;
  user-select: none;
  transition: color 0.30s ease;
  font-family: 'Cairo', sans-serif;
}

.feature-card:hover .feature-card-num {
  color: rgba(15, 177, 162, 0.18);
}

/* ================================================================
   5. ICON CONTAINER
   ================================================================ */
.feature-icon-wrap {
  width: 54px;
  height: 54px;
  background: rgba(15, 177, 162, 0.09);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  flex-shrink: 0;
  transition: background 0.30s ease, box-shadow 0.30s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-icon-wrap svg {
  width: 26px;
  height: 26px;
  stroke: #0FB1A2;
  transition: stroke 0.25s ease, filter 0.25s ease;
}

.feature-card:hover .feature-icon-wrap {
  background: rgba(15, 177, 162, 0.16);
  box-shadow: 0 8px 24px rgba(15, 177, 162, 0.22);
  transform: translateY(-2px) scale(1.06);
}

.feature-card:hover .feature-icon-wrap svg {
  stroke: #0D9E91;
  filter: drop-shadow(0 0 5px rgba(15, 177, 162, 0.38));
}

/* ================================================================
   6. CARD BODY
   ================================================================ */
.feature-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Title ── */
.feature-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0A2340;
  line-height: 1.28;
  margin: 0 0 10px;
  position: relative;
  display: inline-block;
}

/* Animated teal underline on hover */
.feature-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #0FB1A2, #9FD6C7);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
  border-radius: 1px;
}

.feature-card:hover .feature-title::after {
  transform: scaleX(1);
}

/* ── Description ── */
.feature-desc {
  font-size: 0.87rem;
  color: #5A6B7A;
  line-height: 1.68;
  margin: 0 0 16px;
  flex: 1;
}

/* ── Proof stat ── */
.feature-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0FB1A2;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(10, 35, 64, 0.07);
  transition: color 0.25s ease;
}

.feature-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0FB1A2;
  flex-shrink: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.feature-card:hover .feature-stat {
  color: #0D9E91;
}

.feature-card:hover .feature-stat-dot {
  background: #0D9E91;
  transform: scale(1.3);
}

/* ================================================================
   7. FOCUS ACCESSIBILITY
   ================================================================ */
.feature-card:focus-visible {
  outline: 3px solid #0FB1A2;
  outline-offset: 3px;
}

/* ================================================================
   8. RTL OVERRIDES
   ================================================================ */
[dir="rtl"] .feature-card-num {
  right: auto;
  left: 24px;
}

[dir="rtl"] .feature-title::after {
  transform-origin: right center;
}

[dir="rtl"] .feature-card::before {
  transform-origin: right center;
}

/* ================================================================
   9. RESPONSIVE
   ================================================================ */

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .feature-card {
    padding: 28px 22px 24px;
  }

  .feature-card-num {
    font-size: 1.8rem;
  }
}

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

@media (max-width: 520px) {
  .feature-card {
    padding: 22px 18px 18px;
  }

  .feature-card-num {
    top: 14px;
    right: 16px;
    font-size: 1.5rem;
  }
}

@media (max-width: 360px) {
  .features-grid { gap: 10px; }
  .feature-card  { padding: 18px 14px; }
  .feature-title { font-size: 0.95rem; }
}
