/********** Template CSS **********/
* {
    font-family: 'Cairo', sans-serif ;
}
:root {
    --primary: #1f7576; /* Main color — darkened from #2ba2a4: 5.4:1 with white, 4.6:1 with --light */
    --secondary: #f9a84f; /* Updated complementary color */
    --light: #d3f3f3; /* Updated light variant */
    --dark: #0d3333; /* Updated dark variant */
}

body {
    color: #6c6875; /* template default #726D7B was 4.3:1 on --light cards; this is 4.6:1 */
}

.bg-primary {
    background-color: var(--primary) !important; /* or directly with an RGB/RGBA value */
}

.bg-secondary {
    background-color: var(--secondary) !important; /* This would be #f9c74f */
}

.bg-light {
    background-color: var(--light) !important; /* This would be #e0f7f7 */
}

.bg-dark {
    background-color: var(--dark) !important; /* This would be #1a4b4b */
}

.text-primary {
    color: var(--primary) !important; /* or directly with an RGB/RGBA value */
}

.text-secondary {
    color: var(--secondary) !important; /* This would be #f9c74f */
}

.text-light {
    color: var(--light) !important; /* This would be #e0f7f7 */
}

.text-dark {
    color: var(--dark) !important; /* This would be #1a4b4b */
}

.btn-primary {
    background-color: var(--primary) !important; /* This should reflect #2ba2a4 */
    color: #ffffff; /* Text color can be white for contrast */
    border: none; /* Optional: Add if you want no border */
    transition: .3s; /* For smooth hover effect */
}

.btn-primary:hover {
    background-color: var(--dark) !important; /* Optionally change color on hover */
    color: var(--light) !important; /* Change text color for contrast on hover */
}

.btn-secondary {
    background-color: var(--secondary) !important; /* This would be #f9c74f */
    color: var(--dark) !important; /* white on orange was 1.95:1; dark is 7:1 */
}

.btn-light {
    background-color: var(--light) !important; /* This would be #e0f7f7 */
    color: var(--dark) !important; /* Dark text for contrast */
}

.btn-dark {
    background-color: var(--dark) !important; /* This would be #1a4b4b */
    color: #ffffff; /* Light text for contrast */
}


/*** 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;
}

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


/*** Heading ***/
h1,
h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 600 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 500 !important;
}


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

.btn:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}

.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;
    border-radius: 50px;
}


/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f067";
    font-family: "Font Awesome 5 Free";
    font-size: 10px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    position: relative;
    margin-right: 25px;
    padding: 35px 0;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #FFFFFF !important;
    transition: .5s;
}

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

/* Current page shown by underline, not color alone (orange on teal was 1.58:1) */
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #FFFFFF !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

.sticky-top.navbar-light .navbar-nav .nav-link:hover,
.sticky-top.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-light .navbar-brand .h1 {
    color: #FFFFFF;
}

.navbar-light .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-brand img {
    max-height: 45px;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-light {
        position: relative;
        background: #FFFFFF;
    }

    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #DDDDDD;
    }

    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
        color: var(--dark) !important;
    }

    .navbar-light .navbar-nav .nav-link:hover,
    .navbar-light .navbar-nav .nav-link.active,
    .sticky-top.navbar-light .navbar-nav .nav-link:hover,
    .sticky-top.navbar-light .navbar-nav .nav-link.active {
        color: var(--primary) !important;
    }

    .navbar-light .navbar-brand .h1 {
        color: var(--primary);
    }

    .navbar-light .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 992px) {
    .navbar-light {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(256, 256, 256, .1);
        z-index: 999;
    }

    .sticky-top.navbar-light {
        position: fixed;
        background: #FFFFFF;
    }

    .sticky-top.navbar-light .navbar-brand .h1 {
        color: var(--primary);
    }

    .navbar-light .navbar-nav .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar-light .navbar-nav .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }

    .navbar-light .btn {
        color: var(--dark);
        background: #FFFFFF;
    }

    .sticky-top.navbar-light .btn {
        color: var(--dark);
        background: var(--secondary);
    }
}


/*** Hero Header ***/
.hero-header {
    margin-bottom: 6rem;
    padding: 18rem 0;
    background: url(../img/blob-top-left.png),
    url(../img/blob-top-right.png),
    url(../img/blob-bottom-left.png),
    url(../img/blob-bottom-right.png),
    url(../img/blob-center.png),
    url(../img/bg-bottom.png);
    background-position: left 0px top 0px,
    right 0px top 0px,
    left 0px bottom 0px,
    right 0px bottom 0px,
    center center,
    center bottom;
    background-repeat: no-repeat;
}

@media (max-width: 991.98px) {
    .hero-header {
        padding: 6rem 0 9rem 0;
    }
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-transform: uppercase;
}

.section-title span:first-child,
.section-title span:last-child {
    position: relative;
    display: inline-block;
    margin-right: 30px;
    width: 30px;
    height: 2px;
}

.section-title span:last-child {
    margin-right: 0;
    margin-left: 30px;
}

.section-title span:first-child::after,
.section-title span:last-child::after {
    position: absolute;
    content: "";
    width: 15px;
    height: 2px;
    top: 0;
    right: -20px;
}

.section-title span:last-child::after {
    right: auto;
    left: -20px;
}

.section-title.text-primary span:first-child,
.section-title.text-primary span:last-child,
.section-title.text-primary span:first-child::after,
.section-title.text-primary span:last-child::after {
    background: var(--primary);
}

.section-title.text-secondary span:first-child,
.section-title.text-secondary span:last-child,
.section-title.text-secondary span:first-child::after,
.section-title.text-secondary span:last-child::after {
    background: var(--secondary);
}

.section-title.text-white span:first-child,
.section-title.text-white span:last-child,
.section-title.text-white span:first-child::after,
.section-title.text-white span:last-child::after {
    background: #FFFFFF;
}


/* Eyebrow text: orange on white was 1.95:1, so orange stays on the decorative lines only */
.section-title.text-secondary {
    color: var(--dark) !important;
}


/*** Feature ***/
.feature-item {
    transition: .5s;
}

.feature-item:hover {
    margin-top: -15px;
}


/*** About ***/
.progress {
    height: 5px;
}

.progress .progress-bar {
    width: 0px;
    transition: 3s;
}


/*** Fact ***/
.fact {
    margin: 6rem 0;
    background: url(../img/blob-top-left.png),
    url(../img/blob-top-right.png),
    url(../img/blob-bottom-left.png),
    url(../img/blob-bottom-right.png),
    url(../img/blob-center.png);
    background-position: left 0px top 0px,
    right 0px top 0px,
    left 0px bottom 0px,
    right 0px bottom 0px,
    center center;
    background-repeat: no-repeat;
}


/*** Service ***/
.service-item {
    position: relative;
    padding: 45px 30px;
    background: var(--light);
    overflow: hidden;
    transition: .5s;
}

.service-item:hover {
    margin-top: -15px;
    padding-bottom: 60px;
    background: var(--primary);
}

.service-item .service-icon {
    margin: 0 auto 20px auto;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    background: url(../img/blob-primary.png) center center no-repeat;
    background-size: contain;
    transition: .5s;
}

.service-item:hover .service-icon {
    color: var(--dark);
    background: url(../img/blob-secondary.png) center center no-repeat;
    background-size: contain;
}

.service-item .h5,
.service-item p {
    transition: .5s;
}

.service-item:hover .h5,
.service-item:hover p {
    color: #FFFFFF;
}

.service-item a.btn {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px 40px 0 0;
    transition: .5s;
    z-index: 1;
}

.service-item a.btn:hover {
    color: var(--dark);
    background: var(--secondary);
}

.service-item:hover a.btn {
    bottom: 0;
}

/* Keyboard and touch have no hover: show the link anyway */
.service-item:focus-within a.btn {
    bottom: 0;
}

@media (hover: none) {
    .service-item {
        padding-bottom: 60px;
    }

    .service-item a.btn {
        bottom: 0;
    }
}


/*** Project Portfolio ***/
#portfolio-flters li {
    display: inline-block;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: .5s;
    border-bottom: 2px solid transparent;
}

#portfolio-flters button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: var(--primary);
    border-color: var(--primary);
}

.portfolio-item img {
    transition: .5s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item .portfolio-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(31, 117, 118, 0.9);
    transition: .5s;
    opacity: 0;
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-within .portfolio-overlay {
    opacity: 1;
}

/* Touch has no hover: keep the buttons visible in a corner instead of covering the image */
@media (hover: none) {
    .portfolio-item .portfolio-overlay {
        opacity: 1;
        background: none;
        align-items: flex-end;
        justify-content: flex-end;
        padding: 12px;
    }

    .portfolio-item .portfolio-overlay .btn {
        background: rgba(13, 51, 51, .75);
    }
}


/*** Newsletter ***/
.newsletter {
    margin: 6rem 0;
    background: url(../img/blob-top-left.png),
    url(../img/blob-top-right.png),
    url(../img/blob-bottom-left.png),
    url(../img/blob-bottom-right.png),
    url(../img/blob-center.png);
    background-position: left 0px top 0px,
    right 0px top 0px,
    left 0px bottom 0px,
    right 0px bottom 0px,
    center center;
    background-repeat: no-repeat;
}


/*** Testimonial ***/
.testimonial-carousel .testimonial-item {
    padding: 0 30px 30px 30px;
}

.testimonial-carousel .owl-nav {
    display: flex;
    justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--light);
    border-radius: 60px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: #FFFFFF;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}


/*** Team ***/
.team-item .btn {
    color: var(--primary);
    background: #FFFFFF;
}

.team-item .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Footer ***/
.footer {
    margin-top: 6rem;
    padding-top: 9rem;
    background: url(../img/bg-top.png),
    url(../img/map.png);
    background-position: center top,
    center center;
    background-repeat: no-repeat;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid rgba(256, 256, 256, .1);
    border-radius: 40px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

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

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

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

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.footer .copyright a:hover,
.footer .footer-menu a:hover {
    color: #FFFFFF; /* orange on teal fails contrast */
}

.mb-5{
    font-family: 'Cairo', sans-serif !important ;
}
.mb-4{
    font-family: 'Cairo', sans-serif !important ;
}
/*.mb-3{*/
/*    font-family: 'Cairo', sans-serif !important ;*/
/*}*/
.mb-2{
    font-family: 'Cairo', sans-serif !important ;
}
.mb-1{
    font-family: 'Cairo', sans-serif !important ;
}
.mb-0{
    font-family: 'Cairo', sans-serif !important ;
}


.text-white {
    font-family: 'Cairo', sans-serif !important ;
}

/* Headings use Cairo like all other text: Bootstrap sets Jost, which has no Arabic letters */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-family: 'Cairo', sans-serif;
}

.hero-header {
    margin-bottom: 3rem !important;
}

/* ── Scroll animations (replaces animate.css) ────────────────────────── */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.fadeIn { animation-name: fadeIn; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 40px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.fadeInUp { animation-name: fadeInUp; }

@keyframes zoomIn {
    from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
    50%  { opacity: 1; }
    to   { transform: scale3d(1, 1, 1); }
}
.zoomIn { animation-name: zoomIn; }

@keyframes slideInDown {
    from { transform: translate3d(0, -60px, 0); opacity: 0; }
    to   { transform: translate3d(0, 0, 0); opacity: 1; }
}
.slideInDown { animation-name: slideInDown; }

@keyframes slideInLeft {
    from { transform: translate3d(-60px, 0, 0); opacity: 0; }
    to   { transform: translate3d(0, 0, 0); opacity: 1; }
}
.slideInLeft { animation-name: slideInLeft; }

@keyframes slideInRight {
    from { transform: translate3d(60px, 0, 0); opacity: 0; }
    to   { transform: translate3d(0, 0, 0); opacity: 1; }
}
.slideInRight { animation-name: slideInRight; }

@media (prefers-reduced-motion: reduce) {
    .animated { animation: none !important; }
}

/* Logo text is a span.h1 (one real h1 per page); keep the old h1 weight */
.navbar-brand .h1 {
    font-weight: 700 !important;
}

/*** "+N more projects" card: last card in the projects scroller, links to the contact page ***/
.portfolio-more-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 320px;
    padding: 40px 28px;
    text-align: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    box-shadow: 0 10px 30px rgba(31, 117, 118, .25);
    transition: .4s;
}

/* Soft decorative circles */
.portfolio-more-card::before,
.portfolio-more-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.portfolio-more-card::before {
    width: 220px;
    height: 220px;
    top: -80px;
    inset-inline-end: -70px;
}

.portfolio-more-card::after {
    width: 160px;
    height: 160px;
    bottom: -60px;
    inset-inline-start: -50px;
}

.portfolio-more-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(31, 117, 118, .35);
}

.portfolio-more-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 26px;
    background: rgba(255, 255, 255, .15);
}

.portfolio-more-count {
    font-size: clamp(3.5rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1;
}

.portfolio-more-text {
    max-width: 260px;
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.7;
    color: rgba(255, 255, 255, .9);
}

.portfolio-more-card .btn {
    position: relative;
    z-index: 1;
    font-weight: 500;
    color: var(--primary);
}

[dir="rtl"] .portfolio-more-arrow {
    transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-more-card,
    .portfolio-more-card:hover {
        transition: none;
        transform: none;
    }
}

/* Services lift 15px on hover: give the scroller room so the track doesn't clip it */
.hscroll-lift .hscroll-track {
    padding-top: 20px;
}


/*** Horizontal scroller (team, projects, services; 3 cards on desktop, 2 on tablet, 1 and a peek on phones) ***/
.hscroll {
    position: relative;
}

.hscroll-track {
    position: relative; /* containing block for .visually-hidden spans, so the track clips them instead of the page widening */
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px; /* snap to the padded edge, so the start is scrollLeft 0 */
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    padding: 4px 4px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--light);
}

.hscroll-track:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.hscroll-slide {
    flex: 0 0 calc((100% - 48px) / 3);
    scroll-snap-align: start;
}

.team-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
}

.hscroll-nav {
    position: absolute;
    top: 40%;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    font-size: 20px;
    color: #FFFFFF;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    transform: translateY(-50%);
    transition: .3s;
}

.hscroll-nav:hover {
    background: var(--dark);
}

.hscroll-nav:disabled {
    opacity: .35;
    cursor: default;
}

.hscroll-prev {
    inset-inline-start: -24px;
}

.hscroll-next {
    inset-inline-end: -24px;
}

/* Chevrons point the reading direction in Arabic too */
[dir="rtl"] .hscroll-nav i {
    display: inline-block;
    transform: scaleX(-1);
}

@media (max-width: 991.98px) {
    .hscroll-slide {
        flex-basis: calc((100% - 24px) / 2);
    }

    .hscroll-prev {
        inset-inline-start: 0;
    }

    .hscroll-next {
        inset-inline-end: 0;
    }
}

/* Phones: swipe, no arrows */
@media (max-width: 575.98px) {
    .hscroll-slide {
        flex-basis: 85%;
    }

    .hscroll-nav {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hscroll-track {
        scroll-behavior: auto;
    }
}
