/* --- Persian (RTL) Styles --- */

/* 1. Apply Persian Font */
body, h1, h2, h3, h4, .btn, .form-group input, .form-group textarea {
    font-family: 'Vazirmatn', var(--font-primary);
}

/* 2. General Layout & Text Alignment */
body {
    text-align: right;
}

/* 3. Header & Navigation */
.logo {
    margin-right: 0;
    margin-left: auto;
}

.language-switcher {
    margin-left: 0;
    margin-right: 1.5rem; 
}

.lang-button i.fa-chevron-down {
    margin-left: 0;
    margin-right: 0.6rem;
}

.lang-dropdown {
    right: auto;
    left: 0;
}

/* 4. Hero Section Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#hero h1,
#hero p,
.hero-buttons {
    animation-name: fadeInRight;
}

/* 5. Summary Section */
#summary h2 {
    text-align: right;
}
#summary h2::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}
.highlight-card {
    border-left: none;
    border-right: 3px solid var(--golden);
}

/* 6. Experience Section (Timeline) */
.timeline-item:nth-child(odd) { 
    left: auto;
    right: 0; 
    text-align: right; 
    padding-left: 60px; 
    padding-right: 0;
}
.timeline-item:nth-child(even) { 
    left: auto;
    right: 50%;
    text-align: right; 
    padding-left: 0; 
    padding-right: 60px;
}

.timeline-item:nth-child(odd)::after { 
    right: auto;
    left: -8px; 
}
.timeline-item:nth-child(even)::after { 
    left: auto;
    right: -8px; 
}

/* 7. Education Section */
.education-item {
    text-align: right;
}

.education-item:hover {
    transform: translateX(-5px);
}

.education-icon-wrapper {
    margin-right: 0;
    margin-left: 1.5rem;
}

.icon-bachelor::before {
    left: auto;
    right: -2px;
}
.icon-bachelor::after {
    left: auto;
    right: 7px;
}

.icon-certificate::after {
    left: auto;
    right: 5px;
}

/* 8. Contact & Footer Section */
#form-status { 
    text-align: right;
}

.contact-info li i {
    margin-right: 0;
    margin-left: 1.5rem;
}

.contact-info li:hover {
    transform: translateX(-5px);
}

/* 9. Responsive Adjustments for RTL */
@media(max-width: 992px) {
    #summary h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media(max-width: 768px) {
    #main-header nav {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    #main-header.nav-active nav {
        transform: translateX(0);
    }

    .timeline-item,
    .timeline-item:nth-child(odd), 
    .timeline-item:nth-child(even) {
        width: 100%;
        right: 0;
        padding: 0;
    }
}

/* 10. Fix Letter Spacing for Persian Text */
.btn,
#hero p {
    letter-spacing: normal;
    text-transform: none;
}

h3, h4 {
    letter-spacing: normal;
}