/* ============================================ */
/* CARD STYLE 1 - Original Design */
/* ============================================ */

.card-style-1 {
    --bg: #fff;
    --title-color: #fff;
    --title-color-hover: #000;
    --text-color: #666;
    --button-color: #eee;
    --button-color-hover: #ddd;
    background: var(--bg);
    border-radius: 2rem;
    padding: 0.5rem;
    width: 20rem;
    height: 30rem;
    overflow: clip;
    position: relative;
 }
.card-style-1,.card-style-2,.card-style-3,.card-style-4,.card-style-5 {
    margin-bottom: 35px;
    display: block;
}
.card-style-1::before {
    content: "";
    position: absolute;
    width: calc(100% - 1rem);
    height: 30%;
    bottom: 0.5rem;
    left: 0.5rem;
    mask: linear-gradient(#0000, #000f 80%);
    backdrop-filter: blur(1rem);
    border-radius: 0 0 1.5rem 1.5rem;
    transform: translate(0, 0);
    transition: transform 0.25s;
}

.card-style-1 > img {
    max-width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: 50% 5%;
    border-radius: 1.5rem;
    display: block;
    transition: aspect-ratio 0.25s, object-position 0.5s;
    width: 100%;
    height: auto;
}

.card-style-1 > section {
    margin: 1rem;
    height: calc(33.3333% - 1rem);
    display: flex;
    flex-direction: column;
}

.card-style-1 > section h2 {
    margin: 0;
    margin-block-end: 1rem;
    font-size: 1.5rem;
    /* opacity: 0; */
    transform: translate(0, -200%);
    color: #ffffff;
    transition: color 0.5s, margin-block-end 0.25s, opacity 1s, transform 0.25s;
}

.card-style-1 > section p {
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--text-color);
    opacity: 0;
    margin: 0;
    transform: translate(0, 100%);
    transition: margin-block-end 0.25s, opacity 1s 0.2s, transform 0.25s 0.2s;
}

.card-style-1 > section > div {
    flex: 1;
    align-items: flex-end;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: transform 0.25s 0.2s, opacity 1s;
}

.card-style-1 > section > div .tag {
    align-self: center;
    color: var(--title-color-hover);
}

.card-style-1 > section > div button {
    border: 1px solid transparent;
    border-radius: 1.25rem 1.25rem 1.5rem 1.25rem;
    font-size: 1rem;
    padding: 1rem 1.5rem 1rem 2.75rem;
    transform: translate(1rem);
    background: var(--button-color);
    transition: background 0.33s;
    outline-offset: 2px;
    position: relative;
    color: var(--title-color-hover);
    width: 8.2rem;
    text-align: right;
    cursor: pointer;
}

.card-style-1 > section > div button::before,
.card-style-1 > section > div button::after {
    content: "";
    width: 0.85rem;
    height: 0.1rem;
    background: currentcolor;
    position: absolute;
    top: 50%;
    left: 1.33rem;
    border-radius: 1rem;
}

.card-style-1 > section > div button::after {
    transform: rotate(90deg);
    transition: transform 0.15s;
}

.card-style-1 > section > div button.following::after {
    transform: rotate(0deg);
}

.card-style-1 > section > div button:hover {
    background: var(--button-color-hover);
}

.card-style-1 > section > div button:focus {
    outline: 2px solid var(--text-color);
}

.card-style-1:hover::before,
.card-style-1:focus-within::before {
    transform: translate(0, 100%);
}

.card-style-1:hover > img,
.card-style-1:focus-within > img {
    aspect-ratio: 1 / 1;
    object-position: 50% 10%;
    transition: aspect-ratio 0.25s, object-position 0.25s;
}

.card-style-1:hover > section h2,
.card-style-1:focus-within > section h2,
.card-style-1:hover > section p,
.card-style-1:focus-within > section p {
    transform: translate(0, 0);
    margin-block-end: 0.5rem;
    opacity: 1;
}

.card-style-1:hover > section h2,
.card-style-1:focus-within > section h2 {
    color: var(--title-color-hover);
}

.card-style-1:hover > section > div,
.card-style-1:focus-within > section > div {
    transform: translate(0, 0);
    opacity: 1;
    transition: transform 0.25s 0.25s, opacity 0.5s 0.25s;
}

/* ============================================ */
/* CARD STYLE 2 - Glass Card (Light background, dark text) */
/* ============================================ */

.card-style-2 {
    display: block;
    text-decoration: none;
}

.card-style-2 .card-inner {
    background-color: #ffffff;
    border: 2px solid hsl(215, 20%, 90%);
    border-radius: 0.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.card-style-2 .card-inner:hover {
    border-color: #2f744cad;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-style-2 .icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.25rem;
    border: 1px solid #2f744c52;
    background-color: #2f744c21;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    display: none;
}

.card-style-2 .icon-box i {
    color: #2f744c;
    font-size: 1rem;
}

.card-style-2 h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #333;
}
.card-style-2:hover h3 {
 
    color: #327a79;
}

.card-style-2 p {
    color: hsl(0deg 0% 35.58%);
font-size: 17px;
    line-height: 1.625;
}
/* ============================================ */
/* CARD STYLE 3 - Category Badge on Image */
/* ============================================ */

.card-style-3 {
    display: block;
    text-decoration: none;
    position: relative;
}

.card-style-3 .card-inner {
    background: #ffffff;
    border-radius: 40px;
    padding: 16px;
    box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
}

.card-style-3 .card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

/* Image Wrapper - needed for absolute positioning of category */
.card-style-3 .image-wrapper {
    position: relative;
    margin-bottom: 16px;
    border-radius: 32px;
    overflow: hidden;
}

.card-style-3 .image-wrapper img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 32px;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.card-style-3 .card-inner:hover .image-wrapper img {
    filter: grayscale(0%);
}

/* Category Badge - Overlay on image */
.card-style-3 .category {
    position: absolute;
    top: -1px;
    left: 0px;
    z-index: 2;
    background-color: #ffffff;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c34a36;
    min-height: 2rem;
    border-end-end-radius: 16px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

/* Corner shape effects - before and after */
.card-style-3 .category::before,
.card-style-3 .category::after {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    mask-image: radial-gradient(circle at 100% 100%, transparent 16px, red 17px);
    background-color: inherit;
}

.card-style-3 .category::before {
    top: 0;
    right: -15px;
}

.card-style-3 .category::after {
    top: 100%;
    left: 0;
}

/* Title */
.card-style-3 h3 {
     font-size: 1.25rem;
    font-weight: 600;
    color: hsl(215, 55%, 14%);
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Description */
.card-style-3 .description {
    color: hsl(215, 25%, 42%);
    font-size: 0.875rem;
    line-height: 1.6;
}