.menu-container {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    background-color: var(--background-color);
}

.treatment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    margin-top: 20px;
}

.treatment-category-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(139, 181, 177, 0.15);
    transition: all 0.4s ease;
    height: 300px;
    text-decoration: none;
    display: block;
    background-color: var(--very-light-grey);
}

.treatment-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(139, 181, 177, 0.25);
}

.treatment-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.treatment-category-card:hover img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(70, 88, 88, 0.95) 0%,
        rgba(70, 88, 88, 0.8) 50%,
        rgba(70, 88, 88, 0.4) 100%
    );
    padding: 40px 30px;
    color: var(--background-color);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.treatment-category-card:hover .category-overlay {
    background: linear-gradient(
        to top,
        rgba(139, 181, 177, 0.95) 0%,
        rgba(139, 181, 177, 0.8) 50%,
        rgba(139, 181, 177, 0.4) 100%
    );
}

.category-overlay h2 {
    color: var(--background-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: transform 0.3s ease;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
}

.treatment-category-card:hover .category-overlay h2 {
    transform: translateY(-20px);
}

.category-overlay p {
    color: var(--background-color);
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    font-family: 'Playfair Display', serif;
    max-width: 280px;
    transition: transform 0.3s ease;
    min-height: 3.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.treatment-category-card:hover .category-overlay p {
    transform: translateY(-20px);
}

.view-more {
    position: absolute;
    bottom: 40px;
    color: var(--background-color);
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    padding: 10px 25px;
    border: 2px solid var(--background-color);
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
}

.treatment-category-card:hover .view-more {
    opacity: 1;
    transform: translateY(0);
}

.view-more:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* Section Title Styling */
.section-title {
    position: relative;
    text-align: center;
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-color),
        var(--secondary-color),
        var(--primary-color),
        transparent
    );
}

/* Responsive Design */
@media (max-width: 1200px) {
    .treatment-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .menu-container {
        padding: 30px 15px;
    }

    .treatment-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .treatment-category-card,
    .treatment-category-card.full-width {
        height: 160px !important;
    }

    .category-overlay {
        background: linear-gradient(
            to top,
            rgba(70, 88, 88, 0.95) 0%,
            rgba(70, 88, 88, 0.7) 100%
        );
        padding: 20px;
        justify-content: center;
    }

    .category-overlay h2,
    .full-width .category-overlay h2 {
        font-size: 1.6rem !important;
        margin-bottom: 8px;
        text-align: center;
        min-height: auto;
    }

    .category-overlay p,
    .full-width .category-overlay p {
        font-size: 0.9rem !important;
        margin-bottom: 0;
        min-height: auto;
        text-align: center;
        max-width: 280px;
    }

    .view-more {
        display: none;
    }
}

@media (min-width: 1400px) {
    .treatment-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Add this to your existing CSS */
.full-width {
    grid-column: 1 / -1;  /* Span all columns */
    max-width: 100%;
}

/* Adjust height for the wider card */
.treatment-category-card.full-width {
    height: 400px;  /* Slightly taller than regular cards */
}

/* Adjust text size for the wider card */
.full-width .category-overlay h2 {
    font-size: 2.8rem;
}

.full-width .category-overlay p {
    font-size: 1.3rem;
    max-width: 500px;  /* Allow more text width for the wider card */
}

/* Ensure proper grid layout */
@media (min-width: 1400px) {
    .treatment-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Add this new media query for medium screens */
@media (min-width: 769px) and (max-width: 1040px) {
    .treatment-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Make the full-width card behave like regular cards */
    .treatment-category-card.full-width {
        grid-column: auto;  /* Reset the grid spanning */
        height: 300px;  /* Same height as other cards */
    }

    /* Reset the full-width card text sizes */
    .full-width .category-overlay h2 {
        font-size: 2.2rem;
    }

    .full-width .category-overlay p {
        font-size: 1.1rem;
        max-width: 280px;
    }
}
