/* RTL (Right-to-Left) Language Support for Arabic and other RTL languages */

/* Apply RTL styles when body has rtl class */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Sans Arabic', 'Dubai', 'Amiri', 'Tahoma', 'Segoe UI', 'Arial', 'Helvetica', sans-serif;
    font-weight: 500;
    line-height: 1.8;
}

/* Paragraph and text adjustments */
body.rtl p {
    text-align: right;
    line-height: 2;
    margin-bottom: 25px;
    font-size: 1.15rem;
    font-weight: 500;
    word-spacing: 2px;
}

/* Audio Controls - Move to left side for RTL */
.rtl .audio-controls {
    right: auto;
    left: 20px;
}

/* Navigation and Buttons */
.rtl .audio-toggle {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial Unicode MS';
}

.rtl .language-toggle {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial Unicode MS';
}

/* Lists - Adjust padding for RTL */
.rtl ul {
    padding-left: 0;
    padding-right: 30px;
}

.rtl li {
    text-align: right;
}

/* Section headings for RTL */
body.rtl h2 {
    text-align: right;
    font-size: 2.4rem;
    margin: 60px 0 30px 0;
    padding-bottom: 20px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

body.rtl h3 {
    text-align: right;
    font-size: 1.8rem;
    margin: 40px 0 25px 0;
    font-weight: 600;
    line-height: 1.5;
}

/* Video containers - keep centered */
.rtl .video-container {
    text-align: center;
}

/* Video caption adjustments */
body.rtl .video-caption {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 20px;
    font-weight: 600;
    line-height: 1.6;
}

/* Headers with icons - adjust spacing */
.rtl h2::before {
    margin-right: 0;
    margin-left: 10px;
}

/* Highlight box adjustments for RTL */
body.rtl .highlight-box {
    border-right: 5px solid #3498db;
    border-left: none;
    padding: 30px;
    margin: 30px 0;
    text-align: right;
}

body.rtl .highlight-box p {
    font-size: 1.2rem;
    line-height: 1.9;
    font-weight: 600;
    margin-bottom: 0;
}

/* Legal section */
.rtl .legal-section {
    border-left: none;
    border-right: 4px solid #34495e;
}

/* Wave divider - no changes needed as it's decorative */

/* Conclusion section - keep centered text */
.rtl .conclusion {
    text-align: center;
}

/* Language Controls Positioning */
.language-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rtl .language-controls {
    left: auto;
    right: 20px;
}

.language-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 10px;
}

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

.language-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Header adjustments for RTL */
body.rtl .header {
    text-align: center;
    padding: 60px 40px;
}

body.rtl .header h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
    padding: 0 20px;
}

body.rtl .subtitle {
    font-size: 1.4rem;
    line-height: 1.8;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 0 30px;
}

body.rtl .header p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 20px 0;
    font-weight: 500;
    padding: 0 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* List adjustments for RTL */
body.rtl ul, body.rtl ol {
    padding-right: 35px;
    padding-left: 0;
    text-align: right;
    margin: 25px 0;
}

body.rtl li {
    margin-bottom: 15px;
    font-size: 1.15rem;
    line-height: 1.9;
    font-weight: 500;
    word-spacing: 1px;
}

/* Conclusion section for RTL */
body.rtl .conclusion {
    text-align: center;
    padding: 50px;
}

body.rtl .conclusion h2 {
    text-align: center;
    color: white;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    font-size: 2.6rem;
    margin-bottom: 35px;
    font-weight: 700;
}

body.rtl .conclusion p {
    text-align: center;
    font-size: 1.3rem;
    line-height: 2;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Legal section adjustments */
body.rtl .legal-section {
    padding: 40px;
    margin-top: 40px;
}

body.rtl .legal-section h2 {
    text-align: right;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
}

body.rtl .legal-section h3 {
    text-align: right;
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

body.rtl .legal-section p {
    text-align: right;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Button and control adjustments for RTL */
body.rtl .audio-toggle {
    font-size: 1rem;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 30px;
}

body.rtl .language-toggle {
    font-size: 1rem;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 25px;
}

/* Arabic Font Improvements */
.rtl {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Lucida Grande', sans-serif;
}

.rtl h1, .rtl h2, .rtl h3 {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Lucida Grande', sans-serif;
    font-weight: bold;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    .rtl .language-controls {
        right: 10px;
        left: auto;
    }
    
    .rtl .audio-controls {
        left: 10px;
        right: auto;
    }
    
    .rtl ul {
        padding-right: 20px;
    }
    
    /* Mobile header adjustments */
    body.rtl .header {
        padding: 40px 20px;
    }
    
    body.rtl .header h1 {
        font-size: 2.5rem;
        padding: 0 10px;
    }
    
    body.rtl .subtitle {
        font-size: 1.2rem;
        padding: 0 15px;
    }
    
    body.rtl .header p {
        font-size: 1rem;
        padding: 0 20px;
        margin: 15px 0;
    }
}
