/* =============================================
   LEARNING COURSE MANAGEMENT SYSTEM - CSS
   Modern, Professional, Responsive Design
   File: public/css/learning-course.css
   Prefix: lc- (Learning Course)
   ============================================= */

/* =============================================
   TABLE OF CONTENTS
   1. BASE CONTAINER & LAYOUT
   2. CARDS & PANELS
   3. COURSE GRID & LIST
   4. BADGES & STATUS
   5. BUTTONS
   6. FORMS
   7. SECTION MANAGEMENT
   8. CONTENT ITEMS
   9. VIDEO PLAYER
   10. TABS & NAVIGATION
   11. BREADCRUMBS
   12. ALERTS & MESSAGES
   13. EMPTY STATES
   14. LOADING STATES
   15. DASHBOARD CARDS
   16. RESPONSIVE DESIGN
   17. UTILITIES
   ============================================= */

/* =============================================
   1. BASE CONTAINER & LAYOUT
   Container for all course content with max-width
   and centered alignment
   ============================================= */

.lc-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.lc-page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}

.lc-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.2;
}

.lc-page-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
}

/* =============================================
   2. CARDS & PANELS
   Reusable card components with hover effects
   and consistent spacing
   ============================================= */

.lc-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 28px;
    margin-bottom: 28px;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.lc-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.lc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 16px;
}

.lc-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* =============================================
   3. COURSE GRID & LIST
   Centered, responsive grid for course cards
   with flexible column sizing
   ============================================= */

.lc-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 32px;
    justify-content: center;
    max-width: 100%;
}

.lc-course-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lc-course-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.lc-course-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.lc-course-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lc-course-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 2.8rem;
}

.lc-course-description {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

.lc-course-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.lc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.lc-course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    gap: 12px;
    flex-wrap: wrap;
}

/* =============================================
   4. BADGES & STATUS
   Status indicators with color coding
   ============================================= */

.lc-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lc-badge-active {
    background: #d1fae5;
    color: #065f46;
}

.lc-badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.lc-badge-unavailable {
    background: #e5e7eb;
    color: #374151;
}

.lc-badge-beginner {
    background: #dbeafe;
    color: #1e40af;
}

.lc-badge-intermediate {
    background: #fef3c7;
    color: #92400e;
}

.lc-badge-advanced {
    background: #fce7f3;
    color: #9f1239;
}

.lc-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.lc-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* =============================================
   5. BUTTONS
   Consistent button styles with hover states
   and size variants
   ============================================= */

.lc-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lc-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.lc-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.lc-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.lc-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.lc-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.lc-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.lc-btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.lc-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.lc-btn-outline {
    background: transparent;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    box-shadow: none;
}

.lc-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.lc-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.lc-btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* =============================================
   5. BUTTONS (CONTINUED)
   Button group with centered grid layout
   ============================================= */

.lc-btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    gap: 16px;
    justify-content: center;
    align-items: center;
}

/* Optional: Force equal width buttons in a group */
.lc-btn-group-equal {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* For mobile: stack buttons vertically */
@media (max-width: 768px) {
    .lc-btn-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.lc-w-full {
    width: 100%;
}

/* =============================================
   6. FORMS
   Form inputs and controls with focus states
   ============================================= */

.lc-form {
    max-width: 900px;
    margin: 0 auto;
}

.lc-form-group {
    margin-bottom: 28px;
}

.lc-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.lc-label-required::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
}

.lc-input,
.lc-textarea,
.lc-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.lc-input:focus,
.lc-textarea:focus,
.lc-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.lc-textarea {
    min-height: 140px;
    resize: vertical;
}

.lc-help-text {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 8px;
}

.lc-error {
    display: block;
    font-size: 0.875rem;
    color: #ef4444;
    margin-top: 8px;
}

/* =============================================
   7. SECTION MANAGEMENT
   Section list items with hover effects
   ============================================= */

.lc-section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lc-section-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.lc-section-item:hover {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.lc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.lc-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* =============================================
   8. CONTENT ITEMS (Videos, Files, Images)
   Grid layout for content with centered alignment
   ============================================= */

.lc-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
    justify-items: center;
}

.lc-content-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 320px;
}

.lc-content-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.lc-content-type {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.lc-content-video {
    background: #fef3c7;
    color: #92400e;
}

.lc-content-file {
    background: #dbeafe;
    color: #1e40af;
}

.lc-content-image {
    background: #d1fae5;
    color: #065f46;
}

.lc-content-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.lc-content-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
    background: #f3f4f6;
}

/* =============================================
   9. VIDEO PLAYER & CONTENT DISPLAY
   Responsive video container with 16:9 ratio
   ============================================= */

.lc-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lc-video-container iframe,
.lc-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =============================================
   10. TABS & NAVIGATION
   Tab navigation with active states
   ============================================= */

.lc-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 28px;
    overflow-x: auto;
}

.lc-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.lc-tab:hover {
    color: #3b82f6;
    background: #eff6ff;
}

.lc-tab-active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* =============================================
   11. BREADCRUMBS
   Navigation breadcrumbs with separators
   ============================================= */

.lc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.lc-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.lc-breadcrumb a:hover {
    text-decoration: underline;
}

.lc-breadcrumb-separator {
    color: #9ca3af;
    font-weight: 600;
}

/* =============================================
   12. ALERTS & MESSAGES
   Alert boxes with different status levels
   ============================================= */

.lc-alert {
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.lc-alert strong {
    display: block;
    margin-bottom: 4px;
}

.lc-alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.lc-alert-error,
.lc-alert-danger {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.lc-alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.lc-alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* =============================================
   13. EMPTY STATES
   Empty state displays with icons
   ============================================= */

.lc-empty-state {
    text-align: center;
    padding: 80px 24px;
    color: #6b7280;
}

.lc-empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.lc-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.lc-empty-text {
    font-size: 1rem;
    margin-bottom: 28px;
    color: #6b7280;
}

/* =============================================
   14. LOADING STATES
   Loading spinner animation
   ============================================= */

.lc-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.lc-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: lc-spin 0.8s linear infinite;
}

@keyframes lc-spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   15. DASHBOARD CARDS
   Special cards for dashboard sections
   ============================================= */

.lc-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 32px;
}

.lc-dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #f3f4f6;
    transition: all 0.3s ease;
    text-align: center;
}

.lc-dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.lc-dashboard-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
}

.lc-dashboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.lc-dashboard-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Info row for subscription details */
.lc-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 14px;
}

.lc-info-row span:first-child {
    color: #6b7280;
    font-weight: 500;
}

.lc-info-row strong {
    color: #1f2937;
    font-weight: 600;
}

/* =============================================
   16. RESPONSIVE DESIGN
   Mobile-first responsive breakpoints
   ============================================= */

@media (max-width: 1200px) {
    .lc-course-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .lc-container {
        padding: 16px;
    }

    .lc-page-title {
        font-size: 2rem;
    }

    .lc-page-header {
        margin-bottom: 28px;
    }

    .lc-course-grid,
    .lc-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lc-content-grid {
        grid-template-columns: 1fr;
    }

    .lc-card {
        padding: 20px;
    }

    .lc-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lc-btn-group {
        width: 100%;
        flex-direction: column;
    }

    .lc-btn {
        width: 100%;
    }

    .lc-course-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .lc-section-header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .lc-page-title {
        font-size: 1.75rem;
    }

    .lc-card-title {
        font-size: 1.25rem;
    }

    .lc-dashboard-card {
        padding: 24px;
    }

    .lc-empty-state {
        padding: 60px 20px;
    }
}

/* =============================================
   17. UTILITIES
   Helper classes for spacing and alignment
   ============================================= */

/* Text alignment */
.lc-text-center { text-align: center; }
.lc-text-right { text-align: right; }
.lc-text-left { text-align: left; }

/* Center content utility */
.center-link {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Margin utilities */
.lc-mt-1 { margin-top: 12px; }
.lc-mt-2 { margin-top: 20px; }
.lc-mt-3 { margin-top: 28px; }
.lc-mt-4 { margin-top: 36px; }

.lc-mb-1 { margin-bottom: 12px; }
.lc-mb-2 { margin-bottom: 20px; }
.lc-mb-3 { margin-bottom: 28px; }
.lc-mb-4 { margin-bottom: 36px; }

/* Padding utilities */
.lc-p-1 { padding: 12px; }
.lc-p-2 { padding: 20px; }
.lc-p-3 { padding: 28px; }
.lc-p-4 { padding: 36px; }

/* Flex utilities */
.lc-flex { display: flex; }
.lc-flex-col { flex-direction: column; }
.lc-items-center { align-items: center; }
.lc-justify-between { justify-content: space-between; }
.lc-gap-2 { gap: 20px; }
.lc-gap-3 { gap: 28px; }

/* Size utilities */
.lc-h-full { height: 100%; }

/* Display utilities */
.lc-hidden { display: none; }
.lc-block { display: block; }
.lc-inline-block { display: inline-block; }

/* Muted text */
.lc-muted-text {
    color: #6b7280;
}

/* =============================================
   PRINT STYLES
   Optimized layout for printing
   ============================================= */

@media print {
    .lc-btn,
    .lc-btn-group,
    .lc-course-footer {
        display: none !important;
    }

    .lc-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        page-break-inside: avoid;
    }
}




/* Card header: title + badge left, button right — stays one row on all screens */
.mc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
/* Title group: icon + text + count badge */
.mc-card-header__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-shrink: 1;    /* title can shrink but never pushes button off */
    min-width: 0;
}
/* Button: fixed width, never stretches, never shrinks */
.mc-card-header__btn {
    flex-shrink: 0;
    white-space: nowrap;
    width: auto !important;   /* overrides any lc-w-full leak */
}
/* On very small screens: keep same row, just reduce font slightly */
@media (max-width: 480px) {
    .mc-card-header__title { font-size: 0.95rem; }
    .mc-card-header__btn   { font-size: 0.8rem; padding: 6px 12px; }
}