/********** Template CSS **********/

:root {
    --primary: #06A3DA;
    --secondary: #34AD54;
    --light: #EEF9FF;
    --dark: #091E3E;
    --body-bg: #F6FAFF;
    --body-color: #091E3E;
    --heading-color: #091E3E;
    --muted-color: #6B6A75;
    --card-bg: #ffffff;
    --section-alt-bg: #EEF9FF;
    --border-color: rgba(6, 163, 218, .12);
    --navbar-sticky-bg: rgba(8, 25, 51, .92);
    --footer-bg: #091E3E;
    --footer-bottom-bg: #061429;
    --bs-body-font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

[data-theme="dark"] {
    --body-bg: #0a1424;
    --body-color: #e4eaf3;
    --heading-color: #f2f6fc;
    --muted-color: #aeb9c9;
    --card-bg: #132038;
    --section-alt-bg: #101c30;
    --light: #132038;
    --dark: #e4eaf3;
    --border-color: rgba(6, 163, 218, .2);
    --navbar-sticky-bg: rgba(6, 12, 24, .95);
    --footer-bg: #060e1a;
    --footer-bottom-bg: #040a12;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--body-bg);
    color: var(--body-color);
    font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.75;
    transition: background-color .3s ease, color .3s ease;
}

body *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.bi):not([class^="fa-"]):not([class*=" fa-"]) {
    font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

h1 { font-size: clamp(1.45rem, 3vw, 2rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: clamp(1rem, 1.8vw, 1.2rem); }
h5 { font-size: .95rem; }
h6 { font-size: .88rem; }

.section-title h1 {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem) !important;
}


/*** Spinner ***/
.spinner {
    font-family: 'Vazirmatn' !important ;
    width: 40px;
    height: 40px;
    background: var(--primary);
    margin: 100px auto;
    -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
    animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@-webkit-keyframes sk-rotateplane {
    0% {
        -webkit-transform: perspective(120px)
    }
    50% {
        -webkit-transform: perspective(120px) rotateY(180deg)
    }
    100% {
        -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg)
    }
}

@keyframes sk-rotateplane {
    0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
    }
    50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
    }
    100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        -webkit-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;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Heading ***/
.font-Rtl-Tanha{
    font-family: 'Vazirmatn' !important;
}
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;
}


/*** Button ***/
.btn {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.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-right: 0;
    padding-left: 0;
    text-align: center;
}


/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
    font-family: 'Vazirmatn', sans-serif;
    position: relative;
    margin-right: 25px;
    padding: 30px 0;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 20px 0;
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-dark .navbar-brand h1 {
    color: #FFFFFF;
}

.navbar-dark .navbar-toggler {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.navbar-brand img {
    height: 58px;
    width: auto;
    transition: .35s ease;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-dark {
        position: relative;
        background: rgba(8, 25, 51, .94);
        backdrop-filter: blur(8px);
    }

    .navbar-dark .navbar-nav .nav-link,
    .navbar-dark .navbar-nav .nav-link.show,
    .sticky-top.navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
        color: var(--dark);
    }

    .sticky-top.navbar-dark .navbar-nav .nav-link,
    .sticky-top.navbar-dark .navbar-nav .nav-link.show {
        color: #ffffff;
    }

    .navbar-dark .navbar-brand h1 {
        color: var(--primary);
    }
}

@media (min-width: 992px) {
    .navbar-dark {
        position: absolute;
        width: 100%;
        top: 0;
        right: 0;
        border-bottom: 1px solid rgba(256, 256, 256, .1);
        z-index: 999;
    }
    
    .sticky-top.navbar-dark {
        position: fixed;
        background: var(--navbar-sticky-bg);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, .15);
    }

    .sticky-top.navbar-dark .navbar-brand img {
        height: 50px;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35));
    }

    .navbar-dark .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: -1px;
        right: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-dark .navbar-nav .nav-link:hover::before,
    .navbar-dark .navbar-nav .nav-link.active::before {
        width: 100%;
        right: 0;
    }

    .navbar-dark .navbar-nav .nav-link.nav-contact::before {
        display: none;
    }

    .sticky-top.navbar-dark .navbar-brand h1 {
        color: #ffffff;
    }
}


/*** Carousel ***/
.carousel-caption {
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(9, 30, 62, .7);
    z-index: 1;
}

.carousel-caption h1.display-1,
.carousel-caption .display-1 {
    font-size: clamp(1.1rem, 2.2vw, 1.55rem) !important;
    line-height: 1.55 !important;
    font-weight: 600 !important;
    margin-bottom: .75rem !important;
}

.carousel-caption h1:not(.display-1) {
    font-size: clamp(.95rem, 1.6vw, 1.15rem) !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    margin-bottom: .5rem !important;
}

.carousel-caption h5 {
    font-size: clamp(.85rem, 1.4vw, 1rem) !important;
    font-weight: 500 !important;
    margin-bottom: .5rem !important;
}

.carousel-caption .btn {
    font-size: .9rem;
    padding: .55rem 1.4rem !important;
}

@media (max-width: 576px) {
    .carousel-caption h5 {
        font-size: .8rem !important;
        font-weight: 500 !important;
    }

    .carousel-caption h1.display-1,
    .carousel-caption .display-1 {
        font-size: 1rem !important;
        font-weight: 600 !important;
    }

    .carousel-caption h1:not(.display-1) {
        font-size: .9rem !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.6rem;
    height: 2.6rem;
    background-image: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .6);
    background-color: rgba(255, 255, 255, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.carousel-control-prev-icon::before,
.carousel-control-next-icon::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
}

/* RTL: swap arrow directions */
.carousel-control-prev-icon::before {
    content: "\f105";
}

.carousel-control-next-icon::before {
    content: "\f104";
}


/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 150px;
    height: 5px;
    right: 0;
    bottom: 0;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-center::before {
    right: 50%;
    margin-right: -75px;
}

.section-title.section-title-sm::before {
    width: 90px;
    height: 3px;
}

.section-title::after {
    position: absolute;
    content: "";
    width: 6px;
    height: 5px;
    bottom: 0px;
    background: #FFFFFF;
    -webkit-animation: section-title-run 5s infinite linear;
    animation: section-title-run 5s infinite linear;
}

.section-title.section-title-sm::after {
    width: 4px;
    height: 3px;
}

.section-title.text-center::after {
    -webkit-animation: section-title-run-center 5s infinite linear;
    animation: section-title-run-center 5s infinite linear;
}

.section-title.section-title-sm::after {
    -webkit-animation: section-title-run-sm 5s infinite linear;
    animation: section-title-run-sm 5s infinite linear;
}

@-webkit-keyframes section-title-run {
    0% {right: 0; } 50% { right : 145px; } 100% { right: 0; }
}

@-webkit-keyframes section-title-run-center {
    0% { right: 50%; margin-right: -75px; } 50% { right : 50%; margin-right: 45px; } 100% { right: 50%; margin-right: -75px; }
}

@-webkit-keyframes section-title-run-sm {
    0% {right: 0; } 50% { right : 85px; } 100% { right: 0; }
}


/*** Service ***/
.service-item {
    position: relative;
    height: 300px;
    padding: 0 24px;
    transition: .35s ease;
    border: 1px solid rgba(6, 163, 218, .08);
    box-shadow: 0 8px 24px rgba(9, 30, 62, .08);
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 34px rgba(9, 30, 62, .14);
}

.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);
}

.service-item .service-icon i {
    transform: rotate(45deg);
}

.service-item a.btn {
    position: absolute;
    width: 60px;
    bottom: -48px;
    right: 50%;
    margin-right: -30px;
    opacity: 0;
}

.service-item:hover a.btn {
    bottom: -24px;
    opacity: 1;
}


.blog-item .blog-img img {
    transition: .5s;
}

.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;
    left: 45px;
    bottom: 45px;
    z-index: 99;
}

.bg-header {
    background: linear-gradient(rgba(9, 30, 62, .7), rgba(9, 30, 62, .7)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

/* Topbar vertical alignment fix */
.bg-dark .d-inline-flex[style*="height: 45px"] {
    align-items: center !important;
}

/* Improve media blocks in About/Why sections */
.section-media {
    min-height: 430px !important;
}

.section-media img {
    object-fit: cover;
    object-position: center;
    filter: saturate(1.05) contrast(1.03);
}

.carousel-caption .p-3 {
    background: linear-gradient(180deg, rgba(9, 30, 62, .18), rgba(9, 30, 62, .38));
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    backdrop-filter: blur(3px);
}

.blog-item,
.service-item,
.bg-primary.rounded.h-100,
.bg-light.shadow {
    border-radius: 16px !important;
}

.link-animated a {
    transition: .5s;
}

.link-animated a:hover {
    padding-right: 10px;
}

@media (min-width: 767.98px) {
    .footer-about {
        margin-bottom: -75px;
    }
}

/* Form focus & radius (RTL-friendly) */
.form-control,
.form-select,
textarea {
    border-radius: 14px;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 .25rem rgba(6, 163, 218, .18) !important;
    outline: none;
}

/* Dark mode toggle */
.theme-toggle-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: .3s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, .15);
}

/* Dark mode overrides */
[data-theme="dark"] .bg-light {
    background-color: var(--card-bg) !important;
    color: var(--body-color) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
    color: var(--body-color) !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] body,
[data-theme="dark"] p,
[data-theme="dark"] .section-title h1 {
    color: var(--body-color);
}

/* Bootstrap assigns #091E3E directly to headings, so they need an
   explicit theme-aware color instead of relying on body inheritance. */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .h5,
[data-theme="dark"] .h6 {
    color: var(--heading-color);
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
    color: var(--muted-color) !important;
}

[data-theme="dark"] .service-item,
[data-theme="dark"] .blog-item {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea {
    background-color: #1a2d4a !important;
    color: var(--body-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: rgba(228, 234, 243, .5);
}

[data-theme="dark"] #spinner {
    background-color: var(--body-bg) !important;
}

[data-theme="dark"] .container-fluid.bg-dark {
    background-color: var(--footer-bg) !important;
}

[data-theme="dark"] .container-fluid.text-white[style*="background"] {
    background: var(--footer-bottom-bg) !important;
}

[data-theme="dark"] .section-title::after {
    background: var(--card-bg);
}

[data-theme="dark"] .facts .bg-light {
    background-color: var(--card-bg) !important;
}
