/*
Theme Name: Hamrah
Theme URI: https://rtl-theme.com/
Author: Mostafa Kalantari
Author URI: https://rtl-theme.com/author/mostafa-kf/
Description: Hamrah exclusive WordPress theme
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hamrah
*/

/* Global styles */
body {
    overflow-x: hidden;
}

.center-absolute-horizontal {
    position: absolute;
    left: 50% !important;
    right: inherit !important;
    transform: translateX(-50%) !important;
}

@media screen and (max-width: 1024px) {
    .center-absolute-horizontal-tablet {
        position: absolute;
        left: 50% !important;
        right: inherit !important;
        transform: translateX(-50%) !important;
    }
}

@media screen and (max-width: 767px) {
    .center-absolute-horizontal-mobile {
        position: absolute;
        left: 50% !important;
        right: inherit !important;
        transform: translateX(-50%) !important;
    }
}

selector iframe,
selector video {
    object-fit: contain;
    background-color: black;
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.back-to-top.show {
    display: block;
    opacity: 0.5;
}

.back-to-top:hover {
    opacity: 1;
}

/* Fullscreen overlay */
#page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Simple spinner */
.loader {
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* /Global styles */