:root {
    --main-color: #055F00; 
    --hover-color: #0A7B00;
}
/* Desktop (4 cards per row) */
@media (min-width: 1024px) {
    .categories-container,
    .package-container {
        max-width: calc(250px * 4 + 20px * 3); /* 4 cards max with spacing */
    }
    
    .team-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 20px;
        max-width: calc(250px * 3 + 20px * 2); /* 3 cards per row */
        margin: 0 auto;
    }
    
    .team-container > div {
        flex: 0 0 calc(33.33% - 20px); /* 3 cards per row with space */
    }
}

/* Tablet (768px to 1024px) */
@media screen and (max-width: 1024px) {
    .team-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 20px;
        max-width: calc(250px * 2 + 20px * 1); /* 2 cards with spacing */
        margin: 0 auto;
    }

    .team-container > div {
        flex: 0 0 calc(50% - 20px); /* 2 cards per row with space */
    }
    .page-name {
        position: absolute;
        top: 40%;
        margin-left: 40px;
    }
}
/* Mobile (480px to 768px) */
@media screen and (max-width: 768px) {
    * {
        box-sizing: border-box;
    }
    body {
        width: 100%;
        overflow-x: hidden;
    }

    html {
        scroll-behavior: smooth;
    }
    .nav-width-height {
        width: auto;
        padding: 8px 10px; 
    }

    .logo img {
        height: 70px;
    }

    .menu-icon {
        display: block;
        z-index: 200;
    }

    .menu-icon i {
        display: block;
    }

    .page-name {
        width: 100%;
        height: 370px;
        position: absolute;
        top: 70px;
        right: 1px;
        background-color: rgba(0, 0, 0, 0.767);
        flex-direction: column;
        text-align: center;
        visibility: hidden;
        opacity: 0;
        transform: translateX(0); /* Keep it aligned */
        transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
        z-index: 999;
    }

    .page-name.show {
        visibility: visible;
        opacity: 1;
        transform: translateX(0); /* No horizontal shift on activation */
    }

    .page-name a {
        padding: 10px 0 0 0;
        font-size: 1em;
        color: #dbd7d7;
        font-weight: bold;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: 0.1s;
    }

    .page-name.show a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .animation-hover {
        display: inline-block;
    }

    .animation-hover::before {
        left: 0;
        width: 0; /* Start the line with zero width */
    }

    /* Mobile hover effect */
    .animation-hover:hover::before {
        width: 50%; /* Underline will only span 50% of the text */
        left: 25%; /* Center the underline (start at 25%) */
    }

    .nav-items {
        padding: 0 10px;
    }

    .banner {
        height: 40vh;
    }

    .overlay {
        width: 60%;
        height: 60px;
        top: 55%;
    }

    .overlay h1 {
        font-size: 0.8em;
    }

    .welcome-section h1 {
        font-size: 1.5em;
    }

    .underline {
        width: 150px;
    }

    .welcome-section p {
        font-size: 1em;
    }

    .card-container {
        gap: 10px; /* Reduce gap between cards for mobile */
    }

    .service-card {
        flex: 0 1 calc(50% - 10px); /* Each card takes up 50% of the width minus padding */
        max-width: calc(50% - 10px); /* Ensure the cards fit properly */
        height: auto; /* Allow height to adjust naturally */
        margin: 0 auto; /* Center each card */
    }

    .service-card button {
        font-size: 0.6em; /* Keep button size consistent */
        padding: 10px 20px; /* Adjust padding for buttons */
    }

    .service-card button i {
        font-size: 1em;
    }
    .service-card h3 {
        font-size: 1em; /* Slightly smaller font size */
        margin-bottom: 10px; /* Adjust spacing */
    }
    
    .service-card p {
        font-size: 0.9em; /* Maintain legibility */
        line-height: 1.5; /* Ensure good line spacing */
        display: -webkit-box;
        -webkit-line-clamp: 5; /* Limit text to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis; /* Truncate text with ellipsis */
        margin-bottom: 10px; /* Adjust spacing */
    }
    .service-card img {
        width: 50px; /* Maintain image size proportional to card */
        height: 50px; /* Ensure aspect ratio is consistent */
        margin-bottom: 10px; /* Adjust spacing */
    }
    .categories-container {
        padding: 0; /* Ensure no left-right padding on mobile */
        margin: 0; /* Optional: remove margin on mobile */
    }
    .category-card {
        flex: 0 1 calc(50% - 10px); /* Each card takes up 50% of the width minus padding */
        max-width: calc(50% - 10px); /* Ensure the cards fit properly */
        height: auto; /* Allow height to adjust naturally */
        margin: 0 auto; /* Center each card */
    }
    .category-card h3 {
        font-size: 0.8em; /* Slightly smaller font size */
    }
    .category-card .description {
        font-size: 0.8em; /* Maintain legibility */
        line-height: 1; /* Ensure good line spacing */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit text to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis; /* Truncate text with ellipsis */
        margin-bottom: 10px; /* Adjust spacing */
    }
    .category-card .uses {
        font-size: 0.8em; /* Maintain legibility */
        line-height: 1.5; /* Ensure good line spacing */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit text to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis; /* Truncate text with ellipsis */
        margin-bottom: 10px; /* Adjust spacing */
    }
    .package-container {
        padding: 0; /* Ensure no left-right padding on mobile */
        margin: 0; /* Optional: remove margin on mobile */
    }
    .package-card {
        flex: 0 1 calc(50% - 10px); /* Each card takes up 50% of the width minus padding */
        max-width: calc(50% - 10px); /* Ensure the cards fit properly */
        height: auto; /* Allow height to adjust naturally */
        margin: 0 auto; /* Center each card */
    }
    .package-card h3 {
        font-size: 0.8em; /* Slightly smaller font size */
    }
    .package-card .description {
        font-size: 0.8em; /* Maintain legibility */
        line-height: 1; /* Ensure good line spacing */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit text to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis; /* Truncate text with ellipsis */
        margin-bottom: 10px; /* Adjust spacing */
    }
    .package-card .uses {
        font-size: 0.8em; /* Maintain legibility */
        line-height: 1.5; /* Ensure good line spacing */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limit text to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis; /* Truncate text with ellipsis */
        margin-bottom: 10px; /* Adjust spacing */
    }
    .more-info-button {
        width: 80%;
        font-size: 0.8em; /* Keep button size consistent */
    }

    /* Keep your mobile-friendly team card size */
    .team-card {
        margin-top: -30px;
        width: 100px;
        height: 200px;
    }

    .team-card:hover {
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .name {
        font-size: 0.8em;
    }

    .role {
        font-size: 0.7em;
    }

    .team-section h2 {
        margin-top: 30px;
        font-size: 2em;
    }

    .team-section p.subtitle {
        font-size: 1em;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .address-details {
        margin-top: -30px;
    }
    .contact-mail {
        margin-top: 20px;
    }
    .contact-mail form {
        width: 100%;
        max-width: 400px;
    }

    .contact-form label {
        left: 0%;
    }

    .team-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 20px;
        max-width: calc(250px * 2 + 20px * 1); /* 2 cards with spacing */
        margin: 0 auto;
    }

    .team-container > div {
        flex: 0 0 calc(50% - 20px); /* 50% width for each team card */
    }
    .footer-bottom {
        font-size: 0.8em;
    }
    .testimonials-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .testimonial {
        width: 45%;
        height: 300px;
        padding: 15px;
        font-size: 0.9rem;
        margin: 0;
    }
    
    .testimonial img {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    
    .testimonial h3 {
        font-size: 1.1rem;
    }
    
    .testimonial .testimonial-text {
        font-size: 0.9rem;
    }
    
    .testimonial:hover {
        transform: scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }    
}
