/* ------------------------------
   Card Grid
------------------------------ */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* space between cards */
}

/* ------------------------------
   Card Style
------------------------------ */
.card {
    flex: 1 1 calc(32% - 20px); /* 3 cards per row by default */
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8; /* default card color */
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Hover Effect */
.card:hover {
    transform: translateY(-4px) scale(1.02); /* subtle lift and zoom */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background-color: #ffffff; /* smooth fade to highlight */
}

/* Optional: subtle visual cue inside the card */
.card .card-arrow {
    margin-top: auto;
    font-size: 1.2em;
    color: #555;
    transition: transform 0.3s ease, color 0.3s ease;
}

.card:hover .card-arrow {
    transform: translateX(5px); /* arrow moves slightly to indicate click */
    color: #000;
}
/* ------------------------------
   Header Section
------------------------------ */
.card-header {
    font-size: 1.5em; /* 1.5x subheader */
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.2;
}

/* ------------------------------
   Subheader Section
------------------------------ */
.card-subheader {
    font-size: 1em; /* default, will scale relative to header */
    font-weight: 500;
    line-height: 1.2;
    height: calc(2 * 1.2em); /* 2 lines height even if second line unused */
    overflow: hidden;
    margin-bottom: 10px;
}

/* ------------------------------
   Details Section
------------------------------ */
.card-details {
    font-size: 0.66em; /* smaller font for details */
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* up to 5 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ------------------------------
   Responsive Layout
------------------------------ */

/* Medium screens (tablets / small laptops) */
@media (max-width: 1024px) {
    .card {
        flex: 1 1 calc(50% - 20px); /* 2 cards per row */
    }
}

/* Small screens (mobile) */
@media (max-width: 600px) {
    .card {
        flex: 1 1 100%; /* 1 card per row */
    }
}
