
/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Container */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.8) 0%, rgba(26, 26, 46, 0.7) 50%, rgba(22, 33, 62, 0.8) 100%);
    opacity: 0.7;
}

/* Opacity Control */
.opacity-control-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.opacity-control-container label {
    color: #fff;
    font-size: 12px;
    margin-right: 10px;
}

.opacity-control-container input {
    width: 100px;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.line {
    width: 25px;
    height: 3px;
    background: #00ffff;
    border-radius: 2px;
    transition: all 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 10px;
    width: auto;
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00ffff, #0096ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-link {
    color: #00ffff;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.dashboard-link:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.1);
}

.logout-form {
    display: inline;
}

.logout-button {
    background: linear-gradient(45deg, #ff4757, #ff6b7a);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.logout-button:hover {
    background: linear-gradient(45deg, #ff6b7a, #ff4757);
    transform: translateY(-2px);
}

.nav-link {
    color: #00ffff;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00ffff;
}

.username {
    color: #fff;
    font-weight: 500;
}

.notification-icon {
    position: relative;
    color: #00ffff;
    font-size: 1.2rem;
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glassy Panel Base */
.glassy-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.glassy-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(0, 255, 255, 0.1) 0%, 
        rgba(0, 150, 255, 0.1) 50%, 
        rgba(0, 100, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Glowing Border Effect */
.glowing-border {
    position: relative;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

.glowing-border::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #00ffff, #0096ff, #0064ff, #00ffff);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(8px);
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.3); }
    100% { box-shadow: 0 0 40px rgba(0, 150, 255, 0.6); }
}

@keyframes borderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Content Area */
.content {
    flex: 1;
    padding: 0 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Filters Bar */
.filters-bar {
    margin: 10px 0 20px 0;  /* <-- Reduced top margin and overall spacing */
    padding: 10px;          /* <-- Reduced from 25px to make it thinner */
    border-radius: 15px;
;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 8px 15px;      /* <-- Reduced from 12px to make inputs thinner */
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300ffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 45px;
}

.filter-apply-btn {
    background: linear-gradient(45deg, #00ffff, #0096ff);
    border: none;
    border-radius: 25px;
    color: #fff;
    padding: 8px 24px;      /* <-- Reduced from 12px to make button thinner */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}


.filter-apply-btn:hover {
    background: linear-gradient(45deg, #0096ff, #00ffff);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Section Header */
.section-header {
    text-align: center;
    margin: 40px 0;
}

.section-title {
    font-size: 1em;
    margin-bottom: 10px;

    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    font-weight: 700;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.course-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    margin: 0;
}

/* Active Filter Indicator */
.active-filter-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 10px;
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.clear-filter-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4757;
    text-decoration: none;
    transition: all 0.3s;
}

.clear-filter-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.1);
}

/* Tags Section */
.tags-section {
    margin: 10px 0 20px 0;  /* <-- Reduced top margin from 30px to 10px */
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tags-label {
    color: #00ffff;
    font-weight: 600;
    white-space: nowrap;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%; /* Ensure full width */
    max-width: 100%; /* Prevent overflow */
}

.tag {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    color: #00ffff;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
    display: inline-flex; /* Better for consistent sizing */
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* Prevent text wrapping inside tags */
    margin-bottom: 8px; /* Add space between rows */
}

.tag:hover,
.tag.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    color: #fff;
    transform: translateY(-2px);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* <-- Force exactly 8 columns */
    gap: 10px;
    margin: 70px 0;
}

.course-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.2);
}

.course-image {
    position: relative;
    height: 170px;
    overflow: hidden;
}

.course-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.course-card:hover .course-thumbnail {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #ff4757, #ff6b7a);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
}

.course-info {
    padding: 25px;
}

.course-title {
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.instructor-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ffff, #0096ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9em;
}

.instructor-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

.course-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2em;
    font-weight: bold;
}

.meta-item i {
    color: #00ffff;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.rating,
.students {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    font-weight: bold;
}

.rating i {
    color: #ffd700;
    font-size: 1em;
    font-weight: bold;
}

.students i {
    color: #00ffff;
    font-size: 1em;
    font-weight: bold;
}

.reviews-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1em;
    font-weight: bold;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 500;
    text-transform: uppercase;
}

.badge.primary {
    background: rgb(0, 89, 255);
    color: #ffffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.badge.secondary {
    background: rgba(133, 3, 156, 0.975);
    color: #ccc;
    border: 1px solid rgba(150, 150, 150, 0.3);
}

.badge.info {
    background: rgb(255, 170, 0);
    color: #ffffff;
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.badge.tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.course-price {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.original-price {
    color: red;
    background-color: #ffffff;
    text-decoration: line-through;
    font-size: 1.6em;
    font-weight: 600;
}

.discounted-price {
    color: #00ffff;
    font-size: 1em;
    font-weight: 600;
    background-color: red;
}

.regular-price {
    color: #00ffff;
    font-size: 1.6em;
    font-weight: 600;
}

.instructor-name {
    color: #00ffff;
    font-size: 1em;
    font-weight: 600;
}



.course-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9em;
}

.view-btn {
    background: rgba(186, 2, 248, 0.938);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.enroll-btn {
    background: linear-gradient(45deg, #ff9900, #00f2ff);
    color: #fff;
    border: none;
}

.enroll-btn:hover {
    background: linear-gradient(45deg, #0096ff, #00ffff);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.continue-btn {
    background: linear-gradient(45deg, #2ed573, #7bed9f);
    color: #fff;
    border: none;
}

.continue-btn:hover {
    background: linear-gradient(45deg, #7bed9f, #2ed573);
    box-shadow: 0 0 20px rgba(46, 213, 115, 0.5);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: rgba(255, 255, 255, 0.8);
    grid-column: 1 / -1;
}

.empty-state i {
    color: rgba(0, 255, 255, 0.5);
    margin-bottom: 20px;
    font-size: 3em;
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.empty-state .action-btn.primary {
    background: linear-gradient(45deg, #ff9900, #00eeff);
    color: #fff;
    border: none;
    margin-top: 20px;
    display: inline-flex;
    padding: 12px 24px;
}

.empty-state .action-btn.primary:hover {
    background: linear-gradient(45deg, #0096ff, #00ffff);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Pagination */
.pagination-nav {
    margin: 50px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: flex;
}

.page-link {
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-link:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.page-item.active .page-link {
    background: linear-gradient(45deg, #00ffff, #0096ff);
    border-color: #00ffff;
}

/* Debug Info */
.debug-info {
    margin: 40px 0;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 0, 0.3);
    background: rgba(255, 255, 0, 0.1);
}

.debug-info h4 {
    color: #ffff00;
    margin-bottom: 15px;
}

.debug-info p,
.debug-info li {
    color: rgba(255, 255, 255, 0.8);
    margin: 5px 0;
}

.debug-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Promotional Section */
.promo-section {
    margin: 60px 0;
    padding: 40px;
    text-align: center;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.promo-content {
    position: relative;
    z-index: 2;
}

.promo-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #00ffff, #0096ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-content p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.promo-button {
    background: linear-gradient(45deg, #00ffff, #0096ff);
    color: #fff;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s;
    display: inline-block;
}

.promo-button:hover {
    background: linear-gradient(45deg, #0096ff, #00ffff);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    transform: translateY(-3px);
    color: #fff;
    text-decoration: none;
}

/* Footer */
.footer {
    margin-top: 80px;
    padding: 40px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-column h3 {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-button {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-button:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    color: #fff;
    text-decoration: none;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: #00ffff;
    text-decoration: none;
}

.social-buttons {
    display: flex;
    gap: 15px;
}

.social-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.social-button:nth-child(1) {
    background: linear-gradient(45deg, #3b5998, #4c6ef5);
}

.social-button:nth-child(2) {
    background: linear-gradient(45deg, #1DA1F2, #0077B5);
}

.social-button:nth-child(3) {
    background: linear-gradient(45deg, #E4405F, #F56040);
}

.social-button:nth-child(4) {
    background: linear-gradient(45deg, #0077B5, #00A0DC);
}

.social-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .content {
        padding: 0 30px;
    }
}

@media (max-width: 992px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .header {
        padding: 7px 20px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .header-icons {
        gap: 15px;
    }
    
    .username {
        display: none;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 0 20px;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-apply-btn {
        margin-top: 10px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .course-actions {
        flex-direction: column;
    }
    
    .tags-section {
        margin: 8px 0 15px 0;  /* <-- Reduced spacing on mobile too */
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-title {
        font-size: 1em;
        color: white;
    }
    
    .course-meta {
        justify-content: space-between;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .promo-content h2 {
        font-size: 2em;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
    
    .footer-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .social-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 6px 15px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .header-icons {
        gap: 10px;
    }
    
    .nav-link {
        padding: 4px 5px;
        font-size: 0.9em;
    }
    
    .logout-button {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .content {
        padding: 0 15px;
    }
    
    .filters-bar {
        padding: 12px;          /* <-- Even thinner on mobile */
        margin: 10px 0 15px 0;  /* <-- Pushed up more on mobile */
    }
    
    .course-card {
        margin: 0 10px;
    }
    
    .course-info {
        padding: 20px;
    }
    
    .course-title {
        font-size: 1.2em;
    }
    
    .course-actions .action-btn {
        padding: 12px;
        font-size: 0.8em;
    }
    
    .badges-container {
        gap: 5px;
    }
    
    .badge {
        font-size: 0.6em;
        padding: 3px 6px;
    }
    
    .section-title {
        font-size: 1em;
    }
    
    .course-count {
        font-size: 1em;
    }
    
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state i {
        font-size: 2em;
    }
    
    .promo-section {
        margin: 40px 0;
        padding: 30px 20px;
    }
    
    .promo-content h2 {
        font-size: 1.8em;
    }
    
    .promo-content p {
        font-size: 1em;
    }
    
    .promo-button {
        padding: 12px 24px;
        font-size: 1em;
    }
    
    .opacity-control-container {
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }
    
    .opacity-control-container input {
        width: 40px;
    }
}

/* Animation for course cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.6s ease-out;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.2s; }
.course-card:nth-child(3) { animation-delay: 0.3s; }
.course-card:nth-child(4) { animation-delay: 0.4s; }
.course-card:nth-child(5) { animation-delay: 0.5s; }
.course-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading state for filters */
.filter-input:disabled,
.filter-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.filter-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.filter-apply-btn.loading {
    pointer-events: none;
}

.filter-apply-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .course-card,
    .action-btn,
    .page-link,
    .tag,
    .filter-apply-btn,
    .section-title {
        animation: none;
        transition: none;
    }
    
    .course-card:hover {
        transform: none;
    }
    
    .action-btn:hover,
    .page-link:hover,
    .tag:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .course-card {
        border: 2px solid #00ffff;
    }
    
    .filter-input,
    .filter-select {
        border: 2px solid #00ffff;
    }
    
    .badge {
        border-width: 2px;
    }
    
    .section-title {
        -webkit-text-fill-color: #00ffff;
        text-shadow: none;
    }
}

/* Focus states for keyboard navigation */
.filter-input:focus,
.filter-select:focus,
.action-btn:focus,
.page-link:focus,
.tag:focus,
.nav-link:focus,
.logout-button:focus,
.promo-button:focus,
.footer-button:focus,
.social-button:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .filters-bar,
    .pagination-nav,
    .header,
    .footer,
    .promo-section,
    .opacity-control-container {
        display: none;
    }
    
    .course-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
        background: white;
        color: black;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .course-title,
    .instructor-name,
    .course-description {
        color: black;
    }
}

/* Sidebar styles (if needed) */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-open .sidebar-overlay {
    display: block;
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00ffff, #0096ff);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0096ff, #00ffff);
}



/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 15px 0 10px 0;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 25px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.mobile-filter-toggle:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.mobile-filter-toggle .toggle-icon {
    transition: transform 0.3s;
}

.mobile-filter-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Hide filters on mobile by default */
@media (max-width: 768px) {
    .mobile-filter-toggle {
        display: flex;
    }
    
    .filters-bar {
        display: none;
        margin-top: 0;
    }
    
    .filters-bar.show {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure filters are always visible on desktop */
@media (min-width: 769px) {
    .mobile-filter-toggle {
        display: none;
    }
    
    .filters-bar {
        display: block !important;
    }
}


/* Tags Toggle Button */
.tags-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 30px 0 15px 0; /* Increased bottom margin from 10px to 15px */
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 25px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.tags-toggle:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.tags-toggle .toggle-icon {
    transition: transform 0.3s;
    margin-left: 10px;
}

.tags-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.tags-toggle .tags-label {
    flex: 1;
    margin: 0 10px;
    font-weight: 600;
}

/* Tags Section - Hidden by default */
.tags-section {
    display: none;
    margin: 0 0 20px 0;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.tags-section.show {
    display: block;
    animation: slideDown 0.3s ease-out;
    margin-bottom: 50px; /* Increased from 20px to 30px */
    width: 100%;
}

/* Tags Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%; /* Ensure full width */
    max-width: 100%; /* Prevent overflow */
}

/* Individual Tags */
.tag {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    color: #00ffff;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
    white-space: nowrap;
}

.tag:hover,
.tag.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tags-toggle {
        padding: 10px 15px;
        margin: 30px 0 15px 0; /* Increased bottom margin from 10px to 15px */
    }
    
    .tags-toggle .tags-label {
        font-size: 0.9em;
    }
    
    .tags-section {
        padding: 12px 15px;
    }
    
    .tags-container {
        gap: 8px;
    }
    
    .tag {
        font-size: 0.8em;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .tags-toggle {
        padding: 8px 12px;
    }
    
    .tags-toggle .tags-label {
        font-size: 0.8em;
    }
    
    .tags-section {
        padding: 10px 12px;
    }
    
    .tag {
        font-size: 0.75em;
        padding: 4px 8px;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}




/* Add these styles to your existing CSS file */

/* Fixed Filter Bar */
.filters-bar {
    margin: 10px 0 20px 0;
    padding: 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.filters-bar.fixed {
    position: fixed;
    top: 70px; /* Adjust based on your header height */
    left: 0;
    right: 0;
    z-index: 99;
    margin: 0 auto;
    width: calc(100% - 80px); /* Account for the padding */
    max-width: 1400px; /* Match your content max-width */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Mobile Filter Toggle - Fixed when scrolling */
.mobile-filter-toggle.fixed {
    position: fixed;
    top: 70px; /* Adjust based on your header height */
    left: 0;
    right: 0;
    z-index: 99;
    margin: 0 auto;
    width: calc(100% - 40px);
    max-width: 1400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Add a placeholder to prevent content jump when filter becomes fixed */
.filters-placeholder {
    display: none;
    height: 0;
    transition: height 0.3s ease;
}

.filters-placeholder.active {
    display: block;
}

/* Responsive adjustments for fixed filters */
@media (max-width: 768px) {
    .filters-bar.fixed {
        width: calc(100% - 40px);
        top: 60px; /* Smaller offset on mobile */
    }
    
    .mobile-filter-toggle.fixed {
        width: calc(100% - 30px);
        top: 60px; /* Smaller offset on mobile */
    }
}

@media (max-width: 480px) {
    .filters-bar.fixed {
        width: calc(100% - 30px);
        top: 55px; /* Even smaller offset on mobile */
    }
    
    .mobile-filter-toggle.fixed {
        width: calc(100% - 30px);
        top: 55px; /* Even smaller offset on mobile */
    }
}



/* Adjust spacing between filter bar and tags toggle */
.tags-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 30px 0 15px 0; /* Increased top margin from 10px to 25px */
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 25px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

/* Adjust fixed positioning to account for the increased spacing */
.filters-bar.fixed ~ .tags-toggle.fixed {
    top: 180px; /* Increased from 140px to account for more space */
}

.mobile-filter-toggle.fixed ~ .tags-toggle.fixed {
    top: 200px; /* Increased from 130px */
}

.filters-bar.fixed ~ .tags-section.fixed {
    top: 240px; /* Increased from 190px */
}

.mobile-filter-toggle.fixed ~ .tags-section.fixed {
    top: 240px; /* Increased from 180px */
}

/* Also adjust responsive values */
@media (max-width: 768px) {
    .tags-toggle {
        margin: 70px 0 8px 0; /* Increased top margin on mobile too */
    }
    
    .filters-bar.fixed ~ .tags-toggle.fixed,
    .mobile-filter-toggle.fixed ~ .tags-toggle.fixed {
        top: 300px; /* Increased from 120px */
    }
    
    .filters-bar.fixed ~ .tags-section.fixed,
    .mobile-filter-toggle.fixed ~ .tags-section.fixed {
        top: 200px; /* Increased from 170px */
    }
}

@media (max-width: 480px) {
    .tags-toggle {
        margin: 50px 0 8px 0; /* Slightly less spacing on very small screens */
    }
    
    .filters-bar.fixed ~ .tags-toggle.fixed,
    .mobile-filter-toggle.fixed ~ .tags-toggle.fixed {
        top: 150px; /* Increased from 110px */
    }
    
    .filters-bar.fixed ~ .tags-section.fixed,
    .mobile-filter-toggle.fixed ~ .tags-section.fixed {
        top: 185px; /* Increased from 155px */
    }
}




/* Fixed Tags Toggle and Section */
.tags-toggle.fixed {
    position: fixed;
    z-index: 98;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: calc(100% - 80px);
    max-width: 1400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tags-section.fixed {
    position: fixed;
    z-index: 97;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: calc(100% - 80px);
    max-width: 1400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Add a placeholder to prevent content jump when tags become fixed */
.tags-placeholder {
    display: none;
    height: 0;
    transition: height 0.3s ease;
}

.tags-placeholder.active {
    display: block;
}

/* Responsive adjustments for fixed tags */
@media (max-width: 768px) {
    .tags-toggle.fixed,
    .tags-section.fixed {
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .tags-toggle.fixed,
    .tags-section.fixed {
        width: calc(100% - 30px);
    }
}





/* Fix for tags display in fixed position */
.tags-section.fixed {
    position: fixed;
    z-index: 98;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
}

/* Ensure tags container uses full width */
.tags-section .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

/* Make sure each tag is properly displayed */
.tags-section .tag {
    flex: 0 0 auto;
    margin-bottom: 5px;
    white-space: nowrap;
}
