﻿/* ===================================
   مدارس العلوي الدولية - ملف الأنماط العربي
   Al-Alwi International Schools - Arabic RTL Styles
   Modern, Clean, and Professional Design
   =================================== */

/* Import base styles from English version */
@import url('../en/styles.css');

/* Arabic Font - Cairo (Optimized loading) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');

/* ===================================
   RTL BASE OVERRIDES
   =================================== */

html[lang="ar"],
body {
    font-family: 'Cairo', 'Poppins', 'Open Sans', sans-serif;
    direction: rtl;
    text-align: right;
}

/* Typography for Arabic */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cairo', 'Poppins', sans-serif;
    font-weight: 700;
}

p,
li,
span,
a {
    font-family: 'Cairo', 'Open Sans', sans-serif;
}

/* ===================================
   NAVIGATION RTL
   =================================== */

.nav-container {
    flex-direction: row-reverse;
}

.logo {
    flex-direction: row-reverse;
}

.logo-text {
    text-align: right;
}

.logo-main {
    text-align: right;
}

.nav-menu {
    flex-direction: row-reverse;
}

.nav-menu li a {
    flex-direction: row-reverse;
}

.nav-actions {
    flex-direction: row-reverse;
}

/* Dropdown RTL */
.dropdown-menu {
    right: 0;
    left: auto;
}

.dropdown-menu li a {
    flex-direction: row-reverse;
    text-align: right;
}

.dropdown-menu li a i {
    margin-right: 0;
    margin-left: 12px;
}

.nav-dropdown>a .fa-chevron-down {
    margin-left: 0;
    margin-right: 4px;
}

/* Responsive RTL adjustments */
@media (max-width: 1200px) {
    .btn-portal-nav span {
        display: none;
    }
}

@media (max-width: 1024px) {
    .nav-menu li a i {
        display: none;
    }
}

/* Hamburger RTL */
.hamburger {
    margin-left: 0;
    margin-right: auto;
}

/* Mobile Menu RTL - Slide-in from Right */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(100vh - 65px);
        background: var(--bg-white);
        flex-direction: column;
        padding: var(--spacing-md) var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        /* Override LTR transform with RTL transform */
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        align-items: stretch;
        z-index: 1100;
        gap: 0;
        justify-content: flex-start;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    /* Dark mode mobile menu */
    body.dark-mode .nav-menu {
        background: var(--dark-bg);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    /* Menu items */
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--bg-light-gray);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    body.dark-mode .nav-menu li {
        border-bottom-color: var(--dark-border);
    }

    .nav-menu li a {
        width: 100%;
        padding: 18px 16px;
        font-size: 1.05rem;
        font-weight: 500;
        justify-content: flex-end;
        border-radius: 0;
        background: transparent;
        color: var(--text-charcoal);
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 14px;
        transition: all 0.2s ease;
        text-align: right;
    }

    .nav-menu li a i {
        width: 24px;
        text-align: center;
        font-size: 1.1rem;
        color: var(--text-gray);
        transition: color 0.2s ease;
    }

    .nav-menu li a:hover {
        background: var(--bg-light-gray);
        color: var(--primary-blue);
    }

    .nav-menu li a:hover i {
        color: var(--primary-blue);
    }

    .nav-menu li a.active {
        background: rgba(4, 80, 122, 0.08);
        color: var(--primary-blue);
        font-weight: 600;
    }

    .nav-menu li a.active i {
        color: var(--primary-blue);
    }

    body.dark-mode .nav-menu li a {
        color: var(--dark-text);
    }

    body.dark-mode .nav-menu li a i {
        color: var(--dark-text-muted);
    }

    body.dark-mode .nav-menu li a:hover {
        background: var(--dark-bg-secondary);
        color: var(--dark-primary);
    }

    body.dark-mode .nav-menu li a:hover i {
        color: var(--dark-primary);
    }

    /* Dropdown in mobile */
    .nav-dropdown>a .fa-chevron-down {
        margin-right: 8px;
        margin-left: 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: var(--bg-light-gray);
        padding: 0;
        margin: 0;
        border-radius: 0;
    }

    body.dark-mode .dropdown-menu {
        background: var(--dark-bg-secondary);
    }

    .dropdown-menu li a {
        padding: 14px 32px;
        font-size: 0.95rem;
        flex-direction: row-reverse;
        text-align: right;
    }
}

/* Small Phones RTL */
@media (max-width: 480px) {
    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .logo-tagline {
        display: none;
    }

    .lang-toggle span {
        display: none;
    }
}

/* ===================================
   HERO SECTION RTL
   =================================== */

.hero-content {
    text-align: center;
}

.hero-badges {
    flex-direction: row-reverse;
    justify-content: center;
}

.badge {
    flex-direction: row-reverse;
}

.badge i {
    margin-left: 8px;
    margin-right: 0;
}

.hero-cta {
    flex-direction: row-reverse;
    justify-content: center;
}

/* ===================================
   FEATURES & CARDS RTL
   =================================== */

.features-grid,
.programs-grid,
.news-grid,
.team-grid,
.accreditation-grid {
    direction: rtl;
}

.feature-card,
.program-card,
.news-card,
.team-card {
    text-align: center;
}

/* Program Cards RTL */
.program-link {
    flex-direction: row-reverse;
}

.program-link i {
    transform: rotate(180deg);
}

/* Slider Arrows RTL */
.slider-arrow.prev {
    left: auto;
    right: 0;
}

.slider-arrow.next {
    right: auto;
    left: 0;
}

/* ===================================
   DASHBOARD SECTION RTL
   =================================== */

.dashboard-content {
    direction: ltr;
    /* Use LTR for grid, then position items */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

/* Flip the order: mockup on left (column 1), text on right (column 2) */
.dashboard-mockup {
    grid-column: 1;
    grid-row: 1;
}

.dashboard-info {
    grid-column: 2;
    grid-row: 1;
    direction: rtl;
    text-align: right;
}

.mockup-body {
    flex-direction: row-reverse;
}

.mockup-header {
    direction: rtl;
}

.mockup-sidebar {
    border-left: 1px solid var(--bg-light-gray);
    border-right: none;
}

.dashboard-features {
    direction: rtl;
}

.dashboard-features li {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.dashboard-features i {
    margin-left: 0;
    margin-right: var(--spacing-sm);
}

@media (max-width: 992px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .dashboard-mockup {
        grid-column: 1;
        grid-row: 2;
    }

    .dashboard-info {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
    }
}

/* ===================================
   NEWS & EVENTS RTL
   =================================== */

.news-events-grid {
    direction: rtl;
}

.subsection-title::after {
    left: auto;
    right: 0;
}

.news-date {
    flex-direction: row-reverse;
}

.news-date i {
    margin-right: 0;
    margin-left: 6px;
}

.read-more {
    flex-direction: row-reverse;
}

.read-more i {
    transform: rotate(180deg);
}

/* Events RTL */
.event-item {
    flex-direction: row-reverse;
}

.event-date {
    margin-left: 0;
    margin-right: var(--spacing-md);
}

.event-details {
    text-align: right;
}

.event-details p {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.event-details p i {
    margin-right: 0;
    margin-left: 6px;
}

/* Calendar RTL */
.calendar-header {
    flex-direction: row-reverse;
}

.calendar-day-names {
    direction: rtl;
}

/* ===================================
   TESTIMONIALS RTL
   =================================== */

.testimonial-card {
    text-align: center;
}

.testimonial-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-avatar i {
    font-size: 100px;
    color: var(--secondary-yellow);
    opacity: 0.9;
}

.testimonial-quote {
    direction: rtl;
}

/* ===================================
   FOOTER RTL - Clean Modern Design
   =================================== */

/* Footer Grid RTL */
.footer-grid {
    direction: rtl;
}

/* Footer Logo RTL */
.footer-logo {
    flex-direction: row-reverse;
}

.footer-logo-text {
    text-align: right;
}

/* Footer Social RTL */
.footer-social {
    flex-direction: row-reverse;
}

/* Footer Links List RTL */
.footer-links-list li a:hover {
    padding-right: 6px;
    padding-left: 0;
}

/* Contact Info List RTL */
.contact-info-list li {
    flex-direction: row-reverse;
}

/* Footer Bottom RTL */
.footer-bottom-content {
    flex-direction: row-reverse;
}

.footer-bottom-links {
    flex-direction: row-reverse;
}

/* Footer Responsive RTL */
@media (max-width: 1024px) {
    .footer-about {
        text-align: center;
    }

    .footer-about .footer-logo {
        justify-content: center;
    }

    .footer-about .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links-list {
        align-items: center;
    }

    .footer-links-list li a:hover {
        padding-right: 0;
        padding-left: 0;
    }

    .contact-info-list {
        align-items: center;
    }

    .contact-info-list li {
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* ===================================
   BACK TO TOP RTL
   =================================== */

.back-to-top {
    left: 24px;
    right: auto;
}

@media (max-width: 480px) {
    .back-to-top {
        left: 16px;
        right: auto;
    }
}

/* ===================================
   BUTTONS RTL
   =================================== */

.btn {
    flex-direction: row-reverse;
}

.btn i {
    margin-right: 0;
    margin-left: var(--spacing-xs);
}

.btn-portal-nav {
    flex-direction: row-reverse;
}

/* ===================================
   BREADCRUMB RTL
   =================================== */

.breadcrumb {
    flex-direction: row-reverse;
}

.breadcrumb span {
    margin: 0 var(--spacing-xs);
}

/* ===================================
   MISSION & ABOUT PAGES RTL
   =================================== */

.mission-content,
.mv-grid {
    direction: rtl;
}

.mv-content {
    text-align: right;
}

.mv-item {
    text-align: center;
}

.core-values-pills,
.core-values {
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: center;
}

.value-pill {
    flex-direction: row-reverse;
}

.value-pill i {
    margin-right: 0;
    margin-left: var(--spacing-xs);
}

/* Timeline RTL */
.timeline::before {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.timeline-item {
    direction: rtl;
}

.timeline-content {
    text-align: center;
}

/* Team Cards RTL */
.team-card {
    text-align: center;
}

.team-social {
    justify-content: center;
}

/* ===================================
   FORMS RTL
   =================================== */

.form-group label {
    text-align: right;
}

.form-group input,
.form-group select,
.form-group textarea {
    text-align: right;
    direction: rtl;
}

.form-row {
    flex-direction: row-reverse;
}

.checkbox-group label {
    flex-direction: row-reverse;
}

::placeholder {
    text-align: right;
}

:-ms-input-placeholder {
    text-align: right;
}

::-ms-input-placeholder {
    text-align: right;
}

/* ===================================
   TABS RTL
   =================================== */

.tab-buttons {
    flex-direction: row-reverse;
}

.tab-btn {
    flex-direction: row-reverse;
}

.tab-inner {
    direction: rtl;
}

.tab-info {
    text-align: right;
}

/* ===================================
   FAQ RTL
   =================================== */

.faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

.faq-question i {
    margin-left: 0;
    margin-right: auto;
}

.faq-answer {
    text-align: right;
}

/* ===================================
   STATS SECTION RTL
   =================================== */

.stats-grid {
    direction: rtl;
}

.stat-number {
    direction: ltr;
}

/* ===================================
   CONTACT PAGE RTL
   =================================== */

.contact-grid {
    direction: rtl;
}

.contact-card {
    text-align: center;
}

.contact-sidebar {
    text-align: right;
}

.hours-list li {
    flex-direction: row-reverse;
}

.department-list {
    text-align: right;
}

.social-links-contact {
    justify-content: center;
}

/* Map */
.map-container {
    direction: ltr;
}

/* ===================================
   NEWS PAGE RTL
   =================================== */

.filter-tabs {
    flex-direction: row-reverse;
}

.news-grid-layout {
    direction: rtl;
}

.post-meta {
    flex-direction: row-reverse;
}

.post-meta-small {
    flex-direction: row-reverse;
}

.read-more-link {
    flex-direction: row-reverse;
}

.read-more-link i {
    transform: rotate(180deg);
}

/* Event Widget RTL */
.event-widget-item {
    flex-direction: row-reverse;
}

.event-widget-info {
    text-align: right;
}

/* ===================================
   PROGRAMS PAGE RTL
   =================================== */

.programs-showcase {
    direction: rtl;
}

.showcase-body {
    text-align: center;
}

.feature-list li {
    flex-direction: row-reverse;
}

.feature-list i {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

/* ===================================
   ADMISSIONS PAGE RTL
   =================================== */

.process-stepper {
    direction: rtl;
}

.step {
    flex-direction: row-reverse;
}

.step:not(:last-child)::after {
    left: auto;
    right: 30px;
}

.step-content {
    text-align: right;
}

.tuition-grid {
    direction: rtl;
}

.tuition-includes li {
    flex-direction: row-reverse;
}

.tuition-includes i {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

.payment-options {
    direction: rtl;
}

.banner-content {
    flex-direction: row-reverse;
}

/* ===================================
   HYBRID LEARNING RTL
   =================================== */

.hybrid-content {
    direction: rtl;
}

.hybrid-info {
    text-align: right;
}

.hybrid-features {
    direction: rtl;
}

.hybrid-feature {
    flex-direction: row-reverse;
    text-align: right;
}

.hybrid-feature i {
    margin-right: 0;
    margin-left: var(--spacing-md);
}

.schedule-item {
    flex-direction: row-reverse;
}

/* ===================================
   VIRTUAL TOUR RTL
   =================================== */

.virtual-tour-content {
    direction: rtl;
}

.tour-text {
    text-align: right;
}

.tour-features {
    direction: rtl;
}

.tour-feature {
    flex-direction: row-reverse;
}

.tour-feature i {
    margin-right: 0;
    margin-left: var(--spacing-md);
}

/* ===================================
   CURRICULUM LIST RTL
   =================================== */

.curriculum-list {
    text-align: right;
}

.curriculum-list li {
    flex-direction: row-reverse;
}

.curriculum-list i {
    margin-right: 0;
    margin-left: var(--spacing-sm);
}

/* ===================================
   CALENDAR RTL
   =================================== */

.calendar-controls {
    flex-direction: row-reverse;
}

.calendar-weekdays {
    direction: rtl;
}

.calendar-legend {
    flex-direction: row-reverse;
}

.legend-item {
    flex-direction: row-reverse;
}

.legend-color {
    margin-right: 0;
    margin-left: 8px;
}

/* ===================================
   SKIP LINK RTL
   =================================== */

.skip-link {
    left: auto;
    right: 16px;
}

/* ===================================
   UTILITY & MISC RTL
   =================================== */

/* Lists */
ul,
ol {
    padding-left: 0;
    padding-right: 0;
}

/* Ensure proper text rendering for Arabic */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Section Title RTL */
.section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* Focus states RTL */
*:focus-visible {
    outline-offset: 2px;
}

/* Input placeholders */
input::placeholder,
textarea::placeholder {
    text-align: right;
}