/* Footer shell and columns */
footer.site-footer { margin-top: var(--elbi-section-gap); background: #101b31; color: #c7ced8; }
footer.site-footer .primary-footer { padding: 34px 0 30px; }
footer.site-footer :is(.primary-footer, .site-info) > .container-wrapper {
  width: min(calc(100% - var(--elbi-page-gutter) - var(--elbi-page-gutter)), var(--elbi-container));
  max-width: var(--elbi-container);
  margin-inline: auto;
  padding-inline: 0;
}
footer.site-footer .primary-footer > .container-wrapper > .af-container-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0; direction: rtl;
}
footer.site-footer .primary-footer > .container-wrapper > .af-container-row > .primary-footer-area {
  float: none; box-sizing: border-box; width: 100%; min-width: 0;
  padding: 0 30px; direction: rtl;
}
footer.site-footer .footer-second-widgets-section {
  border-right: 1px solid rgba(173, 190, 214, 0.22); border-left: 1px solid rgba(173, 190, 214, 0.22);
}

/* Normalize ReviewNews widget wrappers */
footer.site-footer .primary-footer :is(.widget-area, .reviewnews-widget, .wp-block-group) {
  min-height: 0; background: transparent; box-shadow: none;
}
footer.site-footer .primary-footer .widget-area { display: flex; flex-direction: column; }
footer.site-footer .primary-footer .reviewnews-widget { margin: 0 0 14px; padding: 0; }
footer.site-footer .primary-footer .reviewnews-widget:last-child { margin-bottom: 0; }
footer.site-footer #block-18 { display: none; }
body footer.site-footer .primary-footer .reviewnews-widget :is(.wp-block-heading, .widget-title) {
  margin: 0 0 16px; padding: 0 11px 0 0; border: 0;
  border-right: 3px solid var(--elbi-red); background: transparent;
  color: var(--elbi-white); font-size: 18px; line-height: 1.5;
}
footer.site-footer .primary-footer :is(.wp-block-heading, .heading-line)::before,
footer.site-footer .primary-footer :is(.wp-block-heading, .heading-line)::after,
footer.site-footer .primary-footer .widget-title :is(.heading-line-before, .heading-line-after) { display: none; }
body footer.site-footer .primary-footer .widget-title .heading-line {
  padding: 0;
  background: transparent;
  color: var(--elbi-white);
}
footer.site-footer .primary-footer :is(p, a) { color: #d5dbe5; }

/* About and quick links */
footer.site-footer #block-20 .wp-block-heading {
  margin-right: 0 !important;
  margin-left: auto !important;
  text-align: right;
}
footer.site-footer .footer-first-widgets-section p { max-width: 42ch; margin: 0; font-size: 15px; line-height: 1.8; }
footer.site-footer .footer-first-widgets-section .wp-block-button__link {
  min-height: 38px; padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.42); border-radius: 4px; background: transparent;
}
footer.site-footer #nav_menu-3 .menu {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px; margin: 0;
}
footer.site-footer :is(#nav_menu-3, #nav_menu-5) .menu li { margin: 0; padding: 0; border: 0; }
footer.site-footer #nav_menu-3 .menu a { display: flex; align-items: center; min-height: 34px; padding: 2px 0; }
footer.site-footer #nav_menu-3 .menu a::before { margin-left: 8px; color: var(--elbi-red); content: "\2039"; }

/* Contact and social links */
footer.site-footer .footer-third-widgets-section #nav_menu-5 { order: 1; }
footer.site-footer .footer-third-widgets-section :is(#block-32, #block-33, #block-34) { order: 2; }
footer.site-footer #nav_menu-5 > .widget-title { display: none; }
footer.site-footer #nav_menu-5 .menu { display: flex; gap: 8px; margin: 0 0 14px; }
footer.site-footer #nav_menu-5 .menu a {
  display: grid; width: 40px; height: 40px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); font-size: 0; place-items: center;
}
footer.site-footer #nav_menu-5 .menu a::before { font-family: "aft-icons"; font-size: 16px; }
footer.site-footer #nav_menu-5 a[href*="youtube.com"]::before { content: "\f16a"; }
footer.site-footer #nav_menu-5 a[href*="facebook.com"]::before { content: "\f09a"; }
footer.site-footer #nav_menu-5 a[href*="instagram.com"]::before { content: "\f16d"; }
footer.site-footer .footer-third-widgets-section :is(#block-32, #block-33, #block-34) {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 0 6px;
  align-items: center; margin-bottom: 10px;
}
footer.site-footer .footer-third-widgets-section :is(#block-32, #block-33, #block-34)::before {
  display: block; width: 16px; height: 16px; line-height: 1;
}
footer.site-footer #block-32::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239daabd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}
footer.site-footer #block-33::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239daabd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.9a2 2 0 0 1-.4 2.1L8.1 10a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.9.6 2.9.7a2 2 0 0 1 1.6 1.9Z'/%3E%3C/svg%3E");
}
footer.site-footer #block-34::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239daabd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}
footer.site-footer .footer-third-widgets-section .widget_text p { margin: 0; font-size: 14px; line-height: 1.7; }
footer.site-footer .footer-third-widgets-section .widget_text p br { display: none; }
footer.site-footer .footer-third-widgets-section .widget_text p strong::after { content: " "; }

/* Interaction and lower bar */
footer.site-footer :is(#nav_menu-3, #nav_menu-5) a:hover,
footer.site-footer :is(#nav_menu-3, #nav_menu-5) a:focus-visible,
footer.site-footer .wp-block-button__link:hover,
footer.site-footer .wp-block-button__link:focus-visible { border-color: var(--elbi-red); color: var(--elbi-white); }
footer.site-footer #nav_menu-5 .menu a:hover,
footer.site-footer #nav_menu-5 .menu a:focus-visible { background: var(--elbi-red); }
footer.site-footer .secondary-footer { display: none; }
footer.site-footer .site-info {
  display: flex; min-height: 42px; padding: 0; align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1426;
}
footer.site-footer .site-info .color-pad {
  padding-top: 9px; padding-bottom: 9px;
  color: #c7ced8; font-size: 13px; line-height: 1.5;
}
#scroll-up { bottom: 20px; width: 40px; height: 40px; border-radius: 50%; }
#scroll-up::before {
  position: static; display: block; width: auto; height: auto;
  border: 0; border-radius: 0; transform: none;
  content: "\f077"; font-family: "aft-icons"; font-size: 16px; line-height: 40px;
}
#scroll-up::after { content: none; }

@media screen and (max-width: 1024px) and (min-width: 769px) {
  footer.site-footer .primary-footer > .container-wrapper > .af-container-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }
  footer.site-footer .footer-second-widgets-section { border-right: 1px solid rgba(173, 190, 214, 0.22); border-left: 0; }
  footer.site-footer .footer-third-widgets-section {
    grid-column: 1 / -1;
    padding-top: 26px;
    border-top: 1px solid rgba(173, 190, 214, 0.22);
  }
}

@media screen and (max-width: 768px) {
  footer.site-footer { margin-top: var(--elbi-section-gap-mobile); }
  footer.site-footer .primary-footer { padding: 28px 0 24px; }
  footer.site-footer .primary-footer > .container-wrapper > .af-container-row { grid-template-columns: minmax(0, 1fr); }
  footer.site-footer .primary-footer > .container-wrapper > .af-container-row > .primary-footer-area {
    padding: 22px 0;
    border: 0;
    border-bottom: 1px solid rgba(173, 190, 214, 0.18);
  }
  footer.site-footer .primary-footer > .container-wrapper > .af-container-row > .primary-footer-area:first-child { padding-top: 0; }
  footer.site-footer .primary-footer > .container-wrapper > .af-container-row > .primary-footer-area:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}
