.card-button {
    position: relative;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    transition: transform 0.5s ease;
    border: 1px solid rgba(0, 0, 0, 0.5); /* subtle border like iOS */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    min-height: 200px;
    min-width: 150px;
    margin: 5px;
    height: auto;
}

.card-button:hover {
    transform: scale(1.025);
}

/* Zoom + dim background using a pseudo-element */
.card-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    z-index: 0;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.card-button:hover::before {
    transform: scale(1.1);
    filter: brightness(0.5);
}

/* Inner content */
.card-button div p::after {
    content: ">";
    padding-left: 10px;
    opacity: 50%;
    font-size: 75%;
    transition: all 0.5s ease;
}

.card-button:hover div p::after {
    content: " >";
    opacity: 70%;
    padding-left: 0;
    color: black;
    font-size: 110%;
}

.card-button > div {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px) saturate(50%);
    color: white;
    border-radius: 10px;
    padding: 0 1rem;
    margin-right: 10px;
    transition: background 0.3s ease, color 0.3s ease;
    z-index: 1;
    width: fit-content;
}

/* On hover, change inner content color and background */
.card-button:hover > div {
    background: white;
    color: red;
}

.card-desc {
    position: relative;
    border-radius: 20px;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
    border: 1px solid rgba(0, 0, 0, 0.5); /* subtle border like iOS */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 35, 0.7);
    min-height: 140px;
    min-width: 80px;
    max-width: 300px;
    max-height: 400px;
    margin: 5px;
    height: auto;
}

.card-desc > div:has(h2) {
    background: white;
    color: black;
    padding-left: 20px;
    text-align: left;
    height: 40%;
}

.card-desc img {
    width: 102%;
    min-width: 102%;
    min-height: 102%;
}

.card-desc p {
    font-size: .8em;
    margin: 0;
}

.card-desc h2 {
    margin: 10px 0 10px 0;
}

.card-desc div:has(img) {
    width: 100%;
    max-height: 60%;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    height: 60%;
}

.back-button {
    color: red;
    position: fixed;
    font-weight: bolder;
    left: 15px;
    top: 100px;
    border-radius: 6px;
    transition: all 0.4s ease;
    padding: 6px;
}

.back-button:hover {
    background: red;
    color: white;
}

#detail-card-container {
    position: fixed;
    top: 16px;
    right: 0;
    height: 100%;
    width: 550px;
    max-width: 95vw;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
}

#detail-card-container.open {
    transform: translateX(0);
}

.flyer-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.flyer-close-btn:hover {
    background: red;
}

.flyer-card {
    border-radius: 20px;
    max-height: 90vh;
    box-shadow: 1px 1px 30px rgba(0, 0, 0, 0.5);
    min-height: 60vh;
    max-width: min(520px, 90vw);
    padding: 10px;
    margin: 10px 10px 10px 30px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 10px;
    background: white;
    overflow: scroll
}