/* RTL Styles for Arabic Language */

/* Base RTL */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* ==================== HEADER RTL ==================== */
/* 
   We allow the header container to inherit direction: rtl.
   This automatically flips the order:
   [LeftNav] [Logo] [RightNav] (LTR)
   becomes
   [RightNav] [Logo] [LeftNav] (RTL)
   
   Nav Left (About, Services) moves to Right side.
   Nav Right (Request, Lang) moves to Left side.
*/

body.rtl .header-container {
    /* Explicitly ensuring RTL just in case, though inheritance should work */
    direction: rtl;
}

/* Nav Left (Now displayed on Right) */
body.rtl .nav-left {
    /* It has justify-content: flex-start (Start).
       In RTL, Start is Right.
       Content: [About] [Services].
       Flow RTL: About (Right), Services (Left).
       Result: [Services] [About] aligned to Right Edge.
       Users read Right-to-Left: About -> Services. Correct.
    */
    direction: rtl;
}

/* Nav Right (Now displayed on Left) */
body.rtl .nav-right {
    /* It has justify-content: flex-end (End).
       In RTL, End is Left.
       Content: [Request] [Recycling] [Lang].
       Flow RTL: Request (Right), Recycling, Lang (Left).
       Result: [Lang] [Recycling] [Request] aligned to Left Edge.
       Users read Right-to-Left on left side of screen?
       Actually, mirrored design usually puts Lang switcher at the "Edge".
       Here Lang is at Left Edge. Correct.
    */
    direction: rtl;
}

/* Links inside Nav */
body.rtl .nav-link {
    direction: rtl;
}

/* Hero Section */
body.rtl .hero {
    text-align: right;
    justify-content: flex-end;
}

body.rtl .hero-content {
    text-align: right;
}

/* About Grid */
body.rtl .about-grid {
    direction: rtl;
}

body.rtl .about-content {
    text-align: right;
}

/* Services Grid */
body.rtl .services-grid {
    direction: rtl;
}

body.rtl .services-content,
body.rtl .services-list {
    text-align: right;
}

body.rtl .service-item {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .service-item:hover {
    transform: translateX(-3px);
}

/* Service Cards */
body.rtl .service-card {
    direction: rtl;
}

body.rtl .service-card.reverse {
    direction: ltr;
}

body.rtl .service-card.reverse>* {
    direction: rtl;
}

body.rtl .service-card-content {
    text-align: right;
}

/* Fleet Section */
body.rtl .fleet-grid {
    direction: rtl;
}

body.rtl .fleet-content {
    text-align: right;
}

/* Info Grid */
body.rtl .info-grid {
    direction: rtl;
}

body.rtl .info-block {
    text-align: right;
}

body.rtl .info-block ul {
    list-style-position: inside;
    padding-right: 0;
    padding-left: 0;
}

/* Quality Section */
body.rtl .quality-grid {
    direction: rtl;
}

body.rtl .quality-content {
    text-align: right;
}

body.rtl .quality-list {
    border-left: none;
    border-right: 4px solid var(--primary-green);
    padding-left: 0;
    padding-right: 25px;
}

/* Footer */
body.rtl .footer-grid {
    direction: rtl;
}

body.rtl .footer-section {
    text-align: right;
}

body.rtl .footer-section h4::after {
    left: auto;
    right: 0;
}

body.rtl .footer-links a {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

body.rtl .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

body.rtl .contact-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Forms */
body.rtl .form-group label {
    text-align: right;
    display: block;
}

body.rtl select.form-control {
    background-position: left 15px center;
}

body.rtl .form-row {
    direction: rtl;
}

/* Contact Cards */
body.rtl .contact-card {
    text-align: center;
}

/* Locator Section */
body.rtl .locator-grid {
    direction: rtl;
}

body.rtl .locator-sidebar {
    text-align: right;
}

body.rtl .location-item {
    flex-direction: row-reverse;
}

body.rtl .location-item:hover {
    transform: translateX(-5px);
}

body.rtl .location-info {
    text-align: right;
}

/* Guidelines */
body.rtl .guideline-card {
    text-align: right;
}

body.rtl .guideline-card ul li {
    padding-left: 0;
    padding-right: 15px;
}

body.rtl .guideline-card ul li::before {
    left: auto;
    right: 0;
}

/* Recycling Info Cards */
body.rtl .recycling-info-card {
    text-align: center;
}

/* Competencies */
body.rtl .competencies-section {
    text-align: center;
}

/* Certificates Grid */
body.rtl .certificates-grid {
    direction: rtl;
}

/* Alerts */
body.rtl .alert {
    flex-direction: row-reverse;
    text-align: right;
}

/* Page Header */
body.rtl .page-header {
    text-align: center;
}

/* Mobile Navigation RTL */
body.rtl .mobile-nav {
    text-align: right;
}

body.rtl .mobile-nav-link {
    text-align: right;
}

/* Language Switcher RTL */
/* In RTL, Lang Switcher is at the Left Edge (End of Nav Right).
   We ensure spacing is correct. */
body.rtl .lang-switcher {
    margin-left: 0;
    margin-right: 20px;
    /* Space between Lang and Recycling Link */
}