/* Shumokh Track & Subject UI - Premium Glassmorphism */

:root {
    /* Brand Colors: Deep Red (Crimson) & Bright Orange/Gold */
    --shumokh-primary-grad: linear-gradient(135deg, #be123c 0%, #dc2626 100%);
    /* Crimson to Red */
    --shumokh-secondary-grad: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    /* Amber/Gold */
    --shumokh-card-bg: linear-gradient(135deg, rgba(255, 241, 242, 0.9) 0%, rgba(255, 251, 235, 0.9) 100%);
    --shumokh-glass-bg: rgba(255, 255, 255, 0.85);
    --shumokh-glass-border: 1px solid rgba(190, 18, 60, 0.1);
    --shumokh-shadow-lg: 0 20px 25px -5px rgba(190, 18, 60, 0.1), 0 10px 10px -5px rgba(245, 158, 11, 0.05);
    --shumokh-text-dark: #1f2937;
    --shumokh-text-light: #6b7280;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Container --- */
.shumokh-track-selector-container {
    padding: 60px 20px;
    max-width: 1400px;
    /* Increased for wider grid */
    margin: 0 auto;
    font-family: 'Outfit', 'Inter', 'Tajawal', sans-serif;
    /* Added Tajawal for Arabic */
    position: relative;
    z-index: 10;
}

/* RTL Support */
.shumokh-rtl {
    direction: rtl;
    text-align: right;
}

.shumokh-ltr {
    direction: ltr;
    text-align: left;
}

/* --- Loader --- */
.shumokh-loader {
    text-align: center;
    padding: 40px;
    color: var(--shumokh-text-light);
    font-weight: 500;
}

.shumokh-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.shumokh-empty-msg {
    text-align: center;
    padding: 30px;
    color: var(--shumokh-text-light);
    font-size: 1.1rem;
    font-style: italic;
}

/* --- Tabs --- */
.shumokh-tabs-wrapper {
    padding-bottom: 30px;
    display: flex;
    justify-content: center;
}

.shumokh-tabs {
    background: var(--shumokh-glass-bg);
    backdrop-filter: blur(12px);
    border: var(--shumokh-glass-border);
    padding: 8px;
    border-radius: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.shumokh-tab-btn {
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--shumokh-text-light);
    border-radius: 50px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.shumokh-tab-btn.active {
    background: var(--shumokh-primary-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.shumokh-tab-btn:hover:not(.active) {
    background: rgba(220, 38, 38, 0.05);
    color: var(--shumokh-text-dark);
}

/* --- Chip Selectors (Premium Buttons) --- */
.shumokh-chip-selector {
    margin-bottom: 30px;
    animation: fadeIn 0.4s ease-out;
    text-align: center;
    /* Center chips for both LTR/RTL */
}

.shumokh-chip-selector.secondary {
    margin-top: 30px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    padding-top: 30px;
}

.shumokh-chip-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--shumokh-text-dark);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.5px;
}

.shumokh-chips-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.shumokh-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 25px;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--shumokh-text-dark);
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.shumokh-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #dc2626;
}

.shumokh-chip.active {
    background: var(--shumokh-primary-grad);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
    transform: translateY(-2px);
}

.shumokh-chip-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.shumokh-chip-num {
    background: #f3f4f6;
    color: var(--shumokh-text-dark);
    font-size: 0.9rem;
    font-weight: 800;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.shumokh-chip:hover .shumokh-chip-num {
    background: #fee2e2;
    color: #dc2626;
}

.shumokh-chip.active .shumokh-chip-num {
    background: white;
    color: #dc2626;
}

/* --- Course Grid Area --- */
.shumokh-courses-area {
    margin-top: 40px;
    animation: slideUp 0.5s ease-out;
}

.shumokh-courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

/* RTL Header Adjustment */
.shumokh-rtl .shumokh-courses-header {
    flex-direction: row;
    /* Flex auto-handles RTL usually, but just in case */
}

.shumokh-courses-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--shumokh-text-dark);
    margin: 0;
}

.shumokh-courses-count {
    background: #ecfdf5;
    color: #059669;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Redundant since switching to EduBlink theme grid system
.shumokh-courses-grid-wrap {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 25px;
}

.shumokh-courses-grid-wrap .stm_lms_courses__single {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.shumokh-courses-grid-wrap .stm_lms_courses__single:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}
*/

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .shumokh-courses-grid-wrap .stm_lms_courses__grid {
        grid-template-columns: 1fr !important;
    }

    .shumokh-chip-selector {
        padding: 0 10px;
    }

    .shumokh-chip {
        width: 100%;
        justify-content: center;
    }

    .shumokh-track-selector-container {
        padding: 40px 15px;
    }
}

/* --- Enterprise Course Card Styles (Block 12) --- */
.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: 0;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    position: relative;
    /* Full width, increased height for portrait look */
    width: 100%;
    height: 340px;
}

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

.edublink-single-course.course-style-12 .thumbnail img {
    border-radius: 16px 16px 0 0;
    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;
    /* Default fallback */
}

/* Price Highlight - Clear Dark Red Design */
.edublink-single-course.course-style-12 .course-price {
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
    /* White background for contrast */
    background: #ffffff;
    padding: 8px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 5;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.edublink-single-course.course-style-12 .course-price .price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #be123c !important;
    text-shadow: none;
}

/* Hide Lesson Meta */
.edublink-single-course.course-style-12 .course-meta {
    display: none !important;
}

.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;
}

/* Responsive Handling */
@media (max-width: 768px) {
    .edublink-single-course.course-style-12 .thumbnail {
        height: 220px;
        /* Slightly smaller on mobile to fit viewport better */
    }

    .edublink-single-course.course-style-12 .course-price {
        padding: 6px 14px;
        min-width: 70px;
    }

    .edublink-single-course.course-style-12 .course-price .price {
        font-size: 16px;
    }
}

.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 Override */
.shumokh-rtl .edublink-single-course.course-style-12 .course-price {
    right: auto;
    left: 24px;
}

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

.shumokh-ltr .edublink-single-course.course-style-12 .course-price {
    right: 24px;
    left: auto;
}

.shumokh-ltr .edublink-single-course.course-style-12 .content {
    text-align: left;
}

/* --- Teacher Application Premium UI --- */
.shumokh-application-form-container {
    max-width: 900px !important;
    margin: 40px auto !important;
    padding: 50px 40px !important;
    background: var(--shumokh-glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: var(--shumokh-glass-border) !important;
    border-radius: 24px !important;
    box-shadow: var(--shumokh-shadow-lg) !important;
    font-family: 'Outfit', 'Inter', 'Tajawal', sans-serif !important;
}

.shumokh-form-header {
    margin-bottom: 40px !important;
}

.shumokh-form-title {
    color: var(--shumokh-text-dark) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.shumokh-title-ar {
    background: var(--shumokh-secondary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900 !important;
}

/* Fluent Form Resets & Overrides */
.shumokh-fluent-form .fluentform .ff-el-form-control,
.shumokh-fluent-form .fluentform select.ff-el-form-control,
.shumokh-fluent-form .fluentform textarea.ff-el-form-control {
    background: #fdfdfd !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 1rem !important;
    color: var(--shumokh-text-dark) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) inset !important;
}

.shumokh-fluent-form .fluentform .ff-el-form-control:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1) !important;
    background: #fff !important;
}

/* Custom Dropdowns */
.shumokh-curriculum-dropdowns select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f59e0b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 20px !important;
    padding-right: 45px !important;
}

.shumokh-rtl .shumokh-curriculum-dropdowns select {
    background-position: left 15px center !important;
    padding-left: 45px !important;
    padding-right: 18px !important;
}

/* Repeater Styling */
#shumokh-subject-repeater {
    background: rgba(0, 0, 0, 0.01) !important;
    border-radius: 16px !important;
    padding: 25px !important;
    margin: 20px 0 !important;
    border: 1px dashed #e5e7eb !important;
}

.shumokh-subject-row {
    position: relative !important;
    padding: 20px !important;
    background: #fff !important;
    border-radius: 16px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.03) !important;
}

.shumokh-curriculum-dropdowns {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
}

.curriculum-field label {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--shumokh-text-dark) !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Premium Buttons */
.shumokh-add-subject {
    background: var(--shumokh-secondary-grad) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s var(--transition-bounce) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 30px auto !important;
}

.shumokh-add-subject:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4) !important;
}

.shumokh-remove-row {
    background: #fff !important;
    color: #f59e0b !important;
    border: 1px solid #fef3c7 !important;
    padding: 8px 15px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
}

.shumokh-remove-row:hover {
    background: #fef3c7 !important;
    border-color: #fbbf24 !important;
}

/* Fluent Form Submit Button */
.shumokh-fluent-form .ff-btn-submit {
    width: 100% !important;
    background: var(--shumokh-secondary-grad) !important;
    border: none !important;
    padding: 16px !important;
    border-radius: 16px !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s var(--transition-bounce) !important;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3) !important;
    margin-top: 20px !important;
}

.shumokh-fluent-form .ff-btn-submit:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4) !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .shumokh-application-form-container {
        padding: 30px 20px !important;
        margin: 20px 10px !important;
    }

    .shumokh-curriculum-dropdowns {
        grid-template-columns: 1fr !important;
    }

    .shumokh-form-title {
        font-size: 2rem !important;
    }
}

/* --- Mega Menu (الاقسام) --- */
.shumokh-custom-mega {
    position: static !important;
}

.shumokh-custom-mega .category-menu {
    position: relative;
}

.shumokh-mega-dropdown {
    width: calc(100vw - 40px) !important;
    max-width: 1060px !important;
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    transform: none !important;
    padding: 40px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 10000 !important;
    flex-direction: row !important;
}

/* Force show on hover of the parent item */
.cat-menu-item:hover .shumokh-mega-dropdown {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.shumokh-mega-menu-wrapper {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: flex-start;
}

.shumokh-mega-column {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    border-radius: 12px;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}

.shumokh-mega-column:hover {
    background: #fbfbfb;
    border-color: #f3f4f6;
}

.shumokh-mega-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px !important;
    padding-bottom: 15px;
    border-bottom: 2px solid #be123c;
    /* Red accent */
    color: var(--shumokh-text-dark);
}

.shumokh-mega-title a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit !important;
    text-decoration: none !important;
}

.shumokh-mega-icon {
    font-size: 1.8rem;
}

/* STRICT HOVER REVEAL: Subcategories MUST be hidden by default */
.shumokh-mega-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: none !important;
    /* Use display: none for strict control */
}

.shumokh-mega-column:hover .shumokh-mega-list {
    display: block !important;
    animation: shumokhFadeIn 0.3s ease-out;
}

@keyframes shumokhFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shumokh-mega-list li {
    margin-bottom: 12px !important;
    padding: 5px 0;
}

.shumokh-mega-list li a {
    font-size: 1.1rem;
    color: var(--shumokh-text-light) !important;
    font-weight: 600;
    transition: color 0.2s ease;
    display: block;
    text-decoration: none !important;
}

.shumokh-mega-list li a:hover {
    color: #dc2626 !important;
}

.shumokh-mega-dropdown h3 {
    font-family: 'Tajawal', 'Inter', sans-serif;
}

/* Dark Overlay on Hover (Optional but premium) */
.cat-menu-item:hover::after {
    display: none;
    /* Keep it clean for now */
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .shumokh-mega-dropdown {
        width: 100% !important;
        position: relative !important;
        right: 0 !important;
        top: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        padding: 15px !important;
        box-shadow: none !important;
    }

    .shumokh-mega-menu-wrapper {
        flex-direction: column;
    }

    .shumokh-mega-list {
        display: block !important;
        /* Always show sub-items on mobile */
        opacity: 1 !important;
    }
}