/********** Template CSS **********/

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


/*** BG, Color & Fonts ***/
.open-sans-regular {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

.open-sans-bold {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

.comic-relief-regular {
    font-family: "Comic Relief", system-ui, sans-serif;
    font-weight: 400;
    font-style: normal;
}

.comic-relief-bold {
    font-family: "Comic Relief", system-ui, sans-serif;
    font-weight: 700;
    font-style: normal;
}


/*** Button ***/
.btn-custom {
    padding: 10px 25px;
    font-family: "Comic Relief", system-ui, sans-serif;
    font-weight: 400;
    transition: .5s;
}

.btn-square {
    width: 45px;
    height: 45px;
}

.btn-sm-square {
    width: 35px;
    height: 35px;
}

.btn-lg-square {
    width: 55px;
    height: 55px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
}

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


/*** Navbar ***/
.navbar,
.matro-navbar,
.agrovia-navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: all .3s ease;
    background: rgba(18, 22, 28, 0.96) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding: 10px 0;
}

.navbar.scrolled,
.matro-navbar.scrolled,
.agrovia-navbar.scrolled {
    background: rgba(13, 16, 21, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 6px 0;
}

/* Fix Tailwind CSS conflict: Tailwind sets .collapse { visibility: collapse } which hides the navbar */
.navbar .navbar-collapse.collapse,
.matro-navbar .navbar-collapse.collapse,
.agrovia-navbar .navbar-collapse.collapse {
    visibility: visible !important;
}

.navbar .navbar-collapse.collapse:not(.show),
.matro-navbar .navbar-collapse.collapse:not(.show),
.agrovia-navbar .navbar-collapse.collapse:not(.show) {
    display: none !important;
}

@media (min-width: 992px) {
    .navbar.navbar-expand-lg .navbar-collapse.collapse,
    .matro-navbar.navbar-expand-lg .navbar-collapse.collapse,
    .agrovia-navbar.navbar-expand-lg .navbar-collapse.collapse {
        display: flex !important;
        visibility: visible !important;
    }
}

.navbar .navbar-brand {
    text-decoration: none;
    font-family: "Comic Relief", system-ui, sans-serif;
    color: #fff !important;
}

.navbar .navbar-nav .nav-link {
    margin-right: 0;
    padding: 8px 14px;
    font-family: "Comic Relief", system-ui, sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    border-radius: 6px;
    outline: none;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
    color: var(--bs-primary) !important;
    background: rgba(120, 162, 47, 0.15);
}

.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary) !important;
    font-weight: 700;
}

.navbar .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 8px;
    padding: 6px 10px;
}

.navbar .navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(120, 162, 47, 0.5);
}

.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff !important;
}

.navbar .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff !important;
}

.cartCountBadge {
    font-size: 11px;
    padding: 3px 6px;
    font-weight: 700;
}

.navbar .dropdown-menu {
    background: rgba(18, 22, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
}

.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    padding: 8px 18px;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    color: #fff;
    background: rgba(120, 162, 47, 0.25);
    padding-left: 22px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-collapse {
        border-radius: 14px;
        padding: 16px 18px;
        margin-top: 10px;
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 14px;
        margin-bottom: 2px;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 0;
        top: 130%;
        opacity: 0;
        visibility: hidden;
        transition: .3s;
    }

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


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 100px;
    background: rgba(24, 24, 24, .5);
    z-index: 1;
}

#header-carousel .carousel-control-prev,
#header-carousel .carousel-control-next {
    width: 10%;
    margin-top: 100px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 992px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 500px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    max-height: 500px;
    overflow: hidden;
}

.page-header .page-header-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 100px;
    background: rgba(24, 24, 24, .5);
    z-index: 1;
}

@media (max-width: 992px) {
    .page-header .page-header-caption {
        padding-top: 65px;
    }
}


/*** Section Title ***/
.section-title {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}


/*** About ***/
@media (max-width: 767.98px) {
    .about-items-2 .border-end {
        border-right: none !important;
    }
}

@media (min-width: 768px) {
    .about-items-2 .border-bottom {
        border-bottom: none !important;
    }
}


/*** Service ***/
.service-item * {
    position: relative;
    z-index: 1;
}

.service-item::after {
    position: absolute;
    content: "";
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0;
    background: var(--bs-primary);
    border-radius: 15px;
    transition: .5s;
}

.service-item:hover::after {
    height: 100%;
}

.service-item img {
	filter: blur(3px);
	transition: .5s;
}

.service-item:hover img {
	filter: blur(0);
}

.service-item .btn-lg-square {
    background: rgba(255, 255, 255, .5)
}

.service-item:hover .btn-custom {
    background: var(--bs-white);
}

.service-item:hover .btn-custom::before {
    background: var(--bs-primary);
}


/*** Team ***/
.team-item::after {
    position: absolute;
    content: "";
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0;
    background: var(--bs-primary);
    border-radius: 15px;
    transition: .5s;
}

.team-item:hover::after {
    height: 100%;
}

.team-item * {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.team-item:hover img {
    transform: scale(1.2);
    filter: blur(3px);
}

.team-item .team-social {
    transition: .5s;
    opacity: 0;
}

.team-item:hover .team-social {
    opacity: 1;
}


/*** Blog ***/
.blog-item::after {
    position: absolute;
    content: "";
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    background: var(--bs-primary);
    border-radius: 15px;
    transition: .5s;
}

.blog-item:hover::after {
    height: 100%;
}

.blog-item * {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.blog-item hr {
    width: 30px;
    height: 2px;
}

.blog-item:hover img {
    transform: scale(1.2);
    filter: blur(3px);
}

.blog-item a:hover {
    color: var(--bs-white);
}


/*** Newsletter ***/
.newsletter {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}


/*** Footer ***/
.footer {
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--bs-light);
    font-family: "Open Sans", sans-serif;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

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

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


/*** Copyright ***/
.copyright a {
    color: var(--bs-primary);
}

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


/*** Floating Toast Notification ***/
.agrovia-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    min-width: 320px;
    max-width: 420px;
    background: #ffffff;
    border-left: 5px solid var(--bs-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    display: none;
    font-family: "Open Sans", sans-serif;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/*** Global Search Modal ***/
#searchModal .modal-content {
    border-radius: 16px;
    border: none;
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.search-input {
    font-size: 1.15rem;
    padding: 14px 20px;
    border: 2px solid var(--bs-primary);
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.25);
    border-color: var(--bs-primary);
}

.search-result-item {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    border-left: 4px solid transparent;
}

.search-result-item:hover {
    background: #edf7ed;
    border-left-color: var(--bs-primary);
    transform: translateX(4px);
    color: inherit;
}

.search-result-title {
    font-weight: 700;
    color: #1b3815;
    margin-bottom: 2px;
}

.search-result-desc {
    font-size: 0.88rem;
    color: #6c757d;
    margin: 0;
}


/*** Star Rating Selector ***/
.rating-stars i {
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
    color: #e0e0e0;
}

.rating-stars i.active,
.rating-stars i:hover,
.rating-stars i.hover {
    color: #ffc107 !important;
}

.rating-stars i:hover {
    transform: scale(1.2);
}


/*** Filter Buttons ***/
.agro-filter-btn {
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
    background: transparent;
    padding: 8px 22px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-family: "Comic Relief", system-ui, sans-serif;
    font-size: 0.95rem;
}

.agro-filter-btn:hover,
.agro-filter-btn.active {
    background: var(--bs-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.28);
}


/*** Pricing Billing Toggle ***/
.billing-toggle-container {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}

.billing-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    margin: 0 12px;
}

.billing-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.billing-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.billing-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.billing-switch input:checked + .billing-slider {
    background-color: var(--bs-primary);
}

.billing-switch input:checked + .billing-slider:before {
    transform: translateX(26px);
}


/*** Metric Cards & Feature Badges ***/
.metric-card {
    border-bottom: 4px solid var(--bs-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
}

.agro-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #edf7ed;
    color: #1b5e20;
    margin: 3px;
    border: 1px solid #c8e6c9;
}
