/* =====================================================
   Marketian Style – Course Card Redesign
   ===================================================== */

/* ---- Hide Theme Default Grid / List Toggle ---- */
.elementor-widget-go-course-item .dt-course-topbar {
    display: none !important;
}

/* ---- Grid wrapper ---- */
.elementor-widget-go-course-item .dt-course-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

@media (max-width: 991px) {
    .elementor-widget-go-course-item .dt-course-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 575px) {
    .elementor-widget-go-course-item .dt-course-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---- Individual card ---- */
.elementor-widget-go-course-item .dt-course-card {
    background: #fff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    cursor: pointer !important;
    border: 1px solid #e2e8f0 !important;
    transition: box-shadow 0.25s ease, border-color 0.25s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    width: 100% !important;
}

.elementor-widget-go-course-item .dt-course-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border-color: #cbd5e1 !important;
}

/* ---- Thumbnail ---- */
.elementor-widget-go-course-item .dt-course-thumb {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    padding-top: 66% !important; /* Approx 3:2 aspect ratio */
    overflow: hidden !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
}

.elementor-widget-go-course-item .dt-course-thumb img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
    border-radius: 0 !important; /* Let parent clip it */
}

.elementor-widget-go-course-item .dt-course-card:hover .dt-course-thumb img {
    transform: scale(1.03) !important;
}

/* ---- Card body ---- */
.elementor-widget-go-course-item .dt-course-body {
    padding: 24px 20px 20px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* ---- Title ---- */
.elementor-widget-go-course-item .dt-course-title {
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    color: #334155 !important; /* Dark Slate Gray */
    margin: 0 0 40px 0 !important;
    font-family: inherit !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 45px !important; /* Force space for two lines */
}

.elementor-widget-go-course-item .dt-course-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.elementor-widget-go-course-item .dt-course-title a:hover {
    color: #3b82f6 !important; /* Hover blue */
}

/* ---- Instructor ---- */
.elementor-widget-go-course-item .dt-course-instructor {
    font-size: 13px !important;
    color: #94a3b8 !important; /* Light Slate Gray */
    margin: auto 0 4px 0 !important;
    font-family: inherit !important;
    font-weight: 500 !important;
}

/* ---- Divider ---- */
.elementor-widget-go-course-item .dt-course-divider {
    display: none !important; /* Hidden */
}

/* ---- Price row ---- */
.elementor-widget-go-course-item .dt-course-price-row {
    display: flex !important;
    align-items: baseline !important;
    margin-top: 0 !important; /* Managed by auto margin of instructor */
}

.elementor-widget-go-course-item .list-item-price {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-direction: row-reverse !important; /* Swap del and span to match Marketian order */
}

/* Current Price (Blue) */
.elementor-widget-go-course-item .list-item-price span {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3b82f6 !important; /* Bright Blue */
    font-family: inherit !important;
}

/* Previous Price (Light Blue/Gray) */
.elementor-widget-go-course-item .list-item-price del {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #93c5fd !important; /* Light Blue Strike */
    text-decoration: line-through !important;
    font-family: inherit !important;
}

/* No-price / Free fallback */
.elementor-widget-go-course-item .dt-price-free {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3b82f6 !important;
    font-family: inherit !important;
}

/* ---- No-thumbnail placeholder ---- */
.elementor-widget-go-course-item .dt-course-thumb.no-thumb {
    background: #f1f5f9 !important;
}

/* ---- Fix for any inline list views from theme ---- */
.elementor-widget-go-course-item ul, 
.elementor-widget-go-course-item li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =====================================================
   Filter Dropdown Styles (Category selection)
   ===================================================== */
.dt-filter-dropdown {
    position: relative !important;
    display: inline-block !important;
    margin-bottom: 30px !important;
}

/* Prevent flex row from .dt-filter-bar doing weird things */
.dt-filter-bar.dt-filter-dropdown {
    display: inline-block !important;
}

.dt-dropdown-toggle {
    background-color: #3b82f6 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: background-color 0.2s !important;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2) !important;
    font-family: inherit !important;
}

.dt-dropdown-toggle:hover,
.dt-filter-dropdown:hover .dt-dropdown-toggle {
    background-color: #2563eb !important;
}

.dt-dropdown-toggle i {
    pointer-events: none !important;
    font-size: 13px !important;
}

.dt-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 10px !important;
    background: #fff !important;
    min-width: 240px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border: 1px solid #f1f5f9 !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.2s ease !important;
}

.dt-filter-dropdown:hover .dt-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Override existing button styles from the theme */
.dt-filter-bar .dt-dropdown-menu .dt-filter-btn {
    background: none !important;
    border: none !important;
    padding: 10px 20px !important;
    text-align: left !important;
    width: 100% !important;
    font-size: 14px !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: background-color 0.2s, color 0.2s !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: block !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

.dt-filter-bar .dt-dropdown-menu .dt-filter-btn:hover,
.dt-filter-bar .dt-dropdown-menu .dt-filter-btn.is-checked {
    background-color: #f8fafc !important;
    color: #3b82f6 !important;
    font-weight: 600 !important;
}
