/* General Body and Typography */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700&display=swap');

/* Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif; /* Changed to Work Sans */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: #667eea;
    font-size: 2rem;
}
.logo h1,
.footer-logo h3,
.footer-bottom-content p {
  font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}
.logo h1 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: 0.3s;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab:hover,
.tab.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    transform: translateY(-2px);
}

/* Filters Section */
.filters-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

#resultsCount {
    color: #666;
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: transparent;
    border: 2px solid #e1e5e9;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
    font-size: 0.9rem; /* Set a consistent font size for view buttons */
}

.view-btn:hover,
.view-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Schedule Container */
.schedule-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.timeline-view,
.grid-view {
    display: none;
}

.timeline-view.active,
.grid-view.active {
    display: block;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 4rem;
}

.timeline-date {
    position: absolute;
    left: -2rem;
    top: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.timeline-date::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #667eea;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Course Cards */
.course-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.course-category {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.course-level {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.level-beginner {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.level-intermediate {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.level-advanced {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.course-title {
    margin-bottom: 1rem;
}

.course-title h3 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.course-subtitle {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.instructor-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.instructor-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.instructor-info h4 {
    color: #333;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.instructor-title {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.meta-item i {
    color: #667eea;
    width: 16px;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.stat-group {
    text-align: center;
}

.stat-value {
    display: block;
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
}

.stat-label {
    color: #666;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.course-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.price-tag .currency {
    font-size: 1rem;
    color: #666;
}

.btn-secondary,
.btn-primary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem; /* Keep this for smaller font */
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    /* REMOVED: flex: 1; to reduce its width */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Grid View */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #666;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-badges {
    display: flex;
    gap: 1rem;
}

.modal-badges .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.instructor-info h4 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.course-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    font-weight: 500;
}

.detail-item i {
    color: #667eea;
    width: 20px;
}

.course-description,
.course-curriculum {
    margin-bottom: 2rem;
}

.course-description h4,
.course-curriculum h4 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.course-description p {
    color: #666;
    line-height: 1.7;
}

.course-curriculum ul {
    list-style: none;
    padding: 0;
}

.course-curriculum li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.course-curriculum li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.modal-footer {
    padding: 2rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Status Badges */
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-upcoming {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-ongoing {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-completed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 3rem 0;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.5rem;
    color: white;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: #667eea;
    font-size: 2rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.footer-links a:hover {
    color: #667eea;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.contact-item i {
    color: #667eea;
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    font-family: 'Work Sans', sans-serif; /* Ensure Work Sans is used */
}

.footer-bottom-links a:hover {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .page-header h2 {
        font-size: 2.2rem;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .results-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 2.5rem;
    }

    .timeline-date {
        left: -3rem;
        min-width: 100px;
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .course-card {
        padding: 1.5rem;
    }

    .course-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .course-meta {
        grid-template-columns: 1fr;
    }

    .course-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .course-actions {
        flex-direction: column;
    }

    /* Adjust button width in mobile/modal footer if needed */
    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%; /* Make buttons full width in modal footer on small screens */
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }

    .course-details {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .schedule-container,
    .filters-section {
        padding: 1rem;
    }

    .course-card {
        padding: 1rem;
    }

    .instructor-section {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}