/********** Template CSS **********/
:root {
    --primary: #D6272B;    /* R=214 G=39 B=43 */
    --secondary: #000000;  /* R=0 G=0 B=0 */
    --accent: #588D92;     /* R=88 G=141 B=146 */
    --light: #F8F8F8;
    --dark: #252525;
}

body {
    font-family: 'Tajawal', 'GE SS Text Light', 'Myriad Pro', sans-serif;
    direction: rtl;
    text-align: right;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'GE SS Two Bold', 'Tajawal', 'Myriad Pro', sans-serif;
    font-weight: 700;
}

.back-to-top {
    position: fixed;
    display: none;
    left: 30px; 
    bottom: 30px;
    z-index: 99;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary {
    color: #FFFFFF;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn.btn-primary:hover {
    background-color: #b52024;
    border-color: #b52024;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Navbar ***/
.navbar {
    background-color: var(--primary) !important;
    direction: rtl; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.navbar .navbar-nav {
    display: flex;
    flex-direction: row;
    margin-left: auto;
    margin-right: 0;
}

.navbar .navbar-nav .nav-link {
    margin-left: 15px;
    margin-right: 15px;
    padding: 20px 0;
    color: #FFFFFF;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--light);
}

.navbar .navbar-brand {
    margin-right: auto;
    margin-left: 0;
}

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
        text-align: right;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 8px;
        border-top: 1px solid rgba(256, 256, 256, .1);
        flex-direction: column;
    }

    .navbar .navbar-nav .nav-link {
        margin-left: 0;
        padding: 8px 0;
    }

    .navbar-brand {
        order: 2;
    }
}

/*** Header ***/
#header-carousel .carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    z-index: 1;
}

#header-carousel .carousel-control-prev,
#header-carousel .carousel-control-next {
    width: 10%;
}

#header-carousel .carousel-control-prev-icon,
#header-carousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 500px;
    }
    
    #header-carousel .carousel-item img {
        position: center center;
        display: flex;
        size:cover;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

#header-carousel .carousel-indicators [data-bs-target] {
    width: 60px;
    height: 60px;
    text-indent: 0;
    margin-bottom: 15px;
    border: 2px solid var(--primary); 
    border-radius: 60px;
    overflow: hidden;
}

#header-carousel .carousel-indicators [data-bs-target] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/r1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--secondary);
    content: "\f104" !important; 
    font-family: "Font Awesome 5 Free";
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 2px;
    top: 4px;
    right: -40px; 
    left: auto;
    background: var(--primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 2px;
    bottom: 4px;
    right: -60px; 
    left: auto;
    background: var(--primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    right: 0; 
    left: auto;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    right: 0; 
    left: auto;
}

/*** Img Border ***/
.img-border {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.img-border::before {
    position: absolute;
    content: "";
    top: 0;
    right: 3rem; 
    left: 0;
    bottom: 3rem;
    border: 5px solid var(--primary);
    border-radius: 6px;
}

.img-border img {
    position: absolute;
    top: 3rem;
    right: 3rem; 
    left: 0;
    width: calc(100% - 3rem);
    height: calc(100% - 3rem);
    object-fit: cover;
    border-radius: 6px;
}

/*** Facts ***/
.fact-item {
    transition: .5s;
    background-color: var(--light);
}

.fact-item:hover {
    margin-top: -10px;
    background: #FFFFFF !important;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}

/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
    border: 1px solid transparent;
    transition: .5s;
    background-color: var(--light);
}

.service-item:hover {
    margin-top: -10px;
    box-shadow: none;
    border: 1px solid var(--accent);
    transform: scale(1.03);
}

/*** Feature ***/
.progress {
    height: 8px; 
}

.progress .progress-bar {
    width: 0px;
    transition: 3s;
    background-color: var(--primary);
}

/*** Project ***/
.project-item a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: rgba(0, 0, 0, .5);
    border-radius: 6px;
    opacity: 0;
    transition: .5s;
}

.project-item:hover a {
    opacity: 1;
}

.project-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.project-carousel .owl-dot {
    width: 35px;
    height: 35px;
    margin: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DEE2E6;
    border-radius: 35px;
    transition: .5s;
}

.project-carousel .owl-dot:hover,
.project-carousel .owl-dot.active {
    color: #FFFFFF;
    border-color: var(--primary);
    background: var(--primary);
}


.project-carousel {
    direction: ltr; 
}


/*** Testimonial ***/


.testimonial-carousel  {
    direction: ltr; 
}

.testimonial-carousel .owl-item .testimonial-item img {
    width: 60px;
    height: 60px;
}

.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item .testimonial-item * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DEE2E6;
    border-radius: 50px;
    font-size: 18px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: #FFFFFF;
    border-color: var(--primary);
    background: var(--primary);
}

/*** Footer ***/
.footer {
    background-color: var(--dark);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: right; /* محاذاة النص لليمين */
    color: var(--light);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f104"; /* تغيير اتجاه السهم */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--light);
    margin-left: 10px; /* تغيير من margin-right إلى margin-left */
    margin-right: 0;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* تعديلات RTL إضافية */
.me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}
.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}
.text-start {
    text-align: right !important;
}

.pdf-container {
    border: 1px solid #eee;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.pdf-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.btn-download {
    background: #e43d27;
    border: none;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #c2331f;
    transform: scale(1.05);
}

.video-thumbnail iframe {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-item {
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
}