فوتر 2 معلومات معدة تلقائية

<!-- ========== PROFESSIONAL FOOTER START ========== -->
<style>
/* ===== FOOTER VARIABLES ===== */
:root {
  --footer-bg: #1a1a2e;
  --footer-bg-secondary: #16213e;
  --footer-bg-bottom: #0f0f23;
  --footer-text: #a8b2d1;
  --footer-heading: #e6f1ff;
  --footer-accent: #64ffda;
  --footer-accent-hover: #45e0be;
  --footer-link: #ccd6f6;
  --footer-link-hover: #64ffda;
  --footer-border: rgba(100, 255, 218, 0.1);
  --footer-card-bg: rgba(255,255,255,0.03);
  --footer-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  --footer-radius: 12px;
  --footer-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== FOOTER RESET ===== */
.pro-footer *, .pro-footer *::before, .pro-footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== MAIN FOOTER ===== */
.pro-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-family: &#39;Segoe UI&#39;, Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
  position: relative;
  overflow: hidden;
  box-shadow: var(--footer-shadow);
}

/* ===== DECORATIVE ELEMENTS ===== */
.pro-footer::before {
  content: &#39;&#39;;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--footer-accent), #6366f1, #ec4899, var(--footer-accent));
  background-size: 300% 100%;
  animation: gradientMove 4s ease infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.footer-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(100, 255, 218, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.footer-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.footer-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--footer-accent);
  border-radius: 50%;
  opacity: 0.2;
  animation: float 6s ease-in-out infinite;
}

.footer-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.footer-particles span:nth-child(2) { left: 30%; top: 60%; animation-delay: 1s; }
.footer-particles span:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s; }
.footer-particles span:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; }
.footer-particles span:nth-child(5) { left: 90%; top: 40%; animation-delay: 4s; }
.footer-particles span:nth-child(6) { left: 20%; top: 80%; animation-delay: 1.5s; }
.footer-particles span:nth-child(7) { left: 60%; top: 10%; animation-delay: 2.5s; }
.footer-particles span:nth-child(8) { left: 80%; top: 50%; animation-delay: 3.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
  50% { transform: translateY(-20px) scale(1.5); opacity: 0.5; }
}

/* ===== FOOTER TOP SECTION ===== */
.footer-top-section {
  background: var(--footer-bg-secondary);
  padding: 40px 0;
  position: relative;
  border-bottom: 1px solid var(--footer-border);
}

.footer-brand-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-brand-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 280px;
}

.footer-logo-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--footer-border);
  transition: var(--footer-transition);
  background: var(--footer-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-wrapper:hover {
  border-color: var(--footer-accent);
  transform: rotate(5deg) scale(1.05);
}

.footer-logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand-text h3 {
  color: var(--footer-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-brand-text h3 span {
  color: var(--footer-accent);
}

.footer-brand-text p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--footer-text);
  max-width: 400px;
}

.footer-stats-bar {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 12px 20px;
  background: var(--footer-card-bg);
  border-radius: var(--footer-radius);
  border: 1px solid var(--footer-border);
  transition: var(--footer-transition);
  min-width: 100px;
}

.stat-item:hover {
  border-color: var(--footer-accent);
  transform: translateY(-3px);
  background: rgba(100, 255, 218, 0.05);
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--footer-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--footer-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== FOOTER MAIN CONTENT ===== */
.footer-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 40px;
  position: relative;
  z-index: 1;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
}

/* ===== FOOTER COLUMN STYLES ===== */
.footer-column {
  position: relative;
}

.footer-column-title {
  color: var(--footer-heading);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 25px;
  padding-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-column-title::after {
  content: &#39;&#39;;
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--footer-accent);
  border-radius: 2px;
  transition: var(--footer-transition);
}

.footer-column:hover .footer-column-title::after {
  width: 60px;
}

.footer-column-title svg {
  width: 20px;
  height: 20px;
  fill: var(--footer-accent);
  flex-shrink: 0;
}

/* ===== ABOUT COLUMN ===== */
.footer-about-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--footer-text);
  margin-bottom: 20px;
}

.footer-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.footer-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--footer-text);
  padding: 6px 10px;
  background: var(--footer-card-bg);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: var(--footer-transition);
}

.footer-feature-item:hover {
  border-color: var(--footer-border);
  color: var(--footer-accent);
}

.footer-feature-item svg {
  width: 14px;
  height: 14px;
  fill: var(--footer-accent);
  flex-shrink: 0;
}

/* ===== LINKS COLUMN ===== */
.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 4px;
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--footer-transition);
  border: 1px solid transparent;
}

.footer-links a::before {
  content: &#39;&#9666;&#39;;
  font-size: 10px;
  color: var(--footer-accent);
  transition: var(--footer-transition);
  opacity: 0;
  transform: translateX(5px);
}

.footer-links a:hover {
  color: var(--footer-accent);
  background: var(--footer-card-bg);
  border-color: var(--footer-border);
  padding-right: 18px;
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ===== RECENT POSTS COLUMN ===== */
.footer-recent-posts .recent-post-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--footer-radius);
  background: var(--footer-card-bg);
  border: 1px solid transparent;
  transition: var(--footer-transition);
  text-decoration: none;
}

.footer-recent-posts .recent-post-item:hover {
  border-color: var(--footer-border);
  transform: translateX(-5px);
}

.recent-post-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--footer-transition);
}

.recent-post-item:hover .recent-post-thumb img {
  transform: scale(1.1);
}

.recent-post-info h4 {
  font-size: 13px;
  color: var(--footer-link);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--footer-transition);
}

.recent-post-item:hover .recent-post-info h4 {
  color: var(--footer-accent);
}

.recent-post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--footer-text);
  opacity: 0.7;
}

.recent-post-meta svg {
  width: 12px;
  height: 12px;
  fill: var(--footer-accent);
}

/* ===== CONTACT COLUMN ===== */
.footer-contact-list {
  list-style: none;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--footer-border);
  transition: var(--footer-transition);
}

.footer-contact-list li:last-child {
  border-bottom: none;
}

.footer-contact-list li:hover {
  padding-right: 8px;
}

.contact-icon {
  width: 36px;
  height: 36px;
  background: var(--footer-card-bg);
  border: 1px solid var(--footer-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--footer-transition);
}

.footer-contact-list li:hover .contact-icon {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--footer-accent);
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--footer-accent);
}

.contact-details {
  flex: 1;
}

.contact-details .contact-label {
  font-size: 11px;
  color: var(--footer-text);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-details .contact-value {
  font-size: 14px;
  color: var(--footer-link);
  direction: ltr;
  text-align: right;
}

.contact-details a {
  color: var(--footer-link);
  text-decoration: none;
  transition: var(--footer-transition);
}

.contact-details a:hover {
  color: var(--footer-accent);
}

/* ===== SOCIAL MEDIA ===== */
.footer-social-section {
  margin-top: 25px;
}

.footer-social-title {
  font-size: 14px;
  color: var(--footer-heading);
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--footer-transition);
  position: relative;
  overflow: hidden;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: white;
  position: relative;
  z-index: 1;
  transition: var(--footer-transition);
}

.social-link:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.social-link:hover svg {
  transform: scale(1.1);
}

.social-facebook { background: linear-gradient(135deg, #1877f2, #0d5bbd); }
.social-twitter { background: linear-gradient(135deg, #1da1f2, #0d8ae0); }
.social-instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }
.social-linkedin { background: linear-gradient(135deg, #0077b5, #005e93); }
.social-telegram { background: linear-gradient(135deg, #0088cc, #006daa); }
.social-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.social-pinterest { background: linear-gradient(135deg, #e60023, #bd001a); }
.social-tiktok { background: linear-gradient(135deg, #000000, #333333); }
.social-rss { background: linear-gradient(135deg, #ee802f, #d4721e); }

/* ===== FOOTER WIDGETS ROW ===== */
.footer-widgets-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  position: relative;
  z-index: 1;
}

.footer-widget-card {
  background: var(--footer-card-bg);
  border: 1px solid var(--footer-border);
  border-radius: var(--footer-radius);
  padding: 20px;
  transition: var(--footer-transition);
  text-align: center;
}

.footer-widget-card:hover {
  border-color: var(--footer-accent);
  transform: translateY(-5px);
  background: rgba(100, 255, 218, 0.03);
}

.widget-card-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--footer-transition);
}

.footer-widget-card:hover .widget-card-icon {
  background: rgba(100, 255, 218, 0.2);
  transform: scale(1.1);
}

.widget-card-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--footer-accent);
}

.widget-card-title {
  color: var(--footer-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.widget-card-text {
  font-size: 13px;
  color: var(--footer-text);
  line-height: 1.6;
}

.widget-card-text a {
  color: var(--footer-accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--footer-transition);
}

.widget-card-text a:hover {
  text-decoration: underline;
}

/* ===== TAGS SECTION ===== */
.footer-tags-section {
  border-top: 1px solid var(--footer-border);
  padding: 30px 0;
  position: relative;
  z-index: 1;
}

.footer-tags-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-tags-title {
  color: var(--footer-heading);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tags-title svg {
  width: 20px;
  height: 20px;
  fill: var(--footer-accent);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  background: var(--footer-card-bg);
  border: 1px solid var(--footer-border);
  border-radius: 20px;
  color: var(--footer-text);
  text-decoration: none;
  font-size: 13px;
  transition: var(--footer-transition);
}

.footer-tag:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--footer-accent);
  color: var(--footer-accent);
  transform: translateY(-2px);
}

.footer-tag::before {
  content: &#39;#&#39;;
  color: var(--footer-accent);
  font-weight: 700;
}

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
  background: var(--footer-bg-bottom);
  padding: 20px 0;
  border-top: 1px solid var(--footer-border);
  position: relative;
  z-index: 1;
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--footer-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-copyright .heart {
  color: #ef4444;
  animation: heartbeat 1.5s ease infinite;
  display: inline-block;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.footer-copyright a {
  color: var(--footer-accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--footer-transition);
}

.footer-copyright a:hover {
  text-decoration: underline;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 13px;
  transition: var(--footer-transition);
  position: relative;
}

.footer-bottom-links a::after {
  content: &#39;&#39;;
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--footer-accent);
  transition: var(--footer-transition);
}

.footer-bottom-links a:hover {
  color: var(--footer-accent);
}

.footer-bottom-links a:hover::after {
  width: 100%;
}

.footer-bottom-extra {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--footer-text);
  opacity: 0.7;
}

.footer-bottom-extra svg {
  width: 14px;
  height: 14px;
  fill: var(--footer-accent);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--footer-accent), #45e0be);
  color: var(--footer-bg);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
  transition: var(--footer-transition);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(100, 255, 218, 0.4);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: var(--footer-bg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
  .footer-columns .footer-column:first-child {
    grid-column: 1 / -1;
  }
  .footer-widgets-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .footer-brand-area {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand-info {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand-text p {
    max-width: 100%;
  }
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-features {
    grid-template-columns: 1fr;
  }
  .footer-widgets-row {
    grid-template-columns: 1fr;
  }
  .footer-stats-bar {
    justify-content: center;
  }
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom-links {
    justify-content: center;
  }
  .footer-bottom-extra {
    justify-content: center;
  }
  .footer-social-links {
    justify-content: center;
  }
  .footer-tags {
    justify-content: center;
  }
  .back-to-top {
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .footer-main-content {
    padding: 30px 15px 25px;
  }
  .stat-item {
    min-width: 80px;
    padding: 10px 15px;
  }
  .stat-number {
    font-size: 20px;
  }
}
</style>

<footer class='pro-footer'>
  <!-- Decorative Elements -->
  <div class='footer-bg-pattern'/>
  <div class='footer-particles'>
    <span/><span/><span/><span/><span/><span/><span/><span/>
  </div>

  <!-- ===== FOOTER TOP - BRAND SECTION ===== -->
  <div class='footer-top-section'>
    <div class='footer-brand-area'>
      <div class='footer-brand-info'>
        <a class='footer-logo-wrapper' expr:href='data:blog.homepageUrl'>
          <img expr:alt='data:blog.title' expr:src='data:blog.blogspotFaviconUrl' height='70' width='70'/>
        </a>
        <div class='footer-brand-text'>
          <h3><b:eval expr='data:blog.title'/></h3>
          <p>
            <b:if cond='data:blog.metaDescription != &quot;&quot;'>
              <data:blog.metaDescription/>
            <b:else/>
              مدونة متخصصة نقدم لكم أفضل المحتوى العربي المفيد والحصري في مختلف المجالات
            </b:if>
          </p>
        </div>
      </div>
      <div class='footer-stats-bar'>
        <div class='stat-item'>
          <span class='stat-number' id='footer-posts-count'>0</span>
          <span class='stat-label'>مقالة</span>
        </div>
        <div class='stat-item'>
          <span class='stat-number' id='footer-comments-count'>0</span>
          <span class='stat-label'>تعليق</span>
        </div>
        <div class='stat-item'>
          <span class='stat-number' id='footer-pages-count'>0</span>
          <span class='stat-label'>صفحة</span>
        </div>
        <div class='stat-item'>
          <span class='stat-number' id='footer-years-count'>0</span>
          <span class='stat-label'>سنوات</span>
        </div>
      </div>
    </div>
  </div>

  <!-- ===== FOOTER MAIN COLUMNS ===== -->
  <div class='footer-main-content'>
    <div class='footer-columns'>

      <!-- Column 1: About -->
      <div class='footer-column'>
        <h3 class='footer-column-title'>
          <svg viewBox='0 0 24 24'><path d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/></svg>
          من نحن
        </h3>
        <p class='footer-about-text'>
          <b:if cond='data:blog.metaDescription != &quot;&quot;'>
            <data:blog.metaDescription/>
          <b:else/>
            نسعى لتقديم محتوى عربي عالي الجودة يساعد القراء على التعلم والتطور. فريقنا يعمل بشغف لإيصال المعلومة بأبسط وأجمل صورة.
          </b:if>
        </p>
        <div class='footer-features'>
          <div class='footer-feature-item'>
            <svg viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>
            <span>محتوى حصري</span>
          </div>
          <div class='footer-feature-item'>
            <svg viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>
            <span>تحديث مستمر</span>
          </div>
          <div class='footer-feature-item'>
            <svg viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>
            <span>دعم فني</span>
          </div>
          <div class='footer-feature-item'>
            <svg viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>
            <span>مصادر موثوقة</span>
          </div>
          <div class='footer-feature-item'>
            <svg viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>
            <span>شروحات مفصلة</span>
          </div>
          <div class='footer-feature-item'>
            <svg viewBox='0 0 24 24'><path d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>
            <span>تصميم متجاوب</span>
          </div>
        </div>
      </div>

      <!-- Column 2: Quick Links -->
      <div class='footer-column'>
        <h3 class='footer-column-title'>
          <svg viewBox='0 0 24 24'><path d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/></svg>
          روابط سريعة
        </h3>
        <ul class='footer-links'>
          <li><a expr:href='data:blog.homepageUrl'>الرئيسية</a></li>
          <li><a expr:href='data:blog.homepageUrl + &quot;p/about.html&quot;'>من نحن</a></li>
          <li><a expr:href='data:blog.homepageUrl + &quot;p/contact.html&quot;'>اتصل بنا</a></li>
          <li><a expr:href='data:blog.homepageUrl + &quot;p/privacy-policy.html&quot;'>سياسة الخصوصية</a></li>
          <li><a expr:href='data:blog.homepageUrl + &quot;p/terms.html&quot;'>الشروط والأحكام</a></li>
          <li><a expr:href='data:blog.homepageUrl + &quot;p/disclaimer.html&quot;'>إخلاء المسؤولية</a></li>
          <li><a expr:href='data:blog.homepageUrl + &quot;sitemap.xml&quot;'>خريطة الموقع</a></li>
        </ul>
      </div>

      <!-- Column 3: Categories -->
      <div class='footer-column'>
        <h3 class='footer-column-title'>
          <svg viewBox='0 0 24 24'><path d='M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/></svg>
          الأقسام
        </h3>
        <ul class='footer-links' id='footer-categories'>
          <li><a href='/search/label/تقنية'>تقنية</a></li>
          <li><a href='/search/label/أندرويد'>أندرويد</a></li>
          <li><a href='/search/label/ايفون'>ايفون</a></li>
          <li><a href='/search/label/كمبيوتر'>كمبيوتر</a></li>
          <li><a href='/search/label/انترنت'>انترنت</a></li>
          <li><a href='/search/label/شروحات'>شروحات</a></li>
          <li><a href='/search/label/أخبار'>أخبار</a></li>
        </ul>
      </div>

      <!-- Column 4: Recent Posts (Auto-Updated) -->
      <div class='footer-column'>
        <h3 class='footer-column-title'>
          <svg viewBox='0 0 24 24'><path d='M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z'/></svg>
          أحدث المقالات
        </h3>
        <div class='footer-recent-posts' id='footer-recent-posts'>
          <!-- Auto-populated by script -->
        </div>
      </div>

      <!-- Column 5: Contact Info -->
      <div class='footer-column'>
        <h3 class='footer-column-title'>
          <svg viewBox='0 0 24 24'><path d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/></svg>
          تواصل معنا
        </h3>
        <ul class='footer-contact-list'>
          <li>
            <div class='contact-icon'>
              <svg viewBox='0 0 24 24'><path d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/></svg>
            </div>
            <div class='contact-details'>
              <div class='contact-label'>البريد الإلكتروني</div>
              <div class='contact-value'><a href='mailto:info@example.com'>info@example.com</a></div>
            </div>
          </li>
          <li>
            <div class='contact-icon'>
              <svg viewBox='0 0 24 24'><path d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/></svg>
            </div>
            <div class='contact-details'>
              <div class='contact-label'>الهاتف</div>
              <div class='contact-value'><a href='tel:+966500000000'>+966 50 000 0000</a></div>
            </div>
          </li>
          <li>
            <div class='contact-icon'>
              <svg viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/></svg>
            </div>
            <div class='contact-details'>
              <div class='contact-label'>العنوان</div>
              <div class='contact-value'>المملكة العربية السعودية</div>
            </div>
          </li>
          <li>
            <div class='contact-icon'>
              <svg viewBox='0 0 24 24'><path d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/></svg>
            </div>
            <div class='contact-details'>
              <div class='contact-label'>أوقات العمل</div>
              <div class='contact-value'>السبت - الخميس | 9ص - 6م</div>
            </div>
          </li>
        </ul>

        <!-- Social Media Links -->
        <div class='footer-social-section'>
          <div class='footer-social-title'>تابعنا على</div>
          <div class='footer-social-links'>
            <a aria-label='Facebook' class='social-link social-facebook' href='https://facebook.com/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/></svg>
            </a>
            <a aria-label='Twitter' class='social-link social-twitter' href='https://twitter.com/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/></svg>
            </a>
            <a aria-label='Instagram' class='social-link social-instagram' href='https://instagram.com/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z'/></svg>
            </a>
            <a aria-label='YouTube' class='social-link social-youtube' href='https://youtube.com/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/></svg>
            </a>
            <a aria-label='Telegram' class='social-link social-telegram' href='https://t.me/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M11.944 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0a12 12 0 00-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 01.171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z'/></svg>
            </a>
            <a aria-label='WhatsApp' class='social-link social-whatsapp' href='https://wa.me/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/></svg>
            </a>
            <a aria-label='LinkedIn' class='social-link social-linkedin' href='https://linkedin.com/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/></svg>
            </a>
            <a aria-label='Pinterest' class='social-link social-pinterest' href='https://pinterest.com/' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641.001 12.017.001z'/></svg>
            </a>
            <a aria-label='RSS' class='social-link social-rss' expr:href='data:blog.homepageUrl + &quot;feeds/posts/default&quot;' rel='noopener noreferrer' target='_blank'>
              <svg viewBox='0 0 24 24'><path d='M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.47 24 0 22.526 0 20.71s1.475-3.295 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z'/></svg>
            </a>
          </div>
        </div>
      </div>

    </div>
  </div>

  <!-- ===== FOOTER WIDGET CARDS ===== -->
  <div class='footer-widgets-row'>
    <div class='footer-widget-card'>
      <div class='widget-card-icon'>
        <svg viewBox='0 0 24 24'><path d='M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z'/></svg>
      </div>
      <h4 class='widget-card-title'>مقالات مميزة</h4>
      <p class='widget-card-text'>اكتشف أفضل المقالات المختارة بعناية في <a expr:href='data:blog.homepageUrl'>مدونتنا</a></p>
    </div>
    <div class='footer-widget-card'>
      <div class='widget-card-icon'>
        <svg viewBox='0 0 24 24'><path d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z'/></svg>
      </div>
      <h4 class='widget-card-title'>محتوى موثوق</h4>
      <p class='widget-card-text'>جميع مقالاتنا مراجعة ومدققة من فريق متخصص</p>
    </div>
    <div class='footer-widget-card'>
      <div class='widget-card-icon'>
        <svg viewBox='0 0 24 24'><path d='M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z'/></svg>
      </div>
      <h4 class='widget-card-title'>دعم متواصل</h4>
      <p class='widget-card-text'>فريق الدعم جاهز للإجابة على استفساراتكم</p>
    </div>
    <div class='footer-widget-card'>
      <div class='widget-card-icon'>
        <svg viewBox='0 0 24 24'><path d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z'/></svg>
      </div>
      <h4 class='widget-card-title'>تحميلات مجانية</h4>
      <p class='widget-card-text'>ملفات وأدوات مجانية لمساعدتك في عملك</p>
    </div>
  </div>

  <!-- ===== FOOTER TAGS ===== -->
  <div class='footer-tags-section'>
    <div class='footer-tags-container'>
      <h3 class='footer-tags-title'>
        <svg viewBox='0 0 24 24'><path d='M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z'/></svg>
        الوسوم الشائعة
      </h3>
      <div class='footer-tags' id='footer-tags'>
        <a class='footer-tag' href='/search/label/تقنية'>تقنية</a>
        <a class='footer-tag' href='/search/label/برمجة'>برمجة</a>
        <a class='footer-tag' href='/search/label/تصميم'>تصميم</a>
        <a class='footer-tag' href='/search/label/أندرويد'>أندرويد</a>
        <a class='footer-tag' href='/search/label/ايفون'>ايفون</a>
        <a class='footer-tag' href='/search/label/ويندوز'>ويندوز</a>
        <a class='footer-tag' href='/search/label/لينكس'>لينكس</a>
        <a class='footer-tag' href='/search/label/ألعاب'>ألعاب</a>
        <a class='footer-tag' href='/search/label/أمن'>أمن معلوماتي</a>
        <a class='footer-tag' href='/search/label/SEO'>تحسين محركات البحث</a>
        <a class='footer-tag' href='/search/label/ربح'>الربح من الإنترنت</a>
        <a class='footer-tag' href='/search/label/بلوجر'>بلوجر</a>
        <a class='footer-tag' href='/search/label/ووردبريس'>ووردبريس</a>
        <a class='footer-tag' href='/search/label/تطبيقات'>تطبيقات</a>
      </div>
    </div>
  </div>

  <!-- ===== FOOTER BOTTOM ===== -->
  <div class='footer-bottom'>
    <div class='footer-bottom-content'>
      <div class='footer-copyright'>
        &#169; <span id='footer-year'/> جميع الحقوق محفوظة
        <span class='heart'>&#10084;</span>
        <a expr:href='data:blog.homepageUrl'><b:eval expr='data:blog.title'/></a>
      </div>
      <div class='footer-bottom-links'>
        <a expr:href='data:blog.homepageUrl + &quot;p/privacy-policy.html&quot;'>الخصوصية</a>
        <a expr:href='data:blog.homepageUrl + &quot;p/terms.html&quot;'>الشروط</a>
        <a expr:href='data:blog.homepageUrl + &quot;p/contact.html&quot;'>اتصل بنا</a>
        <a expr:href='data:blog.homepageUrl + &quot;sitemap.xml&quot;'>خريطة الموقع</a>
      </div>
      <div class='footer-bottom-extra'>
        <svg viewBox='0 0 24 24'><path d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/></svg>
        <span>موقع آمن ومحمي بتقنية SSL</span>
      </div>
    </div>
  </div>
</footer>

<!-- ===== BACK TO TOP BUTTON ===== -->
<button aria-label='العودة للأعلى' class='back-to-top' id='backToTop' onclick='window.scrollTo({top:0,behavior:&quot;smooth&quot;})'>
  <svg viewBox='0 0 24 24'><path d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/></svg>
</button>

<!-- ===== FOOTER SCRIPTS ===== -->
<script>
//<![CDATA[

// === Auto Year ===
document.getElementById('footer-year').textContent = new Date().getFullYear();

// === Back to Top Button ===
(function(){
  var btn = document.getElementById('backToTop');
  window.addEventListener('scroll', function(){
    if(window.pageYOffset > 400){
      btn.classList.add('visible');
    } else {
      btn.classList.remove('visible');
    }
  });
})();

// === Fetch Recent Posts ===
(function(){
  var container = document.getElementById('footer-recent-posts');
  var blogUrl = window.location.protocol + '//' + window.location.host;
  
  fetch(blogUrl + '/feeds/posts/default?alt=json&max-results=3')
    .then(function(r){ return r.json(); })
    .then(function(data){
      if(!data.feed || !data.feed.entry) return;
      var entries = data.feed.entry;
      var html = '';
      
      entries.forEach(function(entry){
        var title = entry.title.$t || '';
        var link = '';
        if(entry.link){
          for(var i=0; i<entry.link.length; i++){
            if(entry.link[i].rel === 'alternate'){
              link = entry.link[i].href;
              break;
            }
          }
        }
        var thumb = '';
        if(entry.media$thumbnail){
          thumb = entry.media$thumbnail.url.replace(/\/s[0-9]+(-c)?\//, '/s120-c/');
        } else {
          thumb = 'https://via.placeholder.com/120x120/1a1a2e/64ffda?text=📄';
        }
        var published = '';
        if(entry.published){
          var d = new Date(entry.published.$t);
          var months = ['يناير','فبراير','مارس','أبريل','مايو','يونيو','يوليو','أغسطس','سبتمبر','أكتوبر','نوفمبر','ديسمبر'];
          published = d.getDate() + ' ' + months[d.getMonth()] + ' ' + d.getFullYear();
        }
        
        html += '<a class="recent-post-item" href="' + link + '">';
        html += '<div class="recent-post-thumb"><img alt="' + title + '" loading="lazy" src="' + thumb + '"/></div>';
        html += '<div class="recent-post-info">';
        html += '<h4>' + title + '</h4>';
        html += '<div class="recent-post-meta"><svg viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM9 10H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2z"/></svg>' + published + '</div>';
        html += '</div></a>';
      });
      
      container.innerHTML = html;
    })
    .catch(function(err){ console.log('Footer posts error:', err); });
})();

// === Fetch Blog Stats ===
(function(){
  var blogUrl = window.location.protocol + '//' + window.location.host;
  
  // Posts count
  fetch(blogUrl + '/feeds/posts/default?alt=json&max-results=0')
    .then(function(r){ return r.json(); })
    .then(function(data){
      var total = 0;
      if(data.feed && data.feed.openSearch$totalResults){
        total = parseInt(data.feed.openSearch$totalResults.$t) || 0;
      }
      animateCount('footer-posts-count', total);
    }).catch(function(){});
  
  // Comments count
  fetch(blogUrl + '/feeds/comments/default?alt=json&max-results=0')
    .then(function(r){ return r.json(); })
    .then(function(data){
      var total = 0;
      if(data.feed && data.feed.openSearch$totalResults){
        total = parseInt(data.feed.openSearch$totalResults.$t) || 0;
      }
      animateCount('footer-comments-count', total);
    }).catch(function(){});
  
  // Pages count
  fetch(blogUrl + '/feeds/pages/default?alt=json&max-results=0')
    .then(function(r){ return r.json(); })
    .then(function(data){
      var total = 0;
      if(data.feed && data.feed.openSearch$totalResults){
        total = parseInt(data.feed.openSearch$totalResults.$t) || 0;
      }
      animateCount('footer-pages-count', total);
    }).catch(function(){});

  // Blog age (years)
  fetch(blogUrl + '/feeds/posts/default?alt=json&max-results=1&orderby=published&start-index=1')
    .then(function(r){ return r.json(); })
    .then(function(data){
      if(data.feed && data.feed.entry && data.feed.entry.length > 0){
        // Get the blog's first post date from feed updated or entry
        var firstDate = new Date(data.feed.entry[0].published.$t);
        var now = new Date();
        var years = Math.max(1, Math.floor((now - firstDate) / (365.25 * 24 * 60 * 60 * 1000)));
        animateCount('footer-years-count', years);
      } else {
        document.getElementById('footer-years-count').textContent = '1';
      }
    }).catch(function(){
      document.getElementById('footer-years-count').textContent = '1';
    });
  
  // Animate counter
  function animateCount(id, target){
    var el = document.getElementById(id);
    if(!el) return;
    var start = 0;
    var duration = 2000;
    var startTime = null;
    
    function step(timestamp){
      if(!startTime) startTime = timestamp;
      var progress = Math.min((timestamp - startTime) / duration, 1);
      var eased = 1 - Math.pow(1 - progress, 3);
      el.textContent = Math.floor(eased * target);
      if(progress < 1){
        requestAnimationFrame(step);
      } else {
        el.textContent = target;
        if(target >= 1000){
          el.textContent = (target / 1000).toFixed(1) + 'K';
        }
      }
    }
    
    // Start animation when element is visible
    var observer = new IntersectionObserver(function(entries){
      entries.forEach(function(entry){
        if(entry.isIntersecting){
          requestAnimationFrame(step);
          observer.unobserve(el);
        }
      });
    }, {threshold: 0.5});
    
    observer.observe(el);
  }
})();

// === Auto-fetch Labels for Tags ===
(function(){
  var blogUrl = window.location.protocol + '//' + window.location.host;
  
  fetch(blogUrl + '/feeds/posts/default?alt=json&max-results=0')
    .then(function(r){ return r.json(); })
    .then(function(data){
      if(data.feed && data.feed.category){
        var tagsContainer = document.getElementById('footer-tags');
        var categories = data.feed.category;
        var html = '';
        var maxTags = Math.min(categories.length, 20);
        
        for(var i = 0; i < maxTags; i++){
          var term = categories[i].term;
          html += '<a class="footer-tag" href="/search/label/' + encodeURIComponent(term) + '">' + term + '</a>';
        }
        
        if(html){
          tagsContainer.innerHTML = html;
        }
      }
    }).catch(function(){});
    
  // Auto-fetch labels for categories column
  fetch(blogUrl + '/feeds/posts/default?alt=json&max-results=0')
    .then(function(r){ return r.json(); })
    .then(function(data){
      if(data.feed && data.feed.category){
        var catContainer = document.getElementById('footer-categories');
        var categories = data.feed.category;
        var html = '';
        var maxCats = Math.min(categories.length, 8);
        
        for(var i = 0; i < maxCats; i++){
          var term = categories[i].term;
          html += '<li><a href="/search/label/' + encodeURIComponent(term) + '">' + term + '</a></li>';
        }
        
        if(html){
          catContainer.innerHTML = html;
        }
      }
    }).catch(function(){});
})();

//]]>
</script>
<!-- ========== PROFESSIONAL FOOTER END ========== -->

كاتب المقال محمد بلقاسم

محمد ذويب، مدون مهتم بالربح من الإنترنت، العملات الرقمية، والتسويق الإلكتروني. أشارك شروحات ودروسًا تساعد المبتدئين على تحقيق دخل عبر الإنترنت.

Previous Post Next Post

نموذج الاتصال