/* Kaman Lend v1.3.51 — shared footer mobile brand panel, 3+2 layout.
 * Scoped to the global mobile footer, regardless of Elementor page template.
 * Brand images and links remain fully managed in Appearance > Widgets. */
@media (max-width: 899px) {
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family {
    width: 100%; min-width: 0; height: auto; min-height: 209px;
    margin-top: 20px; padding: 20px 16px 18px;
    border-radius: 16px; background: #f4f7fc; box-sizing: border-box;
    overflow: visible; display: flex; flex-direction: column; gap: 16px;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-head {
    flex: 0 0 auto; width: 100%; min-width: 0; justify-content: center;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-logos,
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-brands-widget-list {
    box-sizing: border-box; display: flex !important;
    flex-direction: row !important; flex-wrap: wrap !important;
    align-items: center !important; justify-content: center !important;
    align-content: center; direction: rtl !important;
    width: 100%; min-width: 0; max-width: 100%;
    gap: 14px 0 !important;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-logos {
    padding: 16px 0 0 !important; border-top: 1px solid #e1e6ef;
  }
  /* The group widget is one WP widget holding five independent brand cards. */
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:has(.klf-brands-widget-list) {
    display: block !important; flex: 0 0 100% !important;
    height: auto !important; min-height: 0 !important; max-height: none !important;
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    padding: 0 !important; margin: 0 !important; border: 0 !important;
    background: transparent !important; overflow: visible !important;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-item,
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:not(:has(.klf-brands-widget-list)) {
    box-sizing: border-box; flex: 0 0 33.333333% !important;
    width: 33.333333% !important; max-width: 33.333333% !important;
    min-width: 0 !important; height: 34px !important; min-height: 34px !important;
    max-height: 34px !important; margin: 0 !important; padding: 0 5px !important;
    display: flex !important; align-items: center; justify-content: center !important;
    border: 0 !important; overflow: visible !important;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-item :is(a,.kl-footer-image-link),
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-logos > .klf-widget :is(a,.wp-block-image) {
    box-sizing: border-box; max-width: 100%; max-height: 34px; min-width: 0;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    margin: 0; overflow: visible;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-item img,
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-logos > .klf-widget img {
    display: block; box-sizing: border-box; width: auto !important; height: auto !important;
    min-width: 0; max-width: 100% !important; max-height: 32px !important;
    object-fit: contain !important; object-position: center !important;
    filter: grayscale(1); opacity: .7; transform: none !important;
  }
  #mobile-footer.kl-footer--mobile .klf-mobile-inner .klf-family-wordmark {
    font-size: 15px; font-weight: 700; color: #a6aab3; white-space: nowrap;
  }
  /* Three cards in the first row, two centered below (RTL):
   * Kaman Lend, Talaboard, Kaman Store / Kaman Khodro, Samin Kala. */
  #mobile-footer.kl-footer--mobile [data-kl-brand-slot="5"] { order: 1 !important; }
  #mobile-footer.kl-footer--mobile [data-kl-brand-slot="4"] { order: 2 !important; }
  #mobile-footer.kl-footer--mobile [data-kl-brand-slot="3"] { order: 3 !important; }
  #mobile-footer.kl-footer--mobile [data-kl-brand-slot="1"] { order: 4 !important; }
  #mobile-footer.kl-footer--mobile [data-kl-brand-slot="2"] { order: 5 !important; }
  /* Standard image widgets are also supported in the five sidebar slots. */
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:nth-child(1) {order: 4;}
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:nth-child(2) {order: 5;}
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:nth-child(3) {order: 3;}
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:nth-child(4) {order: 2;}
  #mobile-footer.kl-footer--mobile .klf-family-logos > .klf-widget:nth-child(5) {order: 1;}
}

/* Figma 11423:11053 / 11431:11900 — the shared footer's final visual layer.
 * Preserve the editable widget media, menus and trust links. */
/* Footer-only logo: standard WordPress Image blocks must not inherit the
 * header's SVG cover rule. Keep every uploaded image fully visible. */
.kl-footer.klf .klf-main-logo :is(.kl-brand-logo-area,.kl-brand-logo-widget,.wp-block-image,.widget_media_image,.kl-brand-logo-link) {
  overflow: visible !important; min-width: 0; max-width: 100%;
}
.kl-footer.klf .klf-main-logo :is(.wp-block-image,.widget_media_image) img {
  display: block; width: 100% !important; height: 100% !important;
  max-width: 100% !important; max-height: 100% !important;
  object-fit: contain !important; object-position: center !important;
  transform: none !important;
}
/* The existing Artboard-1-copy.svg has a 841.89×595.28 artboard but its
 * artwork occupies x=40.61..781.95, y=165.91..356.18. At 201.6px wide
 * the artwork is 45.6px tall. A 56px frame reveals it all, trimming only
 * blank artboard space above/below. Other uploaded SVGs keep contain. */
.kl-footer.klf .klf-main-logo:has(img[src*="/Artboard-1-copy.svg"]) {
  height: 56px !important; min-height: 56px !important;
}
.kl-footer.klf .klf-main-logo:has(img[src*="/Artboard-1-copy.svg"]) :is(.kl-brand-logo-area,.kl-brand-logo-widget,.wp-block-image,.widget_media_image,.kl-brand-logo-link) {
  height: 56px !important; min-height: 56px !important; max-height: 56px !important;
  margin: 0;
}
.kl-footer.klf .klf-main-logo img[src*="/Artboard-1-copy.svg"] {
  display: block; width: 100% !important; height: 56px !important;
  max-width: 100% !important; max-height: 56px !important;
  object-fit: cover !important; object-position: 50% 40% !important;
  transform: none !important;
}
.klf .klf-family { background: #f5f8fd; }
.klf .klf-samin-kala-art { display: flex; direction: ltr; align-items: center; justify-content: center; gap: 8px; max-width: 100%; }
.klf .klf-samin-kala-art picture { display: block; flex: 0 1 auto; min-width: 0; }
.klf .klf-samin-kala-art img { flex: 0 1 auto; object-fit: contain; transform: scaleY(-1) !important; }
.klf .klf-family-head .klf-company-image { order: -1; }
.klf .klf-socials :is(a,span).kl-footer-image-link,
.klf .klf-socials-list > :is(a,span) { background: #f5f5f5; }
.klf .klf-socials-list img { width: 20px; height: 20px; max-width: 20px; max-height: 20px; }
/* Legacy bundled social assets already contain their circular backing. */
.klf .klf-socials img:is([src*="figma-e53ca1b42d520a79.svg"],[src*="figma-1a60d62f9f52fa69.svg"]) { width: 36px; height: 36px; max-width: 36px; max-height: 36px; }
.klf .klf-family-head .klf-widget :is(img,figure) { object-fit: contain; margin: 0; }
.klf .klf-family-item .klf-family-image { filter: grayscale(1); opacity: .9; }

@media (min-width: 900px) {
  #desktop-footer.klf { min-height: 0; padding: 0; }
  #desktop-footer.klf .klf-inner { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
  #desktop-footer.klf .klf-top { flex: 0 0 auto; min-height: 90px; height: auto; padding: 24px 0 !important; border-color: #ebebeb; }
  #desktop-footer.klf .klf-top-left { gap: 16px; }
  #desktop-footer.klf .klf-hours { gap: 8px; font-size: 13px; }
  #desktop-footer.klf .klf-middle { height: auto; min-height: 0; display: grid; grid-template-columns: minmax(0,340px) minmax(0,1fr) minmax(80px,auto); align-items: start; gap: 56px; padding: 8px 0 24px; }
  #desktop-footer.klf .klf-contact { gap: 12px; min-width: 0; }
  #desktop-footer.klf .klf-contact > .klf-widget { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  #desktop-footer.klf .klf-contact-heading, #desktop-footer.klf .klf-navigation-column h3 { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: #121212; }
  #desktop-footer.klf .klf-contact-row { display: block !important; min-width: 0; font-size: 13px; line-height: 1.7; }
  #desktop-footer.klf .klf-contact-row > span { display: inline; width: auto; color: #121212; font-size: 14px; font-weight: 600 !important; margin-inline-end: 4px; }
  #desktop-footer.klf .klf-contact-row > strong { display: inline; width: auto; font-size: 13px; font-weight: 500; color: #696969; }
  #desktop-footer.klf .klf-navigation { justify-content: flex-end; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; }
  #desktop-footer.klf .klf-navigation-column { min-width: 84px; }
  #desktop-footer.klf .klf-navigation-column h3 { margin-bottom: 8px; }
  #desktop-footer.klf .klf-navigation-column .kl-footer-menu-list { gap: 4px; }
  #desktop-footer.klf .klf-navigation-column .kl-footer-menu-list a { font-size: 13px; font-weight: 500; }
  #desktop-footer.klf .klf-trust { align-self: center; justify-content: flex-end; max-width: none; }
  #desktop-footer.klf .klf-family { margin: 0; min-height: 98px; height: auto; padding: 12px 28px 12px 40px; gap: 48px; }
  #desktop-footer.klf .klf-family-head { flex: 0 1 261px; width: auto; min-width: 0; position: relative; padding-inline-end: 16px; }
  #desktop-footer.klf .klf-family-head::after { content: ""; width: 1px; height: 54px; background: #a4a4a4; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); }
  #desktop-footer.klf .klf-family-head > .klf-widget { justify-content: center; }
  #desktop-footer.klf .klf-family-logos > .klf-widget:has(.klf-brands-widget-list) { flex: 1 1 100%; max-height: none; border: 0; padding: 0; }
  #desktop-footer.klf .klf-family-item { height: 46px; border: 0; padding: 0 12px; position: relative; }
  #desktop-footer.klf .klf-family-item:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 24px; background: #e4e7ec; }
  #desktop-footer.klf .klf-family-item img { width: auto; height: auto; max-width: 100%; max-height: 34px; }
  #desktop-footer.klf [data-kl-brand-slot="4"] img { max-width: 56px; max-height: 28px; }
  #desktop-footer.klf [data-kl-brand-slot="3"]:has(.klf-family-image--mark) img:not(.klf-family-image--mark) { max-width: min(110.6px, 72%); max-height: 22.4px; }
  #desktop-footer.klf [data-kl-brand-slot="5"]:has(.klf-family-image--mark) img:not(.klf-family-image--mark) { max-width: min(94.5px, 72%); max-height: 22.6px; }
  #desktop-footer.klf .klf-family-item .klf-family-image--mark { max-width: 28px !important; max-height: 28px; }
  #desktop-footer.klf .klf-samin-kala-art .klf-samin-kala-wordmark { width: 67.46px; }
  #desktop-footer.klf .klf-samin-kala-art .klf-samin-kala-mark { width: 36px; }
  #desktop-footer.klf .klf-samin-kala-art img { width: 100%; max-width: 100%; }
  #desktop-footer.klf .klf-copyright { margin: 0; padding-top: 24px; min-height: 0; font-size: 14px; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  #desktop-footer.klf .klf-middle { gap: 24px; grid-template-columns: minmax(210px, 30%) minmax(0,1fr) 80px; }
  #desktop-footer.klf .klf-navigation { gap: 16px; }
  #desktop-footer.klf .klf-navigation-column { min-width: 65px; }
  #desktop-footer.klf .klf-family { gap: 16px; padding-inline: 20px; }
  #desktop-footer.klf .klf-family-item { padding-inline: 8px; }
}
@media (max-width: 899px) {
  #mobile-footer.klf { height: auto; min-height: 0; }
  #mobile-footer.klf .klf-mobile-inner { display: flex; flex-direction: column; align-items: stretch; width: calc(100% - 40px); max-width: none; padding: 32px 0; gap: 20px; }
  #mobile-footer.klf .klf-mobile-inner .klf-main-logo { margin: 0; align-self: flex-start; }
  #mobile-footer.klf .klf-mobile-contact { background: #f5f8fd; min-height: 0; padding: 4px 16px; }
  #mobile-footer.klf .klf-mobile-contact .klf-contact-row { min-height: 48px; padding: 14px 0; gap: 4px; border-bottom: 1px solid #eef0f3; }
  #mobile-footer.klf .klf-mobile-contact .klf-contact-row > span { font-size: 13px; line-height: 1.5; font-weight: 500 !important; color: #696969; }
  #mobile-footer.klf .klf-mobile-contact .klf-contact-row > strong { font-size: 15px; line-height: 1.7; font-weight: 600; color: #121212; }
  #mobile-footer.klf .klf-mobile-contact .klf-contact-row--hours,
  #mobile-footer.klf .klf-mobile-contact:not(:has(.klf-contact-row--hours)) .klf-contact-row:last-child { border-bottom: 0; }
  #mobile-footer.klf .klf-mobile-social-trust { min-height: 0; padding: 0; align-items: center; gap: 16px; }
  #mobile-footer.klf .klf-socials-block { gap: 10px; }
  #mobile-footer.klf .klf-socials-list { direction: rtl; gap: 12px; }
  #mobile-footer.klf .klf-socials-list img { width: 24px; height: 24px; max-width: 24px; max-height: 24px; }
  #mobile-footer.klf .klf-socials img:is([src*="figma-e53ca1b42d520a79.svg"],[src*="figma-1a60d62f9f52fa69.svg"]) { width: 44px; height: 44px; max-width: 44px; max-height: 44px; }
  #mobile-footer.klf .klf-mobile-navigation, #mobile-footer.klf .klf-mobile-accordion { border-color: #eef0f3; }
  #mobile-footer.klf .klf-mobile-accordion:last-child { border-bottom: 0; }
  #mobile-footer.klf .klf-mobile-accordion summary { height: auto; min-height: 56px; font-size: 15px; font-weight: 600; }
  #mobile-footer.klf .klf-mobile-inner .klf-family { min-height: 0; margin: 0; gap: 18px; padding: 20px 16px; background: #f5f8fd; }
  #mobile-footer.klf .klf-family-head { height: auto; min-height: 52px; gap: 12px; }
  #mobile-footer.klf .klf-family-head > .klf-widget { justify-content: center; }
  #mobile-footer.klf .klf-family-head-text { gap: 2px; }
  #mobile-footer.klf .klf-mobile-inner .klf-family-logos { padding: 18px 0 0 !important; border-color: #eef0f3; }
  #mobile-footer.klf .klf-mobile-inner .klf-family-logos,
  #mobile-footer.klf .klf-mobile-inner .klf-brands-widget-list { gap: 16px 0 !important; }
  #mobile-footer.klf .klf-mobile-inner .klf-family-item { height: 32px !important; min-height: 32px !important; max-height: 32px !important; }
  #mobile-footer.klf [data-kl-brand-slot="2"] { order: 4 !important; }
  #mobile-footer.klf [data-kl-brand-slot="1"] { order: 5 !important; }
  #mobile-footer.klf .klf-family-logos > .klf-widget:nth-child(1) { order: 5; }
  #mobile-footer.klf .klf-family-logos > .klf-widget:nth-child(2) { order: 4; }
  #mobile-footer.klf .klf-mobile-inner [data-kl-brand-slot="1"] img { max-width: 74.88px !important; max-height: 24px !important; }
  #mobile-footer.klf .klf-mobile-inner [data-kl-brand-slot="4"] img { max-width: 48px !important; max-height: 24px !important; }
  #mobile-footer.klf .klf-mobile-inner :is([data-kl-brand-slot="3"],[data-kl-brand-slot="5"]) img:not(.klf-family-image--mark) { max-width: min(88px,100%) !important; max-height: 16.2px !important; }
  #mobile-footer.klf .klf-mobile-inner :is([data-kl-brand-slot="3"],[data-kl-brand-slot="5"]):has(.klf-family-image--mark) img:not(.klf-family-image--mark) { max-width: min(68px,72%) !important; }
  #mobile-footer.klf .klf-mobile-inner .klf-family-item .klf-family-image--mark { max-width: 16px !important; max-height: 16px !important; }
  #mobile-footer.klf .klf-mobile-inner .klf-samin-kala-art { width: 75.57px; gap: 5px; }
  #mobile-footer.klf .klf-mobile-inner .klf-samin-kala-art .klf-samin-kala-wordmark { width: 45.88px; }
  #mobile-footer.klf .klf-mobile-inner .klf-samin-kala-art .klf-samin-kala-mark { width: 24.4px; }
  #mobile-footer.klf .klf-mobile-inner .klf-samin-kala-art img { max-width: 100% !important; transform: scaleY(-1) !important; }
  #mobile-footer.klf .klf-mobile-inner .klf-copyright { margin: 0; padding: 0; min-height: 0; font-size: 13px; line-height: 1.7; }
  #mobile-footer.klf .klf-copyright :is(p,div) { line-height: 1.7; }
}
