/* =============================================================
   FOOTER — widget grid (logo + wp_nav_menu instances)
   Source: bg var(--color-bg-alt), thin orange top separator, headings 25/600 navy,
   links 17/400/21lh navy. Footer menu items with image hide their text label.
   ============================================================= */
.site-footer {
    background: var(--color-bg-alt);
    color: rgb(57, 70, 95);
    padding-block: 48px 24px;
    border-block-start: 1px solid var(--color-primary);
}

.site-footer__cols {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.site-footer__cols > * {
    flex: 1;
}

.site-footer__col-heading {
    font-family: 'Rubik', sans-serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 25px;
    color: rgb(57, 70, 95);
    margin: 0 0 20px;
    text-align: start;
}

.site-footer__col-heading--app {
    margin-block-start: 32px;
}

.site-footer__col-heading--center {
    text-align: center;
}

/* Default footer menu styling (vertical list of text links) */
.site-footer .menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.site-footer .menu-item {
    margin: 0;
}

.site-footer .menu-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Rubik', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 21px;
    color: rgb(57, 70, 95);
    text-decoration: none;
    padding-block: 8px;
    transition: color 0.2s;
}

.site-footer .menu-item a:hover {
    color: var(--color-primary);
}

/* Active state — current page menu item renders orange (same as hover). */
.site-footer .current-menu-item > a,
.site-footer .current_page_item > a {
    color: var(--color-primary);
}

.site-footer .menu-item__icon {
    display: block;
    object-fit: contain;
}

/* In the footer, a menu item with an image hides its text label
   (image-only display once ACF uploads an icon) */
.site-footer .menu-item--has-icon .menu-item__label {
    display: none;
}

/* Brand widget — centered column with logo, "עקבו אחרינו", social icons */
.widget--brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.site-footer__col--brand .widget_text {
    display: flex;
    flex-direction: column;
    gap: 16px 0;
}

/* Nav widget columns — same flex column treatment so a heading + nav-menu
   widget (and any extras like the "להורדת האפליקציה" + app store badges
   in col 4) sit with a consistent 24px vertical rhythm. */
.widget--nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.site-footer__brand-logo {
    display: block;
}

.site-footer__brand-logo img {
    height: 70px;
    width: auto;
    display: block;
}

/* The "עקבו אחרינו" heading sits in the brand widget — smaller than other col-headings,
   with extra space above (from logo) and below (to the social row) */
.widget--brand .site-footer__col-heading {
    font-size: 20px;
    line-height: 20px;
    margin: 0;
}

/* Social menu — tight horizontal row, ~15px between icon edges (matches source)
   Selector qualified with .site-footer to beat the generic .site-footer .menu defaults */
.site-footer .menu--social {
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    margin-block-start: 4px;
}

.site-footer .menu--social .menu-item a {
    padding: 0;
}

.site-footer .menu--social .menu-item__icon {
    width: 27px;
    height: 27px;
}

/* Apps menu — vertical stack, tight spacing matching other footer items */
.site-footer .menu--apps {
    gap: 0;
}

.site-footer .menu--apps .menu-item a {
    padding-block: 4px;
}

.site-footer .menu--apps .menu-item__icon {
    width: 150px;
    height: 50px;
}

.site-footer__bottom {
    margin-block-start: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 14px;
    color: rgb(57, 70, 95);
}

.site-footer__powered {
    padding-right: 4px;
}

.site-footer__powered a {
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 1024px) {

    .site-footer {
        padding-block: 36px 16px;
    }

    .site-footer__cols {
        flex-wrap: wrap;
        gap: 32px;
    }

    .site-footer__cols > * {
        width: calc(50% - 16px);
        flex: unset;
    }

    .widget--brand,
    .widget--nav:last-child {
        width: 100%;
    }

    .widget--nav:last-child .widget_text:last-child {
        position: relative;
        padding: 24px 0 0;
    }

    .widget--nav:last-child .widget_text:last-child:before {
        content: '';
        height: 2px;

        position: absolute;
        top: 0; left: 0; right: 0;

        display: block;
        margin: 0 -16px;

        background: var(--color-primary);
    }

    .site-footer .menu--footer {
        align-items: center;
    }

    .site-footer .menu--footer .menu-item a {
        justify-content: center;
        text-align: center;
        font-size: 15px;
    }

    .widget--nav:last-child .widget_text:last-child .site-footer__col-heading {
        text-align: center;
    }

    .site-footer .menu--apps {
        flex-direction: row;
        gap: 0 24px;
        align-items: center;
        justify-content: center;
    }

    .site-footer__bottom {
        font-size: 13px;
    }
}

