/* RTL Support for Arabic language */

/* Common RTL adjustments */
.rtl {
    direction: rtl;
    text-align: right;
}

/* Header navigation RTL */
.rtl nav ul li {
    margin-right: 0;
    margin-left: 30px;
}

.rtl nav ul li:last-child {
    margin-left: 0;
}

.rtl nav ul li a::after {
    left: auto;
    right: 0;
}

.rtl .language a {
    margin-left: 0;
    margin-right: 10px;
}

.rtl .language a:first-child {
    margin-right: 0;
}

.rtl .language a .lang-code {
    font-weight: 500;
}

/* Logos and images */
.rtl .logo {
    flex-direction: row-reverse;
}

/* Section headings */
.rtl .hero h2, 
.rtl .about h2, 
.rtl .services h2, 
.rtl .timing h2, 
.rtl .location h2, 
.rtl .contacts h2 {
    text-align: right;
}

.rtl .timing h2, 
.rtl .location h2, 
.rtl .contacts h2 {
    text-align: center;
}

.rtl .hero h2::after, 
.rtl .about h2::after, 
.rtl .services h2::after, 
.rtl .timing h2::after, 
.rtl .location h2::after, 
.rtl .contacts h2::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

/* About section */
.rtl .about-content {
    flex-direction: row-reverse;
}

.rtl .about-text {
    text-align: right;
}

/* Services section */
.rtl .service-item {
    text-align: right;
}

.rtl .service-item h3 {
    text-align: right !important;
    padding-left: 0;
    padding-right: 5px;
    font-weight: 600;
}

.rtl .service-item p {
    text-align: right !important;
    padding-right: 5px;
}

.rtl .service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.rtl .service-item::before {
    left: auto;
    right: 0;
}

/* Удаляем анимацию, которая больше не нужна */
.rtl .service-item.active-service {
    display: none;
}

/* Contact section */
.rtl .contact-item {
    flex-direction: column;
    text-align: center;
    box-shadow: none;
}

.rtl .contact-item i {
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 15px;
    display: block;
}

/* Prevent phone numbers and email from being displayed in reverse */
.rtl .contact-number,
.rtl .contact-email,
.rtl .footer-info p {
    direction: ltr;
    unicode-bidi: embed;
    text-align: center;
    display: block;
}

/* Footer */
.rtl .footer-info,
.rtl .copyright {
    text-align: right;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .rtl header .container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .rtl .logo {
        margin-left: auto;
        margin-right: 0;
        order: 1;
    }
    
    .rtl .language {
        margin-right: auto;
        margin-left: 0;
        order: 2;
    }
    
    .rtl nav ul {
        flex-direction: row;
        flex-basis: 100%;
        order: 3;
        padding-right: 0;
    }
    
    .rtl nav ul li {
        margin-left: 0;
        text-align: center;
    }
    
    .rtl .about-content {
        flex-direction: column;
    }
    
    .rtl .contact-item {
        flex-direction: column;
    }
    
    .rtl .contact-item i {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 15px;
    }
    
    .rtl .about-stats {
        flex-direction: column;
        min-width: auto;
    }
    
    .rtl .stat-item {
        flex: none;
        min-width: auto;
        width: 100%;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .rtl .stat-item:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .rtl .logo {
        margin-left: auto;
        margin-right: 0;
        order: 1;
    }
    
    .rtl .language {
        margin-right: auto;
        margin-left: 0;
        order: 2;
    }
    
    .rtl nav {
        flex-basis: 100%;
        order: 3;
    }
    
    .rtl .service-item {
        text-align: right;
    }
    
    .rtl .service-item h3,
    .rtl .service-item p {
        text-align: right !important;
    }

    .rtl .service-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }

    /* Smaller font sizes for RTL mobile */
    .rtl .hero h2,
    .rtl .about h2,
    .rtl .services h2,
    .rtl .timing h2,
    .rtl .location h2,
    .rtl .contacts h2 {
        font-size: 20px;
    }
    
    .rtl .service-item h3 {
        font-size: 15px;
    }
    
    .rtl .service-item p {
        font-size: 14px;
    }

    /* Стили для контактных элементов в мобильной версии на арабском */
    .rtl .contact-item {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 12px 16px;
        width: auto;
        max-width: 280px;
        margin: 0 auto 15px;
        position: relative;
        white-space: nowrap;
    }
    
    .rtl .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .rtl .contact-item i {
        font-size: 18px;
        margin: 0 0 0 15px;
        padding: 0;
        position: static;
        display: inline-block;
    }
    
    .rtl .contact-item p {
        font-size: 15px;
        margin: 0;
        padding: 0;
        display: inline-block;
        direction: ltr;
        text-align: right;
    }
    
    /* Стиль для кнопки карты используем как образец */
    .rtl .map-button i {
        margin-right: 0;
        margin-left: 5px;
    }
    
    .rtl .about-stats {
        flex-direction: column;
        min-width: auto;
        gap: 15px;
    }
    
    .rtl .stat-item {
        flex: none;
        min-width: auto;
        width: 100%;
        height: auto;
        padding: 15px;
        text-align: center;
    }
    
    .rtl .stat-item h3 {
        font-size: 20px;
        height: auto;
    }
    
    .rtl .stat-item p {
        font-size: 14px;
        height: auto;
        line-height: 1.4;
    }
}

/* RTL styles for Arabic language */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Header navigation RTL adjustments */
body.rtl nav ul li {
    margin-right: 0;
    margin-left: 30px;
}

body.rtl nav ul li:last-child {
    margin-left: 0;
}

/* Preventing phone numbers from being reversed in RTL mode */
body.rtl .contact-number {
    direction: ltr;
    unicode-bidi: embed;
    text-align: center;
    display: block;
}

/* Fix for footer alignment in RTL mode */
body.rtl .copyright {
    text-align: center;
}

/* Ensure logo text is properly aligned in RTL */
body.rtl .logo-text {
    text-align: right;
}

/* Ensure about section text alignment in RTL */
body.rtl .about-text p {
    text-align: right;
}

.contact-item p a:hover {
    color: var(--primary-color);
}

.rtl .contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Reduce font size for RTL headings */
.rtl .hero h2,
.rtl .about h2,
.rtl .services h2,
.rtl .timing h2,
.rtl .location h2,
.rtl .contacts h2 {
    font-size: 1.5em;
}

/* Стили для подвала в арабской версии */
.rtl .copyright {
    text-align: center;
    direction: rtl;
    background-color: #6C6C6C;
}

.rtl .copyright p {
    display: inline-block;
    direction: rtl;
    text-align: center;
}

/* Стили для нового footer в RTL */
.rtl .footer-content {
    direction: rtl;
}

.rtl .footer-badge {
    direction: rtl;
}

.rtl .footer-dark-section {
    direction: rtl;
}

.rtl .footer-disclaimer p {
    text-align: center;
    direction: rtl;
    color: #ffffff;
}

.rtl .footer-buttons {
    direction: rtl;
}

.rtl .trustee-badge {
    direction: rtl;
    background-color: transparent;
    color: #094551;
    border: none;
    padding: 0;
}

.rtl .trustee-badge i {
    color: #6C6C6C;
}

.rtl .google-reviews-btn {
    direction: ltr; /* Google Reviews остается LTR */
    background-color: #ffffff;
    color: #094551;
    border: none;
}

.rtl .google-reviews-btn:hover {
    background-color: #f5f5f5;
    color: #094551;
}

.rtl .google-reviews-btn i {
    color: #4285f4;
}

.rtl .google-reviews-btn:hover i {
    color: #4285f4;
}

.rtl .copyright {
    background-color: #6C6C6C;
}

.rtl .copyright p {
    color: #ffffff;
}

/* Стили для заголовка в арабской версии */
.rtl .hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 150px;
    z-index: 2;
    overflow-x: hidden;
    background-color: transparent;
}

.rtl .hero-content h2 {
    position: relative;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    padding: 8px 15px;
    border-radius: 8px;
    margin-top: 0;
    width: auto;
    max-width: 80%;
    overflow: visible;
    opacity: 0;
    
    /* Создаем двухмерный градиент с плавными переходами со всех сторон */
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.85) 70%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* Убираем псевдоэлементы */
.rtl .hero-content h2::before,
.rtl .hero-content h2::after {
    display: none;
}

/* Стили для мобильной версии */
@media (max-width: 768px) {
    .rtl .hero-content {
        padding-top: 70px;
    }
    
    .rtl .hero-content h2 {
        font-size: 24px;
        padding: 8px 15px;
        /* Более компактный градиент для планшетов */
        background: radial-gradient(
            ellipse at center,
            rgba(255, 255, 255, 0.85) 60%,
            rgba(255, 255, 255, 0) 100%
        );
    }
}

@media (max-width: 480px) {
    .rtl .hero-content {
        left: 8px;
        right: 8px;
        width: auto;
        padding-left: 0;
        padding-right: 0;
        padding-top: 60px;
        padding-bottom: 20px;
    }
    
    .rtl .hero-content h2 {
        font-size: 18px;
        padding: 5px 10px;
        white-space: nowrap;
        max-width: 90%;
        margin-top: 0;
        /* Ещё более компактный градиент для мобильных */
        background: radial-gradient(
            ellipse at center,
            rgba(255, 255, 255, 0.85) 70%,
            rgba(255, 255, 255, 0) 100%
        );
    }
}

/* Стили для iPad Air M2 и подобных устройств в портретном режиме */
@media (min-width: 768px) and (max-width: 820px) {
    .rtl .hero-content h2 {
        white-space: nowrap; /* Сохраняем текст в одну строку */
        font-size: 28px; /* Возвращаем прежний размер шрифта */
        padding: 5px 10px; /* Отступы по бокам */
        max-width: 100%; /* Ограничиваем максимальную ширину */
        line-height: 1.3;
        overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
    }
    
    .rtl .hero-content {
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }
}

/* Стили для цитаты в RTL версии */
.rtl .quote-content {
    flex-direction: row-reverse;
}

.rtl .quote-text blockquote {
    text-align: right;
}

.rtl .quote-text blockquote cite {
    text-align: left;
}

@media (max-width: 768px) {
    .rtl .quote-text blockquote p,
    .rtl .quote-text blockquote cite {
        text-align: center;
    }
}

/* RTL Timing table styles */
.rtl .timing-table td:first-child {
    text-align: right;
}

.rtl .timing-table td:last-child {
    text-align: left;
}

/* RTL стили для очень маленьких экранов */
@media (max-width: 350px) {
    .rtl .contact-item {
        max-width: 90%;
        padding: 10px 12px;
        margin: 0 auto 12px;
    }
    
    .rtl .contact-item p {
        font-size: 14px;
    }
    
    .rtl .contact-item i {
        font-size: 16px;
        margin-left: 10px;
        margin-right: 0;
    }
} 