.glasscards * {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.glasscards h1 {
    color: #ffffff;
}

.glasscards {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glasscards .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.glasscards .cards-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.glasscards .cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: max-content;
}

.glasscards .card {
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 16rem;
    border-radius: 1rem;
    box-shadow: 0 0 2px #ffffff80;
    min-height: 22rem;
    justify-content: flex-end;
}

.glasscards .card.one {
    background-image: url("https://medex.co.th/wp-content/uploads/2020/12/purple-bg.webp");
}

.glasscards .card.two {
    background-image: url("https://medex.co.th/wp-content/uploads/2020/12/purple-bg.webp");
}

.glasscards .card.three {
    background-image: url("https://medex.co.th/wp-content/uploads/2020/12/purple-bg.webp");
}

.glasscards .details {
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
    background-color: #ffffff10;
    border-top: 1px solid #ffffff30;
    border-radius: 1rem;
    -webkit-backdrop-filter: blur(0.75rem);
    backdrop-filter: blur(0.75rem);
    transition: ease 0.5s;
}

.glasscards .details:hover {
    padding-bottom: 0.5rem;
}

.glasscards .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 3rem;
}

.glasscards .content h2 {
    color: #ffffffdd;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.glasscards .content p {
    color: #ffffffaa;
    margin-bottom: 1.5rem;
    text-align: center;
    white-space: normal;  /* Allows wrapping of text */
    word-wrap: break-word;  /* Breaks the words as necessary */
    overflow-wrap: break-word;  /* Same as word-wrap */
}

.glasscards .content a {
    background-image: linear-gradient(
        90deg,
        #ffffffaa 0%,
        #ffffffee 50%,
        #ffffffaa 100%
    );
    white-space: nowrap;
    background-size: 200%;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
    color: #000000bb;
    text-decoration: none;
    text-transform: uppercase;
    padding: 0.75rem 4rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 10px -3px #00000025;
    transition: 0.5s ease-in-out;
}

.glasscards .content a:hover {
    background-position: right;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .glasscards .cards {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
        justify-content: start; /* Aligns the cards to the start on mobile */
    }

    .glasscards .card {
        flex-shrink: 0;
    }
}