/**********************************/
/* SPS ALFACHEM THEME             */
/* Based on Logo: Green & Rose    */
/**********************************/

:root {
    /* --- BRANDING COLORS --- */
    
    /* Primary: Deep Forest Green (Main Brand Color) */
    --bs-primary: #1B4D3E;
    --bs-primary-rgb: 27, 77, 62; /* REQUIRED for Bootstrap focus rings & shadows */

    /* Accent: Rose Red (From Logo Flower) */
    --sps-rose: #9E1B32;
    --sps-rose-rgb: 158, 27, 50;

    /* --- THEME COLORS --- */
    
    /* Dark: Near Black for footers/text */
    --bs-dark: #111111;
    --bs-dark-rgb: 17, 17, 17;

    /* Light: Off-white with a very subtle green tint */
    --bs-light: #F2F7F4;
    --bs-light-rgb: 242, 247, 244;

    /* Standard White */
    --bs-white: #ffffff;
    
    /* --- GLOBAL COMPONENT SETTINGS --- */
    --bs-link-color: #1B4D3E;
    --bs-link-hover-color: #9E1B32;
}

/**********************************/
/* BOOTSTRAP OVERRIDES            */
/* Forces Green/Rose branding     */
/**********************************/

/* Text & Backgrounds */
.text-primary { color: var(--bs-primary) !important; }
.bg-primary { background-color: var(--bs-primary) !important; }
.border-primary { border-color: var(--bs-primary) !important; }

/* Links */
a { color: var(--bs-primary); transition: 0.3s; }
a:hover { color: var(--sps-rose); }

/* Buttons - Solid */
.btn-primary {
    color: var(--bs-white);
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-primary:hover {
    background-color: var(--sps-rose);
    border-color: var(--sps-rose);
}

/* Buttons - Outline */
.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: var(--bs-white);
    border-color: var(--bs-primary);
}

/* Form Inputs (Focus Glow) */
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(27, 77, 62, 0.25) !important; /* Green Glow */
}

/* Pagination & Active States */
.page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: var(--bs-primary) !important;
}

/**********************************/
/* TEMPLATE STYLES START          */
/**********************************/

/*** Spinner Start ***/
#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;
}
/*** Spinner End ***/

.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    transition: 0.5s;
    z-index: 99;
    background-color: var(--sps-rose); /* Rose accent for call to action */
    color: var(--bs-white);
}

.back-to-top:hover {
    background-color: var(--bs-primary);
}


/*** Button Start ***/
.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 32px;
    height: 32px;
}

.btn-sm-square {
    width: 34px;
    height: 34px;
}

.btn-md-square {
    width: 40px;
    height: 40px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

.btn-xl-square {
    width: 56px;
    height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square,
.btn-xl-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.btn.btn-light {
    color: var(--bs-primary);
    border: none;
}

.btn.btn-light:hover {
    color: var(--bs-white);
    background: var(--sps-rose); /* Rose accent on hover */
}

/*** Navbar Start ***/
.header-top .topbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
    color: var(--sps-rose); /* Rose accent arrow */
}

.header-top .topbar .dropdown .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    background: var(--bs-light);
    padding-top: 12px;
    border: 0;
    transition: .5s;
    opacity: 1;
}

.header-top {
    height: 125px;
    position: relative;
}

.header-top::after {
    content: "";
    position: absolute;
    overflow: hidden;
    width: 50%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--bs-dark);
    z-index: 1;
}

.header-top .container {
    position: relative;
    z-index: 999;
}

@media (min-width: 992px) {
    .header-top::before {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 100%;
        height: 45px;
        top: 0;
        right: 0;
        background: var(--bs-dark);
        z-index: -1;
    }

    .navbar-brand-2 {
        display: none;
    }
}

@media (max-width: 991px) {
    .header-top {
        max-height: 80px;
    }

    .navbar {
        justify-content: space-between;
    }

    .header-top .container {
        max-height: 80px;
    }

    .navbar-brand {
        display: none;
    }

    .navbar-brand-2 {
        position: relative;
        overflow: hidden;
        width: 200px;
        height: 100%;
        padding: 0;
        display: flex;
        align-items: center;
        z-index: 99;
    }

    .navbar-brand-2::before {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 100%;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--bs-dark);
        transform: rotate(-18deg);
        z-index: -1;
    }

    /* Mobile Brand Accent Strip */
    .navbar-brand-2::after {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 5px;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--sps-rose); /* Changed to Rose Red */
        transform: rotate(-18deg);
        z-index: -1;
    }

    .navbar.navbar-light {
        height: 100%;
        padding: 0;
    }

    .navbar .navbar-collapse {
        margin-top: -20px;
    }

}

.nav-bar .navbar {
    height: 100%;
    background: var(--bs-white);
    position: relative;
    z-index: 9;
}

.navbar-light .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.nav-bar .navbar-light .navbar-brand img {
    max-height: 50px;
}

.navbar .navbar-nav .nav-item .nav-link {
    padding: 0;
}

.navbar .navbar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 20px;
}

.navbar-light .navbar-nav .nav-item:hover,
.navbar-light .navbar-nav .nav-item.active,
.navbar-light .navbar-nav .nav-item:hover .nav-link,
.navbar-light .navbar-nav .nav-item.active .nav-link {
    color: var(--bs-primary);
}

@media (max-width: 991px) {
    .navbar {
        padding: 20px 0;
    }

    .navbar .navbar-nav .nav-link {
        padding: 0;
    }

    .navbar .navbar-nav .nav-item {
        display: flex;
        padding: 12px;
        flex-direction: column;
        justify-content: start;
        align-items: start;
    }

    .navbar .navbar-nav .nav-btn {
        display: flex;
        justify-content: start;
    }

    .navbar .navbar-nav {
        width: 100%;
        display: flex;
        margin-top: 20px;
        padding-bottom: 20px;
        margin-left: 50px;
        background: var(--bs-light);
    }

    .navbar .navbar-nav .nav-btn {
        display: flex;
        flex-direction: column;
    }

    .navbar .navbar-nav .nav-btn a.btn {
        margin-right: 15px;
    }

    .navbar.navbar-expand-lg .navbar-toggler {
        padding: 8px 15px;
        border: 1px solid var(--bs-primary);
        color: var(--bs-primary);
    }
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
}

.dropdown .dropdown-menu .dropdown-item:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

@media (min-width: 992px) {
    .nav-bar .navbar::before {
        position: absolute;
        content: "";
        width: 50px;
        height: 100%;
        top: 0;
        left: -49px;
        background: var(--bs-white);
    }

    .navbar .nav-btn {
        display: flex;
        align-items: center;
        justify-content: end;
    }

    .navbar .navbar-nav {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--bs-light);
        border-radius: 10px;
    }

    .navbar .navbar-nav .nav-btn {
        width: 100%;
        display: flex;
        margin-left: auto;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        border: 0;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        margin-top: 19px;
        background: var(--bs-white);
        transition: .5s;
        opacity: 1;
    }

    .header-top .navbar-brand {
        position: relative;
        overflow: hidden;
        padding: 40px 50px 40px 0;
        z-index: 99;
    }
    
    .navbar-brand::before {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 300px;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--bs-dark);
        transform: rotate(-18deg);
        z-index: -1;
    }
    
    /* Desktop Brand Accent Strip */
    .navbar-brand::after {
        content: "";
        position: absolute;
        overflow: hidden;
        width: 5px;
        height: 600px;
        top: -200px;
        right: 18px;
        background: var(--sps-rose); /* Changed to Rose Red */
        transform: rotate(-18deg);
        z-index: -1;
    }
}
/*** Navbar End ***/


/*** Carousel Hero Header Start ***/
.hero-section {
    background-image: url(../img/carousel-1.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    width: 100%;
    height: 700px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-bg-half-1 {
    background-image: url(../img/header-2.jpeg);
    clip-path: polygon(37% 0%, 100% 0%, 100% 100%, 0% 100%);
    filter: grayscale(10%);
    transform: scale(100% - 50%);
    background-position: center right;
    background-repeat: no-repeat;
    background-size: cover;
    position: absolute;
    width: 58%;
    height: 100%;
    right: 0;
    top: 0;
}

.hero-bg-half-2 {
    background-image: url(../img/header-1.jpeg);
    clip-path: polygon(37% 0%, 100% 0%, 100% 100%, 0% 100%);
    filter: grayscale(10%);
    transform: scale(100% - 50%);
    background-position: center right;
    background-repeat: no-repeat;
    background-size: cover;
    position: absolute;
    width: 58%;
    height: 100%;
    right: 0;
    top: 0;
}

/* Hero Shape 1 - Primary Green */
.hero-shape-1 {
    background-color: var(--bs-primary);
    width: 150px;
    height: 50%;
    position: absolute;
    left: 54%;
    top: 0;
    transform: translateY(-50%) skew(-26deg, 0deg);
    position: relative;
}

.hero-shape-1:before {
    background-color: var(--bs-dark);
    content: "";
    width: 50%;
    height: 80%;
    position: absolute;
    right: 0;
    top: 0;
}

/* Hero Shape 2 - Dark with Rose Accent */
.hero-shape-2 {
    background-color: var(--bs-dark);
    width: 150px;
    height: 50%;
    position: absolute;
    right: -43%;
    bottom: 0;
    transform: translateY(50%) skew(-25deg, 0deg);
    position: relative;
    z-index: 1;
}

.hero-shape-2::after {
    background-color: var(--sps-rose); /* Changed to Rose Red */
    content: "";
    width: 75px;
    height: 80%;
    position: absolute;
    right: 0;
    bottom: 0;
}

/*** Carousel Hero Header Start ***/
.header-carousel .header-carousel-item {
    height: 700px;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bs-white);
    color: var(--bs-primary);
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
}

.header-carousel .owl-nav .owl-prev {
    bottom: 30px;
    left: 0;
}
.header-carousel .owl-nav .owl-next {
    bottom: 30px;
    right: 0;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    box-shadow: inset 0 0 65px 0 var(--bs-primary);
    color: var(--bs-dark);
}

.header-carousel .header-carousel-item .carousel-caption {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .2);
    display: flex;
    align-items: center;
    z-index: 9;
}

@media (max-width: 991px) {
    .header-carousel .header-carousel-item .carousel-caption {
        padding-top: 45px;
    }

    .header-carousel.owl-carousel,
    .header-carousel .header-carousel-item {
        height: 700px;
    }
}
/*** Carousel Hero Header End ***/


/*** Single Page Hero Header Start ***/
.bg-breadcrumb {
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(27, 77, 62, 0.8), rgba(0, 0, 0, 0.7)), url(../img/banner-img.jpg); /* Green tint */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 60px 0 60px 0;
    transition: 0.5s;
}

.bg-breadcrumb .breadcrumb {
    position: relative;
}

.bg-breadcrumb .breadcrumb .breadcrumb-item a {
    color: var(--bs-white);
}
/*** Single Page Hero Header End ***/

/*** Service Start ***/
.service .nav .nav-item {
    width: 75%;
    border: 1px solid var(--bs-primary);
    background: var(--bs-light);
}

.service .nav .nav-item a {
    display: flex;
    justify-content: center;
}


.owl-stage-outer {
    margin-right: -1px;
}
.service .nav-item a.active {
    background: var(--bs-primary);
}

.service .nav-item a span {
    color: var(--bs-dark);
}

.service .nav-item a.active span {
    color: var(--bs-white);
}

.service-carousel .owl-nav .owl-prev,
.service-carousel .owl-nav .owl-next {
    position: absolute;
    padding: 10px 35px;
    border: 1px solid var(--bs-primary);
    color: var(--bs-dark);
    background: var(--bs-light);
    transition: 0.5s;
}

.service-carousel .owl-nav .owl-prev:hover,
.service-carousel .owl-nav .owl-next:hover {
    background: var(--sps-rose); /* Hover Rose Accent */
    color: var(--bs-white);
    border-color: var(--sps-rose);
}

@media (min-width: 992px) {
    .service-carousel .owl-nav .owl-prev {
        top: 0;
        left: -115px;
    }
    
    .service-carousel .owl-nav .owl-next {
        bottom: 0;
        left: -115px;
    }
}

@media (max-width: 991px) {
    .owl-stage-outer {
        margin-bottom: 70px;
    }
    .service-carousel .owl-nav .owl-prev {
        bottom: -70px;
        left: 0;
    }

    .service-carousel .owl-nav .owl-next {
        bottom: -70px;
        right: 0;
    }

    .service .nav {
        display: flex;
        justify-content: center;
    }
}
/*** Service End ***/

/*** Team Start ***/
.team .team-item .team-img {
    position: relative;
    overflow: hidden;
}

.team .team-item .team-img img {
    transition: 0.5s;
}

.team .team-item:hover .team-img img {
    transform: scale(1.1);
}

.team .team-item .team-img .team-icon {
    position: absolute;
    bottom: 20px; right: -100%;
    z-index: 9;
    transition: 0.5s;
}

.team .team-item:hover .team-img .team-icon {
    right: 25px;
}

.team .team-item .team-img::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    background: rgba(27, 77, 62, 0.4); /* Forest Green Overlay */
    transition: 0.5s;
    z-index: 1;
}

.team .team-item:hover .team-img::after {
    height: 100%;
}

.team .team-item .team-content {
    transition: 0.5s;
}

.team .team-item:hover .team-content {
    box-shadow: 0 0 20px rgba(0, 0, 0, .2);
}
/*** Team End ***/

/*** Testimonial Start ***/
.testimonial-carousel .owl-stage-outer {
    margin-right: -1px;
}

.testimonial .testimonial-item {
    position: relative;
    margin-top: 35px;
}

.testimonial .testimonial-item .customer-text {
    border: 1px solid var(--bs-primary);
    border-top: none;
}

.testimonial .testimonial-item .testimonial-quote {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 0;
    right: 25px;
    transform: translateY(-50%);
    color: var(--bs-white);
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial .testimonial-item .testimonial-inner {
    display: flex;
    align-items: center;
    background: var(--bs-white);
}

.testimonial .testimonial-item .testimonial-inner img {
    width: 100px; 
    height: 100px;
    border: 2px solid var(--bs-primary);
}

.testimonial-carousel .owl-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.testimonial-carousel .owl-dots .owl-dot {
    width: 30px;
    height: 30px;
    margin: 30px 10px 0 10px;
    background: var(--bs-white);
    transition: 0.5s;
    border: 1px solid var(--bs-primary);
}

@media (max-width: 991px) {
    
    .testimonial-carousel .owl-dots .owl-dot {
        margin: 0 10px 0 10px;
    }
}


.testimonial-carousel .owl-dots .owl-dot.active {
    width: 30px;
    height: 30px;
    background: var(--bs-primary);
    transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot span {
    position: relative;
    margin-top: 50%;
    margin-left: 50%;
    transform: translate(-50%, -50%);
    margin-right: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.testimonial-carousel .owl-dots .owl-dot.active span::after {
    background: var(--bs-white);
}

.testimonial-carousel .owl-dots .owl-dot span::after {
    content: "";
    width: 15px;
    height: 15px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--sps-rose); /* Center dot is Rose when inactive */
    transition: 0.5s;
}
/*** Testimonial End ***/

/*** Footer Start ***/
.footer {
    background: var(--bs-dark);
}

.footer .footer-item a {
    line-height: 35px;
    color: var(--bs-white);
    transition: 0.5s;
}

.footer .footer-item p {
    line-height: 35px;
}

.footer .footer-item a:hover {
    letter-spacing: 1px;
    color: var(--sps-rose); /* Footer links hover to Rose */
}

.footer .footer-item .footer-btn a {
    transition: 0.5s;
}

.footer .footer-item .footer-btn a:hover {
    background: var(--bs-white);
}

.footer .footer-item .footer-btn a:hover {
    color: var(--bs-primary);
}
/*** Footer End ***/

/*** copyright Start ***/
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bs-dark);
}
/*** copyright end ***/
/* --- NEW CENTERED HEADER STYLES (FINALIZED) --- */

/* 1. Logo Styling */
.brand-centered-logo {
    max-height: 110px;
    width: auto;
    transition: transform 0.3s ease;
}

.brand-centered-logo:hover {
    transform: scale(1.02); 
}

/* 2. Navigation Link Styling */
.custom-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    color: #444 !important;    
    padding: 15px 25px !important; 
    letter-spacing: 0.5px;
    position: relative;
}

/* Hover Effect - Corrected to your Brand Green */
.custom-nav-link:hover,
.custom-nav-link.active {
    color: var(--bs-primary) !important; /* FIXED: Now uses your green */
}

/* 3. CENTERED DROPDOWN FIXES */
@media (min-width: 992px) {
    .centered-dropdown {
        /* Removes the gap so the menu doesn't disappear */
        margin-top: 0 !important; 
        top: 100%; 
        
        /* Forces horizontal centering */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        
        /* Visual Styling */
        text-align: center;
        min-width: 200px;
        border-radius: 0 0 8px 8px; /* Round bottom corners only */
        border-top: 3px solid var(--sps-rose); /* FIXED: Rose accent line on top */
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    }
}

/* 4. Dropdown Item Styling */
.dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--bs-light); /* Light background */
    color: var(--bs-primary); /* Green text on hover */
}

/* 5. Mobile Adjustments */
@media (max-width: 991px) {
    .brand-centered-logo {
        max-height: 80px; 
    }
    .custom-nav-link {
        text-align: center;
        padding: 12px !important;
        border-bottom: 1px solid #f0f0f0;
    }
}
/* --- FINAL GAP FIX --- */

/* 1. Kill the gap caused by the old template */
@media (min-width: 992px) {
    .navbar .nav-item:hover .dropdown-menu {
        margin-top: 0 !important; /* Overrides the old 19px gap */
        top: 100%;
    }

    /* 2. Double-check centering */
    .centered-dropdown {
        margin-top: 0 !important;
        top: 100%;
        left: 50% !important;
        transform: translateX(-50%) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-top: 3px solid var(--sps-rose);
    }
    
    /* 3. The "Invisible Bridge" (Fail-safe) 
       This creates an invisible block to bridge any remaining tiny gaps 
       so the mouse doesn't lose focus. */
    .centered-dropdown::before {
        content: "";
        position: absolute;
        top: -20px; /* Extends invisible area upwards */
        left: 0;
        width: 100%;
        height: 20px;
        background: transparent;
    }
}