/* ═══════════════════════════════════════════════════
   CONTACT SECTION — Cinematic, cohesive, interactive
   ═══════════════════════════════════════════════════ */

.contact {
  padding: var(--section-padding) 0;
  position: relative;
  overflow: hidden;
}

/* Ambient animated aurora behind the whole section */
.contact::before,
.contact::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.contact::before {
  top: 10%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(var(--neon-primary-rgb), 0.18) 0%, transparent 70%);
  animation: contactAurora1 14s ease-in-out infinite;
}
.contact::after {
  bottom: 5%;
  left: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(var(--neon-secondary-rgb), 0.15) 0%, transparent 70%);
  animation: contactAurora2 18s ease-in-out infinite;
}

@keyframes contactAurora1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-40px, 30px) scale(1.1); }
}
@keyframes contactAurora2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}

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

.contact .section-title {
  text-align: center;
  display: block;
}

.contact .section-desc {
  text-align: center;
  margin: 0 auto 56px;
}

/* ─── Cards row ─── */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 360px));
  justify-content: center;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.contact-card {
  --card-c1: var(--neon-primary);
  --card-c2: var(--neon-secondary);
  --card-glow: rgba(var(--neon-primary-rgb), 0.35);

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 28px 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: transform 0.5s var(--ease-out-expo),
              border-color 0.4s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
}

/* Per-channel accent colors */
.contact-card[data-channel="whatsapp"] {
  --card-c1: #25d366;
  --card-c2: #128c7e;
  --card-glow: rgba(37, 211, 102, 0.45);
}
.contact-card[data-channel="email"] {
  --card-c1: #e040fb;
  --card-c2: #7c4dff;
  --card-glow: rgba(224, 64, 251, 0.4);
}

/* Animated gradient border on hover */
.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--card-c1), var(--card-c2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-expo);
  z-index: 2;
  pointer-events: none;
}

/* Glow halo behind card on hover */
.contact-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), var(--card-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-expo);
  z-index: 0;
  pointer-events: none;
}

.contact-card:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 50px var(--card-glow);
}

.contact-card:hover::before { opacity: 1; }
.contact-card:hover::after  { opacity: 0.55; }

/* Status pill at top */
.contact-card-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-c1);
  box-shadow: 0 0 0 0 var(--card-c1);
  animation: statusPulse 2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 var(--card-c1); opacity: 1; }
  70%  { box-shadow: 0 0 0 8px transparent; opacity: 0.7; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* Icon */
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--card-c1);
  transition: transform 0.5s var(--ease-out-expo),
              background 0.4s,
              box-shadow 0.4s,
              color 0.4s;
  position: relative;
  z-index: 1;
}

.contact-card:hover .contact-icon {
  transform: scale(1.08) rotate(-4deg);
  background: linear-gradient(135deg, var(--card-c1), var(--card-c2));
  color: #fff;
  box-shadow: 0 12px 32px var(--card-glow);
  border-color: transparent;
}

/* Text block */
.contact-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.contact-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s;
}

.contact-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-family: 'Outfit', 'Tajawal', sans-serif;
  transition: color 0.3s;
}

.contact-card:hover .contact-value { color: var(--card-c1); }

/* CTA pill (slides in on hover) */
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--card-c1), var(--card-c2));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 6px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out-expo),
              transform 0.4s var(--ease-out-expo),
              box-shadow 0.4s;
  box-shadow: 0 8px 24px transparent;
}

.contact-cta svg {
  transition: transform 0.4s var(--ease-out-quart);
}

.contact-card:hover .contact-cta {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 8px 24px var(--card-glow);
}

.contact-card:hover .contact-cta svg {
  transform: translateX(-4px); /* RTL → arrow points left, slides further left */
}

/* ─── Divider ─── */
.contact-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 360px;
  margin: 48px auto 28px;
  position: relative;
  z-index: 1;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.divider-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── Social Icons ─── */
.contact-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.social-icon {
  --social-c1: var(--neon-primary);
  --social-c2: var(--neon-secondary);
  --social-glow: rgba(var(--neon-primary-rgb), 0.4);

  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-secondary);
  transition: transform 0.45s var(--ease-out-expo),
              color 0.4s,
              border-color 0.4s,
              box-shadow 0.45s var(--ease-out-expo);
  position: relative;
  overflow: visible;
}

.social-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--social-c1), var(--social-c2));
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-expo);
  z-index: 0;
}

.social-icon svg {
  position: relative;
  z-index: 1;
  transition: transform 0.4s var(--ease-out-quart);
}

.social-icon:hover {
  transform: translateY(-6px) rotate(-4deg);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4),
              0 0 32px var(--social-glow);
}

.social-icon:hover::before { opacity: 1; }
.social-icon:hover svg     { transform: scale(1.15); }

/* Tooltip */
.social-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(10, 10, 24, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-family: 'Outfit', 'Tajawal', sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-expo),
              transform 0.3s var(--ease-out-expo);
  z-index: 5;
}

.social-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(10, 10, 24, 0.95);
}

.social-icon:hover .social-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Brand colors per platform */
.social-icon[data-platform="facebook"]  { --social-c1: #1877f2; --social-c2: #0a5dc7; --social-glow: rgba(24,119,242,0.5); }
.social-icon[data-platform="instagram"] { --social-c1: #f09433; --social-c2: #dc2743; --social-glow: rgba(220,39,67,0.5); }
.social-icon[data-platform="tiktok"]    { --social-c1: #25f4ee; --social-c2: #fe2c55; --social-glow: rgba(254,44,85,0.5); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .contact-cards {
    grid-template-columns: 1fr;
    max-width: 360px;
    gap: 18px;
  }
  .contact-card {
    padding: 28px 22px 24px;
  }
  .contact-icon {
    width: 60px;
    height: 60px;
  }
  .contact-divider {
    margin: 36px auto 22px;
  }
  .social-icon {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 380px) {
  .contact-value { font-size: 0.78rem; }
  .contact-socials { gap: 10px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .contact::before,
  .contact::after,
  .status-dot {
    animation: none;
  }
  .contact-card,
  .contact-icon,
  .social-icon,
  .contact-cta {
    transition-duration: 0.01ms;
  }
}
