/* ==========================================================================
   Khosh Andam - Persian (Farsi) RTL Styles
   ========================================================================== */

/* Font Family */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSans-web.woff2') format('woff2'),
         url('../fonts/IRANSans-web.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSans-Medium-web.woff2') format('woff2'),
         url('../fonts/IRANSans-Medium-web.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSans-Bold-web.woff2') format('woff2'),
         url('../fonts/IRANSans-Bold-web.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSans-Light-web.woff2') format('woff2'),
         url('../fonts/IRANSans-Light-web.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* RTL Base Overrides */
:root {
    --font-family: 'IRANSans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[dir="rtl"] body {
    font-family: var(--font-family);
    direction: rtl;
    text-align: right;
}

/* Navigation RTL */
html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .logo-text {
    margin-right: var(--space-2);
    margin-left: 0;
}

/* Hero RTL */
html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .hero-actions {
    justify-content: flex-start;
}

html[dir="rtl"] .hero-stats {
    justify-content: flex-start;
}

html[dir="rtl"] .hero-image-decoration {
    left: auto;
    right: 20px;
}

html[dir="rtl"] .hero-floating-card-1 {
    right: auto;
    left: -30px;
}

html[dir="rtl"] .hero-floating-card-2 {
    left: auto;
    right: -40px;
}

/* Buttons RTL */
html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn svg {
    margin-right: 0;
    margin-left: var(--space-2);
}

/* Feature Cards RTL */
html[dir="rtl"] .feature-card::before {
    transform-origin: right;
}

html[dir="rtl"] .feature-icon {
    margin-left: 0;
    margin-right: 0;
}

/* App Features Grid RTL */
html[dir="rtl"] .app-features-grid {
    direction: rtl;
}

html[dir="rtl"] .app-feature-card {
    text-align: right;
}

html[dir="rtl"] .app-feature-tags {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

/* App Download RTL */
html[dir="rtl"] .app-download-btn-text {
    text-align: right;
}

html[dir="rtl"] .app-download-buttons {
    justify-content: flex-start;
}

/* Testimonials RTL */
html[dir="rtl"] .testimonial-author {
    flex-direction: row-reverse;
}

html[dir="rtl"] .testimonial-text {
    text-align: right;
}

/* Contact RTL */
html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-item-icon {
    margin-left: var(--space-4);
    margin-right: 0;
}

html[dir="rtl"] .form-label {
    text-align: right;
}

/* FAQ RTL */
html[dir="rtl"] .faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .faq-answer {
    text-align: right;
}

/* Footer RTL */
html[dir="rtl"] .footer-container {
    direction: rtl;
}

html[dir="rtl"] .footer-brand {
    text-align: right;
}

html[dir="rtl"] .footer-col {
    text-align: right;
}

html[dir="rtl"] .footer-col a {
    text-align: right;
}

html[dir="rtl"] .footer-contact {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-contact svg {
    margin-left: var(--space-2);
    margin-right: 0;
}

html[dir="rtl"] .social-link:first-child {
    margin-left: var(--space-3);
    margin-right: 0;
}

/* Blog Cards RTL */
html[dir="rtl"] .blog-card-content {
    text-align: right;
}

html[dir="rtl"] .blog-card-meta {
    flex-direction: row-reverse;
}

/* Articles Section RTL */
html[dir="rtl"] .articles-grid {
    direction: rtl;
}

html[dir="rtl"] .article-card-body {
    text-align: right;
}

html[dir="rtl"] .article-card-meta {
    flex-direction: row-reverse;
}

html[dir="rtl"] .article-card-category {
    flex-direction: row-reverse;
}

html[dir="rtl"] .article-card-date {
    flex-direction: row-reverse;
}

html[dir="rtl"] .article-read-more {
    flex-direction: row-reverse;
}

html[dir="rtl"] .article-card:hover .article-read-more svg {
    transform: translateX(-4px);
}

@media (max-width: 640px) {
    html[dir="rtl"] .article-card-body {
        text-align: center;
    }

    html[dir="rtl"] .article-card-meta {
        justify-content: center;
    }
}

/* Program Cards RTL */
html[dir="rtl"] .program-card-content {
    text-align: right;
}

/* Section Headers RTL */
html[dir="rtl"] .section-header {
    text-align: center;
}

/* Page Header RTL */
html[dir="rtl"] .page-header {
    text-align: center;
}

/* Mobile Menu RTL */
html[dir="rtl"] .mobile-menu-content {
    text-align: center;
}

html[dir="rtl"] .mobile-lang {
    flex-direction: row-reverse;
}

/* Hero Badge RTL */
html[dir="rtl"] .hero-badge {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-badge::before {
    margin-left: var(--space-2);
    margin-right: 0;
}

/* Grid Adjustments */
@media (min-width: 1024px) {
    html[dir="rtl"] .hero-container {
        direction: rtl;
    }

    html[dir="rtl"] .app-download-container {
        direction: rtl;
    }

    html[dir="rtl"] .contact-container {
        direction: rtl;
    }
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .hero-content {
        text-align: center;
    }

    html[dir="rtl"] .hero-actions {
        justify-content: center;
    }

    html[dir="rtl"] .hero-stats {
        align-items: center;
    }

    html[dir="rtl"] .app-download-content {
        text-align: center;
    }

    html[dir="rtl"] .app-download-buttons {
        justify-content: center;
    }

    html[dir="rtl"] .footer-brand {
        text-align: center;
    }

    html[dir="rtl"] .footer-col {
        text-align: center;
    }
}

/* Text Alignment Utilities */
html[dir="rtl"] .text-left {
    text-align: right;
}

html[dir="rtl"] .text-right {
    text-align: left;
}

/* Margin/Padding Utilities */
html[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: var(--space-4);
}

html[dir="rtl"] .mr-4 {
    margin-right: 0;
    margin-left: var(--space-4);
}

/* Transitions for RTL animations */
html[dir="rtl"] .feature-card::before {
    transform: scaleX(0);
    transform-origin: right;
}

html[dir="rtl"] .feature-card:hover::before {
    transform: scaleX(1);
}

/* Number Display (keep LTR for numbers) */
html[dir="rtl"] .hero-stat-value,
html[dir="rtl"] .price,
html[dir="rtl"] .counter {
    direction: ltr;
    display: inline-block;
}

/* ==========================================================================
   RTL Styles for New Spacious Home Page Sections
   ========================================================================== */

/* Feature Row RTL */
html[dir="rtl"] .feature-row {
    direction: rtl;
}

html[dir="rtl"] .feature-row-reverse {
    direction: ltr;
}

html[dir="rtl"] .feature-row-reverse > * {
    direction: rtl;
}

html[dir="rtl"] .feature-row-content {
    text-align: right;
}

html[dir="rtl"] .feature-row-highlights {
    justify-content: flex-start;
}

html[dir="rtl"] .feature-highlight svg {
    margin-left: var(--space-2);
    margin-right: 0;
}

/* Features Strip RTL */
html[dir="rtl"] .features-strip-inner {
    direction: rtl;
}

html[dir="rtl"] .strip-feature {
    flex-direction: row-reverse;
}

html[dir="rtl"] .strip-feature-text {
    text-align: right;
}

/* Body Tracking RTL */
html[dir="rtl"] .body-tracking-layout {
    direction: rtl;
}

html[dir="rtl"] .body-tracking-content {
    text-align: right;
}

html[dir="rtl"] .body-tracking-metrics {
    direction: rtl;
}

html[dir="rtl"] .tracking-metric {
    flex-direction: row-reverse;
}

html[dir="rtl"] .tracking-metric-info {
    text-align: right;
}

html[dir="rtl"] .tracking-metric:hover {
    transform: translateX(-8px);
}

html[dir="rtl"] .floating-metric-1 {
    right: auto;
    left: -10%;
}

html[dir="rtl"] .floating-metric-2 {
    left: auto;
    right: -10%;
}

/* Couple Illustration RTL */
html[dir="rtl"] .couple-wrapper {
    flex-direction: row-reverse;
}

html[dir="rtl"] .couple-figure-boy {
    margin-left: 0;
    margin-right: -30px;
}

html[dir="rtl"] .body-tracking-couple .floating-metric-1 {
    right: auto;
    left: -5%;
}

html[dir="rtl"] .body-tracking-couple .floating-metric-2 {
    left: auto;
    right: -5%;
}

@media (max-width: 768px) {
    html[dir="rtl"] .couple-figure-boy {
        margin-right: -20px;
    }
}

@media (max-width: 480px) {
    html[dir="rtl"] .couple-figure-boy {
        margin-right: -15px;
    }
}

/* Download CTA RTL */
html[dir="rtl"] .download-cta-layout {
    direction: rtl;
}

html[dir="rtl"] .download-cta-content {
    text-align: right;
}

html[dir="rtl"] .download-cta-buttons {
    justify-content: flex-start;
}

html[dir="rtl"] .app-download-btn {
    flex-direction: row-reverse;
}

/* Programs Showcase RTL */
html[dir="rtl"] .programs-showcase-grid {
    direction: rtl;
}

html[dir="rtl"] .program-showcase-content {
    text-align: center;
}

/* Training Section RTL */
html[dir="rtl"] .training-cards-grid {
    direction: rtl;
}

html[dir="rtl"] .training-card-body {
    text-align: right;
}

html[dir="rtl"] .training-card-tags {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[dir="rtl"] .training-tag {
    flex-direction: row-reverse;
}

@media (max-width: 600px) {
    html[dir="rtl"] .training-card-body {
        text-align: center;
    }

    html[dir="rtl"] .training-card-tags {
        justify-content: center;
    }
}

/* Sports Showcase RTL */
html[dir="rtl"] .sports-showcase-grid {
    direction: rtl;
}

html[dir="rtl"] .sport-card-icon {
    left: auto;
    right: var(--space-5);
}

html[dir="rtl"] .sport-card-arrow {
    right: auto;
    left: var(--space-5);
    transform: translateX(10px);
}

html[dir="rtl"] .sport-card:hover .sport-card-arrow {
    transform: translateX(0);
}

html[dir="rtl"] .sport-card-tags {
    flex-direction: row-reverse;
}

@media (max-width: 480px) {
    html[dir="rtl"] .sport-card-icon {
        right: var(--space-4);
    }

    html[dir="rtl"] .sport-card-arrow {
        left: var(--space-4);
    }
}

/* Hero Landscape RTL */
html[dir="rtl"] .hero-landscape-content {
    direction: rtl;
}

html[dir="rtl"] .hero-landscape-text {
    text-align: right;
}

html[dir="rtl"] .hero-landscape-actions {
    justify-content: flex-start;
}

html[dir="rtl"] .hero-landscape-stats {
    justify-content: flex-start;
}

html[dir="rtl"] .hero-landscape-badge {
    flex-direction: row-reverse;
}

html[dir="rtl"] .pulse-dot {
    margin-left: var(--space-2);
    margin-right: 0;
}

html[dir="rtl"] .hero-glass-card-1 {
    left: auto;
    right: 0;
}

html[dir="rtl"] .hero-glass-card-2 {
    right: auto;
    left: 0;
}

/* Responsive RTL for new sections */
@media (max-width: 1024px) {
    html[dir="rtl"] .feature-row-content {
        text-align: center;
    }

    html[dir="rtl"] .feature-row-highlights {
        justify-content: center;
    }

    html[dir="rtl"] .body-tracking-content {
        text-align: center;
    }

    html[dir="rtl"] .tracking-metric:hover {
        transform: none;
    }

    html[dir="rtl"] .download-cta-content {
        text-align: center;
    }

    html[dir="rtl"] .download-cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .features-strip-inner {
        align-items: center;
    }

    html[dir="rtl"] .strip-feature {
        flex-direction: row-reverse;
    }

    html[dir="rtl"] .strip-feature-text {
        text-align: right;
    }

    html[dir="rtl"] .hero-landscape-text {
        text-align: center;
    }

    html[dir="rtl"] .hero-landscape-actions {
        justify-content: center;
    }

    html[dir="rtl"] .hero-landscape-stats {
        justify-content: center;
    }
}

/* ==========================================================================
   RTL Styles for App Showcase Section
   ========================================================================== */

html[dir="rtl"] .app-showcase-layout {
    direction: rtl;
}

html[dir="rtl"] .app-showcase-content {
    text-align: right;
}

html[dir="rtl"] .app-showcase-badges {
    justify-content: flex-start;
}

html[dir="rtl"] .showcase-badge {
    flex-direction: row-reverse;
}

html[dir="rtl"] .phone-wrapper .hero-glass-card-1 {
    right: auto;
    left: -60px;
}

html[dir="rtl"] .phone-wrapper .hero-glass-card-2 {
    left: auto;
    right: -60px;
}

html[dir="rtl"] .hero-glass-card {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-glass-card-info {
    text-align: right;
}

@media (max-width: 1024px) {
    html[dir="rtl"] .app-showcase-content {
        text-align: center;
    }

    html[dir="rtl"] .app-showcase-badges {
        justify-content: center;
    }

    html[dir="rtl"] .phone-wrapper .hero-glass-card-1 {
        left: -20px;
    }

    html[dir="rtl"] .phone-wrapper .hero-glass-card-2 {
        right: -20px;
    }
}

/* ==========================================================================
   RTL Styles for Coach Page
   ========================================================================== */

/* Coach Benefits RTL */
html[dir="rtl"] .coach-benefits-grid {
    direction: rtl;
}

html[dir="rtl"] .coach-benefit-card {
    text-align: center;
}

html[dir="rtl"] .coach-benefit-description {
    text-align: center;
}

/* Coach Process RTL */
html[dir="rtl"] .coach-process-grid {
    direction: rtl;
}

html[dir="rtl"] .coach-process-step {
    text-align: center;
}

html[dir="rtl"] .coach-process-connector {
    left: auto;
    right: calc(50% + 40px);
    background: linear-gradient(270deg, var(--primary-300), var(--primary-200));
}

/* Coach Stats RTL */
html[dir="rtl"] .coach-stats-grid {
    direction: rtl;
}

html[dir="rtl"] .coach-stat-card {
    text-align: center;
}

html[dir="rtl"] .coach-stat-value {
    direction: ltr;
    display: inline-block;
}

/* Coach Specialties RTL */
html[dir="rtl"] .coach-specialties .sports-showcase-grid {
    direction: rtl;
}

/* Coach CTA RTL */
html[dir="rtl"] .coach-cta-illustration {
    direction: ltr;
}

/* ==========================================================================
   RTL Styles for Nutritionist Page
   ========================================================================== */

/* Nutritionist Benefits RTL */
html[dir="rtl"] .nutritionist-benefits-grid {
    direction: rtl;
}

html[dir="rtl"] .nutritionist-benefit-card {
    text-align: center;
}

/* Nutritionist Process RTL */
html[dir="rtl"] .nutritionist-process-grid {
    direction: rtl;
}

html[dir="rtl"] .nutritionist-process-step {
    text-align: center;
}

html[dir="rtl"] .nutritionist-process-connector {
    left: auto;
    right: calc(50% + 48px);
    background: linear-gradient(270deg, #6E78F7 0%, #e8e9fe 50%, #6E78F7 100%);
}

/* Nutritionist Services RTL */
html[dir="rtl"] .nutrition-services-grid {
    direction: rtl;
}

html[dir="rtl"] .nutrition-service-card {
    text-align: right;
}

html[dir="rtl"] .nutrition-service-card ul li {
    padding-left: 0;
    padding-right: var(--space-6);
}

html[dir="rtl"] .nutrition-service-card ul li::before {
    left: auto;
    right: 0;
}

/* Nutritionist Stats RTL */
html[dir="rtl"] .nutritionist-stats-grid {
    direction: rtl;
}

html[dir="rtl"] .nutritionist-stat-card {
    text-align: center;
}

html[dir="rtl"] .nutritionist-stat-value {
    direction: ltr;
    display: inline-block;
}

/* Nutritionist CTA RTL */
html[dir="rtl"] .nutritionist-cta-illustration {
    direction: ltr;
}
