.hero-section {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f5f7f6;
    padding: 20px 20px;
    text-align: center;
    z-index: -1;
    transition: opacity 0.5s ease;
    margin-top: 20px;
}

.hero-text h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1a3b22;
    /* dark green */
    margin-bottom: 5px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 16px;
    color: #555;
    max-width: 700px;
    margin: 0 auto 10px auto;
}

.hero-gallery {
    display: flex;
    justify-content: center;
    will-change: opacity, transform;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 80%;
    width: 100%;
    transform-style: preserve-3d;
    perspective: 1600px;
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transform: translateZ(0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    opacity: 0;
    animation: cardSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(-15deg) scale(0.9);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
        filter: blur(0);
    }
}

.image-card:hover {
    transform: translateY(-8px) rotateX(8deg) rotateY(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1));
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.image-card:hover::before {
    opacity: 1;
}

.image-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    backface-visibility: hidden;
}

.image-card:hover img {
    transform: scale(1.08) translateZ(20px);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 140, 0, 0.9);
    color: white;
    text-align: center;
    padding: 20px;
    transform: translateY(100%) translateZ(10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: bold;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    backface-visibility: hidden;
}

.image-card:hover .card-overlay {
    transform: translateY(0) translateZ(20px);
}

/* Sequential animation delays for each card */
.image-card:nth-child(1) {
    animation-delay: 0.1s;
}

.image-card:nth-child(2) {
    animation-delay: 0.3s;
}

.image-card:nth-child(3) {
    animation-delay: 0.5s;
}

.image-card:nth-child(4) {
    animation-delay: 0.7s;
}

.image-card:nth-child(5) {
    animation-delay: 0.9s;
}

.image-card:nth-child(6) {
    animation-delay: 1.1s;
}

/* Add a subtle pulse effect after cards appear */
@keyframes subtlePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.image-card {
    animation: cardSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards,
        subtlePulse 2s ease-in-out 1.5s forwards;
}

.content-wrapper {
    margin-top: 100vh;
    /* equal to hero height */
    position: relative;
    z-index: 1;
}

/* Enhanced hero section animation */
@keyframes fadeInLeftModern {
    0% {
        opacity: 0;
        transform: translateX(-60px) scale(0.98) rotateY(-8deg);
        filter: blur(5px);
    }

    50% {
        opacity: 0.6;
        transform: translateX(-20px) scale(1.01) rotateY(4deg);
        filter: blur(2px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1) rotateY(0);
        filter: blur(0);
    }
}

/* Add staggered animation for image cards with more sophisticated timing */
.image-card {
    opacity: 0;
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(-10deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.image-card:nth-child(1) {
    animation-delay: 0.1s;
}

.image-card:nth-child(2) {
    animation-delay: 0.2s;
}

.image-card:nth-child(3) {
    animation-delay: 0.3s;
}

.image-card:nth-child(4) {
    animation-delay: 0.4s;
}

.image-card:nth-child(5) {
    animation-delay: 0.5s;
}

.image-card:nth-child(6) {
    animation-delay: 0.6s;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 15px 20px 15px;
        height: auto;
        position: relative;
        margin-top: 0;
        top: 5px;
    }

    .hero-text h1 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .hero-text p {
        font-size: 14px;
        padding: 0 10px;
    }

    .hero-gallery {
        margin-top: 20px;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }

    .image-grid img {
        height: 140px;
    }

    .content-wrapper {
        margin-top: 40px;
    }
}


/* section 2 */
.about-section {
    display: flex;
    background: #357400A8;
    padding: 10px 20px;
    /* align-items: center; */
    justify-content: center;
    align-items: center;
    gap: 15px;

}

.about-image {
    flex: 1;
    display: flex;
    /* justify-content: center; */
    /* align-items: center; */
}

.all-vegitables {
    width: 100%;
    height: 95%;
    transform: rotateY(15deg) rotateX(5deg) scale(1.02);
    transform-style: preserve-3d;
    perspective: 1200px;
    /* box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25); */
    border-radius: 12px;
}

.carousel-img.active {
    opacity: 1;
}

.about-content {
    flex: 1;
    color: white;
}

.about-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.about-content h1 span {
    color: #ffffff;
    font-weight: 700;
}

.about-content h1 em {
    font-family: 'Pacifico', cursive;
    font-size: 24px;
    margin-left: 10px;
    color: #ffffff;
}

.about-content p {
    font-size: 16px;
    max-width: 84%;
    line-height: 1.7;
    margin-bottom: 10px;
}

.about-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #f57c00;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary span {
    margin-left: 8px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary span {
    margin-left: 8px;
}


/* section3 */
.vegetable-section {
    display: flex;
    padding: 15px;
    background: white;
    gap: 30px;
    align-items: center;
    /* padding-left: 4%;
    padding-right: 4%; */
}

.carousel-container {
    flex: 1;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    height: 380px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

#carousel-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

#carousel-track img {
    width: 100%;
    height: 100%;
    /* object-fit: contain; */
    flex-shrink: 0;
    padding: 10px 20px;
}

.vegetable-grid {
    flex: 1.5;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.vegetable-card {
    background: #e8f5e9;
    border-radius: 15px;
    height: 190px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.vegetable-card:hover {
    transform: scale(1.05);
    background: #c8e6c9;
}

.vegetable-card img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    /* margin-bottom: 10px; */
}

.vegetable-card h4 {
    font-size: 16px;
    color: #2A3C2C;
    margin-top: 5px;
}

.vegetable-card.active {
    border: 1.5px solid #EF7F1B;
    /* green border for active */
    background: #e8f5e9;
    /* light green background */
    transform: scale(1.05);
    /* slightly bigger */
}


/* mobile responsive  */
@media (max-width: 768px) {

    /* Section 2: About */
    .about-section {
        flex-direction: column;
        padding: 20px 10px;
        text-align: center;
    }

    .about-image {
        width: 100%;
        margin-bottom: 20px;
    }

    .carousel {
        width: 100%;
        max-width: 320px;
        height: 300px;
        margin: 0 auto;
        border: 3px solid #f57c00;
        border-radius: 15px;
        overflow: hidden;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .carousel-img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }

    .carousel-img.active {
        opacity: 1;
        z-index: 1;
    }

    .about-content h1 {
        font-size: 24px;
    }

    .about-content p {
        font-size: 14px;
        max-width: 100%;
        padding: 0 10px;
    }

    .about-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    /* Section 3: Vegetable */
    .vegetable-section {
        flex-direction: column;
        padding: 20px 10px;
    }

    .carousel-container {
        width: 100%;
        height: 250px;
        margin-bottom: 20px;
    }

    .vegetable-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
    }

    .vegetable-card {
        height: auto;
        padding: 10px;
    }

    .vegetable-card img {
        height: 80px;
    }

    .vegetable-card h4 {
        font-size: 14px;
    }
}

/* HD (1280x720) */
@media (min-width: 1350px) and (max-width: 1919px) {
    .hero-section {
        position: fixed;
        top: 30px;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #f5f7f6;
        padding: 20px 20px;
        text-align: center;
        z-index: -1;
        transition: opacity 0.5s ease;
        margin-top: 10px;
    }

    .hero-text h1 {
        font-size: 32px;
        font-weight: 700;
        color: #1a3b22;
        margin-bottom: 5px;
        /* line-height: 1.2; */
        margin-top: 22px;
    }

    .hero-text p {
        font-size: 16px;
        color: #555;
        max-width: 700px;
        margin: 0 auto 0px auto;
        padding-bottom: 8px;
    }

    .hero-gallery {
        display: flex;
        justify-content: center;
    }

    .image-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        max-width: 80%;
        width: 100%;
    }

    .image-grid img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 10px;
    }

    .content-wrapper {
        margin-top: 100vh;
        /* equal to hero height */
        position: relative;
        z-index: 1;
    }
}

/* Full HD (1920x1080) */
@media (min-width: 1920px) {
    .hero-section {
        padding: 40px 60px;
        margin-top: 2%;
    }

    .hero-text h1 {
        font-size: 48px;
        /* margin-bottom: 20px; */
    }

    .hero-text p {
        font-size: 20px;
        max-width: 900px;
        margin-bottom: 20px;
    }

    .image-grid {
        max-width: 82%;
        gap: 5px;
    }

    .image-grid img {

        object-fit: cover;
        height: 320px;
    }

    .about-content h1 {
        font-size: 40px;
        margin-bottom: 20px;
    }

    .about-content h1 span {
        color: #ffffff;
        font-weight: 700;
    }

    .about-content h1 em {
        font-family: 'Poppins', cursive;
        font-size: 40px;
        margin-left: 10px;
        color: #ffffff;
    }

    .about-content p {
        font-size: 20px;
        max-width: 84%;
        line-height: 1.7;
        margin-bottom: 30px;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 20px;
    }

}

/* Mac Devices */
@media (min-width: 1440px) and (max-width: 1919px) and (-webkit-min-device-pixel-ratio: 2) {
    .hero-section {
        padding: 35px 50px;
    }

    .hero-text h1 {
        font-size: 44px;
    }

    .hero-text p {
        font-size: 19px;
        max-width: 850px;
    }

    .image-grid {
        max-width: 92%;
        gap: 22px;
    }

    .image-grid img {
        height: 230px;
    }
}