.ag-footer {
    --ag-footer-bg: #f8f9fa;
    --ag-footer-text: #333333;
    --ag-footer-link: #333333;
    --ag-footer-link-hover: #c49150;
    /* Add a nice gold/brown hover */
    --ag-footer-icon-size: 24px;

    background-color: var(--ag-footer-bg);
    color: var(--ag-footer-text);
    padding: 40px 20px;
    font-family: inherit;
    direction: rtl;
    /* Enforce RTL for Arabic */
}

.ag-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

/* Right Side: Location & Image (In RTL, this visually might mean flex start/end based on reading order) */
.ag-footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.ag-footer-image img {
    width: 150px;
    height: auto;
    object-fit: contain;
    display: block;
}

.ag-footer-location .ag-location-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ag-footer-link);
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.ag-footer-location .ag-location-link:hover {
    color: var(--ag-footer-link-hover);
}

.ag-footer-icon {
    flex-shrink: 0;
    fill: currentColor;
    width: var(--ag-footer-icon-size);
    height: var(--ag-footer-icon-size);
}

/* Left Side: Contact Links */
.ag-footer-left {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    /* In RTL, flex-end aligns to the left */
    min-width: 300px;
}

.ag-footer-contacts {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.ag-footer-contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ag-footer-link);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ag-footer-contact-link:hover {
    color: var(--ag-footer-link-hover);
    transform: translateY(-2px);
}

/* Icons */
.ag-whatsapp:hover svg {
    fill: #25D366;
}

.ag-phone:hover svg {
    fill: #3498db;
}

.ag-email:hover svg {
    fill: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .ag-footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ag-footer-right {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ag-footer-location .ag-location-link {
        flex-direction: column;
        gap: 5px;
    }

    .ag-footer-left {
        justify-content: center;
    }

    .ag-footer-contacts {
        justify-content: center;
    }
}

/* Scroll to Top Button */
.ag-scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Keep it on the left side in RTL */
    width: 50px;
    height: 50px;
    background-color: #c49150;
    /* Primary color fallback */
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.ag-scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ag-scroll-to-top:hover {
    background-color: #a87b40;
    transform: scale(1.1);
}

.ag-scroll-to-top svg {
    fill: #ffffff;
    width: 24px;
    height: 24px;
    transition: fill 0.3s ease;
}