/* === FORCE LTR LAYOUT === */
html[dir="ltr"] body {
    direction: ltr !important;
    text-align: left !important;
}

/* === NAVIGATION COMPLETE LTR LAYOUT === */
html[dir="ltr"] .navbar .container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
    padding: 0 2rem !important;
}

html[dir="ltr"] .nav-brand {
    order: 1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

html[dir="ltr"] .nav-links {
    order: 2 !important;
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 !important;
}

html[dir="ltr"] .nav-menu {
    flex-direction: row !important;
    gap: 1.5rem !important;
    /* Equal gaps for all navigation bar items */
    justify-content: center !important;
    width: auto !important;
}

html[dir="ltr"] .nav-menu li {
    margin: 0 !important;
    /* Remove individual margins to allow gap to handle equal spacing */
}

html[dir="ltr"] .nav-link {
    white-space: nowrap !important;
    padding: 0.6rem 1rem !important;
    /* Balanced padding */
}

/* === DROPDOWN MENUS LTR === */
html[dir="ltr"] .dropdown-menu {
    left: 0 !important;
    right: auto !important;
    text-align: left !important;
    direction: ltr !important;
}

/* Specific alignment for the language menu to stay within bounds if on the right */
html[dir="ltr"] .language-menu {
    left: auto !important;
    right: 0 !important;
}

html[dir="ltr"] .dropdown-link {
    flex-direction: row !important;
    text-align: left !important;
    justify-content: flex-start !important;
    direction: ltr !important;
}

html[dir="ltr"] .dropdown-link i {
    margin-right: 0.8rem !important;
    margin-left: 0 !important;
}

html[dir="ltr"] .dropdown-arrow {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* === FOOTER COMPLETE LTR === */
html[dir="ltr"] .footer {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .footer-content {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

html[dir="ltr"] .footer-section {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 2rem !important;
}

html[dir="ltr"] .footer-section h3 {
    text-align: left !important;
}

html[dir="ltr"] .footer-section ul {
    text-align: left !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

html[dir="ltr"] .footer-section ul li {
    text-align: left !important;
}

html[dir="ltr"] .contact-info {
    text-align: left !important;
}

html[dir="ltr"] .contact-info p {
    text-align: left !important;
}

html[dir="ltr"] .footer-social-media {
    justify-content: flex-start !important;
    text-align: left !important;
}

html[dir="ltr"] .footer-bottom {
    text-align: left !important;
}

/* === MOBILE NAVIGATION LTR === */
html[dir="ltr"] .mobile-nav {
    text-align: left !important;
}

html[dir="ltr"] .mobile-nav-content {
    text-align: left !important;
}

html[dir="ltr"] .mobile-nav-section {
    text-align: left !important;
}

html[dir="ltr"] .mobile-nav-section h4 {
    text-align: left !important;
}

html[dir="ltr"] .mobile-nav-section ul {
    text-align: left !important;
    padding-left: 0 !important;
}

/* === GENERAL LTR TEXT === */
html[dir="ltr"] * {
    text-align: left !important;
}

/* === SECTION HEADERS CENTERED === */
html[dir="ltr"] .section-header {
    text-align: center !important;
}

html[dir="ltr"] .section-title {
    text-align: center !important;
}

html[dir="ltr"] .section-subtitle {
    text-align: center !important;
}

/* === ALL HEADERS AND TITLES CENTERED === */
html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3,
html[dir="ltr"] h4,
html[dir="ltr"] h5,
html[dir="ltr"] h6 {
    text-align: center !important;
}

/* === SPECIFIC SECTIONS CENTERED === */
html[dir="ltr"] .mobile-app .section-title,
html[dir="ltr"] .mobile-app .section-subtitle,
html[dir="ltr"] .quick-access .section-title,
html[dir="ltr"] .quick-access .section-subtitle,
html[dir="ltr"] .dollar-card .section-title,
html[dir="ltr"] .dollar-card .section-subtitle {
    text-align: center !important;
}

/* === SERVICE TITLES AND STATS CENTERED === */
html[dir="ltr"] .service-title {
    text-align: center !important;
}

html[dir="ltr"] .stat-number {
    text-align: center !important;
}

html[dir="ltr"] .stat-label {
    text-align: center !important;
}

/* === STATISTICS SECTION CENTERED === */
html[dir="ltr"] .statistics {
    text-align: center !important;
}

html[dir="ltr"] .stats-grid {
    text-align: center !important;
}

html[dir="ltr"] .stat-item {
    text-align: center !important;
}

html[dir="ltr"] .stat-icon {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

html[dir="ltr"] .stat-icon i {
    text-align: center !important;
}

/* === QUICK ACCESS ITEMS CENTERED === */
html[dir="ltr"] .quick-menu-item h4 {
    text-align: center !important;
}

html[dir="ltr"] .quick-menu-item p {
    text-align: center !important;
}

/* === FOOTER SECTIONS LEFT ALIGNED === */
html[dir="ltr"] .footer-section h3 {
    text-align: left !important;
}

/* === CONTACT TITLE LEFT ALIGNED === */
html[dir="ltr"] .contact-title-clickable {
    text-align: left !important;
}

/* === FOOTER LOGO CENTERED === */
html[dir="ltr"] .footer-logo {
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
}

html[dir="ltr"] .footer-section:first-child {
    text-align: center !important;
}

/* === FOOTER CONTENT LEFT ALIGNED === */
html[dir="ltr"] .footer-section ul {
    text-align: left !important;
}

html[dir="ltr"] .footer-section p {
    text-align: left !important;
}

html[dir="ltr"] .contact-info {
    text-align: left !important;
}

/* === FOOTER GRID LAYOUT === */
html[dir="ltr"] .footer-content {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem !important;
    align-items: start !important;
}

html[dir="ltr"] .footer-section:first-child {
    grid-column: 1 / -1 !important;
    text-align: center !important;
}

/* === FOOTER MOBILE RESPONSIVE === */
@media (max-width: 1024px) {
    html[dir="ltr"] .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    html[dir="ltr"] .footer-section:first-child {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 768px) {
    html[dir="ltr"] .footer-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: left !important;
    }

    html[dir="ltr"] .footer-section {
        text-align: left !important;
    }

    html[dir="ltr"] .footer-section:first-child {
        grid-column: 1 !important;
        text-align: center !important;
        padding-bottom: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-bottom: 1rem !important;
    }

    html[dir="ltr"] .footer-logo {
        width: 150px !important;
        margin: 0 auto 1rem !important;
    }
}

@media (max-width: 480px) {
    html[dir="ltr"] .footer-content {
        gap: 1rem !important;
        padding: 1rem 0 !important;
    }

    html[dir="ltr"] .footer-section h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }

    html[dir="ltr"] .footer-section ul li {
        margin-bottom: 0.5rem !important;
    }

    html[dir="ltr"] .footer-section ul li a {
        font-size: 0.9rem !important;
        padding: 0.25rem 0 !important;
    }

    html[dir="ltr"] .contact-info p {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    html[dir="ltr"] .footer-bottom p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
}

/* === FOOTER BOTTOM CENTERED === */
html[dir="ltr"] .footer-bottom {
    text-align: center !important;
}

html[dir="ltr"] .footer-bottom p {
    text-align: center !important;
}

/* === POPUP HEADERS CENTERED === */
html[dir="ltr"] .popup-header h2 {
    text-align: center !important;
}

html[dir="ltr"] .sharia-members-title h3 {
    text-align: center !important;
}

/* === CONTACT POPUP CONTENT LEFT ALIGNED === */
html[dir="ltr"] .popup-contact-info {
    text-align: left !important;
}

html[dir="ltr"] .popup-contact-info p {
    text-align: left !important;
}

/* === CONTACT POPUP PHONE NUMBERS LEFT ALIGNED === */
html[dir="ltr"] .popup-contact-info a {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .popup-phone-btn {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .popup-contact-info strong {
    text-align: left !important;
}

/* === FORCE ALL CONTACT POPUP ELEMENTS LEFT === */
html[dir="ltr"] .popup-contact-info * {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .popup-contact-info p * {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .popup-contact-info p a {
    text-align: left !important;
    direction: ltr !important;
    display: inline-block !important;
}

/* === MODAL AND POPUP LTR === */
html[dir="ltr"] .modal-content {
    text-align: left !important;
}

html[dir="ltr"] .popup {
    text-align: left !important;
}