/**
 * Mesa Footer Styles
 *
 * Two-section footer: top (company + category columns) + bottom (decorative SVGs)
 * RTL-first, 1512px reference layout
 *
 * @package Mesa
 * @since 1.2.0
 */

/* ===========================================
   FOOTER BASE
   =========================================== */
.mesa-footer {
    background-color: var(--mesa-black, #08050C);
    color: var(--mesa-white, #FFFFFF);
    font-family: var(--font-hebrew, 'Open Sans Hebrew', 'Open Sans', sans-serif);
    overflow: hidden;
}

.mesa-footer__inner {
    max-width: 1512px;
    margin: 0 auto;
}

/* ===========================================
   TOP SECTION — Company + Categories
   =========================================== */
.mesa-footer__top {
    max-width: 1512px;
    padding: 40px 60px;
}

.mesa-footer__top-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

/* ===========================================
   COMPANY COLUMN
   =========================================== */
.mesa-footer__company {
    width: 33%; /* 360/1512 */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.mesa-footer__logo {
    width: 204px;
    height: auto;
    display: block;
}

.mesa-footer__description {
    font-family: var(--font-hebrew, 'Open Sans Hebrew', 'Open Sans', sans-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: var(--mesa-white, #FFFFFF);
    margin: 0;
}

.mesa-footer__copyright {
    font-family: var(--font-hebrew, 'Open Sans Hebrew', 'Open Sans', sans-serif);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Social Icons — flat, no background */
.mesa-footer__social {
    display: flex;
    gap: 24px;
}

.mesa-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mesa-white, #FFFFFF);
    transition: color 150ms ease, transform 150ms ease;
}

.mesa-footer__social-link:hover {
    color: var(--mesa-lime, #CEFE65);
    transform: translateY(-2px);
}

.mesa-footer__social-link svg {
    width: 26px;
    height: 26px;
}

.mesa-footer__social-link svg path {
    fill: #CEFE65;
}

/* ===========================================
   CATEGORY COLUMNS
   =========================================== */
.mesa-footer__categories {
    display: flex;
    gap: 25px;
}

.mesa-footer__category-col {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Desktop heading */
h3.mesa-footer__col-heading {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    font-style: italic !important;
    line-height: 1;
    letter-spacing: 0;
    text-align: right;
    margin: 0 0 20px 0;
    padding: 0;
    color: var(--mesa-lime, #CEFE65);
}

/* Mobile toggle — hidden on desktop */
.mesa-footer__col-toggle {
    display: none;
}

/* Column content always visible on desktop */
.mesa-footer__col-content {
    flex: 1;
}

/* ===========================================
   FOOTER MENUS
   =========================================== */
.mesa-footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mesa-footer__menu li {
    margin-bottom: 18px;
}

.mesa-footer__menu a {
    font-family: var(--font-hebrew, 'Open Sans Hebrew', 'Open Sans', sans-serif);
    color: var(--mesa-white, #FFFFFF);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    transition: color 150ms ease;
    display: inline-block;
}

.mesa-footer__menu a:hover {
    color: var(--mesa-lime, #CEFE65);
}

/* ===========================================
   DECORATION SECTION — Decorative SVGs
   =========================================== */
.mesa-footer__decoration {
    display: flex;
    align-items: flex-end;
    /*margin-top: clamp(2rem, 5.29vw, 80px);*/
    gap: 0;
    width: 100%;
}

.mesa-footer__deco-mesa {
    flex: 1 1 auto;
    max-width: 74%; /* ~1112/1512 */
}

.mesa-footer__deco-hash {
    flex: 0 0 auto;
    width: 26%; /* ~387/1512 */
}

.mesa-footer__deco-mesa svg,
.mesa-footer__deco-hash svg {
    width: 100%;
    height: auto;
    display: block;
}



/* ===========================================
   INFO CONTENT
   =========================================== */
.mesa-footer__info-list {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
}

.mesa-footer__info-list .mesa-footer__info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mesa-footer__info-item .mesa-footer__info-icon .mesa-footer__info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.mesa-footer__info-item .mesa-footer__info-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
}

.mesa-footer__info-item .mesa-footer__info-icon svg,
.mesa-footer__info-item .mesa-footer__info-icon img {
    width: 100%;
    height: 100%;
}

a[href^="tel"] {
    color: inherit !important;
    text-decoration: none !important;
}

.mesa-footer__info-item .mesa-footer__info-label,
.mesa-footer__info-item .mesa-footer__info-value {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 20px;
    color: var(--mesa-white) !important;
}

.mesa-footer__info-item .mesa-footer__info-label {
    font-weight: 400;
    margin-left: 5px;
}

.mesa-footer__info-item .mesa-footer__info-value {
    font-weight: 600;
    text-decoration: none !important;
}

/* ===========================================
   TABLET — ≤1200px
   =========================================== */
@media (max-width: 1200px) {
    .mesa-footer__top-inner {
        flex-direction: column;
        gap: 40px;
    }

    .mesa-footer__company {
        width: 100%;
    }

    .mesa-footer__categories {
        margin-inline-start: 0;
        flex-wrap: wrap;
        gap: 25px 40px;
    }

    .mesa-footer__category-col {
        width: calc(50% - 20px);
    }
}

/* ===========================================
   MOBILE — ≤768px
   =========================================== */
@media (max-width: 768px) {
    .mesa-footer__top {
        padding: 40px 20px 42px;
    }

    .mesa-footer__top-inner {
        margin-top: 32px;
    }


    /* Reorder: columns first, company info below */
    .mesa-footer__categories {
        flex-wrap: wrap;
        margin-inline-start: 0;
    }

    .mesa-footer__company {
        width: 100%;
        max-width: 100%;
        align-items: flex-start;
        text-align: right;
        gap: 40px;
    }

    .mesa-footer__logo {
        align-self: flex-start;
    }

    /* Override accordion: always visible */
    .mesa-footer__col-content {
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }

    /* Decoration: flush to bottom */
    /*.mesa-footer__decoration {*/
    /*    margin-top: 1rem;*/
    /*}*/

    /* Extend black background behind fixed bottom nav */
    .mesa-footer {
        margin-bottom: calc(-3.5rem - env(safe-area-inset-bottom, 0px));
        padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
    }

    .mesa-footer__info-list .mesa-footer__info-item {
        gap: 5px;
    }

    .mesa-footer__info-item .mesa-footer__info-label,
    .mesa-footer__info-item .mesa-footer__info-value {
        font-size: 14px;
    }

    .mesa-footer__info-item .mesa-footer__info-label {
        margin-left: 0;
    }
}

/* ===========================================
   ACCESSIBILITY
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    .mesa-footer__col-content,
    .mesa-footer__col-icon,
    .mesa-footer__social-link {
        transition: none;
    }
}

.mesa-footer__menu a:focus-visible,
.mesa-footer__social-link:focus-visible {
    outline: 2px solid var(--mesa-lime, #CEFE65);
    outline-offset: 2px;
}
