/* RTL Styles for Services Archive Page */

/* General RTL Layout */
.rtl-layout {
    direction: rtl;
    text-align: right;
}

.rtl-content {
    direction: rtl;
    text-align: right;
}

/* Hero Section RTL */
.rtl-content.hero-content {
    text-align: center;
}

/* Breadcrumb RTL */
.rtl-content.breadcrumbs {
    direction: rtl;
}

.rtl-content .breadcrumb-item {
    float: right;
}

.rtl-content .breadcrumb-separator {
    margin: 0 8px;
    transform: rotate(180deg);
}

/* Services Filters RTL */
.rtl-content.services-filters {
    flex-direction: row-reverse;
}

.rtl-content .search-box {
    direction: rtl;
}

.rtl-content .search-box .fa-search {
    left: 15px;
    right: auto;
}

.rtl-input {
    padding-right: 15px;
    padding-left: 40px;
}

.rtl-content .category-filter {
    margin-left: 0;
    margin-right: 20px;
}

.rtl-content .category-filter label {
    margin-left: 10px;
    margin-right: 0;
}

/* Service Cards RTL */
.services-section {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px 0;
}

.services-carousel .owl-stage {
    display: flex;
    padding: 20px 0;
}

.services-carousel .owl-item {
    display: flex;
}

.services-carousel .service-card {
    height: 100%;
    margin: 0;
    transition: all 0.3s ease;
}

.services-carousel .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    margin-top: 0;
    pointer-events: none;
}

.services-carousel .owl-nav button {
    width: 40px;
    height: 40px;
    background: var(--primary-color) !important;
    border-radius: 50% !important;
    color: #fff !important;
    position: absolute;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.services-carousel .owl-nav button:hover {
    background: var(--secondary-green) !important;
    transform: translateY(-2px);
}

/* RTL specific - swap navigation button positions */
.services-carousel .owl-prev {
    right: -20px;
    left: auto;
}

.services-carousel .owl-next {
    left: -20px;
    right: auto;
}

.services-carousel .owl-dots {
    margin-top: 20px;
}

.services-carousel .owl-dot span {
    width: 10px;
    height: 10px;
    margin: 5px;
    background: #D6D6D6;
    display: block;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.services-carousel .owl-dot.active span {
    background: var(--secondary-green);
    width: 20px;
}

.services-carousel .service-card:hover {
    transform: translateY(-10px);
}

@media (max-width: 768px) {
    .services-carousel .owl-nav {
        display: none;
    }
}

/* RTL Service Card */
.rtl-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 280px;
    direction: rtl;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

.rtl-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.rtl-card .icon-box {
    width: 80px;
    height: 80px;
    background: var(--secondary-light, #EDF8FE);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.rtl-card:hover .icon-box {
    background: var(--secondary-green, #AFCB3B);
}

.rtl-card .icon-box i {
    font-size: 32px;
    color: var(--primary-dark, #22376C);
    transition: all 0.3s ease;
}

.rtl-card:hover .icon-box i {
    color: #fff;
}

.rtl-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-dark, #22376C);
}

.rtl-card .service-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.rtl-card .service-features {
    margin: 20px 0;
}

.rtl-card .service-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rtl-card .service-features li {
    padding: 8px 0;
    color: #555;
    position: relative;
}

.rtl-card .read-more {
    color: var(--secondary-green, #AFCB3B);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
    flex-direction: row-reverse;
}

.rtl-card .read-more:hover {
    color: var(--primary-dark, #22376C);
}

/* RTL Responsive Design */
@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .rtl-card {
        min-height: 250px;
    }
}

/* Pagination RTL */
.rtl-pagination {
    direction: rtl;
}

.rtl-pagination .page-numbers {
    float: right;
}

.rtl-pagination .prev {
    float: right;
}

.rtl-pagination .next {
    float: left;
}

/* CTA Section RTL */
.rtl-content .cta-buttons {
    flex-direction: row-reverse;
}

.rtl-content .cta-primary {
    margin-left: 15px;
    margin-right: 0;
}

/* Responsive RTL Styles */
@media (max-width: 768px) {
    .rtl-content.services-filters {
        flex-direction: column;
    }
    
    .rtl-content .category-filter {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Floating Shapes RTL Adjustments */
.rtl-layout .floating-shapes .shape {
    transform: scaleX(-1);
}

/* No Services Message RTL */
.rtl-content.no-services {
    text-align: center;
}

/* Service Categories RTL */
.rtl-content .category-filter select {
    padding-right: 15px;
    padding-left: 30px;
    background-position: 10px center;
}

/* Service Card Hover Effects RTL */
.rtl-card:hover .read-more i {
    transform: translateX(-5px) rotate(180deg);
}

/* Custom Scrollbar for RTL */
.rtl-content ::-webkit-scrollbar {
    left: 0;
    right: auto;
}

/* Accessibility Improvements */
.rtl-content .screen-reader-text {
    left: auto;
    right: -9999px;
}

/* Print Styles RTL */
@media print {
    .rtl-layout {
        direction: rtl;
    }
    
    .rtl-card {
        page-break-inside: avoid;
    }
}
