/* Extracted from includes/footer.php; preserve page scope. */
/* ========== أكورديون الفوتر ========== */
.footer-accordion {
    position: relative;
}
.footer-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    color: inherit;
    transition: color 0.2s;
}
.footer-accordion-toggle:hover {
    color: #4facfe;
}
.footer-accordion-toggle:focus-visible {
    outline: 2px solid #4facfe;
    outline-offset: 4px;
    border-radius: 6px;
}
.footer-acc-arrow {
    display: inline-block;
    font-size: 0.85rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
    margin-right: 8px;
}
.footer-accordion.is-open .footer-acc-arrow {
    transform: rotate(180deg);
}
.footer-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}
.footer-accordion.is-open .footer-accordion-body {
    max-height: 1200px;
    opacity: 1;
    margin-bottom: 8px;
}
.footer-accordion-body .footer-links {
    margin-bottom: 0;
}

/* تحسين مظهر العنوان داخل الأكورديون ليطابق بقية العناوين */
.footer-accordion .footer-title {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 10px;
}

/* على الجوال نُجبر الأقسام على البدء مغلقة */
@media (max-width: 768px) {
    .footer-accordion .footer-accordion-body {
        max-height: 0;
        opacity: 0;
    }
    .footer-accordion.is-open .footer-accordion-body {
        max-height: 1500px;
        opacity: 1;
    }
    .footer-accordion-toggle {
        padding: 10px 0;
    }
}

/* ========== الشريط اللاصق ========== */
.sticky-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              box-shadow 0.4s ease;
  background: #ffffff;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 10px 20px;
  pointer-events: none;
}
.sticky-header-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.sticky-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.sticky-header-inner:active { transform: scale(0.97); }
.sticky-logo-img {
  height: 50px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid #b8d4f0;
}
.sticky-title-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.sticky-arrow-icon {
  font-size: 1.2rem;
  color: #555;
  transition: transform 0.3s ease;
  display: inline-block;
}
.sticky-header-inner:hover .sticky-arrow-icon {
  transform: translateY(-3px);
  color: #000;
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #333;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#backToTop.hidden {
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}
#backToTop:hover {
  background: #000;
  transform: translateY(-3px);
}

[dir="rtl"] #backToTop {
  right: auto;
  left: 30px;
}

/* ========== أيقونات Font Awesome في الفوتر ========== */
.site-footer i[class*="fa-"],
.sticky-header-bar i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-style: normal;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* أيقونات الروابط داخل الفوتر */
.footer-links a i[class*="fa-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    min-width: 20px;
    margin-inline-end: 8px;
    font-size: 0.95em;
    color: #ffd27a;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.footer-links a:hover i[class*="fa-"] {
    color: #ffffff;
    transform: translateX(-2px);
}

/* أيقونات عناوين الأقسام */
.footer-accordion-toggle > span > i[class*="fa-"] {
    margin-inline-end: 8px;
    font-size: 1rem;
    color: #ffd27a;
    vertical-align: middle;
}
.footer-accordion-toggle:hover > span > i[class*="fa-"] {
    color: #ffffff;
}

/* أيقونات التواصل */
.footer-contact-item i[class*="fa-"] {
    color: #ffd27a;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-inline-end: 10px;
}

/* أيقونة عنوان النشرة */
.footer-newsletter-title i[class*="fa-"] {
    color: #ffd27a;
    margin-inline-end: 6px;
    font-size: 1rem;
    vertical-align: middle;
}

/* أيقونة زر الاشتراك */
.footer-subscribe-btn i[class*="fa-"] {
    margin-inline-end: 6px;
    font-size: 0.95rem;
}

/* أيقونات السوشيال ميديا */
.footer-socials a i[class*="fa-"] {
    font-size: 1.05rem;
}
.footer-socials a:hover i[class*="fa-"] {
    color: #014978;
}

/* سهم الشريط اللاصق */
.sticky-arrow-icon.fa-arrow-up {
    font-size: 1.2rem;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* سهم الأكورديون */
.footer-acc-arrow.fa-chevron-down {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* تصغير أيقونات على الجوال */
@media (max-width: 600px) {
  .sticky-header-bar { padding: 8px 12px; }
  .sticky-logo-img { width: 32px; height: 32px; border-radius: 6px; }
  .sticky-title-text { font-size: 0.95rem; }
  .sticky-header-inner { gap: 8px; }
}

.sticky-header-bar { padding: 6px 12px !important; }
.sticky-logo-img { height: 30px !important; max-width: 90px !important; }
.sticky-title-text { font-size: 0.9rem !important; }
.sticky-header-inner { gap: 6px !important; }

/* إزالة القديم — لم نعد بحاجة إلى .footer-emoji */
.footer-emoji { display: none !important; }
