/* Shumokh Elementor Custom Track Widget */

.shumokh-elementor-tracks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    perspective: 1000px;
    position: relative;
    z-index: 10;
    padding-top: 100px;
    /* Space for floating image */
}

.shumokh-elementor-track-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    cursor: pointer;
    /* Removed individual margin-top as container padding handles it for the row */
}

/* Floating Image */
.shumokh-elementor-track-image {
    position: absolute;
    /* Default position, customizable via Elementor */
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    /* Lower than content */
    transition: transform 0.5s ease;
    width: 280px;
    /* Increased default size */
    height: 280px;
    /* Increased default size */
    border-radius: 20px !important;
}

.shumokh-elementor-track-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px !important;
}

.shumokh-elementor-track-card:hover .shumokh-elementor-track-image img {
    transform: scale(1.15) rotate(5deg);
}

/* Content */
.shumokh-elementor-track-content {
    width: 100%;
    position: relative;
    z-index: 20;
    /* Higher than image */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    /* Push content to bottom */
    height: 100%;
    margin-top: 0;
    /* Reset margin */
    padding-bottom: 80px;
    /* Increased bottom padding for larger images */
    pointer-events: none;
    /* Let clicks pass through if needed, though they are inside <a> */
}

.shumokh-elementor-track-title {
    margin: 0;
    padding: 0;
    transition: color 0.3s ease;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    font-family: 'Tajawal', sans-serif;
}

.shumokh-elementor-track-desc {
    margin: 10px 0 20px;
    padding: 0;
    transition: color 0.3s ease;
}

/* Grayscale Effect */
.shumokh-grayscale-effect .shumokh-elementor-track-image img {
    filter: grayscale(100%);
}

.shumokh-elementor-track-card:hover .shumokh-grayscale-effect .shumokh-elementor-track-image img {
    filter: grayscale(0%);
}

/* Zoom Effect on Card */
.shumokh-zoom-effect:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
    .shumokh-elementor-tracks-container {
        grid-template-columns: 1fr;
        padding-top: 120px;
        /* More space for top image on mobile if needed */
        gap: 80px;
        /* Increase gap to account for image overlap between items */
    }

    .shumokh-elementor-track-card {
        margin-top: 0;
        /* Handled by gap */
    }

    .shumokh-elementor-track-image {
        width: 180px;
        /* Slightly smaller on mobile */
        height: 180px;
        top: -90px;
    }
}

/* Custom Course Card Styles - Enterprise Grade */
.edublink-single-course.course-style-12 .inner {
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    padding-bottom: 24px;
    position: relative;
}

.edublink-single-course.course-style-12:hover .inner {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary, #b7903c);
}

.edublink-single-course.course-style-12 .thumbnail {
    margin: 12px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* Aspect ratio fallback */
    height: 200px;
}

.edublink-single-course.course-style-12 .thumbnail a {
    display: block;
    height: 100%;
}

.edublink-single-course.course-style-12 .thumbnail img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.edublink-single-course.course-style-12:hover .thumbnail img {
    transform: scale(1.08);
}

.edublink-single-course.course-style-12 .content {
    padding: 0 24px;
    text-align: right;
    /* Ensure RTL standard by default if not set by body */
}

/* Price Highlight */
.edublink-single-course.course-style-12 .course-price {
    position: absolute;
    top: 24px;
    right: 24px;
    /* Adjust for RTL/LTR */
    background: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 5;
    font-family: 'Tajawal', sans-serif;
}

.edublink-single-course.course-style-12 .course-price .price {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-primary, #b7903c);
}

.edublink-single-course.course-style-12 .course-meta {
    margin-top: 12px;
    margin-bottom: 8px;
}

.edublink-single-course.course-style-12 .course-meta li {
    font-size: 13px;
    color: #888;
    background: #f9f9f9;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.edublink-single-course.course-style-12 .edu-course-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 54px;
    /* Minimal height alignment for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.edublink-single-course.course-style-12 .edu-course-title a {
    color: #1A1A1A;
    transition: color 0.3s ease;
    text-decoration: none;
}

.edublink-single-course.course-style-12 .edu-course-title a:hover {
    color: var(--color-primary, #b7903c);
}

.edublink-single-course.course-style-12 .read-more-btn {
    margin-top: auto;
}

.edublink-single-course.course-style-12 .read-more-btn .edu-btn {
    width: 100%;
    text-align: center;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 700;
    justify-content: center;
    background-color: #f5f5f5;
    color: #1A1A1A;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edublink-single-course.course-style-12 .read-more-btn .edu-btn:hover {
    background-color: var(--color-primary, #b7903c);
    color: #fff;
    transform: translateY(-2px);
}

/* RTL Support fixes if needed */
body.rtl .edublink-single-course.course-style-12 .course-price {
    right: auto;
    left: 24px;
}

body.rtl .edublink-single-course.course-style-12 .content {
    text-align: right;
}