/* LTR Overrides for English */
/* Retaining structure but removing font overrides to use Global Cairo */

/* Typography Consistency */
/* font-family inherited from global */
html[dir="ltr"] body {
    line-height: 1.8;
    /* Match Arabic spacing */
    font-size: 16px;
    /* Match Arabic base size */
}

html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3,
html[dir="ltr"] h4,
html[dir="ltr"] .nav-item {
    /* font-family: var(--font-heading); Inherited from global */
    letter-spacing: -0.02em;
}

/* Navigation - LTR */
html[dir="ltr"] .dropdown-menu {
    right: auto;
    left: 0;
}

@media (min-width: 993px) {
    html[dir="ltr"] .nav-menu > .dropdown:last-of-type > .dropdown-menu,
    html[dir="ltr"] .nav-menu > .dropdown:nth-last-of-type(1) > .dropdown-menu,
    html[dir="ltr"] .nav-menu > .dropdown:nth-last-of-type(2) > .dropdown-menu {
        right: 0 !important;
        left: auto !important;
    }
}

html[dir="ltr"] .submenu {
    right: auto;
    left: 100%;
}

html[dir="ltr"] .dropdown-menu a {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

html[dir="ltr"] .dropdown-menu a:hover {
    padding-right: 1.5rem;
    padding-left: 1.75rem;
}

html[dir="ltr"] .nav-item i {
    margin-right: 0;
    margin-left: 4px;
}

html[dir="ltr"] .mobile-toggle {
    margin-right: auto;
    margin-left: 0;
}

/* Section Header Symmetry */
html[dir="ltr"] .section-header h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Footer - Alignment for LTR */
html[dir="ltr"] .footer-col ul {
    padding: 0;
    list-style: none;
}

html[dir="ltr"] .footer-col ul li i {
    margin-right: 10px;
    margin-left: 0;
}

/* Mobile LTR */
@media (max-width: 992px) {

    html[dir="ltr"] .dropdown-menu,
    html[dir="ltr"] .submenu {
        padding-left: 1rem;
        padding-right: 0;
    }
}

/* --- Category Grid Fix for English --- */
/* Ensuring these styles are loaded for LTR pages */
html[dir="ltr"] .categories-wrapper.grid-view {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
}

html[dir="ltr"] .categories-wrapper.grid-view .category-card {
    flex: 1 1 calc(25% - 1rem);
    min-width: 250px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    height: auto;
    min-height: 60px;
}

html[dir="ltr"] .categories-wrapper.grid-view .category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

html[dir="ltr"] .categories-wrapper.grid-view .category-card i {
    font-size: 1.5rem;
    color: var(--text-dark);
}

html[dir="ltr"] .categories-wrapper.grid-view .category-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Center Table Content for English Pages */
html[dir="ltr"] table th,
html[dir="ltr"] table td {
    text-align: center;
    vertical-align: middle;
}

html[dir="ltr"] table th:first-child,
html[dir="ltr"] table td:first-child {
    text-align: left;
    /* Keep Title Left Aligned */
    padding-left: 1.5rem;
}

/* Removed Upcoming Section Width override to match Main Categories width */
/* Mirror Course Card Badges for LTR (Left Side) */
html[dir="ltr"] .course-badges {
    left: 12px !important;
    right: auto !important;
}

/* Sidebar Icon Spacing for LTR */
html[dir="ltr"] .sidebar-title i {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* Force Hero Text to One Line */
html[dir="ltr"] .hero-content p {
    white-space: nowrap;
    max-width: 100%;
}

/* Force Hero Heading to One Line */
html[dir="ltr"] .hero-content h1 {
    white-space: nowrap;
}