/* ============================================
   QIELTS Moodle Custom CSS
   Modern Education Tech Theme
   Based on Bootstrap 5
   ============================================ */

/* ============================================
   BOOTSTRAP ICONS - Loaded via HTML head
   ============================================ */
/* Bootstrap Icons are loaded via <link> tag in HTML head */

/* ============================================
   COLOR PALETTE - TECH EDUCATION
   ============================================ */
:root {
    /* Primary Tech Colors */
    --tech-primary: #2563eb;        /* Blue - Trust, Technology */
    --tech-primary-dark: #1e40af;   /* Dark Blue */
    --tech-primary-light: #3b82f6;  /* Light Blue */
    --tech-secondary: #06b6d4;      /* Cyan - Innovation */
    --tech-accent: #8b5cf6;         /* Purple - Creativity */
    --tech-success: #10b981;         /* Green - Success */
    --tech-warning: #f59e0b;        /* Amber - Attention */
    --tech-danger: #ef4444;          /* Red - Alert */
    
    /* Neutral Colors */
    --tech-gray-50: #f9fafb;
    --tech-gray-100: #f3f4f6;
    --tech-gray-200: #e5e7eb;
    --tech-gray-300: #d1d5db;
    --tech-gray-400: #9ca3af;
    --tech-gray-500: #6b7280;
    --tech-gray-600: #4b5563;
    --tech-gray-700: #374151;
    --tech-gray-800: #1f2937;
    --tech-gray-900: #111827;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-tech: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #06b6d4 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: var(--tech-gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   NAVBAR - MODERN TECH STYLE
   ============================================ */
.navbar,
.navbar-light,
.navbar-dark {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    border-bottom: 2px solid var(--tech-primary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1030;
}

/* Fix modal backdrop overlay on navbar */
.modal-backdrop {
    z-index: 1029 !important;
}

.modal-backdrop.show {
    z-index: 1029 !important;
}

/* Hide backdrop when navbar collapse is open (mobile menu) */
.navbar-collapse.show ~ .modal-backdrop,
.navbar-collapse.collapsing ~ .modal-backdrop {
    display: none !important;
}

/* Remove any backdrop from navbar collapse */
.navbar-collapse::before,
.navbar-collapse::after {
    display: none !important;
}

/* Fix Bootstrap collapse backdrop on mobile */
.collapse.show::before,
.collapse.collapsing::before {
    display: none !important;
}

/* Ensure navbar is above any overlays */
.navbar-collapse {
    position: relative;
    z-index: 1031;
}

.navbar-nav {
    position: relative;
    z-index: 1032;
}

/* Fix dropdown menu z-index */
.dropdown-menu {
    z-index: 1050 !important;
}

/* Remove any overlay on navbar items */
.navbar .nav-item,
.navbar .navbar-nav,
.navbar .usermenu {
    position: relative;
    z-index: 1033;
}

/* Fix popover z-index */
.popover-region-container {
    z-index: 1060 !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
}

.navbar-nav .nav-link {
    color: var(--tech-gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--tech-primary) !important;
    background: var(--tech-gray-100);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--tech-primary) !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ============================================
   BUTTONS - TECH STYLE
   ============================================ */
.btn,
button {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary,
.btn-primary-custom {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    box-shadow: var(--shadow-md);
    border: none !important;
}

.btn-primary:hover,
.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-tech) !important;
}

.btn-primary:active,
.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--tech-gray-600) !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background: var(--tech-gray-700) !important;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--tech-success) !important;
    color: #fff !important;
}

.btn-warning {
    background: var(--tech-warning) !important;
    color: #fff !important;
}

.btn-danger {
    background: var(--tech-danger) !important;
    color: #fff !important;
}

.btn-outline-primary {
    border: 2px solid var(--tech-primary) !important;
    color: var(--tech-primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--tech-primary) !important;
    color: #fff !important;
}

/* ============================================
   CARDS - MODERN EDUCATION STYLE
   ============================================ */
.card {
    border: none !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--tech-gray-50);
    border-top: 1px solid var(--tech-gray-200);
    padding: 1rem 1.5rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
}

.card-img-top {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* ============================================
   FORMS - MODERN INPUT STYLE
   ============================================ */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    border: 2px solid var(--tech-gray-300) !important;
    border-radius: var(--radius-lg) !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
    background: #fff;
    font-size: 0.95rem;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--tech-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
}

.form-label {
    font-weight: 600;
    color: var(--tech-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232563eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================
   TABLES - CLEAN TECH STYLE
   ============================================ */
.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.table thead {
    background: var(--gradient-primary) !important;
    color: #fff !important;
}

.table thead th {
    border: none !important;
    padding: 1rem 1.5rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--tech-gray-200);
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem 1.5rem !important;
    vertical-align: middle;
}

/* ============================================
   LOGIN PAGE - EDUCATION TECH THEME
   ============================================ */
#page-login-index,
#page-login-signup {
    background: var(--gradient-tech) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#page-login-index::before,
#page-login-signup::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#page-login-index .card,
#page-login-signup .card {
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-xl);
    border: none;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    max-width: 450px;
    width: 100%;
}

#page-login-index .card-header,
#page-login-signup .card-header {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0 !important;
    padding: 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

#page-login-index .card-body,
#page-login-signup .card-body {
    padding: 2rem;
}

#page-login-index .form-control,
#page-login-signup .form-control {
    margin-bottom: 1rem;
}

/* ============================================
   COURSE CARDS - EDUCATION STYLE
   ============================================ */
.coursebox,
.course-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

.coursebox:hover,
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--tech-primary);
}

.coursename {
    font-weight: 600;
    color: var(--tech-primary);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   COMPLETELY NEW COURSE CARDS DESIGN
   ============================================ */
/* Category Page Header */
#page-course-index-category .page-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--tech-primary);
}

#page-course-index-category .page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--tech-gray-900);
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Category Description */
.category-description-custom {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 15px;
    border-left: 4px solid var(--tech-primary);
    padding: 2rem !important;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.category-description-custom p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--tech-gray-700);
}

.category-description-custom p:last-child {
    margin-bottom: 0;
}

/* Courses Container */
#courses-container-custom {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

#courses-container-custom.courses-list-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.course-card-modern-wrapper {
    width: 100%;
}

.course-card-modern-new {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.course-card-modern-new:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Image Section */
.course-card-image-section {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

.course-image-link-new {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.course-card-image-new {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card-modern-new:hover .course-card-image-new {
    transform: scale(1.15);
}

.course-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.course-card-modern-new:hover .course-image-overlay {
    opacity: 0.7;
}

.course-badge-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.course-category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--tech-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Content Section */
.course-card-content-section {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title-wrapper {
    margin: 0 0 1rem 0;
}

.course-card-title-new {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    color: var(--tech-gray-900);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    margin: 0;
}

.course-card-title-new:hover {
    color: var(--tech-primary);
}

.course-card-title-new.dimmed {
    opacity: 0.6;
}

.course-card-summary-new {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--tech-gray-600);
    margin: 0 0 1.25rem 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-meta-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tech-gray-200);
    flex-wrap: wrap;
}

.course-card-action-new {
    margin-top: auto;
}

.btn-course-view-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-course-view-new,
.btn-course-view-new * {
    color: #ffffff !important;
}

.btn-course-view-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
}

.btn-course-view-new:hover,
.btn-course-view-new:hover * {
    color: #ffffff !important;
}

.btn-course-view-new i {
    transition: transform 0.3s ease;
}

.btn-course-view-new:hover i {
    transform: translateX(4px);
}

/* View Controls */
.course-view-controls {
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(59, 130, 246, 0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.course-view-controls::before {
    content: 'View Mode:';
    font-weight: 700;
    color: var(--tech-gray-700);
    font-size: 1rem;
}

.view-toggle-btn {
    border: 2px solid var(--tech-primary);
    color: var(--tech-primary);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-btn i {
    font-size: 1.1rem;
}

.view-toggle-btn:hover,
.view-toggle-btn.active {
    background: var(--tech-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* List View Styles */
#courses-container-custom.courses-list-view .course-card-modern-new {
    flex-direction: row;
    height: auto;
}

#courses-container-custom.courses-list-view .course-card-image-section {
    width: 350px;
    min-width: 350px;
    height: 250px;
}

#courses-container-custom.courses-list-view .course-card-content-section {
    flex: 1;
    padding: 2rem;
}

#courses-container-custom.courses-list-view .course-card-title-new {
    font-size: 1.5rem;
    -webkit-line-clamp: 1;
}

#courses-container-custom.courses-list-view .course-card-summary-new {
    -webkit-line-clamp: 4;
    font-size: 1rem;
}

/* Category Description */
.category-description-custom {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 15px;
    border-left: 4px solid var(--tech-primary);
    padding: 2rem !important;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.category-description-custom p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--tech-gray-700);
}

.category-description-custom p:last-child {
    margin-bottom: 0;
}

/* No Courses Message */
.no-courses-message {
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(59, 130, 246, 0.1);
}

.no-courses-message p {
    font-size: 1.25rem;
    color: var(--tech-gray-600);
    margin: 0;
}

.no-courses-message p {
    font-size: 1.25rem;
    color: var(--tech-gray-600);
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    #courses-container-custom {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #courses-container-custom {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    #courses-container-custom.courses-list-view .course-card-modern-new {
        flex-direction: column;
    }
    
    #courses-container-custom.courses-list-view .course-card-image-section {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }
    
    .course-card-content-section {
        padding: 1.5rem;
    }
    
    .course-card-title-new {
        font-size: 1.2rem;
    }
}

/* Hide old coursebox style and show custom grid */
#page-course-index-category .course_category_tree .courses .coursebox {
    display: none !important;
}

#page-course-index-category .course_category_tree .courses {
    display: contents;
}

/* Pagination styling */
.courses-pagination-top,
.courses-pagination-bottom {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.courses-pagination-top .pagination,
.courses-pagination-bottom .pagination {
    margin: 0;
}

.courses-pagination-top .page-link,
.courses-pagination-bottom .page-link {
    color: var(--tech-primary);
    border-color: var(--tech-gray-300);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.25rem;
}

.courses-pagination-top .page-link:hover,
.courses-pagination-bottom .page-link:hover {
    background: var(--tech-primary);
    color: #ffffff;
    border-color: var(--tech-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.courses-pagination-top .page-item.active .page-link,
.courses-pagination-bottom .page-item.active .page-link {
    background: var(--tech-primary);
    border-color: var(--tech-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card-modern-wrapper {
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   COURSE CATEGORIES BLOCK - GRID LAYOUT
   ============================================ */
/* Make block full width - override Bootstrap grid */
#frontblockregion .col-md-6:has(.block_course_list),
#frontblockregion .col-md-6:has(.block-region-frnt-market-a),
.block-region-frnt-market-a {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* Alternative selector for browsers that don't support :has() */
#frontblockregion > .col-md-6:first-child,
#frontblockregion > div:has(.block_course_list) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.block_course_list.block {
    width: 100%;
    max-width: 100%;
}

.block_course_list.block .content {
    padding: 0 !important;
}

.block_course_list.block .content ul.unlist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.block_course_list.block .content ul.unlist li {
    margin: 0 !important;
    padding: 0;
}

.block_course_list.block .content ul.unlist li .column {
    height: 100%;
}

.block_course_list.block .content ul.unlist li a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    min-height: 200px;
}

.block_course_list.block .content ul.unlist li a:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Category Image */
.block_course_list.block .content ul.unlist li a::before {
    content: '';
    display: block;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Category Icon Overlay */
.block_course_list.block .content ul.unlist li a i.afaicon {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.block_course_list.block .content ul.unlist li a:hover i.afaicon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* Category Name */
.block_course_list.block .content ul.unlist li a {
    padding: 0;
    color: var(--tech-gray-900);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.block_course_list.block .content ul.unlist li a .column {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Hide icon from normal flow */
.block_course_list.block .content ul.unlist li a i.afaicon {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.block_course_list.block .content ul.unlist li a:hover i.afaicon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* Category text */
.block_course_list.block .content ul.unlist li a .column {
    padding: 1.25rem 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 60px;
}

.block_course_list.block .content ul.unlist li a .column > *:not(i) {
    color: var(--tech-gray-900);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    z-index: 1;
    width: 100%;
}

/* Footer */
.block_course_list.block .content .footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tech-gray-200);
    text-align: center;
}

.block_course_list.block .content .footer a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.block_course_list.block .content .footer a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1200px) {
    .block_course_list.block .content ul.unlist {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .block_course_list.block .content ul.unlist {
        grid-template-columns: 1fr;
    }
    
    .block_course_list.block .content ul.unlist li a::before {
        height: 120px;
    }
}

/* ============================================
   COURSE CATEGORIES PAGE - SUBcategories GRID
   ============================================ */
/* Make subcategories full width */
.category-browse,
.category-browse .subcategories {
    width: 100% !important;
    max-width: 100% !important;
}

/* Grid layout for categories */
.subcategories {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategories .category {
    margin: 0 !important;
    padding: 0;
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.subcategories .category:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Category Image Section */
.subcategories .category::before {
    content: '';
    display: block;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    position: relative;
    background-size: cover;
    background-position: center;
    background-image: var(--category-image, linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%));
}

/* Category Info */
.subcategories .category .info {
    padding: 1.25rem 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    position: relative;
}

.subcategories .category .info h3.categoryname {
    margin: 0;
    width: 100%;
    text-align: center;
}

.subcategories .category .info h3.categoryname a {
    color: var(--tech-gray-900);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.subcategories .category .info h3.categoryname a:hover {
    color: var(--tech-primary);
}

/* Category Icon (if exists) */
.subcategories .category .info::before {
    content: '\f19d'; /* fa-graduation-cap */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.subcategories .category:hover .info::before {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* Hide default category content */
.subcategories .category .content {
    display: none;
}

/* Responsive for subcategories */
@media (max-width: 1200px) {
    .subcategories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .subcategories {
        grid-template-columns: 1fr;
    }
    
    .subcategories .category::before {
        height: 120px;
    }
}

/* ============================================
   DASHBOARD (MY MOODLE)
   ============================================ */
/* ============================================
   MY COURSES / DASHBOARD PAGE - ENHANCED
   ============================================ */
#page-my-index,
body.page-mycourses {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    padding-bottom: 3rem;
}

#page-my-index .card,
body.page-mycourses .card {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    background: #fff;
    overflow: hidden;
}

#page-my-index .card:hover,
body.page-mycourses .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

#page-my-index .card-header,
body.page-mycourses .card-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    border-bottom: none;
}

#page-my-index .card-body,
body.page-mycourses .card-body {
    padding: 1.5rem;
}

/* Recently Accessed Courses Block */
#page-my-index .block_recentlyaccessedcourses,
body.page-mycourses .block_recentlyaccessedcourses {
    background: transparent;
    border: none;
    box-shadow: none;
}

#page-my-index .block_recentlyaccessedcourses .card-grid,
body.page-mycourses .block_recentlyaccessedcourses .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

#page-my-index .block_recentlyaccessedcourses .card,
body.page-mycourses .block_recentlyaccessedcourses .card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#page-my-index .block_recentlyaccessedcourses .card:hover,
body.page-mycourses .block_recentlyaccessedcourses .card:hover {
    transform: translateY(-8px);
    border-color: var(--tech-primary);
    box-shadow: var(--shadow-xl);
}

/* Course Overview Block */
#page-my-index .block_course_overview,
body.page-mycourses .block_course_overview {
    background: transparent;
    border: none;
    box-shadow: none;
}

#page-my-index .block_course_overview .coursebox,
body.page-mycourses .block_course_overview .coursebox {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--tech-primary);
    transition: all 0.3s ease;
}

#page-my-index .block_course_overview .coursebox:hover,
body.page-mycourses .block_course_overview .coursebox:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
    border-left-width: 6px;
}

/* Dashboard Page Header */
#page-my-index .page-header,
body.page-mycourses .page-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

#page-my-index .page-header h1,
body.page-mycourses .page-header h1 {
    color: #fff;
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}

/* Dashboard Content Region */
#page-my-index .block-region-content,
body.page-mycourses .block-region-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Empty State */
#page-my-index .empty-placeholder,
body.page-mycourses .empty-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--tech-gray-500);
}

#page-my-index .empty-placeholder img,
body.page-mycourses .empty-placeholder img {
    max-width: 200px;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* ============================================
   COURSE VIEW PAGE - ENHANCED
   ============================================ */
#page-course-view {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* Course Header */
#page-course-view .course-header {
    background: var(--gradient-tech);
    color: #fff;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

#page-course-view .course-header h1 {
    color: #fff;
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

#page-course-view .course-header .course-summary {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-top: 1rem;
}

/* Course Content Sections */
#page-course-view .course-content,
#page-course-view #region-main {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--tech-primary);
}

/* Course Sections */
#page-course-view .course-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--tech-gray-200);
    transition: all 0.3s ease;
}

#page-course-view .course-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--tech-primary);
}

#page-course-view .section-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--tech-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--tech-gray-200);
}

/* Course Activities */
#page-course-view .activity {
    background: var(--tech-gray-50);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--tech-primary);
    transition: all 0.2s ease;
}

#page-course-view .activity:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

#page-course-view .activity .activityname {
    font-weight: 600;
    color: var(--tech-gray-800);
    font-size: 1rem;
}

#page-course-view .activity .activityicon {
    margin-right: 0.75rem;
    color: var(--tech-primary);
}

/* Course Navigation */
#page-course-view .course-navigation {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

#page-course-view .course-navigation .nav-link {
    color: var(--tech-gray-700);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

#page-course-view .course-navigation .nav-link:hover,
#page-course-view .course-navigation .nav-link.active {
    background: var(--gradient-primary);
    color: #fff;
}

/* Course Completion */
#page-course-view .completion-progress {
    background: var(--tech-gray-100);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

#page-course-view .progress {
    height: 1rem;
    border-radius: var(--radius-full);
    background: var(--tech-gray-200);
    overflow: hidden;
}

#page-course-view .progress-bar {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Course Blocks Sidebar */
#page-course-view .block {
    background: #fff;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

#page-course-view .block .header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

#page-course-view .block .content {
    padding: 1.25rem;
}

/* ============================================
   USER PROFILE - ENHANCED
   ============================================ */
#page-user-profile {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* Profile Header */
#page-user-profile .userprofile {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 0;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

#page-user-profile .userprofile .profile-header {
    background: var(--gradient-tech);
    color: #fff;
    padding: 3rem 2rem;
    text-align: center;
}

#page-user-profile .userprofile .profile-header .userpicture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xl);
}

#page-user-profile .userprofile .profile-header h1,
#page-user-profile .userprofile .profile-header h2 {
    color: #fff;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* Profile Content */
#page-user-profile .userprofile .profile-content {
    padding: 2rem;
}

#page-user-profile .userprofile .profile-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--tech-gray-200);
}

#page-user-profile .userprofile .profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#page-user-profile .userprofile .profile-section h3 {
    color: var(--tech-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--tech-gray-200);
}

#page-user-profile .userprofile .profile-field {
    display: flex;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--tech-gray-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--tech-primary);
}

#page-user-profile .userprofile .profile-field .field-label {
    font-weight: 600;
    color: var(--tech-gray-700);
    min-width: 150px;
    margin-right: 1rem;
}

#page-user-profile .userprofile .profile-field .field-value {
    color: var(--tech-gray-800);
    flex: 1;
}

/* Profile Tabs */
#page-user-profile .nav-tabs {
    border-bottom: 2px solid var(--tech-gray-200);
    margin-bottom: 2rem;
}

#page-user-profile .nav-tabs .nav-link {
    color: var(--tech-gray-700);
    font-weight: 500;
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

#page-user-profile .nav-tabs .nav-link:hover {
    color: var(--tech-primary);
    background: var(--tech-gray-50);
}

#page-user-profile .nav-tabs .nav-link.active {
    color: var(--tech-primary);
    background: transparent;
    border-bottom-color: var(--tech-primary);
    font-weight: 700;
}

/* Profile Courses */
#page-user-profile .profile-courses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

#page-user-profile .profile-courses .course-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--tech-primary);
    transition: all 0.3s ease;
}

#page-user-profile .profile-courses .course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   BADGES & ALERTS
   ============================================ */
.badge {
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary,
.badge-info {
    background: var(--gradient-primary) !important;
    color: #fff !important;
}

.badge-success {
    background: var(--tech-success) !important;
    color: #fff !important;
}

.badge-warning {
    background: var(--tech-warning) !important;
    color: #fff !important;
}

.badge-danger {
    background: var(--tech-danger) !important;
    color: #fff !important;
}

.alert {
    border-radius: var(--radius-lg);
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--tech-success);
    border-left: 4px solid var(--tech-success);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--tech-primary);
    border-left: 4px solid var(--tech-primary);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--tech-warning);
    border-left: 4px solid var(--tech-warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--tech-danger);
    border-left: 4px solid var(--tech-danger);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--tech-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--tech-primary-dark);
}

.breadcrumb-item.active {
    color: var(--tech-gray-600);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--tech-gray-400);
    font-weight: bold;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    color: var(--tech-primary);
    border-color: var(--tech-gray-300);
    border-radius: var(--radius-md);
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary) !important;
    border-color: var(--tech-primary) !important;
    color: #fff !important;
}

.pagination .page-link:hover {
    color: var(--tech-primary-dark);
    background: var(--tech-gray-100);
    border-color: var(--tech-primary);
    transform: translateY(-2px);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    height: 1rem;
    border-radius: var(--radius-lg);
    background: var(--tech-gray-200);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: var(--gradient-primary) !important;
    border-radius: var(--radius-lg);
    transition: width 0.6s ease;
}

/* ============================================
   DROPDOWNS
   ============================================ */
.dropdown-menu {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: none;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--tech-primary);
    transform: translateX(4px);
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    border-radius: var(--radius-2xl);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0 !important;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.modal-header .close,
.modal-header .btn-close {
    color: #fff !important;
    opacity: 1;
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--tech-gray-200);
    padding: 1.5rem 2rem;
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl) !important;
}

/* ============================================
   TABS
   ============================================ */
.nav-tabs {
    border-bottom: 3px solid var(--tech-gray-200);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--tech-gray-600);
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-right: 0.5rem;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--tech-primary-light);
    color: var(--tech-primary);
    background: rgba(37, 99, 235, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--tech-primary) !important;
    border-bottom-color: var(--tech-primary) !important;
    background: rgba(37, 99, 235, 0.1);
}

/* ============================================
   LIST GROUPS
   ============================================ */
.list-group-item {
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
    border: 2px solid var(--tech-gray-200);
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
}

.list-group-item:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-color: var(--tech-primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.list-group-item.active {
    background: var(--gradient-primary) !important;
    border-color: var(--tech-primary) !important;
    color: #fff !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary-custom {
    color: var(--tech-primary) !important;
}

.bg-primary-custom {
    background: var(--gradient-primary) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-tech {
    box-shadow: var(--shadow-lg);
}

.border-tech {
    border: 2px solid var(--tech-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: #fff;
    }
    
    .navbar,
    .btn,
    .card::before {
        display: none;
    }
}

/* ============================================
   BLOCKS - ENHANCED STYLING
   ============================================ */
.block {
    background: #fff;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.block:hover {
    box-shadow: var(--shadow-lg);
}

.block .header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1.125rem;
    border-bottom: none;
}

.block .header h2,
.block .header .title {
    color: #fff;
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0;
}

.block .content {
    padding: 1.25rem;
    background: #fff;
}

/* Calendar Block */
.block_calendar_month .calendar_event_course {
    background: var(--tech-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.block_calendar_month .calendar_event_global {
    background: var(--tech-accent);
    color: #fff;
}

.block_calendar_month .calendar_event_user {
    background: var(--tech-secondary);
    color: #fff;
}

/* Navigation Block */
.block_navigation .block_tree li {
    padding: 0.5rem 0;
}

.block_navigation .block_tree a {
    color: var(--tech-gray-700);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: block;
}

.block_navigation .block_tree a:hover {
    background: var(--tech-gray-50);
    color: var(--tech-primary);
    transform: translateX(4px);
}

.block_navigation .block_tree .active_tree_node > a {
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
}

/* Settings Block */
.block_settings .block_tree a {
    color: var(--tech-gray-700);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: block;
}

.block_settings .block_tree a:hover {
    background: var(--tech-gray-50);
    color: var(--tech-primary);
}

.block_settings .block_tree .active_tree_node > a {
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
}

/* Messages Block */
.block_messages .content .list-group-item {
    border: none;
    border-bottom: 1px solid var(--tech-gray-200);
    padding: 1rem;
    transition: all 0.2s ease;
}

.block_messages .content .list-group-item:hover {
    background: var(--tech-gray-50);
    transform: translateX(4px);
}

/* Online Users Block */
.block_online_users .content .user {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.block_online_users .content .user:hover {
    background: var(--tech-gray-50);
}

.block_online_users .content .userpicture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
    border: 2px solid var(--tech-primary);
}

/* ============================================
   LOGIN PAGE - ENHANCED
   ============================================ */
#page-login-index .login-container,
#page-login-signup .login-container {
    max-width: 450px;
    width: 100%;
    z-index: 1;
}

#page-login-index .btn-primary,
#page-login-signup .btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

#page-login-index .btn-primary:hover,
#page-login-signup .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#page-login-index .form-control:focus,
#page-login-signup .form-control:focus {
    border-color: var(--tech-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

#page-login-index .forgotpassword,
#page-login-signup .forgotpassword {
    color: var(--tech-primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

#page-login-index .forgotpassword:hover,
#page-login-signup .forgotpassword:hover {
    color: var(--tech-primary-dark);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Dashboard */
    #page-my-index .block-region-content,
    body.page-mycourses .block-region-content {
        grid-template-columns: 1fr;
    }
    
    #page-my-index .block_recentlyaccessedcourses .card-grid,
    body.page-mycourses .block_recentlyaccessedcourses .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Course View */
    #page-course-view .course-header {
        padding: 2rem 1rem;
    }
    
    #page-course-view .course-header h1 {
        font-size: 1.75rem;
    }
    
    #page-course-view .course-content,
    #page-course-view #region-main {
        padding: 1.5rem 1rem;
    }
    
    /* Profile */
    #page-user-profile .userprofile .profile-header {
        padding: 2rem 1rem;
    }
    
    #page-user-profile .userprofile .profile-header .userpicture {
        width: 120px;
        height: 120px;
    }
    
    #page-user-profile .profile-courses {
        grid-template-columns: 1fr;
    }
    
    #page-user-profile .userprofile .profile-field {
        flex-direction: column;
    }
    
    #page-user-profile .userprofile .profile-field .field-label {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    /* Blocks */
    .block .content {
        padding: 1rem;
    }
    
    /* Login */
    #page-login-index .card,
    #page-login-signup .card {
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    #page-my-index .page-header h1,
    body.page-mycourses .page-header h1 {
        font-size: 1.5rem;
    }
    
    #page-course-view .course-header h1 {
        font-size: 1.5rem;
    }
    
    #page-user-profile .userprofile .profile-header h1,
    #page-user-profile .userprofile .profile-header h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   BREADCRUMBS - ENHANCED
   ============================================ */
.breadcrumb {
    background: var(--tech-gray-50);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--tech-primary);
}

.breadcrumb-item {
    color: var(--tech-gray-600);
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--tech-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--tech-primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--tech-gray-800);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--tech-gray-400);
    margin: 0 0.75rem;
}

/* ============================================
   PAGINATION - ENHANCED
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    color: var(--tech-primary);
    background: #fff;
    border: 2px solid var(--tech-gray-300);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
}

.pagination .page-link:hover {
    background: var(--tech-primary);
    color: #fff;
    border-color: var(--tech-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: #fff;
    border-color: var(--tech-primary);
    box-shadow: var(--shadow-md);
}

.pagination .page-item.disabled .page-link {
    color: var(--tech-gray-400);
    background: var(--tech-gray-100);
    border-color: var(--tech-gray-200);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   MODALS - ENHANCED
   ============================================ */
.modal-content {
    border-radius: var(--radius-2xl);
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: #fff;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.modal-header .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--tech-gray-200);
    padding: 1.5rem 2rem;
    background: var(--tech-gray-50);
}

/* ============================================
   DROPDOWNS - ENHANCED
   ============================================ */
.dropdown-menu {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--tech-gray-700);
}

.dropdown-item:hover {
    background: var(--tech-gray-50);
    color: var(--tech-primary);
    transform: translateX(4px);
}

.dropdown-item.active,
.dropdown-item:active {
    background: var(--gradient-primary);
    color: #fff;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--tech-gray-200);
}

/* ============================================
   TABS - ENHANCED
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid var(--tech-gray-200);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    color: var(--tech-gray-700);
    font-weight: 500;
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--tech-primary);
    background: var(--tech-gray-50);
    border-bottom-color: var(--tech-gray-300);
}

.nav-tabs .nav-link.active {
    color: var(--tech-primary);
    background: transparent;
    border-bottom-color: var(--tech-primary);
    font-weight: 700;
}

.tab-content {
    padding: 1.5rem;
    background: #fff;
    border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   TOOLTIPS & POPOVERS - ENHANCED
   ============================================ */
.tooltip-inner {
    background: var(--tech-gray-800);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.popover {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.popover-header {
    background: var(--gradient-primary);
    color: #fff;
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-weight: 600;
}

.popover-body {
    padding: 1rem;
}

/* ============================================
   PROGRESS BARS - ENHANCED
   ============================================ */
.progress {
    height: 1rem;
    border-radius: var(--radius-full);
    background: var(--tech-gray-200);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* ============================================
   LOADING SPINNERS - ENHANCED
   ============================================ */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    border-color: var(--tech-primary);
    border-right-color: transparent;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-grow {
    width: 3rem;
    height: 3rem;
    background-color: var(--tech-primary);
    animation: spinner-grow 0.75s ease-in-out infinite;
}

@keyframes spinner-grow {
    0%, 100% { transform: scale(0); }
    50% { transform: scale(1); }
}

/* ============================================
   SCROLLBAR - CUSTOM STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--tech-gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--tech-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-tech);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .sidebar,
    .block,
    .btn,
    .pagination,
    .footer {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
    
    .card,
    .course-content {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
}

