/* --- Common Card Styles --- */
.sfcm-class-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden; /* Important for image corners */
    padding: 0; /* Remove padding from main card to let image go edge-to-edge */
}

.sfcm-class-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* New Image Styles */
.sfcm-card-img-wrap {
    display: block;
    width: 100%;
    height: 180px; /* Fixed height for uniformity */
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #f3f4f6;
}

.sfcm-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills area without stretching */
    display: block;
    transition: transform 0.5s ease;
}

.sfcm-class-card:hover .sfcm-card-img-wrap img {
    transform: scale(1.05); /* Subtle zoom effect */
}

/* Content Wrapper (replaces padding on main card) */
.sfcm-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sfcm-card-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

.sfcm-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.sfcm-card-title a:hover {
    color: #4f46e5;
}

.sfcm-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #4b5563;
}

.sfcm-icon {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
}

.sfcm-card-footer {
    margin-top: auto;
    padding-top: 20px;
}

.sfcm-card-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background-color: #4f46e5;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.sfcm-card-btn:hover {
    background-color: #4338ca;
    color: #ffffff;
}

/* --- Grid Layout --- */
.sfcm-grid-view {
    display: grid;
    width: 100%;
}

/* --- Carousel Layout --- */
.sfcm-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sfcm-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 4px 20px 4px;
    width: 100%;
}

.sfcm-carousel-track::-webkit-scrollbar {
    display: none;
}

.sfcm-carousel-track .sfcm-class-card {
    flex: 0 0 300px;
    max-width: 85vw;
}

/* Navigation Buttons */
.sfcm-nav-btn {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
    transition: all 0.2s;
}

.sfcm-nav-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.sfcm-nav-btn svg {
    width: 20px;
    height: 20px;
}