/* ═══════════════════════════════════════════════════════════════════════════
   Diako Academy — Footer v5
   Luxury dark footer · RTL · 4-column grid · orange accents
   Progressive-enhancement animation: columns ALWAYS visible by default;
   JS adds .ft-anim to <footer> which enables the scroll-in transitions.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS custom properties (defaults; template <style> block may override) ── */
.site-footer {
  --ft-bg:        #0F172A;
  --ft-bg2:       #111827;
  --ft-accent:    #f97316;
  --ft-muted:     #94a3b8;
  --ft-border:    rgba(255, 255, 255, 0.08);
  --ft-icon-bg:   rgba(255, 255, 255, 0.07);
  --ft-chat:      #22c55e;
  --ft-glow:      rgba(249, 115, 22, 0.16);
}

/* ── Outer wrapper ──────────────────────────────────────────────────────── */
.site-footer {
  background: linear-gradient(135deg, var(--ft-bg) 0%, var(--ft-bg2) 100%);
  color: rgba(255, 255, 255, .88);
  font-family: Vazirmatn, IRANSans, "Segoe UI", sans-serif;
  direction: rtl;
  padding: 40px 24px 18px;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Inner grid ─────────────────────────────────────────────────────────── */
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px 40px;
  align-items: start;
  background: transparent;
}

/* Ensure no stray background on any column */
.footer-col,
.footer-bottom { background: transparent; }

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESSIVE-ENHANCEMENT ANIMATION
   Columns are VISIBLE by default (no JS required).
   JS adds .ft-anim to <footer> → columns become opacity:0 + translateY(20px)
   → IntersectionObserver adds .ft-visible → animate to full visibility.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Default: always visible */
.footer-col {
  opacity: 1;
  transform: translateY(0);
}

/* Only when JS opts in to animation */
.site-footer.ft-anim .footer-col {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.site-footer.ft-anim .footer-col.ft-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays (RTL: col 1 = rightmost, appears first) */
.site-footer.ft-anim .footer-col:nth-child(1) { transition-delay: 0.00s; }
.site-footer.ft-anim .footer-col:nth-child(2) { transition-delay: 0.10s; }
.site-footer.ft-anim .footer-col:nth-child(3) { transition-delay: 0.20s; }
.site-footer.ft-anim .footer-col:nth-child(4) { transition-delay: 0.30s; }

/* ═══════════════════════════════════════════════════════════════════════════
   COL 1 — Brand
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* Thin orange underline accent below name */
.footer-brand-name::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--ft-accent);
  margin-top: 8px;
  border-radius: 2px;
}

.footer-tagline {
  font-size: 13.5px;
  color: var(--ft-muted);
  margin: 12px 0 22px;
  line-height: 1.75;
}

/* Address block — plain list variant */
.footer-address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.72);
}
.footer-address p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  margin: 0 0 8px;
}
.footer-address p:last-child { margin-bottom: 0; }

/* Address block — rich-text/CKEditor HTML variant */
.footer-address--html {
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
}
.footer-address--html p { margin: 0 0 6px; }
.footer-address--html p:last-child { margin-bottom: 0; }
.footer-address--html strong { color: rgba(255, 255, 255, 0.88); font-weight: 600; }
.footer-address--html a { color: inherit; text-decoration: none; }
.footer-address--html a:hover { color: var(--ft-accent); }

/* Pin icon */
.ft-addr-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--ft-accent);
  opacity: 0.80;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLUMN HEADINGS (Cols 2-4) — orange, bold, underlined
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--ft-accent);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ft-accent);
  display: block;
  width: fit-content;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COL 2 — Contact
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-contact-list li { margin-bottom: 12px; }
.footer-contact-list li:last-child { margin-bottom: 0; }

.ft-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.6;
  transition: color 0.2s ease;
}
.ft-contact-link:hover { color: #fff; }

.ft-contact-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.ft-contact-link:hover svg { opacity: 0.85; }

/* Phone digits: LTR inside RTL layout */
.ft-phone span {
  direction: ltr;
  unicode-bidi: embed;
  font-family: "SF Mono", monospace, Vazirmatn, sans-serif;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COL 3 — Quick Links
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 11px; }
.footer-links li:last-child { margin-bottom: 0; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.6;
  transition: color 0.2s ease;
}

/* Arrow — hidden by default, fades in on hover */
.footer-links a::before {
  content: "← ";
  color: var(--ft-accent);
  font-size: 11px;
  opacity: 0;
  margin-left: 5px;
  transition: opacity 0.2s ease;
}
.footer-links a:hover             { color: var(--ft-accent); }
.footer-links a:hover::before     { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   COL 4 — Social Icons
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.ft-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--ft-muted);
  text-decoration: none;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease,
              border-color 0.22s ease, box-shadow 0.22s ease;
}
.ft-social-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Per-platform brand colours ─────────────────────────────────────────── */
.ft-social-icon--instagram {
  color: #E1306C;
  border-color: rgba(225, 48, 108, 0.28);
  background: rgba(225, 48, 108, 0.08);
}
.ft-social-icon--telegram {
  color: #29B6F6;
  border-color: rgba(41, 182, 246, 0.28);
  background: rgba(41, 182, 246, 0.08);
}
.ft-social-icon--whatsapp {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.28);
  background: rgba(37, 211, 102, 0.08);
}
.ft-social-icon--youtube {
  color: #FF4444;
  border-color: rgba(255, 68, 68, 0.28);
  background: rgba(255, 68, 68, 0.08);
}
.ft-social-icon--linkedin {
  color: #0A84FF;
  border-color: rgba(10, 132, 255, 0.28);
  background: rgba(10, 132, 255, 0.08);
}

/* ── Hover: each icon brightens with its own brand colour ───────────────── */
.ft-social-icon:hover {
  color: #fff;
  transform: scale(1.12);
}
.ft-social-icon--instagram:hover {
  background: #E1306C;
  border-color: #E1306C;
  box-shadow: 0 4px 18px rgba(225, 48, 108, 0.40);
}
.ft-social-icon--telegram:hover {
  background: #29B6F6;
  border-color: #29B6F6;
  box-shadow: 0 4px 18px rgba(41, 182, 246, 0.40);
}
.ft-social-icon--whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.40);
}
.ft-social-icon--youtube:hover {
  background: #FF4444;
  border-color: #FF4444;
  box-shadow: 0 4px 18px rgba(255, 68, 68, 0.40);
}
.ft-social-icon--linkedin:hover {
  background: #0A84FF;
  border-color: #0A84FF;
  box-shadow: 0 4px 18px rgba(10, 132, 255, 0.40);
}

/* ── Chat Now button ────────────────────────────────────────────────────── */
.footer-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--ft-chat, #22c55e);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 18px rgba(34, 197, 94, .28);
}
.footer-chat-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, .40);
  color: #fff;
}
.footer-chat-btn svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM COPYRIGHT BAR
   ═══════════════════════════════════════════════════════════════════════════ */

.footer-bottom {
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  direction: rtl;
  background: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLOATING WHATSAPP BUBBLE
   ═══════════════════════════════════════════════════════════════════════════ */

.wa-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ft-chat, #22c55e);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(34, 197, 94, .38);
  transition: transform 0.22s, box-shadow 0.22s;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(34, 197, 94, .55);
}
.wa-float svg { flex-shrink: 0; }

.wa-float__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--ft-chat, #22c55e);
  opacity: 0;
  animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.70; }
  70%  { transform: scale(1.5); opacity: 0;    }
  100% { transform: scale(1.5); opacity: 0;    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }
}

@media (max-width: 768px) {
  .site-footer { padding: 36px 20px 16px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-brand-name::after { margin-left: auto; margin-right: auto; }

  .footer-address p,
  .ft-contact-link,
  .footer-links a        { justify-content: center; }

  .footer-social-grid    { justify-content: center; }
  .footer-heading        { margin-left: auto; margin-right: auto; }
  .footer-chat-btn       { justify-content: center; }

  /* Collapse stagger on mobile */
  .site-footer.ft-anim .footer-col:nth-child(n) { transition-delay: 0s; }
}

@media (max-width: 480px) {
  .site-footer { padding: 28px 16px 14px; }
  .footer-bottom { font-size: 12px; }
  .wa-float { bottom: 18px; left: 18px; width: 50px; height: 50px; }
}
