/* RTL Specific Styles - Only apply when html root is RTL */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}



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

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

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

html[dir="rtl"] .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

html[dir="rtl"] .space-x-6 > * + * {
    margin-right: 1.5rem;
    margin-left: 0;
}

html[dir="rtl"] .border-r {
    border-right: none;
    border-left: 1px solid;
}

html[dir="rtl"] .border-l {
    border-left: none;
    border-right: 1px solid;
}

html[dir="rtl"] .rounded-r {
    border-radius: 0 0.5rem 0.5rem 0;
}

html[dir="rtl"] .rounded-l {
    border-radius: 0.5rem 0 0 0.5rem;
}

html[dir="rtl"] .translate-x-full {
    transform: translateX(100%);
}

html[dir="rtl"] .-translate-x-full {
    transform: translateX(-100%);
}

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

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

html[dir="rtl"] .footer-nav a:hover {
    transform: translateX(-0.5rem);
}

html[dir="rtl"] .footer-info-value:hover {
    transform: translateX(-0.5rem);
}

html[dir="rtl"] .social-icons {
    flex-direction: row;
}

html[dir="rtl"] .header-inner {
    flex-direction: row;
}

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


html[dir="rtl"] .countdown-timer {
    direction: ltr;
}

html[dir="rtl"] .stat-value-container {
    flex-direction: row-reverse;
}

/* LTR Styles - Apply when html root is LTR */
html[dir="ltr"],
html[dir="ltr"] * {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] .text-center,
html[dir="ltr"] [class*="text-center"] {
    text-align: center !important;
}

html[dir="ltr"] .text-left {
    text-align: left !important;
}

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

html[dir="ltr"] .mr-auto {
    margin-right: auto;
    margin-left: 0;
}

html[dir="ltr"] .ml-auto {
    margin-left: auto;
    margin-right: 0;
}

html[dir="ltr"] .space-x-4 > * + * {
    margin-left: 1rem;
    margin-right: 0;
}

html[dir="ltr"] .space-x-6 > * + * {
    margin-left: 1.5rem;
    margin-right: 0;
}

html[dir="ltr"] .left-0 {
    left: 0;
    right: auto;
}

html[dir="ltr"] .right-0 {
    right: 0;
    left: auto;
}

html[dir="ltr"] .footer-nav a:hover {
    transform: translateX(0.5rem);
}

html[dir="ltr"] .footer-info-value:hover {
    transform: translateX(0.5rem);
}

html[dir="ltr"] .stat-value-container {
    flex-direction: row;
}

/* English overrides using body class (more reliable than html dir) */
body.lang-en,
body.lang-en * {
    direction: ltr !important;
    text-align: left !important;
}

body.lang-en .text-right {
    text-align: left !important;
}

body.lang-en .text-center,
body.lang-en [class*="text-center"] {
    text-align: center !important;
}

/* Elements that should stay centered in English */
body.lang-en .agenda-hero-title,
body.lang-en .page-hero-title,
body.lang-en .page-hero-subtitle,
body.lang-en .stat-label,
body.lang-en .workshops-content-section .section-title,
body.lang-en .agenda-hero-description,
body.lang-en .section-beige .section-title,
body.lang-en .section-beige .text-center,
body.lang-en .section-beige .text-center p,
body.lang-en .certificate-popup-content,
body.lang-en .certificate-popup-title,
body.lang-en .certificate-popup-text,
body.lang-en .page-hero-description,
body.lang-en .stories-hero-description,
body.lang-en .library-hero-description {
    text-align: center !important;
}

/* Section titles centered on inner pages only (not homepage) */
body.lang-en:not(.home) .section-title {
    text-align: center !important;
}

/* Section titles left-aligned on homepage */
body.lang-en.home .section-title {
    text-align: left !important;
}

/* Hero background flip for English (green on right) */
body.lang-en .hero-section-home {
    background-image: url("data:image/svg+xml,%3Csvg width='1920' height='1200' viewBox='0 0 1920 1200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1920' height='1200' fill='%23F3F2EE'/%3E%3Crect x='1420' width='500' height='1200' fill='%232C3B1E'/%3E%3C/svg%3E") !important;
}

@media (max-width: 1024px) {
    body.lang-en .hero-section-home {
        background-image: url("data:image/svg+xml,%3Csvg width='1920' height='1200' viewBox='0 0 1920 1200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1920' height='1200' fill='%23F3F2EE'/%3E%3Crect width='1920' height='300' y='900' fill='%232C3B1E'/%3E%3C/svg%3E") !important;
    }
}

/* Specific element overrides for English */
body.lang-en .info-label,
body.lang-en .speaker-name,
body.lang-en .speaker-title,
body.lang-en h1,
body.lang-en h2,
body.lang-en h3,
body.lang-en h4,
body.lang-en h5,
body.lang-en h6,
body.lang-en p,
body.lang-en span,
body.lang-en div,
body.lang-en label,
body.lang-en li {
    text-align: left !important;
    direction: ltr !important;
}

/* English hero title - smaller on desktop */
@media (min-width: 1024px) {
    body.lang-en .hero-title {
        font-size: 40px;
        line-height: 50px;
    }
}

