/*
 * Startup template (HTML Codex), adapted for Logic Leap:
 *  - physical left/right replaced by logical properties, so one file serves RTL and LTR
 *  - colors come from the brand variables in theme.css (--ll-*), including dark mode
 *  - fonts come from --ll-font (Arabic or English face chosen in the control panel)
 */

:root {
    --primary: var(--ll-primary);
    --secondary: var(--ll-secondary);
    --light: var(--ll-light);
    --dark: var(--ll-dark);
    --ll-font: var(--ll-font-ar);
    --ll-overlay: rgba(var(--ll-dark-rgb), .75);
    --ll-shadow: rgba(var(--ll-dark-rgb), .12);
}

html[lang="en"] { --ll-font: var(--ll-font-en); }

body {
    font-family: var(--ll-font);
}

/*** Spinner ***/
.spinner {
    width: 40px;
    height: 40px;
    background: var(--primary);
    margin: 100px auto;
    animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@keyframes sk-rotateplane {
    0% { transform: perspective(120px) rotateX(0deg) rotateY(0deg); }
    50% { transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); }
    100% { transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); }
}

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
    background: var(--bs-body-bg);
}

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

/*** Heading ***/
h1, h2, .fw-bold { font-weight: 800 !important; }
h3, h4, .fw-semi-bold { font-weight: 700 !important; }
h5, h6, .fw-medium { font-weight: 600 !important; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--ll-font);
    color: var(--bs-heading-color);
}

/*** Button ***/
.btn {
    font-family: var(--ll-font);
    font-weight: 600;
    transition: .5s;
}

.btn-primary {
    --bs-btn-bg: var(--ll-primary);
    --bs-btn-border-color: var(--ll-primary);
    --bs-btn-hover-bg: var(--ll-secondary);
    --bs-btn-hover-border-color: var(--ll-secondary);
    --bs-btn-active-bg: var(--ll-secondary);
    --bs-btn-active-border-color: var(--ll-secondary);
    --bs-btn-disabled-bg: var(--ll-primary);
    --bs-btn-disabled-border-color: var(--ll-primary);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

.btn-outline-primary {
    --bs-btn-color: var(--ll-primary);
    --bs-btn-border-color: var(--ll-primary);
    --bs-btn-hover-bg: var(--ll-primary);
    --bs-btn-hover-border-color: var(--ll-primary);
    --bs-btn-active-bg: var(--ll-primary);
    --bs-btn-hover-color: #fff;
}

.btn-dark {
    --bs-btn-bg: var(--ll-dark);
    --bs-btn-border-color: var(--ll-dark);
    --bs-btn-hover-bg: var(--ll-secondary);
    --bs-btn-hover-border-color: var(--ll-secondary);
}

.btn-primary,
.btn-secondary {
    color: #FFFFFF;
    box-shadow: inset 0 0 0 50px transparent;
}

.btn-primary:hover { box-shadow: inset 0 0 0 0 var(--primary); }
.btn-secondary:hover { box-shadow: inset 0 0 0 0 var(--secondary); }

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

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

/*** Topbar ***/
.topbar {
    background: var(--ll-dark);
}

/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
    font-family: var(--ll-font);
    position: relative;
    margin-inline-start: 25px;
    padding: 35px 0;
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 600;
    outline: none;
    transition: .5s;
}

.navbar-dark .navbar-nav .nav-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--bs-heading-color);
}

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

.navbar-dark .navbar-brand .brand-name { color: #FFFFFF; }

.navbar-dark .navbar-toggler {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.navbar .logo-on-light { display: none; }
.sticky-top.navbar .logo-on-light { display: inline; }
.sticky-top.navbar .logo-on-dark { display: none; }
[data-bs-theme="dark"] .sticky-top.navbar .logo-on-light { display: none; }
[data-bs-theme="dark"] .sticky-top.navbar .logo-on-dark { display: inline; }

@media (max-width: 991.98px) {
    .navbar-dark,
    .sticky-top.navbar-dark {
        position: relative;
        background: var(--bs-body-bg);
    }

    .navbar-dark .navbar-nav .nav-link,
    .navbar-dark .navbar-nav .nav-link.show,
    .sticky-top.navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
        margin-inline-start: 0;
        color: var(--bs-heading-color);
    }

    .navbar-dark .navbar-brand .brand-name { color: var(--primary); }
    .navbar .logo-on-light { display: inline; }
    .navbar .logo-on-dark { display: none; }
    [data-bs-theme="dark"] .navbar .logo-on-light { display: none; }
    [data-bs-theme="dark"] .navbar .logo-on-dark { display: inline; }
}

@media (min-width: 992px) {
    .navbar-dark {
        position: absolute;
        width: 100%;
        top: 0;
        inset-inline-start: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
        z-index: 999;
    }

    .sticky-top.navbar-dark {
        position: fixed;
        background: var(--bs-body-bg);
    }

    .navbar-dark .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: -1px;
        inset-inline-start: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-dark .navbar-nav .nav-link:hover::before,
    .navbar-dark .navbar-nav .nav-link.active::before {
        width: 100%;
        inset-inline-start: 0;
    }

    .navbar-dark .navbar-nav .nav-link.nav-contact::before { display: none; }
    .sticky-top.navbar-dark .navbar-brand .brand-name { color: var(--primary); }
}

/*** Hero (carousel) ***/
.carousel-caption {
    inset: 0;
    background: var(--ll-overlay);
    z-index: 1;
}

.hero-slide img {
    height: 100vh;
    min-height: 560px;
    max-height: 820px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .carousel-caption h5 { font-size: 14px; font-weight: 500 !important; }
    .carousel-caption h1 { font-size: 30px; font-weight: 600 !important; }
}

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

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

/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 150px;
    height: 5px;
    inset-inline-start: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-center::before {
    inset-inline-start: 50%;
    margin-inline-start: -75px;
}

.section-title.section-title-sm::before { width: 90px; height: 3px; }

.section-title::after {
    position: absolute;
    content: "";
    width: 6px;
    height: 5px;
    bottom: 0;
    background: var(--bs-body-bg);
    animation: section-title-run 5s infinite linear;
}

.bg-dark .section-title::after,
.bg-primary .section-title::after { background: #fff; }

.section-title.section-title-sm::after { width: 4px; height: 3px; animation: section-title-run-sm 5s infinite linear; }
.section-title.text-center::after { animation: section-title-run-center 5s infinite linear; }

@keyframes section-title-run {
    0% { inset-inline-start: 0; } 50% { inset-inline-start: 145px; } 100% { inset-inline-start: 0; }
}

@keyframes section-title-run-center {
    0% { inset-inline-start: 50%; margin-inline-start: -75px; }
    50% { inset-inline-start: 50%; margin-inline-start: 45px; }
    100% { inset-inline-start: 50%; margin-inline-start: -75px; }
}

@keyframes section-title-run-sm {
    0% { inset-inline-start: 0; } 50% { inset-inline-start: 85px; } 100% { inset-inline-start: 0; }
}

/*** Service ***/
.service-item {
    position: relative;
    min-height: 300px;
    padding: 30px;
    transition: .5s;
}

.service-item .service-icon {
    margin-bottom: 30px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 2px;
    transform: rotate(-45deg);
    flex: none;
}

.service-item .service-icon i { transform: rotate(45deg); }

.service-item a.btn {
    position: absolute;
    width: 60px;
    bottom: -48px;
    inset-inline-start: 50%;
    margin-inline-start: -30px;
    opacity: 0;
}

.service-item:hover a.btn,
.service-item a.btn:focus-visible {
    bottom: -24px;
    opacity: 1;
}

/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    margin-top: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: var(--bs-border-color);
    border-radius: 2px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active { width: 30px; background: var(--primary); }
.testimonial-carousel .owl-item.center { position: relative; z-index: 1; }
.testimonial-carousel .owl-item .testimonial-item { transition: .5s; }

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--bs-body-bg) !important;
    box-shadow: 0 0 30px var(--ll-shadow);
}

/*** Team ***/
.team-item { transition: .5s; }

.team-social {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.team-social a.btn {
    position: relative;
    margin: 0 3px;
    margin-top: 100px;
    opacity: 0;
}

.team-item:hover { box-shadow: 0 0 30px var(--ll-shadow); }
.team-item:hover .team-social { background: var(--ll-overlay); }

.team-item:hover .team-social a.btn { opacity: 1; margin-top: 0; }
.team-item:hover .team-social a.btn:nth-child(1) { transition: .3s 0s; }
.team-item:hover .team-social a.btn:nth-child(2) { transition: .3s .05s; }
.team-item:hover .team-social a.btn:nth-child(3) { transition: .3s .1s; }
.team-item:hover .team-social a.btn:nth-child(4) { transition: .3s .15s; }

.team-item .team-img img,
.blog-item .blog-img img { transition: .5s; }

.team-item:hover .team-img img,
.blog-item:hover .blog-img img { transform: scale(1.15); }

/*** Miscellaneous ***/
@media (min-width: 991.98px) {
    .facts {
        position: relative;
        margin-top: -75px;
        z-index: 1;
    }
}

.back-to-top {
    position: fixed;
    display: none;
    inset-inline-end: 45px;
    bottom: 45px;
    z-index: 99;
}

.bg-header {
    background: linear-gradient(var(--ll-overlay), var(--ll-overlay)), var(--ll-header-image, url(../img/carousel-1.jpg)) center center no-repeat;
    background-size: cover;
}

.link-animated a { transition: .5s; }
.link-animated a:hover { padding-inline-start: 10px; }

@media (min-width: 767.98px) {
    .footer-about { margin-bottom: -75px; }
}

/* Directional icons point the reading way */
[dir="rtl"] .flip-rtl { display: inline-block; transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .wow { visibility: visible !important; }
}
