html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Adjust back-to-top button for mobile */
@media (max-width: 768px) {
    #backToTop {
        right: 16px;
        bottom: 24px;
        z-index: 10;
    }
}

/* Ensure all elements stay within viewport */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Smooth scroll on the entire page */
}

#sideMenu {
    z-index: 999
}

header {
    z-index: 99;
}

.carousel-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    flex: 0 0 calc(25% - 20px);
    margin: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    position: relative;
    height: 400px;
    /* Fixed height for all cards */
    display: flex;
    flex-direction: column;
}

.carousel-item img {
    width: 100%;
    height: 150px;
    /* Fixed height for images */
    object-fit: cover;
    /* Ensures images fill space without distortion */
    border-radius: 8px;
    margin-bottom: 15px;
}

.carousel-item h3 {
    color: rgba(8, 145, 178, 1);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.carousel-item p {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-grow: 1;
    /* Makes text take remaining space */
}

@media (max-width: 768px) {

    .prev,
    .next {
        top: 140px !important;
    }
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(8, 145, 178, 1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.prev:hover,
.next:hover {
    background: rgb(36, 123, 145);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev.disabled,
.next.disabled {
    background: rgb(79, 104, 110);
    cursor: not-allowed;
}

@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(33.33% - 20px);
        height: 380px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(50% - 20px);
        height: 360px;
    }

    .carousel-item img {
        width: 100%;
        height: 80px;
        /* Fixed height for images */
        object-fit: cover;
        /* Ensures images fill space without distortion */
        border-radius: 8px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        flex: 0 0 calc(100% - 20px);
        height: 350px;
    }

    .carousel-item img {
        width: 100%;
        height: 80px;
        /* Fixed height for images */
        object-fit: cover;
        /* Ensures images fill space without distortion */
        border-radius: 8px;
        margin-bottom: 15px;
    }
}

.learn-more {
    background-color: rgba(8, 145, 178, 1);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* New product card overlay and button styling */
.product-card {
    position: relative;
}

.product-card img {
    border-radius: 12px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 20px;
}

.overlay .order-button {
    background-color: rgba(8, 145, 178, 1);
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.overlay .order-button:hover {
    background-color: rgba(6, 182, 212, 1);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
        /* Starts slightly below */
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        /* Ends at normal position */
    }
}

/* Applying the animation to elements */
.animate-fade-up {
    animation: fadeInUp 1.5s ease-out forwards;
}

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 1.5rem;
}

.contact-button {
    display: flex;
    align-items: center;
    background-color: rgba(8, 145, 178, 1);
    /* green-600 */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: background-color 0.3s;
    text-decoration: none;
}

.contact-button:hover {
    background-color: rgba(6, 182, 212, 1);
    /* green-400/500 */
}

.button-icon {
    margin-left: 0.5rem;
}

/* Mobile styles (icon only) */
@media (max-width: 767px) {
    .button-container {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .contact-button {
        width: 3rem;
        height: 3rem;
        padding: 0;
        justify-content: center;
    }

    .button-text {
        display: none;
    }

    .button-icon {
        margin: 0;
        font-size: 1.25rem;
    }
}

.faq-item p {
    transition: all 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    /* Adjust based on your content */
}

.faq-item h3 {
    transition: color 0.2s;
}

.faq-item:hover h3 {
    color: rgba(6, 182, 212, 1);
    /* Slightly darker green on hover */
}

.faq-answer ul li {
    position: relative;
    padding-left: 5px;
}

.hidden {
    display: none;
}