/* ================================================================
FOOTER - Fixed Background + Desktop Layout Structure
================================================================ */

/* ========== BASE ========== */
.footer-bg {
    position: relative;
    width: 100%;
    /* ✅ CORRECT: Combined gradient + image in ONE background property */
    background: var(--c-bg-footer-img, url('/assests/img/footer-pattern.svg'));
    /* ✅ Apply properties directly for multi-backgrounds */
    background-size: cover, auto;        /* Gradient covers, image auto */
    background-position: bottom right, bottom right;
    background-repeat: no-repeat, no-repeat; /* ✅ Prevent repetition */
    background-attachment: scroll;
    overflow: hidden;
    padding-top: 40px;
    padding-bottom: 36px;
    font-family: var(--font-arabic);
    color: var(--c-white);
}

/* ========== DESKTOP (≥768px) ========== */
.footer-desktop {
    display: block;
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 56px);
    box-sizing: border-box;
}

.footer-mobile {
    display: none; /* Hidden on desktop */
}

/* Description - Top Left: 734×49px, left:71px */
.footer-description-desktop {
    position: relative;
    width: 735px;
    max-width: 100%;
    margin: 0 auto 64px 71px;
    
    font-family: var(--font-arabic);
    font-weight: 400;
    font-size: 24px;
    line-height: 28.8px;
    letter-spacing: 0;
    text-align: right;
    vertical-align: middle;
    color: var(--c-white);
    box-sizing: border-box;
}

/* Decorative Image - Right: 785×785px, opacity:0.5 */
.footer-robotic-img {
    position: relative; /* Changed from absolute */
    width: 785px;
    max-width: 100%;
    /* height: 785px; */
    /* opacity: 0.5; */
    pointer-events: none;
    z-index: 0;
    object-fit: contain;
    /* margin-bottom: 40px; */
}

/* Social Section - BELOW the decorative image, right-aligned */
.footer-social-section {
    position: relative;
    z-index: 1;
    text-align: center; /* ✅ Center text and icons */
    /* max-width: 400px; */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* ✅ Center items horizontally */
}
/* [dir="rtl"] .footer-social-section { text-align: left; }
 */
.footer-social-text {
    font-family: var(--font-arabic);
    font-weight: 400;
    font-size: 32px;
    line-height: 100%;
    text-align: center;
    color: var(--c-white);
    margin: 0 0 20px;
}
/* [dir="rtl"] .footer-social-text { text-align: left; }
 */
.footer-social-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}
/* [dir="rtl"] .footer-social-icons { justify-content: flex-start; }
 */

.footer-social-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.footer-social-icon:hover {
    transform: scale(1.1);
}

.footer-social-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-subscribe-btn {
    position: relative;
    display: inline-flex;
    font-family: var(--font-arabic);
    font-weight: 700;
    font-size: 32px;
    line-height: 100%;
    color: var(--c-white);
    text-decoration: none;
    /* padding-bottom: 5px; */
    transition: color 0.3s ease;
}

.footer-subscribe-btn:hover {
    color: var(--c-accent-light);
}

/* .footer-subscribe-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%; 
    transform: translateX(-50%);
    width: 154px; 
    height: 10px;
    background: rgba(212, 175, 55, 1);
    border-radius: 2px;
} */

.footer-main-grid {
    display: grid;
    grid-template-columns: 40% 60%; /* ✅ Exact 40/60 split */
    gap: 48px;
    align-items: start;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

/* LEFT COLUMN (40%) - Links Group */
.footer-links-column-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 24px;
    box-sizing: border-box;
    margin: auto 0;
}

/* Links Grid - two columns below intro */
.footer-links-grid {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 48px;
    margin-top: 8px;
}

.footer-links-column {
    text-align: right;
}

/* [dir="rtl"] .footer-links-column { text-align: left; }
 */

.footer-links-title {
    font-family: var(--font-arabic-heading);
    font-weight: 900;
    font-size: 20px;
    line-height: 24px;
    text-align: right;
    color: var(--c-white);
    margin: 0 0 25px;
}
/* [dir="rtl"] .footer-links-title { text-align: left; }
 */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}
/* [dir="rtl"] .footer-links-list { text-align: left; }
 */
.footer-links-list li {
    margin-bottom: 15px;
}

.footer-links-list a {
    font-family: var(--font-arabic);
    font-weight: 400;
    font-size: 18px;
    /* line-height: 100%; */
    text-align: right;
    color: var(--c-white);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

/* [dir="rtl"] .footer-links-list a { text-align: left; }
 */
.footer-links-list a:hover {
    color: #ffd700;
    transform: translateX(-5px);
}

/* [dir="rtl"] .footer-links-list a:hover { transform: translateX(5px); }
 */

 /* RIGHT COLUMN (60%) - Image + Social Group */
.footer-image-social-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* ✅ Right-align content */
    justify-content: flex-start;
    /* padding-left: 24px; */
    box-sizing: border-box;
    position: relative;
    margin: auto 0;
}
/* [dir="rtl"] .footer-image-social-group {
    align-items: flex-start;
    padding-left: 0;
    padding-right: 24px;
} */

/* Footer Bottom */
.footer-bottom {
    margin-top: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    padding: 0 71px;
    box-sizing: border-box;
}
/* [dir="rtl"] .footer-bottom { justify-content: flex-start; }
 */
.footer-copyright {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0;
    color: var(--c-white);
}

.footer-email {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 32px;
    letter-spacing: 0;
    vertical-align: middle;
    color: var(--c-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email:hover {
    color: #ffd700;
}

/* ========== MOBILE (≤767px) ========== */
@media (max-width: 767.98px) {
    .footer-bg {
        padding-top: 40px;
        padding-bottom: 0;
        background-size: cover, 60%;
        background-position: center, center;
    }
    
    .footer-desktop {
        display: none !important;
    }
    
    .footer-mobile {
        display: block !important;
        position: relative;
        width: 100%;
        padding: 0 4px;
        box-sizing: border-box;
    }
    
    .footer-description-mobile {
        width: 100%;
        max-width: 214px;
        margin: 0 auto 20px;
        font-family: var(--font-arabic);
        font-weight: 400;
        font-size: 8px;
        line-height: 17px;
        letter-spacing: 0;
        text-align: center;
        vertical-align: middle;
        color: rgba(255, 255, 255, 1);
    }
    
    .footer-brand-mobile {
         display: grid;
        /* ✅ Exact proportions: 22% | 60% | 18% */
        grid-template-columns: 22% 60% 18%;
        /* gap: 12px; */
        align-items: start; /* Align items to top */
        /* margin: 20px 0; */
        width: 100%;
    }
    
    .footer-quick-links-mobile {
        grid-column: 3;
        text-align: right;
        /* padding-right: 8px; */
        box-sizing: border-box;
    }
    
    /* [dir="rtl"] .footer-quick-links-mobile {
        text-align: left;
        padding-right: 0;
        padding-left: 8px;
    }
     */
    .footer-quick-links-mobile .footer-links-title {
        font-size: 14px;
        margin-bottom: 8px;
        /* white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; */
    }
    
    .footer-quick-links-mobile .footer-links-list {
        padding: 0;
        margin: 0;
    }
    
    .footer-quick-links-mobile .footer-links-list a {
        font-size: 8px;
        display: block;
        padding-bottom: 8px;
        /* white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; */
    }
    
    .footer-quick-links-mobile .footer-links-list li {
        margin-bottom: 8px;
    }
    
    .footer-brand-logo-mobile {
        grid-column: 2;
        display: flex;
        flex-direction: column; /* ✅ Stack logo + social vertically */
        align-items: center;    /* ✅ Center items horizontally */
        justify-content: flex-start;
        width: 100%;
        /* max-width: 158px;       */
        margin: 0 auto;
        opacity: 1;
    }

    .footer-brand-logo-mobile .footer-logo-img {
        width: 100%;
        height: auto;
        /* max-height: 158px; */
        object-fit: contain;
        display: block;
        margin-top: -50px; /* ✅ Space between logo and social */
    }
    
    .footer-brand-logo-mobile img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
    
    .footer-pages-mobile {
        grid-column: 1;
        text-align: right;
        /* padding-left: 8px; */
        box-sizing: border-box;
    }
    
    /* [dir="rtl"] .footer-pages-mobile {
        text-align: left;
        padding-left: 0;
        padding-right: 8px;
    } */
    
    .footer-pages-mobile .footer-links-title {
        font-size: 14px;
        margin-bottom: 8px;
        /* white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; */
    }
    
    .footer-pages-mobile .footer-links-list {
        padding: 0;
        margin: 0;
    }

    .footer-pages-mobile .footer-links-list a {
        font-size: 8px;
        display: block;
        padding-bottom: 8px;
        /* white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; */
    }
    
    .footer-pages-mobile .footer-links-list li {
        margin-bottom: 8px;
    }
    
    .footer-social-mobile {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px; /* Space between text, icons, button */
        margin-top: -25px;
    }
    
    .footer-social-text-mobile {
        font-family: var(--font-arabic);
        font-weight: 400;
        font-size: 10px;
        line-height: 100%;
        text-align: center;
        color: var(--c-white);
        margin: 0;
    }
    
    .footer-social-icons-mobile {
        display: flex;
        gap: 5px;
        justify-content: center;
        /* margin-bottom: 15px; */
    }
    
    .footer-social-icon-mobile {
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .footer-social-icon-mobile img {
        width: 14px;
        height: 14px;
        object-fit: contain;
        filter: brightness(0) invert(1);
    }
    
    .footer-subscribe-btn-mobile {
        font-family: var(--font-arabic);
        font-weight: 700;
        font-size: 10px;
        line-height: 100%;
        color: var(--c-white);
        text-decoration: none;
        padding-bottom: 3px;
        display: inline-block;
        position: relative;
    }
    
    .footer-bottom-mobile {
        margin-top: 24px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .footer-copyright-mobile {
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        font-size: 6px;
        line-height: 100%;
        color: var(--c-white);
    }
    
    .footer-email-mobile {
        font-family: 'Josefin Sans', sans-serif;
        font-weight: 400;
        font-size: 6px;
        line-height: 32px;
        color: var(--c-white);
        text-decoration: none;
    }
}

/* Very Small Mobile (≤320px) */
@media (max-width: 319.98px) {
    .footer-bg {
        padding: 30px 12px 15px;
    }
    
    .footer-description-mobile {
        font-size: 7px;
        line-height: 15px;
    }
    
    .footer-quick-links-mobile .footer-links-title,
    .footer-pages-mobile .footer-links-title {
        font-size: 12px;
    }
    
    .footer-quick-links-mobile .footer-links-list a,
    .footer-pages-mobile .footer-links-list a {
        font-size: 7px;
    }
    
    .footer-social-text-mobile {
        font-size: 9px;
    }
    
    .footer-subscribe-btn-mobile {
        font-size: 9px;
    }
    
    .footer-copyright-mobile,
    .footer-email-mobile {
        font-size: 5px;
    }
}

/* Product (blue) theme: footer matches cool palette; pattern image kept underneath */
body.site-tone-blue .footer-bg {
    background:
        linear-gradient(
            180deg,
            rgba(12, 52, 88, 0.9) 0%,
            rgba(6, 20, 40, 0.94) 42%,
            rgba(4, 10, 24, 0.98) 100%
        ),
        var(--c-bg-footer-img, url('/assests/img/footer-pattern-2.svg'));
    background-size: cover, auto;
    background-position: center bottom, bottom right;
    background-repeat: no-repeat, no-repeat;
    background-attachment: scroll;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .footer-social-icon,
    .footer-links-list a,
    .footer-email {
        transition: none !important;
    }
}