/* =========================================================
   Qimah Custom Footer
   Dark green background with RTL layout
   Enhanced with visual polish and micro-interactions
========================================================= */

.qimah-footer {
    background: linear-gradient(180deg, #0a1f17 0%, #071812 100%);
    color: #fff;
    padding: 64px 24px 32px;
    position: relative;
}

.qimah-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    gap: 24px 60px;
    align-items: start;
}

/* =========================================================
   Brand Column (Logo, Discord, Badges)
========================================================= */

.qimah-footer-brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 320px;
}

/* Payment section - under brand on desktop */
.qimah-footer-payment {
    grid-column: 1;
    grid-row: 2;
    max-width: 320px;
}

.qimah-footer-logo {
    display: inline-block;
}

.qimah-footer-logo img {
    height: 64px;
    width: auto;
}

/* Discord CTA Button with pulse animation */
.qimah-discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 28px;
    background: #5865F2;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    position: relative;
    overflow: hidden;
}

/* Subtle glow pulse */
.qimah-discord-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: #5865F2;
    border-radius: 14px;
    z-index: -1;
    animation: discord-pulse 2.5s ease-in-out infinite;
}

@keyframes discord-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.qimah-discord-btn:hover {
    background: #4752c4;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(88, 101, 242, 0.5);
}

.qimah-discord-btn:active {
    transform: translateY(-1px);
}

.qimah-discord-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.qimah-discord-btn:hover .qimah-discord-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Payment Badges */
.qimah-payment-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.qimah-payment-row {
    display: flex;
    gap: 8px;
}

.qimah-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 8px 10px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.qimah-badge:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.qimah-badge img {
    height: 28px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.qimah-badge:hover img {
    transform: scale(1.05);
}

/* Saudi Business Center Badge */
.qimah-sbc-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #fff;
    border-radius: 7px;
    padding: 10px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.qimah-sbc-badge:hover {
    transform: translateY(-2px);
}

.qimah-sbc-badge img {
    height: 33px;
    width: auto;
    object-fit: contain;
}

/* =========================================================
   Navigation Columns
========================================================= */

.qimah-footer-nav-columns {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    direction: rtl;
}

.qimah-footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    direction: rtl;
    text-align: right;
}

.qimah-footer-heading {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    position: relative;
    display: inline-block;
}

/* Subtle heading underline accent */
.qimah-footer-heading::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 32px;
    height: 3px;
    background: linear-gradient(90deg, #10b981, transparent);
    border-radius: 2px;
}

.qimah-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qimah-footer-menu li {
    margin: 0;
}

.qimah-footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

/* Animated underline on hover */
.qimah-footer-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background: #10b981;
    transition: width 0.3s ease;
}

.qimah-footer-menu a:hover {
    color: #fff;
    transform: translateX(-4px);
}

.qimah-footer-menu a:hover::after {
    width: 100%;
}

/* =========================================================
   Badges + Tax Row
========================================================= */

.qimah-footer-badges-row {
    max-width: 1200px;
    margin: 48px auto 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.qimah-footer-badges-left {
    flex-shrink: 0;
    width: 320px;
}

.qimah-footer-badges-left .qimah-sbc-badge {
    width: 100%;
}

.qimah-footer-tax {
    text-align: right;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    direction: rtl;
}

/* =========================================================
   Footer Bottom Bar
========================================================= */

.qimah-footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Social Icons with brand colors on hover */
.qimah-footer-socials {
    display: flex;
    gap: 12px;
}

.qimah-footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qimah-footer-socials a:hover {
    transform: translateY(-3px);
}

/* TikTok */
.qimah-footer-socials a[aria-label="TikTok"]:hover {
    color: #fff;
    background: linear-gradient(135deg, #00f2ea, #ff0050);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(255, 0, 80, 0.3);
}

/* YouTube */
.qimah-footer-socials a[aria-label="YouTube"]:hover {
    color: #fff;
    background: #ff0000;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

/* Instagram */
.qimah-footer-socials a[aria-label="Instagram"]:hover {
    color: #fff;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(253, 29, 29, 0.3);
}

/* X (Twitter) */
.qimah-footer-socials a[aria-label="X (Twitter)"]:hover {
    color: #fff;
    background: #000;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Copyright */
.qimah-footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    direction: rtl;
}

/* =========================================================
   Responsive - Tablet
========================================================= */

@media (max-width: 1024px) {
    .qimah-footer-inner {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    /* Mobile order: brand first, nav second, payment third */
    .qimah-footer-brand {
        order: 1;
        align-items: center;
        text-align: center;
        max-width: 100%;
        margin: 0 auto;
    }

    .qimah-footer-nav-columns {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 32px;
    }

    .qimah-footer-payment {
        order: 3;
        max-width: 320px;
        margin: 0 auto;
    }

    .qimah-footer-nav-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: right;
        width: auto;
    }

    .qimah-footer-heading {
        text-align: center;
    }

    .qimah-footer-heading::after {
        right: 50%;
        transform: translateX(50%);
    }

    .qimah-footer-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .qimah-footer-menu a:hover {
        transform: translateY(-2px);
    }

    .qimah-footer-menu a::after {
        right: 50%;
        transform: translateX(50%);
    }

    .qimah-footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .qimah-footer-socials {
        justify-content: center;
    }

    .qimah-footer-badges-row {
        flex-direction: column;
        text-align: center;
    }

    .qimah-footer-badges-left {
        width: 100%;
        max-width: 320px;
    }

    .qimah-footer-tax {
        text-align: center;
    }
}

/* =========================================================
   Responsive - Mobile
========================================================= */

@media (max-width: 768px) {
    .qimah-footer {
        padding: 48px 20px 24px;
    }

    .qimah-footer-inner {
        gap: 32px;
    }

    .qimah-footer-nav-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .qimah-footer-heading {
        font-size: 24px;
    }

    .qimah-footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .qimah-footer-socials {
        justify-content: center;
    }

    .qimah-footer-payment {
        max-width: 280px;
    }

    .qimah-payment-row {
        justify-content: center;
    }

    .qimah-badge {
        height: 36px;
        padding: 4px 10px;
    }

    .qimah-sbc-badge img {
        height: 40px;
    }

    .qimah-footer-brand {
        max-width: 280px;
    }

    .qimah-footer-badges-row {
        margin: 32px auto 0;
        padding-bottom: 20px;
    }

    .qimah-footer-badges-left {
        max-width: 280px;
    }
}

/* =========================================================
   Back to Top Button
========================================================= */

.qimah-back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.qimah-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.qimah-back-to-top:hover {
    background: #10b981;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.qimah-back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Footer is always dark — no light/dark mode changes needed */
