/*
 Theme Name:   Hamrah Child
 Description:  Hamrah Child Theme
 Author:       Mostafa Kalantari
 Author URI:   https://rtl-theme.com/author/mostafa-kf/
 Template:     hamrah
 Version:      1.0.0
 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;
    }
}

.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 */

.hamrah-blog-post-item .hamrah-blog-post-image {
    height: 124px;
    border-radius: 8px;
    background-size: cover;
    background-position: center center;
}

.hamrah-blog-post-item .hamrah-video-image-cover {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 7px;
}

selector iframe,
selector video,
.elementor-widget-video .e-hosted-video .elementor-video {
    object-fit: contain !important;
    background-color: black !important;
}

#shorts-modal video {
    max-height: 100vh !important;   /* prevent video from exceeding viewport height */
    width: 100% !important;         /* full width inside container */
    height: auto !important;        /* keep aspect ratio */
    object-fit: contain !important; /* make sure video fits without cropping */
    border-radius: 8px !important;  /* optional: rounded corners */
    background: black !important;   /* fill background behind video */
}

#hamrah-header-sticky.sticky,
#hamrah-mobile-header-sticky.sticky {
    z-index: 9;
}