/* Critical alignment fixes for slideshow - override all other styles */
html[lang] #slideshow .carousel-container,
html[lang] #slideshow .carousel-container * {
    text-align: center !important;
}

/* Force flexbox centering */
html[lang] #slideshow .carousel-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 90% !important;
    max-width: 1200px !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
}

/* Force all headings to center */
html[lang] #slideshow .carousel-container h2,
html[lang] #slideshow .carousel-container h2[dir="rtl"] {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    margin-top: 20rem !important;
}

/* Force all button containers to center */
html[lang] #slideshow .carousel-container div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
}

/* Force all buttons to center */
html[lang] #slideshow .carousel-container a.btn-get-started {
    display: inline-block !important;
    text-align: center !important;
    float: none !important;
    margin: 0 auto !important;
    position: relative !important;
}

/* Additional RTL specific fixes */
html[lang="ku"] #slideshow .carousel-container,
html[lang="ckb"] #slideshow .carousel-container {
    direction: rtl !important;
}

/* Mobile fixes */
@media (max-width: 767px) {
    html[lang] #slideshow .carousel-container {
        width: 95% !important;
    }

    html[lang] #slideshow .carousel-container h2 {
        font-size: 1.5rem !important;
    }
}

/* Extra small device fixes */
@media (max-width: 575.98px) {
    html[lang] #slideshow .carousel-container {
        width: 95% !important;
        padding: 10px !important;
    }

    html[lang] #slideshow .carousel-container h2 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }
}

/* Fix absolute positioning for container */
#slideshow .carousel-item {
    position: relative !important;
}

#slideshow .carousel-container {
    position: absolute !important;
    top: 50% !important;
    z-index: 10 !important;
}
