/********** Template CSS - Modified for Noor Sama theme **********/
:root {
    /* Core brand colors extracted from the Noor Sama logo */
    --primary: #4BB4A6;    /* teal/green - main brand color */
    --secondary: #F2B94A;  /* gold - accent */
    --light: #F7F7F7;      /* very light background */
    --dark: #1C1C1C;       /* dark text / near-black */
    --dark-rgba: 28,28,28; /* for rgba usage */
}

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

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

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

/* Buttons */
.btn {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    transition: .5s;
}

/* Primary / secondary buttons use brand colors */
.btn-primary,
.btn-secondary {
    color: var(--light);
    border-radius: 6px;
}

.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
}
.btn-secondary {
    background: var(--secondary);
    border: 1px solid var(--secondary);
}

/* Hover swaps or slightly darkens */
.btn-primary:hover {
    background: color-mix(in srgb, var(--primary) 85%, black 15%);
    border-color: color-mix(in srgb, var(--primary) 85%, black 15%);
}
.btn-secondary:hover {
    background: color-mix(in srgb, var(--secondary) 90%, black 10%);
    border-color: color-mix(in srgb, var(--secondary) 90%, black 10%);
}

/* Square button sizes */
.btn-square { width: 36px; height: 36px; }
.btn-sm-square { width: 28px; height: 28px; }
.btn-lg-square { width: 46px; height: 46px; }

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

/* 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 */
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/* Top-shape decoration using secondary color for contrast */
.top-shape::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 100%;
    top: 0;
    left: -17px;
    background: var(--secondary);
    transform: skew(40deg);
}

/* Navbar link styles */
.navbar-light .navbar-nav .nav-link {
    font-family: 'Jost', sans-serif;
    padding: 35px 15px;
    font-size: 18px;
    color: var(--dark);
    outline: none;
    transition: .35s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 15px;
}

/* active / hover use brand primary */
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

/* Carousel caption overlay - tuned to brand dark */
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--dark-rgba), .75); /* semi-dark overlay */
    z-index: 1;
}

@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 decoration uses brand colors */
.section-title h5::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 3px;
    right: -55px;
    bottom: 11px;
    background: var(--primary);
}

.section-title h5::after {
    position: absolute;
    content: "";
    width: 15px;
    height: 3px;
    right: -75px;
    bottom: 11px;
    background: var(--secondary);
}

/* Hero header: use image with a gentle brand-colored overlay */
.hero-header {
    background:
        linear-gradient(180deg, rgba(var(--dark-rgba),0.55) 0%, rgba(var(--dark-rgba),0.55) 100%),
        url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

/* Services / team transitions */
.service-item img,
.service-item .bg-light,
.service-item .bg-light h5,
.team-item .team-text {
    transition: .5s;
}

.service-item:hover img {
    transform: scale(1.12);
}

/* Decorative shadow under cards on hover tuned to brand dark */
.team-item .team-text::after,
.service-item .bg-light::after {
    position: absolute;
    content: "";
    top: 50%;
    bottom: 0;
    left: 15px;
    right: 15px;
    border-radius:100px / 15px;
    box-shadow: 0 10px 30px rgba(28,28,28, .45);
    opacity: 0;
    transition: .5s;
    z-index: -1;
}

.team-item:hover .team-text::after,
.service-item:hover .bg-light::after {
    opacity: 1;
}

/* small utilities */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }

/* set default body background and text */
body {
    background: var(--light);
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* footer and other dark blocks */
.bg-dark {
    background: linear-gradient(180deg, #051225 0%, rgba(var(--dark-rgba), 1) 100%);
    color: var(--light);
}

/* ensure good contrast for small text on colored backgrounds */
small, .small {
    color: rgba(var(--dark-rgba), .7);
}

/* accessibility: focus outlines for keyboard navigation */
a:focus, button:focus, input:focus {
    outline: 3px solid rgba(var(--primary), .15);
    outline-offset: 2px;
}

/* كروت موحّدة للصور (خدمات + معدات) */
.ns-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5f1f4;
    transition: .3s;
}

.ns-card:hover {
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
    transform: translateY(-4px);
}

/* توحيد مقاس الصور */
.ns-card-img {
    width: 100%;
    height: 260px;       /* نفس الارتفاع لكل الصور */
    object-fit: cover;   /* يقتص الصورة بدون تشويه */
    display: block;
}

/* تحسين العرض في الموبايل */
@media (max-width: 767.98px) {
    .ns-card {
        margin-bottom: 1.5rem;
    }
    .ns-card-img {
        height: 210px;   /* ارتفاع أقل للموبايل */
    }
}

