/* --- PREMIUM COURSE CARD REFINEMENTS --- */

#sh-course-browser .sh-course-card {
    border-radius: 20px !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#sh-course-browser .sh-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

/* Image Wrapper & Aspect Ratio */
.sh-card-image-wrapper {
    height: 250px; /* Standardized height */
    overflow: hidden;
    position: relative;
}

.sh-course-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching */
    transition: transform 0.6s ease;
}

.sh-course-card:hover .sh-course-img {
    transform: scale(1.08);
}

/* Floating Badges */
.sh-card-badges {
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}


.sh-badge-price {
    background: var(--sh-secondary) !important;
    color: white !important;
}

/* Typography & Spacing */
.sh-course-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    min-height: 2.8em; /* Keeps alignment uniform */
}

.sh-course-title {
    line-height: 1.2 !important;
    margin-bottom: 5px !important;
    font-weight: 700;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;   /* max 2 lines */
    overflow: hidden;
}

.sh-course-facilitator {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 15px !important;
}


.sh-course-facilitator {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Button Refinements */
.sh-btn-primary {
    border-radius: 12px !important;
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
}

.sh-btn-secondary {
    border-radius: 12px !important;
    padding: 10px 20px !important;
}



/* --- Fix the Filter Spacing --- */
#sh-course-browser .sh-filter-card {
    border-radius: 50px !important;
    padding: 5px 15px !important;
    min-height: 50px;
    display: flex;
    align-items: center;
}

/* Add this to ensure the search bar takes up proper space in the flex container */
#sh-course-browser .sh-filter-card .row {
    flex: 1; 
    margin: 0 !important;
}


#sh-course-browser .sh-filter-card .form-select, 
#sh-course-browser .sh-filter-card .form-control {
    font-size: 0.85rem !important;
    padding: 5px !important;
}


/* Fix the column spacing inside the form */
#sh-course-browser .sh-filter-card .row {
    margin: 0 !important;
    width: 100%;
}

/* Fix for the dropdown arrow overlapping text */
#sh-course-browser .sh-filter-card .form-select {
    padding-right: 25px !important; /* Create space for the arrow */
    background-position: right 5px center !important; /* Pin arrow to the right */
    background-size: 12px !important; /* Make arrow slightly smaller and cleaner */
    text-overflow: ellipsis;
    white-space: nowrap;
}


#sh-course-browser .sh-filter-card .form-control {
    padding-left: 10px !important;
}


.sh-browser-expansion {
    margin-top: 20px;
}

.sh-info-box {
    margin-top: 15px !important;
}




#course-results {
    padding-top: 0.5rem;
}


.sh-grid {
    margin-top: 20px;
}







/* =================================
COURSE SINGLE VIEW (course.php) 
====================================*/


/* --- COURSE VIEW ENHANCEMENTS --- */

#sh-course-view .sh-main-card {
    /* Adding a subtle border-top accent color based on your primary brand color */
    border-top: 6px solid var(--sh-primary, #0b5f2c) !important;
}

.sh-hero-wrapper img {
    /* Slight zoom effect or filter to make text pop if you ever overlay it */
    transition: transform 0.5s ease;
}

/* Improving the "About this Course" section readability */
.sh-description-content {
    font-size: 1.1rem;
    color: #334155; /* Slate 700 - easier on the eyes than pure black */
    line-height: 1.8;
}

/* Customizing the big buttons to look more "Premium" */
#sh-course-view .btn-success, 
#sh-course-view .btn-primary {
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


#sh-course-view .btn-success:hover, 
#sh-course-view .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

/* Success Soft background for "Already Enrolled" states */
.bg-success-soft {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}



.sh-hero-wrapper {
    border-radius: 16px;
    overflow: hidden;
}

.sh-course-image-container {
    height: 400px;
}

.sh-main-title {
    font-size: calc(1.5rem + 1.5vw);
    line-height: 1.2;
}

.sh-section-heading {
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

/* Badge Contrast Fix */
#sh-course-view .sh-pill-level, 
#sh-course-view .sh-pill-duration {
    background-color: #f8f9fa !important;
    color: var(--sh-primary, #0b5f2c) !important;
    border: 1px solid #dee2e6 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

#sh-course-view .sh-pill-price {
    background-color: var(--sh-secondary, #ff8c1a) !important;
    color: #fff !important;
    border: none !important;
}

/* Ensure icons in badges are spaced right */
.sh-pill-duration i {
    margin-right: 8px;
    vertical-align: middle;
}

/* Back Button Styling */
.sh-back-link {
    text-decoration: none !important;
    color: var(--sh-primary);
    font-weight: 600;
    transition: all 0.2s;
}
.sh-back-link:hover {
    opacity: 0.8;
    transform: translateX(-3px);
}




/* --- 2. BADGE CONTRAST & VISIBILITY --- */
.sh-badge-level, .sh-badge-price {
    padding: 6px 14px !important;
    font-size: 0.7rem !important;
    border-radius: 10px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9) !important;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.6) ; 
    backdrop-filter: blur(4px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Specific colors to tell them apart */
.sh-badge-level {
    background-color: var(--sh-primary, #0b5f2c) !important;
}

.sh-badge-price {
    background-color: var(--sh-secondary, #ff8c1a) !important;
}

/* --- RESPONSIVE CONTAINER LOGIC --- */

/* 1. Mobile First: No "box" feel, just clean flow */
#sh-course-view .sh-main-card {
    background: transparent;
    border: none !important;
    padding: 15px 0 !important; /* Minimal side padding for mobile */
    box-shadow: none !important;
}

/* 2. Desktop: Transform into the professional card */
@media (min-width: 992px) {
    #sh-course-view .sh-main-card {
        background: #ffffff !important;
        border: 1px solid #e3e6f0 !important;
        border-radius: 20px !important;
        padding: 40px !important; /* Generous padding for desktop */
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
        margin-bottom: 50px !important;
    }
}

/* Ensure the hero image always looks good */
.sh-hero-wrapper {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}
