/* ============================================
   MODERN ENHANCED CARD ELEMENTS - ADDITIONAL STYLES
   Ultra-Modern Borders, Icons, and Interactions
============================================= */

/* Hover Overlay with View Details Button */
.modern-thumb .hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 43, 27, 0.95), rgba(0, 217, 163, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.course-single-grid-item:hover .hover-overlay {
    opacity: 1;
}

.hover-overlay .overlay-content {
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.course-single-grid-item:hover .hover-overlay .overlay-content {
    transform: translateY(0);
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: white;
    color: var(--courses-primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-details-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.view-details-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.view-details-btn:hover i {
    transform: scale(1.2);
}

/* Modern Price Badge - Enhanced */
.modern-price {
    padding: 14px 26px !important;
}

.modern-price .price-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-price .current-price {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.modern-price .old-price {
    font-size: 15px;
    opacity: 0.8;
}

/* Modern Category Badge with Icon */
.modern-category a {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.modern-category a i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.modern-category a:hover i {
    transform: rotate(10deg) scale(1.1);
}

/* Modern Content Area */
.modern-content {
    position: relative;
}

/* Modern Rating with Score */
.modern-rating {
    display: flex;
    align-items: center;
    gap: 12px !important;
    margin-bottom: 18px !important;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.modern-rating .ratings {
    flex-shrink: 0;
}

.modern-rating .rating-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--courses-text-light);
}

.modern-rating .rating-count strong {
    font-size: 18px;
    font-weight: 800;
    color: #ffc107;
}

.modern-rating .reviews-text {
    font-size: 13px;
}

/* Modern Title - Enhanced */
.modern-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.5px;
    margin-bottom: 18px !important;
}

/* Modern Instructor Section */
.modern-instructor {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.05), rgba(0, 255, 200, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 163, 0.1);
    margin-bottom: 18px !important;
    transition: all 0.3s ease;
}

.course-single-grid-item:hover .modern-instructor {
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.1), rgba(0, 255, 200, 0.1));
    border-color: rgba(0, 217, 163, 0.3);
    transform: translateX(5px);
}

.instructor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--courses-secondary), var(--courses-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 217, 163, 0.3);
    transition: transform 0.3s ease;
}

.course-single-grid-item:hover .instructor-avatar {
    transform: rotate(360deg) scale(1.1);
}

.instructor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.instructor-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--courses-text-light);
    font-weight: 600;
}

.instructor-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--courses-primary) !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.instructor-name:hover {
    color: var(--courses-secondary) !important;
}

/* Modern Description */
.modern-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--courses-text-light);
    margin-bottom: 22px !important;
}

/* Modern Footer - Redesigned */
.modern-footer {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 !important;
    border-top: 2px solid transparent !important;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(90deg, var(--courses-secondary), var(--courses-accent)) border-box;
    border-image: linear-gradient(90deg, #e9ecef, var(--courses-secondary), #e9ecef) 1;
    border-top: 2px solid;
    gap: 0 !important;
    margin-top: auto;
}

.modern-footer .info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    transition: transform 0.3s ease;
}

.course-single-grid-item:hover .modern-footer .info-item {
    transform: translateY(-2px);
}

.modern-footer .icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 217, 163, 0.1), rgba(0, 255, 200, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--courses-secondary);
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.course-single-grid-item:hover .modern-footer .info-item:nth-child(1) .icon-wrapper {
    background: linear-gradient(135deg, var(--courses-secondary), var(--courses-accent));
    color: white;
    transform: scale(1.15) rotate(5deg);
}

.course-single-grid-item:hover .modern-footer .info-item:nth-child(3) .icon-wrapper {
    background: linear-gradient(135deg, var(--courses-accent), var(--courses-secondary));
    color: white;
    transform: scale(1.15) rotate(-5deg);
}

.modern-footer .info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modern-footer .info-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--courses-text-dark);
    line-height: 1;
}

.modern-footer .info-label {
    font-size: 12px;
    color: var(--courses-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.modern-footer .divider {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--courses-secondary), transparent);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.course-single-grid-item:hover .modern-footer .divider {
    opacity: 1;
}

/* Enroll Button - Appears on Hover */
.card-action {
    padding: 0 30px 25px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-single-grid-item:hover .card-action {
    opacity: 1;
    transform: translateY(0);
}

.enroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--courses-primary), var(--courses-secondary));
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 43, 27, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.enroll-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.enroll-btn:hover::before {
    width: 300px;
    height: 300px;
}

.enroll-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 43, 27, 0.4);
    background: linear-gradient(135deg, var(--courses-secondary), var(--courses-accent));
}

.enroll-btn i {
    transition: transform 0.4s ease;
}

.enroll-btn:hover i {
    transform: translateX(5px);
}

/* Corner Accent - Decorative Element */
.corner-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, var(--courses-secondary) 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-top-right-radius: 24px;
    pointer-events: none;
}

.corner-accent::after {
    content: '✨';
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.course-single-grid-item:hover .corner-accent {
    opacity: 0.3;
}

/* Card Height Adjustment for New Elements */
.modern-card-enhanced {
    min-height: 600px;
}

.modern-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ============================================
   NEW MODERN ELEMENTS
============================================= */

/* Corner Level Badge */
.corner-level-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0, 43, 27, 0.9);
    color: #fff;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: badgePulse 2.5s ease-in-out infinite;
}

.corner-level-badge i {
    font-size: 14px;
    color: var(--courses-accent);
}

@keyframes badgePulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: translateY(-4px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    }
}

/* Floating Icon Buttons */
.floating-icon-buttons {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 4;
}

.course-single-grid-item:hover .floating-icon-buttons {
    opacity: 1;
    transform: translate(-50%, -5px);
    pointer-events: auto;
}

.floating-icon-buttons .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    color: var(--courses-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-icon-buttons .icon-btn:hover {
    transform: translateY(-3px) rotate(8deg);
    background: var(--courses-secondary);
    color: white;
    box-shadow: 0 12px 30px rgba(0, 217, 163, 0.3);
}

.floating-icon-buttons .icon-btn.share {
    animation: floatShare 3s ease-in-out infinite;
}

.floating-icon-buttons .icon-btn.favourite {
    animation: floatFav 3s ease-in-out infinite 0.3s;
}

@keyframes floatShare {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes floatFav {
    0%, 100% { transform: translateY(-4px); }
    50% { transform: translateY(0); }
}

/* Course Metrics List */
.course-metrics {
    list-style: none;
    padding: 0;
    margin: 0 0 22px 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.course-metrics li {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(0, 43, 27, 0.04), rgba(0, 217, 163, 0.05));
    border: 1px solid rgba(0, 43, 27, 0.08);
    border-radius: 14px;
    padding: 14px;
    animation: metricPop 0.4s ease;
}

.course-single-grid-item:hover .course-metrics li {
    animation: metricPulse 1.4s ease-in-out infinite;
}

.course-metrics li:nth-child(2) { animation-delay: 0.1s; }
.course-metrics li:nth-child(3) { animation-delay: 0.2s; }

@keyframes metricPop {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes metricPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(0, 217, 163, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--courses-secondary);
    font-size: 16px;
    flex-shrink: 0;
}

.metric-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--courses-text-light);
    font-weight: 600;
}

.metric-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--courses-text-dark);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .modern-title {
        font-size: 21px !important;
    }
    
    .modern-footer .info-value {
        font-size: 16px;
    }
    
    .modern-card-enhanced {
        min-height: auto;
    }

    .course-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .modern-title {
        font-size: 19px !important;
    }
    
    .modern-instructor {
        padding: 12px 14px;
    }
    
    .instructor-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .modern-footer .icon-wrapper {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .enroll-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

@media (max-width: 575px) {
    .modern-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px !important;
    }
    
    .modern-footer {
        flex-direction: column;
        gap: 12px !important;
    }
    
    .modern-footer .divider {
        width: 100%;
        height: 2px;
    }
    
    .modern-footer .info-item {
        width: 100%;
    }

    .course-metrics {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hover-overlay,
    .card-action,
    .instructor-avatar,
    .corner-accent::after {
        animation: none !important;
        transition: none !important;
    }
}

