/* Minimal Custom CSS - Only essential styles that Bootstrap doesn't provide */

/* Arabic Font */
* {
    font-family: "Zain", sans-serif !important;
}

/* Custom CSS Variables */
:root {
    --primary: #06BBCC;
    --light: #F0FBFC;
    --dark: #181d38;
    --white: #FFFFFF;
    --navbar-height: 80px;
}

:root, [data-bs-theme="light"] {
    --navbar-bg: var(--primary);
}

[data-bs-theme="dark"] {
    --primary: #06BBCC;
    --light: #1e2530;
    --dark: #F0FBFC;
    --bs-body-bg: #101524;
    --bs-body-color: #dee2e6;
    --card-bg: #181d38;
    --navbar-bg: #101524; /* Dark background for navbar in dark mode */
}

/* Card dark mode overrides */
[data-bs-theme="dark"] .card {
    background-color: var(--card-bg);
    border-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .team-member-card {
    background: linear-gradient(145deg, #181d38 0%, #101524 100%);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Force dark backgrounds on elements that might use light classes */
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .text-dark {
    color: var(--dark) !important;
}

[data-bs-theme="dark"] .text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .border-white {
    border-color: rgba(255,255,255,0.1) !important;
}

/* Filter Section Overrides */
[data-bs-theme="dark"] .filter-section {
    background-color: #181d38; /* Dark card background */
    border: 1px solid rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .category-filter,
[data-bs-theme="dark"] .subject-filter {
    background-color: #2b3040; /* Slightly lighter than card */
    color: #dee2e6;
    border-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .category-filter:hover,
[data-bs-theme="dark"] .subject-filter:hover {
    background-color: #353b4d;
}

[data-bs-theme="dark"] .category-filter.active,
[data-bs-theme="dark"] .subject-filter.active {
    color: #fff;
    /* Active color usually set by inline style or specific class, ensure text is white */
}

/* Teammate Card Overrides - Fix photo wrapper */
[data-bs-theme="dark"] .member-photo-wrapper,
[data-bs-theme="dark"] .member-photo-placeholder {
    background: linear-gradient(135deg, #2b3040 0%, #181d38 100%);
    border-bottom-color: rgba(6, 187, 204, 0.2);
}

/* Fix "About" section overlays and cards */
[data-bs-theme="dark"] .img-overlay-dark {
    background: rgba(0,0,0,0.7);
}

/* Override inline background color for course images */
[data-bs-theme="dark"] .course-card .card-img-top,
[data-bs-theme="dark"] .card-img-top {
    background-color: var(--card-bg) !important;
}

/* Nav Tabs in Dark Mode */
[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #dee2e6;
}
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--bs-body-bg);
    border-color: rgba(255,255,255,0.1) rgba(255,255,255,0.1) var(--bs-body-bg);
    color: var(--primary);
}

/* Dark Mode Shadows */
[data-bs-theme="dark"] .shadow,
[data-bs-theme="dark"] .shadow-lg,
[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
}

[data-bs-theme="dark"] .course-item:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.4) !important;
}

/* Footer Fixes */
[data-bs-theme="dark"] footer.bg-dark {
    background-color: #0b0f19 !important; /* Very dark background for footer */
    border-top: 1px solid rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] footer .social-link {
    background-color: rgba(255,255,255,0.05);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex; /* Ensure flexbox is active */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 0; /* Remove padding to ensure centering */
    line-height: 0; /* Reset line height */
}

/* Ensure icons inside social links are centered */
[data-bs-theme="dark"] footer .social-link i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Brand colors for social links in dark mode */
[data-bs-theme="dark"] footer .social-link[data-hover-color="#1877f2"] { color: #1877f2 !important; }
[data-bs-theme="dark"] footer .social-link[data-hover-color="#ff0000"] { color: #ff4444 !important; }
[data-bs-theme="dark"] footer .social-link[data-hover-color="#25d366"] { color: #25d366 !important; }
[data-bs-theme="dark"] footer .social-link[data-hover-color="#0088cc"] { color: #33aadd !important; }

/* Alert improvements for Dark Mode */
[data-bs-theme="dark"] .alert {
    background-color: #1e2436;
    border: 1px solid rgba(255,255,255,0.1);
    color: #e9ecef;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

[data-bs-theme="dark"] .alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.2) 0%, rgba(20, 108, 67, 0.2) 100%);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75b798;
}

[data-bs-theme="dark"] .alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(204, 154, 6, 0.2) 100%);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffda6a;
}

[data-bs-theme="dark"] .alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.2) 0%, rgba(12, 166, 197, 0.2) 100%);
    border-color: rgba(13, 202, 240, 0.3);
    color: #6edff6;
}

[data-bs-theme="dark"] .alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(176, 42, 55, 0.2) 100%);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

[data-bs-theme="dark"] .alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] footer .social-link:hover {
    background-color: rgba(255,255,255,0.15);
    transform: translateY(-3px);
    border-color: currentColor;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Fix Hero Section Buttons in Dark Mode */
[data-bs-theme="dark"] .hero-section .btn-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #f8f9fa !important;
}

[data-bs-theme="dark"] .hero-section .btn-light:hover {
    background-color: #e2e6ea !important;
    border-color: #dae0e5 !important;
}

[data-bs-theme="dark"] .hero-section .btn-outline-light {
    color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

[data-bs-theme="dark"] .hero-section .btn-outline-light:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Team Member Card Dark Mode Improvements */
[data-bs-theme="dark"] .team-member-card {
    background: linear-gradient(145deg, #1e2436 0%, #151a27 100%);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .team-member-card:hover {
    background: linear-gradient(145deg, #23293d 0%, #1a2030 100%);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border-color: var(--primary);
}

[data-bs-theme="dark"] .team-member-card .member-photo-wrapper {
    border-bottom: 2px solid rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .team-member-card:hover .member-photo-wrapper {
    border-bottom-color: var(--primary);
}

[data-bs-theme="dark"] .card-content {
    background: transparent !important;
    border-top-color: rgba(255,255,255,0.1);
    box-shadow: none;
}

[data-bs-theme="dark"] .bio-text {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .team-member-card .social-link {
    background: rgba(255,255,255,0.05) !important;
    color: #dee2e6;
    border: 1px solid rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .team-member-card .social-link:hover {
    background: var(--primary) !important;
    color: #fff;
    border-color: var(--primary);
}

/* Fix flex display for icons to ensure centering */
[data-bs-theme="dark"] .team-member-card .social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[data-bs-theme="dark"] .team-member-card .social-link i {
    display: block; /* Change from flex to block inside the flex container */
    line-height: 1;
    margin: 0;
    width: auto; /* Remove width 100% which might be causing offset */
    height: auto;
    font-size: 1.2rem;
}

/* Course Card Contrast Fix */
[data-bs-theme="dark"] .course-card .card {
    background-color: #1e2436; /* Slightly lighter than main bg for contrast */
    border: 1px solid rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .course-card .card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4) !important;
}

/* Help Button & Notifications */
[data-bs-theme="dark"] .student-help-popup,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e2436;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

[data-bs-theme="dark"] .student-help-popup .help-popup-header {
    background-color: rgba(255,255,255,0.05);
    border-bottom-color: rgba(255,255,255,0.1);
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #dee2e6;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: rgba(255,255,255,0.1);
}

/* Ensure icons in help popup/notifications are visible */
[data-bs-theme="dark"] .student-help-popup i,
[data-bs-theme="dark"] .dropdown-menu i {
    color: var(--primary);
}

/* Badge visibility in course cards */
[data-bs-theme="dark"] .badge.bg-light {
    background-color: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

/* Spinner Animation */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* Navbar Dropdown Arrow */
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/* Course Item Hover Effect */
.course-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* Link Hover Effects */
.hover-primary:hover {
    color: var(--primary) !important;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Navbar Sticky Animation */
.navbar {
    transition: all 0.3s ease;
    height: var(--navbar-height);
    background-color: var(--navbar-bg) !important;
}

.navbar.scrolled {
    backdrop-filter: blur(10px);
    background-color: var(--navbar-bg) !important;
}

/* Navbar collapse animation */
.navbar-collapse {
    transition: all 0.3s ease;
}

.navbar-collapse.collapsing {
    transition: height 0.35s ease;
}

/* Ensure proper navbar button spacing and sizing */
.navbar .d-flex {
    gap: 0.75rem;
}

.navbar .btn {
    white-space: nowrap;
    min-width: fit-content;
}

/* Card Animations */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    width: 44px;
    height: 44px;
    text-align: center;
    line-height: 44px;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Bootstrap Extension Classes */
.text-primary-hover:hover {
    color: var(--primary) !important;
}

.bg-primary-light {
    background-color: var(--light) !important;
}

.border-primary-light {
    border-color: var(--light) !important;
}

/* Loading States */
.loading-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
}

/* Grade Card Hover Effects */
.grade-card {
    transition: all 0.3s ease;
}

.grade-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.grade-card .position-absolute {
    transition: all 0.3s ease;
}

/* Course Item Overlay Hover - Show overlay on hover */
*:hover > .position-absolute[style*="opacity: 0"] {
    opacity: 1 !important;
}

/* Hover overlay should be behind badges - target all course cards, not just with course-item class */
.position-absolute[style*="background: rgba(0,0,0,0.3)"],
.position-absolute[style*="background: rgba(0,0,0,0.5)"] {
    z-index: 5 !important;
}

/* Grade and subject badges should have higher z-index than hover overlay */
.grade-tags-container, .subject-badges-container {
    z-index: 15 !important;
}

/* Status badges at top-right should always be on top */
.position-absolute.top-0.end-0 {
    z-index: 20 !important;
}

.grade-tags-container .badge {
    z-index: 1;
}

/* Video Container Improvements */
.ratio iframe,
.ratio video {
    border-radius: 0.5rem;
}

/* Alert Improvements - Positioned in top-right corner */
.alert {
    border: none;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    position: fixed;
    top: calc(var(--navbar-height) - 25px);
    right: 20px;
    width: 350px;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Stack multiple alerts vertically */
.alert:nth-of-type(2) {
    top: calc(var(--navbar-height) + 50px);
}

.alert:nth-of-type(3) {
    top: calc(var(--navbar-height) + 125px);
}

.alert:nth-of-type(4) {
    top: calc(var(--navbar-height) + 200px);
}

/* Improve close button styling */
.alert .btn-close {
    background: none;
    border: none;
    opacity: 0.8;
    transition: all 0.2s ease;
    padding: 0.25rem;
    margin: -0.25rem -0.25rem -0.25rem 0;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    position: relative;
}

/* Ensure close button has visible X symbol */
.alert .btn-close::before {
    content: "×";
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    color: currentColor;
}

.alert .btn-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.alert .btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.15);
    opacity: 1;
}

/* Ensure alert content doesn't overlap with close button */
.alert > div:first-child,
.alert-content {
    flex: 1;
    margin-right: 0.5rem;
}

/* Slide in animation for alerts */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide out animation for dismissing alerts */
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Apply slide out animation when alert is being dismissed */
.alert.fade {
    animation: slideOutRight 0.3s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

/* Enhanced close button visibility for different alert types */
.alert-success .btn-close::before {
    color: #155724;
}

.alert-warning .btn-close::before {
    color: #856404;
}

.alert-info .btn-close::before {
    color: #0c5460;
}

.alert-danger .btn-close::before {
    color: #721c24;
}

/* Close button hover effects for better visibility */
.alert-success .btn-close:hover {
    background-color: rgba(21, 87, 36, 0.1);
}

.alert-warning .btn-close:hover {
    background-color: rgba(133, 100, 4, 0.1);
}

.alert-info .btn-close:hover {
    background-color: rgba(12, 84, 96, 0.1);
}

.alert-danger .btn-close:hover {
    background-color: rgba(114, 28, 36, 0.1);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .alert {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        width: auto;
    }
}

@media (max-width: 576px) {
    .alert {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        width: auto;
        font-size: 0.9rem;
    }
}

/* Progress Bar Improvements */
.progress {
    border-radius: 1rem;
    background-color: #f8f9fa;
}

.progress-bar {
    border-radius: 1rem;
    background: linear-gradient(90deg, var(--primary) 0%, #4dd0e1 100%);
}

/* Badge Improvements */
.badge {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Form Improvements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(6, 187, 204, 0.25);
}

/* Button Improvements */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4dd0e1 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059aa5 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 187, 204, 0.3);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Navigation Improvements */
.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar .btn {
    transition: all 0.3s ease;
    border-width: 2px;
    font-weight: 500;
}

.navbar .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Disable transform effects on mobile for better performance */
@media (max-width: 991.98px) {
    .navbar .btn:hover {
        transform: none !important;
    }
}

/* Proper navbar button styling for better contrast and hover effects */
.navbar .btn-outline-light {
    color: white !important;
    border-color: rgba(255,255,255,0.8) !important;
    background-color: transparent !important;
}

.navbar .btn-outline-light:hover,
.navbar .btn-outline-light:focus {
    color: white !important;
    background-color: rgba(255,255,255,0.2) !important;
    border-color: white !important;
    box-shadow: 0 4px 12px rgba(255,255,255,0.3) !important;
}

.navbar .btn-light {
    color: var(--dark) !important;
    background-color: white !important;
    border-color: white !important;
}

.navbar .btn-light:hover,
.navbar .btn-light:focus {
    color: var(--dark) !important;
    background-color: rgba(255,255,255,0.9) !important;
    border-color: white !important;
    box-shadow: 0 4px 12px rgba(255,255,255,0.3) !important;
}

/* Fix Create Account button in Dark Mode (Text visibility) */
[data-bs-theme="dark"] .navbar .btn-light {
    color: #181d38 !important; /* Force actual dark color for text */
    background-color: #e9ecef !important; /* Slightly dimmed white */
    border-color: #e9ecef !important;
}

[data-bs-theme="dark"] .navbar .btn-light:hover {
    background-color: #fff !important;
    box-shadow: 0 0 15px rgba(255,255,255,0.3) !important;
}

/* Ensure navbar buttons are always visible */
.navbar .d-flex .btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mobile navbar improvements - Fix overflow and contrast issues */
@media (max-width: 991.98px) {
    /* Give collapsed navbar a consistent background matching the main navbar */
    .navbar-collapse {
        background-color: var(--navbar-bg) !important;
        backdrop-filter: blur(10px);
        margin: 1rem -1rem -1rem -1rem;
        padding: 1rem;
        border-radius: 0 0 1rem 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .navbar .d-flex {
        flex-direction: column;
        gap: 12px !important;
        align-items: stretch !important;
        width: 100%;
        margin-top: 1rem;
    }

    .navbar .btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 0.5rem;
        transform: none !important; /* Disable transform on mobile */
    }

    /* Enhanced mobile button styling - outline buttons (Login, Profile, etc.) */
    .navbar .btn-outline-light {
        background-color: transparent !important;
        border-color: white !important;
        color: white !important;
        border-width: 2px !important;
    }

    .navbar .btn-outline-light:hover,
    .navbar .btn-outline-light:focus,
    .navbar .btn-outline-light:active {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: white !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }

    /* Solid white button (Create Account) */
    .navbar .btn-light {
        background-color: white !important;
        border-color: white !important;
        color: var(--dark) !important;
        border-width: 2px !important;
    }

    .navbar .btn-light:hover,
    .navbar .btn-light:focus,
    .navbar .btn-light:active {
        background-color: rgba(255, 255, 255, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.95) !important;
        color: var(--dark) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }

    /* Navbar toggler improvements for mobile */
    .navbar-toggler {
        border: 2px solid rgba(255, 255, 255, 0.8) !important;
        padding: 0.5rem 0.75rem;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3) !important;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
}

/* Footer Link Improvements */
.hover-primary {
    transition: all 0.3s ease;
}

.hover-primary:hover {
    color: var(--primary) !important;
    transform: translateX(-5px);
    text-decoration: none !important;
}

/* Spinner Improvements */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Text Shadow for Better Readability */
.text-white {
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }

    .grade-card:hover {
        transform: none;
    }

    .course-item:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }
}

/* Ensure main content is properly positioned below fixed navbar */
body {
    padding-top: var(--navbar-height);
}

/* Remove body padding on mobile to give more space for content */
@media (max-width: 768px) {
    body {
        padding-top: calc(var(--navbar-height) - 10px);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    #spinner {
        display: none !important;
    }

    .container-xxl {
        max-width: 100% !important;
    }
}

/* Social media links */
.social-link {
    transition: color 0.3s ease;
}

.social-link[data-hover-color="#1877f2"]:hover {
    color: #1877f2 !important;
}

.social-link[data-hover-color="#ff0000"]:hover {
    color: #ff0000 !important;
}

/* Team Member Cards - Enhanced with Outlines & Effects */
.team-member-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    backdrop-filter: blur(15px);
}

.team-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 28px;
    padding: 3px;
    background: linear-gradient(135deg,
        rgba(6, 187, 204, 0.3) 0%,
        rgba(77, 208, 225, 0.2) 25%,
        rgba(248, 249, 250, 0.8) 50%,
        rgba(77, 208, 225, 0.2) 75%,
        rgba(6, 187, 204, 0.3) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    z-index: -1;
    transition: all 0.5s ease;
}

.team-member-card:hover {
    transform: translateY(-15px) scale(1.02) rotateX(5deg);
    box-shadow:
        0 25px 80px rgba(6, 187, 204, 0.4),
        0 0 0 1px rgba(6, 187, 204, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f0fbfc 100%);
}

.team-member-card:hover::before {
    background: linear-gradient(135deg,
        rgba(6, 187, 204, 0.8) 0%,
        rgba(77, 208, 225, 0.6) 25%,
        rgba(6, 187, 204, 0.4) 50%,
        rgba(77, 208, 225, 0.6) 75%,
        rgba(6, 187, 204, 0.8) 100%);
}

.member-photo-wrapper {
    position: relative;
    overflow: hidden;
    height: 320px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid rgba(6, 187, 204, 0.1);
}

.member-photo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    z-index: 2;
}

.team-member-card:hover .member-photo-wrapper::after {
    transform: translateX(100%);
}

.member-photo {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0;
    filter: brightness(1.05) contrast(1.02) saturate(1.05);
    position: relative;
    z-index: 1;
}

.team-member-card:hover .member-photo {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.15) contrast(1.08) saturate(1.15);
}

.member-photo-placeholder {
    height: 320px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

.member-photo-placeholder i {
    font-size: 4.5rem;
    color: #6c757d;
    opacity: 0.6;
}

/* Member Info Positioning - Fixed Position with Subtle Blur */
.member-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 60%,
        transparent 100%);
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
    backdrop-filter: blur(1.5px);
    z-index: 10;
    padding: 0;
    min-height: 80px;
}

.member-info .p-3 {
    padding: 0.8rem 1.2rem !important;
    text-align: left;
}

.member-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 50%,
        rgba(6, 187, 204, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-member-card:hover .member-info {
    background: linear-gradient(180deg,
        rgba(6, 187, 204, 0.8) 0%,
        rgba(6, 187, 204, 0.6) 40%,
        rgba(6, 187, 204, 0.25) 60%,
        transparent 100%);
    backdrop-filter: blur(2px);
}

.team-member-card:hover .member-info::before {
    opacity: 1;
}

.member-info h5 {
    font-size: 1.4rem;
    font-weight: 800;
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.7),
        0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: #ffffff;
    position: relative;
    z-index: 12;
}

.member-info p {
    font-size: 1rem;
    font-weight: 600;
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    opacity: 0.95;
    color: #ffffff;
    position: relative;
    z-index: 12;
}

.card-content {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    position: relative;
    border-top: 2px solid rgba(6, 187, 204, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(6, 187, 204, 0.3) 50%,
        transparent 100%);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.team-member-card:hover .card-content::before {
    transform: scaleX(1);
}

.bio-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
    text-align: center;
    font-weight: 500;
    max-height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    transition: color 0.3s ease;
}

.team-member-card:hover .bio-text {
    color: #343a40;
}

.social-links {
    margin-top: auto;
    padding-top: 0.75rem;
    position: relative;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border-radius: 18px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.4rem;
    border: 2px solid rgba(6, 187, 204, 0.1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    color: #ffffff;
    background: linear-gradient(145deg, var(--primary) 0%, #4dd0e1 100%);
    transform: translateY(-6px) scale(1.2) rotateZ(5deg);
    box-shadow:
        0 15px 35px rgba(6, 187, 204, 0.4),
        0 0 0 3px rgba(6, 187, 204, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Specific social media colors on hover */
.social-link:hover i.bi-linkedin {
    color: #ffffff;
}

.social-link:hover i.bi-twitter-x {
    color: #ffffff;
}

.social-link:hover i.bi-github {
    color: #ffffff;
}

.social-link:hover i.bi-globe {
    color: #ffffff;
}

.social-link:hover i.bi-envelope {
    color: #ffffff;
}

/* Mobile responsive adjustments for team cards */
@media (max-width: 768px) {
    .team-member-card {
        border-radius: 20px;
        margin-bottom: 2rem;
        border-width: 1.5px;
    }

    .team-member-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 40px rgba(6, 187, 204, 0.2);
    }

    .member-photo-wrapper {
        height: 280px;
    }

    .member-info {
        min-height: 75px;
        backdrop-filter: blur(1px);
    }

    .member-info h5 {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .member-info p {
        font-size: 0.9rem;
    }

    .member-info .p-3 {
        padding: 0.6rem 0.9rem !important;
        text-align: left;
    }

    .team-member-card:hover .member-info {
        backdrop-filter: blur(1.5px);
    }

    .social-link {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        border-radius: 14px;
    }

    .social-link:hover {
        transform: translateY(-3px) scale(1.1);
    }

    .bio-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 576px) {
    .team-member-card {
        border-radius: 18px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    }

    .member-photo-wrapper {
        height: 260px;
    }

    .card-content {
        padding: 1.5rem !important;
    }

    .member-info {
        min-height: 70px;
    }

    .member-info h5 {
        font-size: 1.1rem;
    }

    .member-info p {
        font-size: 0.85rem;
    }

    .member-info .p-3 {
        padding: 0.5rem 0.7rem !important;
        text-align: left;
    }

    .bio-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .social-link {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        border-radius: 12px;
    }
}

/* Enhanced Animation Effects */
@keyframes teamCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(15deg);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
        filter: blur(0px);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.team-member-card {
    animation: teamCardFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.team-member-card:hover {
    animation: floatAnimation 2s ease-in-out infinite;
}

/* Stagger animation delays with enhanced effects */
.team-member-card:nth-child(1) {
    animation-delay: 0.1s;
}
.team-member-card:nth-child(2) {
    animation-delay: 0.3s;
}
.team-member-card:nth-child(3) {
    animation-delay: 0.5s;
}
.team-member-card:nth-child(4) {
    animation-delay: 0.7s;
}
.team-member-card:nth-child(5) {
    animation-delay: 0.9s;
}
.team-member-card:nth-child(6) {
    animation-delay: 1.1s;
}

/* Add a subtle pulse effect on focus */
.team-member-card:focus-within {
    animation: none;
    transform: scale(1.02);
    box-shadow:
        0 0 0 4px rgba(6, 187, 204, 0.3),
        0 25px 80px rgba(6, 187, 204, 0.4);
}

/* Enhance the shine effect */
.team-member-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    transform: skewX(-25deg);
    transition: left 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.team-member-card:hover::after {
    left: 100%;
}
