/********** Template CSS **********/
:root {
    --primary: #7FA15C;
    --secondary: #1F4D1F;
    --light: #FFFFFF;
    --dark: #1E1916;
}

h4,
h5,
h6,
.h4,
.h5,
.h6 {
    font-weight: 600 !important;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

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


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


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

.btn.btn-primary {
    color: #FFFFFF;
}

.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;
}


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

.navbar .navbar-nav .nav-link {
    padding: 35px 15px;
    color: var(--light);
    outline: none;
}

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

.navbar.fixed-top {
    transition: .5s;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, .3);
        background: var(--dark);
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.header-carousel .owl-carousel-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, .5);
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 600px;
    }

    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .header-carousel .owl-carousel-item p {
        font-size: 16px !important;
    }
}

.header-carousel .owl-nav {
    position: relative;
    width: 80px;
    height: 80px;
    margin: -40px auto 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-carousel .owl-nav::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #FFFFFF;
    transform: rotate(45deg);
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    position: relative;
    font-size: 40px;
    color: var(--primary);
    transition: .5s;
    z-index: 1;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}

.page-header {
    margin-bottom: 6rem;
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** Service ***/
.service-item {
    transition: .5s;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary);
}

.service-item .service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
}

.service-item:hover .service-icon {
    background: var(--dark) !important;
    transform: rotateY(360deg);
}

@media (max-width: 768px) {
    .service-item h5 {
        font-size: 1rem;
    }
    
    .service-item p {
        font-size: 0.875rem;
    }
    
    .service-item .service-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .service-item .service-icon i {
        font-size: 1.5rem;
    }
}


/*** Facts ***/
.fact-item {
    transition: .5s;
}

.fact-item:hover {
    margin-top: -10px;
    background: #FFFFFF !important;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}


/*** About ***/
.img-twice::before {
    position: absolute;
    content: "";
    width: 60%;
    height: 80%;
    top: 10%;
    left: 20%;
    background: var(--primary);
    border: 25px solid var(--light);
    border-radius: 6px;
    z-index: -1;
}


/*** Product ***/
.product-item {
    transition: .5s;
}

.product-item:hover {
    background: var(--primary) !important;
}

.product-item:hover * {
    color: var(--light);
}

.product-item:hover .border-primary {
    border-color: var(--light) !important;
}

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

.product-item:hover .product-overlay {
    height: 100%;
    opacity: 1;
}


/*** Team ***/
.team-item .team-text {
    position: relative;
    height: 100px;
    overflow: hidden;
}

/* ======================
   Responsive Styles
   ====================== */

/* Base responsive adjustments */
@media (max-width: 991.98px) {
    html {
        font-size: 15px;
    }
    
    .py-6 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .my-6 {
        margin-top: 4rem;
        margin-bottom: 4rem;
    }
    
    /* Improve touch targets */
    .btn, button, [role="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Adjust navigation for mobile */
    .navbar-toggler {
        padding: 0.5rem 0.75rem;
        font-size: 1.25rem;
    }
    
    .navbar-collapse {
        padding: 1rem;
        background: var(--dark);
    }
    
    /* Responsive images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Adjust page header */
    .page-header {
        padding: 4rem 0 !important;
    }

    /* Service items responsive */
    .service-item {
        margin-bottom: 1.5rem;
        transition: transform 0.3s ease;
    }
    
    .service-item:hover {
        transform: translateY(-5px);
    }
    
    @media (max-width: 768px) {
        .service-item {
            margin-bottom: 1rem;
        }
        
        .service-item h5 {
            font-size: 1.1rem;
        }
        
        .service-item span {
            font-size: 0.9rem;
        }
    }
    
    .page-header h1 {
        font-size: 2rem !important;
    }
    
    /* Form elements */
    .form-control {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    /* Service cards */
    .service-item {
        margin-bottom: 1.5rem;
        transition: transform 0.3s ease;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .service-item:hover {
        transform: translateY(-5px);
    }
    
    /* Perfect responsive service cards */
    @media (max-width: 991.98px) {
        .service-item {
            margin-bottom: 1.2rem;
        }
        
        .service-item h5 {
            font-size: 1.1rem;
            line-height: 1.3;
        }
        
        .service-item p {
            font-size: 0.85rem;
            line-height: 1.4;
        }
        
        .service-item .btn-square {
            width: 50px;
            height: 50px;
            margin-bottom: 1rem;
        }
    }
    
    @media (max-width: 768px) {
        .service-item {
            margin-bottom: 1rem;
            padding: 1.5rem;
            text-align: center;
        }
        
        .service-item h5 {
            font-size: 1rem;
            margin-bottom: 0.8rem;
        }
        
        .service-item p {
            font-size: 0.8rem;
            line-height: 1.4;
        }
        
        .service-item .btn-square {
            width: 45px;
            height: 45px;
            margin-bottom: 1rem;
        }
        
        .service-item .fa {
            font-size: 1rem;
        }
        
        /* Ensure 3 cards stack properly on mobile */
        .row.g-4 > .col-lg-4 {
            flex: 0 0 100%;
            max-width: 100%;
            margin-bottom: 1rem;
        }
    }
    
    @media (max-width: 575.98px) {
        .service-item {
            padding: 1rem;
        }
        
        .service-item h5 {
            font-size: 0.95rem;
        }
        
        .service-item p {
            font-size: 0.75rem;
        }
        
        .service-item .btn-square {
            width: 40px;
            height: 40px;
        }
        
        .service-item .fa {
            font-size: 0.9rem;
        }
    }
    
    /* Footer adjustments */
    .footer .col-md-4, 
    .footer .col-md-3 {
        margin-bottom: 2rem;
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .py-6 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .my-6 {
        margin-top: 3rem;
        margin-bottom: 3rem;
    }
    
    /* Adjust page header for very small screens */
    .page-header {
        padding: 3rem 0 !important;
    }
    
    .page-header h1 {
        font-size: 1.75rem !important;
    }
    
    /* Adjust spacing */
    .section-title {
        margin-bottom: 2rem;
    }
    
    /* Adjust buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Ensure all clickable elements have proper touch targets */
a, button, [role="button"], input, textarea, select, label {
    touch-action: manipulation;
}

/* Prevent text from being too small on mobile */
body {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

/* Improve form field readability on mobile */
input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
}

/* Ensure content doesn't overflow on small screens */
.container, .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Grid system adjustments */
@media (max-width: 768px) {
    .row.g-4 > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .row.g-4 > .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Responsive iframes and embedded content */
iframe, embed, object, video {
    max-width: 100%;
    height: auto;
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .btn, button, [role="button"], input, select, textarea {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevent horizontal scroll on small devices */
body {
    overflow-x: hidden;
}

/* Ensure content fits viewport */
* {
    box-sizing: border-box;
}

/* Responsive tables */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive iframes */
iframe, embed, object, video {
    max-width: 100%;
    height: auto;
}

.team-item .team-title {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--light);
    transition: .5s;
}

.team-item:hover .team-title {
    top: -100px;
}

.team-item .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 100px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    transition: .5s;
}

.team-item .team-social .btn {
    margin: 0 3px;
}

.team-item:hover .team-social {
    top: 0;
}


/*** Testimonial ***/
.testimonial-carousel .owl-item .testimonial-item img {
    width: 60px;
    height: 60px;
}

.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item .testimonial-item * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

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

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--primary);
    background: var(--dark);
}


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

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

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

.copyright {
    background: #111111;
}

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

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

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #000;
    color: #fff;
    padding: 20px;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out;
}

.cookie-consent.show {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.cookie-consent-text {
    flex: 1;
    min-width: 250px;
}

.cookie-consent-text h4 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

.cookie-consent-text a {
    color: #ffd700;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: #fff;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cookie-consent-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    background: #28a745;
    color: #fff;
    transition: all 0.3s ease;
}

.cookie-consent-buttons button:hover {
    background: #218838;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .cookie-consent {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: calc(100% - 24px);
        max-width: 95%;
        min-width: 280px;
        box-sizing: border-box;
        border-radius: 14px;
        transform: translate(-50%, -50%);
    }

    .cookie-consent.show {
        transform: translate(-50%, -50%);
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-text {
        min-width: auto;
    }

    .cookie-consent-buttons {
        justify-content: center;
        width: 100%;
    }

    .cookie-consent-buttons button {
        width: 100%;
        max-width: 260px;
    }
}

@media (max-width: 576px) {
    .cookie-consent {
        padding: 16px;
    }

    .cookie-consent-text h4 {
        font-size: 1rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }

    .cookie-consent-buttons button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

