/* -------------------------------------------
   Google Fonts (مثال Montserrat)
   أضف هذا في رأس الـ HTML أو في ملف CSS منفصل
--------------------------------------------- */
/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap'); */

/* -------------------------------------------
   متغيرات الألوان والخطوط
--------------------------------------------- */
:root {
  --accent-color: #FFD700; /* اللون المميز (ذهبي) */
  --footer-bg: #000;       /* خلفية داكنة */
  --footer-text: #fff;     /* نص أبيض */
  --overlay-bg: rgba(255, 255, 255, 0.1); /* تراكب خفيف لزجاجية الخلفية */
  --transition-speed: 0.3s;
  --font-family: 'Roboto Slab', serif; /* استبدل Montserrat بـ Poppins إن رغبت */
  --back-to-top-bg: #333;   /* خلفية زر العودة إلى الأعلى */
  --back-to-top-hover: var(--accent-color);
}

/* -------------------------------------------
   Advanced Footer Styles - Upgraded
--------------------------------------------- */
.advanced-footer {
  background: var(--footer-bg) !important;
  color: var(--footer-text);
  padding: 60px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  /* Using relative positioning with a low z-index ensures that the footer sits
     behind fixed elements like the header and mobile nav overlay */
  position: relative;
  z-index: 1;
  font-family: var(--font-family);
  transition: background var(--transition-speed) ease;
  backdrop-filter: none;
}

/* إزالة التراكب الشفاف */
.advanced-footer::before {
  display: none;
}

/* تأكيد لون النص داخل الفوتر */
.advanced-footer h1,
.advanced-footer h2,
.advanced-footer h3,
.advanced-footer h4,
.advanced-footer h5,
.advanced-footer h6,
.advanced-footer p,
.advanced-footer li,
.advanced-footer span {
  color: var(--footer-text) !important;
  -webkit-text-fill-color: var(--footer-text) !important;
}

/* أقسام الفوتر */
.advanced-footer .footer-section {
  margin-bottom: 20px;
}
.advanced-footer .footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  position: relative;
  font-weight: 600;
}
.advanced-footer .footer-section h3::after {
  content: "";
  display: block;
  margin: 8px auto 0; /* centers the line under the heading */
  width: 50px;        /* initial fixed width */
  height: 2px;
  background: var(--accent-color);
  transition: width var(--transition-speed) ease;
}

.advanced-footer .footer-section h3:hover::after {
  width: 130px; /* expands only slightly on hover */
}

/* تنسيق الفقرات */
.advanced-footer p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0 0 10px 0;
}

/* تنسيق الروابط مع حالة التركيز للوصولية (Accessibility) */
.advanced-footer a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.advanced-footer a:hover,
.advanced-footer a:focus {
  color: var(--accent-color);
  transform: translateY(-2px);
  outline: none;
}

/* -------------------------------------------
   Newsletter Section تحسين قسم النشرة البريدية
--------------------------------------------- */
.footer-newsletter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
}
.footer-newsletter input[type="email"] {
  padding: 10px;
  font-size: 0.95rem;
  width: 100%;
  max-width: 250px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
}
.footer-newsletter input[type="email"]:focus {
  border-color: var(--accent-color);
}
.footer-newsletter button {
  padding: 10px 20px;
  background: var(--accent-color);
  color: #000;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--transition-speed) ease;
}
.footer-newsletter button:hover {
  background: #f7c900;
}

/* -------------------------------------------
   Social Links Styling (أيقونات التواصل الاجتماعي)
--------------------------------------------- */
.advanced-footer .social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  /* Center the social icons */
  justify-content: center;
}
.advanced-footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 2px solid var(--footer-text);
  border-radius: 50%;
  transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
  font-size: 1.2rem;
}
.advanced-footer .social-links a:hover,
.advanced-footer .social-links a:focus {
  background: var(--accent-color);
  color: #000;
  transform: scale(1.1);
}

/* -------------------------------------------
   Payment Icons (ترتيب شعارات الدفع)
--------------------------------------------- */
/* Payment Icons - Same Layout on All Devices */
.payment-icons {
  display: flex;
  flex-wrap: wrap; /* allows wrapping if screen is too narrow */
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.payment-icons img {
  max-height: 30px;
  object-fit: contain;
  transition: transform var(--transition-speed) ease;
}

.payment-icons img:hover {
  transform: scale(1.1);
}


/* -------------------------------------------
   Footer Bottom Section (الجزء السفلي)
--------------------------------------------- */
/* -------------------------------------------
   Footer Bottom Section (Enhanced)
--------------------------------------------- */
/* -------------------------------------------
   Footer Bottom Section (Enhanced + Logo + Slogan)
--------------------------------------------- */
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding: 30px 15px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background-color: transparent;
}

.footer-bottom p {
  font-size: 0.95rem;
  color: var(--footer-text);
  margin: 5px 0;
  line-height: 1.6;
}

.footer-bottom a {
  color: var(--footer-text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed) ease, text-shadow var(--transition-speed) ease;
}

.footer-bottom a:hover,
.footer-bottom a:focus {
  color: var(--accent-color);
  text-shadow: 0 0 6px var(--accent-color);
}

.footer-designer {
  color: var(--accent-color);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}

.footer-power-link {
  position: relative;
  display: inline-block;
}

.footer-power-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-speed) ease;
}

.footer-power-link:hover::after,
.footer-power-link:focus::after {
  transform: scaleX(1);
}

/* Updated Logo Style — 3× Bigger */
.footer-logo {
  height: 108px; /* 3 × 36px */
  margin-top: 16px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.footer-logo:hover {
  transform: scale(1.05);
}

/* Updated Slogan Style */
.footer-slogan {
  display: block;
  color: var(--accent-color);
  font-style: normal;
  font-family: 'Poppins', sans-serif; /* Modern, strong font */
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  margin-top: 10px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-bottom {
    padding: 25px 10px;
  }

  .footer-bottom p {
    font-size: 0.9rem;
  }

  .footer-logo {
    height: 88px; /* Scales a bit smaller for mobile */
  }

  .footer-slogan {
    font-size: 1.1rem;
  }
}

.footer-slogan {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  }
  50% {
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
  }
}

/* -------------------------------------------
   Responsive Adjustments (تجاوب الشاشات الصغيرة)
--------------------------------------------- */
@media (max-width: 768px) {
  .advanced-footer {
    grid-template-columns: 1fr;
    text-align: center;
    background: var(--footer-bg) !important; /* Keep background black for all screen sizes */
    pointer-events: none;
  }
  /* Re-enable pointer events for all interactive elements inside */
  .advanced-footer .footer-bottom,
  .footer-newsletter,
  .advanced-footer a,
  .advanced-footer * {
    pointer-events: auto;
  }
  .footer-newsletter {
    align-items: center;
  }
  .footer-newsletter input[type="email"] {
    max-width: 100%;
  }
}

/* -------------------------------------------
   Mobile Navigation Overlay z-index Adjustment
--------------------------------------------- */
@media screen and (max-width: 768px) {
  .nav-links {
    z-index: 1200;
  }
}

.advanced-footer .social-links img {
  width: 24px; /* Set your desired width */
  height: 24px; /* Set your desired height */
  object-fit: contain; /* Ensure the SVG scales correctly */
}

/* -------------------------------------------
   Custom Payment Icons Layout for Smart & Tablet
--------------------------------------------- */
@media (max-width: 768px) {
  .payment-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centers the icons */
  }
  /* Style the first three icons (Apple Pay, MasterCard, Visa) */
  .payment-icons img:nth-child(-n+3) {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    margin-bottom: 10px; /* optional spacing */
  }
  /* Style the remaining icons in the second row */
  .payment-icons img:nth-child(n+4) {
    flex: 0 0 25%;
    max-width: 25%;
    margin-bottom: 10px; /* optional spacing */
  }
}

/* -------------------------------------------
   Quick Links Adjustments (Remove bullet points & center items)
--------------------------------------------- */
.advanced-footer .quick-links ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
}
.advanced-footer .quick-links ul li {
  margin-bottom: 10px;
}

/* -------------------------------------------
   Center Footer Section Content for Desktop & Tablet
--------------------------------------------- */
@media (min-width: 769px) {
  .advanced-footer .footer-section {
    text-align: center;
  }
}

.wiinged-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wiing {
  width: 24px;
  height: auto;
}

.wiing-right {
  transform: scaleX(-1); /* Mirror the image horizontally */
}

/* -------------------------------------------
   Developer Signature Enhancements
--------------------------------------------- */
.developer-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.dev-line {
  margin: 5px 0;
  color: var(--footer-text);
  text-align: center;
}

.signature-icon {
  margin-right: 6px;
  color: var(--accent-color);
  font-size: 1.1rem;
}

.footer-logo {
  height: 108px;
  margin-top: 14px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.footer-logo:hover {
  transform: scale(1.05);
}

/* Responsive for Signature on Mobile */
@media (max-width: 768px) {
  .developer-signature {
    font-size: 0.9rem;
    gap: 6px;
    margin-top: 12px;
    margin-bottom: 12px;
  }

  .footer-logo {
    height: 88px;
  }
}

/* Rotation Animation */
@keyframes rotateLogoTwice {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(720deg); /* 2 full rotations */
  }
}

.footer-logo:hover {
  animation: rotateLogoTwice 1.2s ease-in-out;
}

.footer-logo {
  cursor: pointer;
}


/* -------------------------------------------
   extra
--------------------------------------------- */
.footer-contact-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #f7c900;
  color: #000;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.footer-contact-btn:hover {
  background-color: #ffd700;
  color: #000 !important;  /* Ensures the text stays visible */
  transform: translateY(-2px);
}

/* ضمان حجم ثابت لشعار الفوتر */
.advanced-footer .footer-logo {
  height: 108px !important;
}
