/* ===== RTL SPECIFIC STYLES ===== */

/* --- Desktop Styles (Unchanged) --- */
.contact-icon {
    margin-left: 0.5rem;
    margin-right: 0;
}

.flag-margin {
    margin-left: 0.5rem;
}

.tech-frame {
    position: relative;
    padding: 2rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
    border-radius: 0.5rem;
}

.tech-frame::before,
.tech-frame::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--primary-color);
    transition: all 0.4s ease;
}

.tech-frame::before {
    top: 10px;
    right: 10px;
    border-top: 2px solid;
    border-right: 2px solid;
}

.tech-frame::after {
    bottom: 10px;
    left: 10px;
    border-bottom: 2px solid;
    border-left: 2px solid;
}

.dropdown-menu {
    right: 0;
}


/* =================================================================== */
/* ============= MOBILE RESPONSIVENESS FOR RTL (Corrected) ============= */
/* =================================================================== */

@media (max-width: 767px) {
    #hero-headline {
        font-size: 2.125rem !important;
        line-height: 1.5 !important;
        margin-bottom: 3rem !important;
        text-align: center !important;
        overflow-wrap: break-word !important;
        max-width: 100%;
    }
    h2[data-translate-key$="_title"] {
        font-size: 1.875rem !important;
        line-height: 2.25rem !important;
    }
    #ai-services h3, #news h3, #about h3, #contact h3, footer h3 {
        font-size: 1.25rem !important;
    }
    .text-justify {
        text-align: right !important;
    }
    main#home > p {
        text-align: center !important;
    }
    .equation-part.part-ai, .equation-part.part-plus {
        font-size: 3rem !important;
    }
    .equation-result {
        font-size: 3.75rem !important;
    }
    .equation-container {
        min-height: 8rem !important;
    }

    /*
     * =================================================================
     * ============= THIS IS THE FIX FOR RTL MOBILE ACCORDION ==========
     * =================================================================
     * The JavaScript uses `ml-3`, which is WRONG for RTL. This CSS
     * rule overrides it ONLY on mobile and ONLY in this RTL stylesheet.
     * It removes the wrong margin-left and adds the correct margin-right.
    */
    .accordion-button span > span.ml-3 {
        margin-left: 0 !important;
        margin-right: 0.75rem !important; /* This is the correct spacing */
    }

    .tech-frame {
        padding: 1.5rem 1rem;
    }
    .tech-frame::before, .tech-frame::after {
        width: 20px;
        height: 20px;
    }
}