/* ==========================================================================
   LAYOUT / FOOTER
   Shared site footer — appears on every page.
   ========================================================================== */

/* ==========================================================================
   3. FOOTER STYLES
   ========================================================================== */
.site-footer {
  width: 100%;
  max-width: var(--container-max);
  min-height: 420px;
  margin: 0 auto;
  position: relative; /* חובה עבור מיקום ה-Ribbon */
  direction: rtl;
  padding: 60px 0 20px 0; /* הגדלנו padding עליון כדי שה-Ribbon לא יסתיר תוכן */
}

/* 2. פס ה-Ribbon הרקום בחלק העליון */
.site-footer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 52px; /* גובה ה-Ribbon לפי התמונה */
  
  /* הוספת ה-Pattern הרקום */
  background-image: url('../../images/backgrounds/pattern-ribbon.png');
  background-repeat: repeat-x; /* חזרה אופקית בלבד */
  background-position: top center;
  background-size: auto 100%;
  z-index: 2;
}

/* Repeating canvas-texture background — same ::before pattern as
   .main-content, on ::after here since ::before is already the ribbon. */
.site-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../../images/backgrounds/pattern-texture.jpg');
  background-repeat: repeat;
  background-position: top center;
  background-size: auto;
  opacity: 1;
  z-index: -1;
  pointer-events: none;
}

.footer-container {
  width: 100%;
  max-width: 1360px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin: 0 auto;
  padding-inline-end: 110px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

/* Brand Column */
.footer-col.col-brand {
  max-width: 320px;
}

.footer-logo img {
  width: 170px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}

.brand-description {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 18px;
  line-height: 30px;
  text-align: right;
  color: var(--color-primary-navy);
}

/* Headings */
.footer-heading {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 20px;
  line-height: 32px;
  text-align: right;
  color: var(--color-primary-navy);
  margin-bottom: 24px;
}

/* Navigation Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  text-align: right;
  color: var(--color-primary-navy);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.75;
}

/* Contact Info Section */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: var(--color-primary-navy);
  text-decoration: none;
}

.contact-icon {
  flex-shrink: 0;
}

/* Social Media Cards */
.social-links {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.social-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-item:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}

/* Footer Bottom Bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #000080;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  margin-top: 75px;
}

.legal-copyright {
  font-family: var(--font-assistant);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: var(--color-primary-navy);
  font-variant-numeric: lining-nums tabular-nums;
  display: flex;
  gap: 8px;
  align-items: center;
}

.legal-copyright a {
  color: var(--color-primary-navy);
  text-decoration: none;
}

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

.legal-copyright .sep {
  opacity: 0.6;
}

.created-by {
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 18px;
  line-height: 176%;
  color: var(--color-primary-navy);
  font-variant-numeric: lining-nums tabular-nums;
}



/* ==========================================================================
   RESPONSIVE — Footer
   ========================================================================== */
@media (max-width: 1023px) {
  .footer-container {
    padding-inline-end: 40px;
    flex-wrap: wrap;
    gap: 32px 24px;
  }

  .footer-col.col-brand {
    max-width: 100%;
    flex: 1 1 100%;
    margin-bottom: 20px;
  }

  .social-links {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .site-footer {
    padding: 48px 0 20px 0;
  }

  .footer-container {
    flex-direction: column;
    gap: 0;
    padding: 0 20px;
  }

  .footer-col {
    width: 100%;
  }

  .social-links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px 0;
    margin-top: 40px;
  }

  .legal-copyright {
    flex-wrap: wrap;
    justify-content: center;
  }
  .created-by {
      text-align: center;
      width: 100%;
  }
}

@media (max-width: 420px) {
  .footer-logo img {
    width: 130px;
    height: 92px;
  }

  .brand-description,
  .footer-heading,
  .footer-links a,
  .contact-item {
    font-size: 16px;
  }
}

/* ==========================================================================
   FOOTER ACCORDION — MOBILE ONLY
   assets/js/core/footer.js turns every ".footer-col" that has a
   ".footer-heading" into a ".footer-accordion": the heading becomes a
   ".footer-accordion-toggle" button, everything else in the column moves
   into a ".footer-accordion-body". Above 767px the toggle is inert and
   the body is always shown (desktop is visually unchanged); below 767px
   it behaves like a real accordion, closed by default.
   ========================================================================== */
.footer-accordion-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 20px;
  line-height: 32px;
  text-align: right;
  color: var(--color-primary-navy);
  cursor: pointer;
}

.footer-accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

@media (min-width: 768px) {
  /* Desktop/tablet: keep looking exactly like the old <h3>.footer-heading,
     always expanded, no click behavior. */
  .footer-accordion-toggle {
    display: flex;
    pointer-events: none;
    margin-bottom: 24px;
  }

  .footer-accordion-chevron {
    display: none;
  }

  .footer-accordion-body {
    display: block !important;
  }
}

@media (max-width: 767px) {
  .footer-col.footer-accordion {
    border-bottom: 1px solid rgba(0, 0, 128, 0.12);
    padding-bottom: 0;
  }

  .footer-accordion-toggle {
    display: flex;
    padding: var(--space-3) 0;
    justify-content: center;
    gap: 20px;
  }

  .footer-accordion-toggle[aria-expanded="true"] .footer-accordion-chevron {
    transform: rotate(180deg);
  }

  .footer-accordion-body {
    display: none;
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .footer-col.footer-accordion.is-open .footer-accordion-body {
    display: block;
  }

  .footer-col.footer-accordion .contact-info {
    margin-bottom: var(--space-4);
  }
}
