/* Badge Styles */
.badge {
    font-size: 0.75em;
    padding: 0.375rem 0.75rem;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.enrolled {
    background-color: #28a745;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75em;
}

.btn-sm i {
    font-size: 0.8em;
}


/* Course Info Icon and Tooltip */
.course-info-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999999;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(29, 103, 162, 0.3);
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
}

.info-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(29, 103, 162, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #1d67a2 100%);
}

.course-tooltip {
    position: absolute;
    top: 40px;
    right: -10px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2), 0 10px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999999;
    border: 1px solid rgba(0,0,0,0.05);
    max-height: 500px;
    overflow-y: auto;
}

.course-info-icon:hover .course-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-header {
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid rgba(255,255,255,0.1);
}

.tooltip-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.tooltip-content {
    padding: 20px;
}

.tooltip-section {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tooltip-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tooltip-section strong {
    display: block;
    color: #1d67a2;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip-section span {
    color: #34495e;
    font-size: 14px;
    line-height: 1.4;
}

.tooltip-section p {
    color: #5a6c7d;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.tooltip-list {
    margin: 0;
    padding-left: 18px;
    color: #5a6c7d;
    font-size: 13px;
    line-height: 1.5;
}

/* Enrollment Modal Styles */
.enrollment-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
}

.enrollment-modal-header {
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 25px 30px;
    border: none;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.enrollment-modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.enrollment-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
    color: white !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.enrollment-modal-close {
    color: white;
    font-size: 28px;
    font-weight: 300;
    opacity: 0.8;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.enrollment-modal-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.enrollment-modal-body {
    padding: 30px;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.enrollment-info-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(102,126,234,0.1);
}

.course-name {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102,126,234,0.2);
}

.course-details {
    display: grid;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-label {
    font-weight: 500;
    color: #5a6c7d;
    font-size: 14px;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.price-highlight {
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.enrollment-alert {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 20px;
}

.alert-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(255, 152, 0, 0.3));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b35a00;
}

.alert-icon svg {
    width: 20px;
    height: 20px;
}

.alert-content {
    flex: 1;
}

.alert-text {
    color: #856404;
    font-weight: 500;
    margin: 0 0 8px 0;
    font-size: 15px;
}

.alert-subtext {
    color: #6c5600;
    margin: 0;
    font-size: 13px;
}

.enrollment-modal-footer {
    padding: 25px 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fafbfc;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-confirm {
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-confirm:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
}

/* Certificate Modal Styles */
.certificate-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
}

.certificate-modal-header {
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white !important;
    border-radius: 16px 16px 0 0;
    padding: 25px 30px;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.certificate-modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.certificate-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
    color: white !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.certificate-modal-close {
    color: white;
    font-size: 28px;
    font-weight: 300;
    opacity: 0.8;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.certificate-modal-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.certificate-modal-body {
    padding: 30px;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,241,241,0.45) 100%);
}

.certificate-info-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fef1f1 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(245,87,108,0.1);
}

.certificate-benefits h5 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.benefits-list li {
    padding: 8px 0;
    color: #2c3e50;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card {
    background: white;
    border: 2px solid rgba(245,87,108,0.2);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pricing-label {
    font-weight: 500;
    color: #5a6c7d;
    font-size: 14px;
}

.pricing-value {
    font-weight: 700;
    color: #f5576c;
    font-size: 18px;
}

.pricing-note {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

.certificate-question h5 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.certificate-question p {
    color: #5a6c7d;
    font-size: 14px;
    margin: 0;
}

.certificate-modal-footer {
    padding: 25px 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fafbfc;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    flex-shrink: 0;
}

.btn-without-cert {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.btn-without-cert:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-with-cert {
    background: linear-gradient(135deg, #1d67a2 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.btn-with-cert:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 103, 162, 0.3);
}

.btn-without-cert small,
.btn-with-cert small {
    font-size: 11px;
    opacity: 0.9;
}

/* Responsive adjustments */
.enrollment-dialog,
.certificate-dialog {
    width: 100%;
}

@media (max-width: 768px) {
    .course-tooltip {
        width: 280px;
        right: -10px;
    }
    /* Improve card spacing on mobile */
    .project-wrap { margin-bottom: 20px; }
    .info-icon { width: 36px; height: 36px; font-size: 15px; }

    .enrollment-dialog,
    .certificate-dialog {
        width: calc(100% - 32px);
        max-width: 520px;
        margin: 16px auto;
        display: flex;
        align-items: stretch;
        min-height: calc(100% - 32px);
    }

    .enrollment-dialog .modal-content,
    .certificate-dialog .modal-content {
        max-height: calc(100vh - 32px);
    }

    .enrollment-modal-header,
    .certificate-modal-header {
        padding: 20px;
        gap: 10px;
    }

    .enrollment-modal-title,
    .certificate-modal-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .enrollment-modal-body,
    .certificate-modal-body {
        padding: 20px;
    }

    .course-name {
        font-size: 18px;
    }

    .enrollment-modal-header .enrollment-modal-icon,
    .certificate-modal-header .certificate-modal-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .alert-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .enrollment-modal-footer,
    .certificate-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .enrollment-modal-footer .btn,
    .certificate-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .certificate-modal-body {
        background-size: cover;
        background-repeat: no-repeat;
    }
}

@media (max-width: 480px) {
    .enrollment-modal-header,
    .certificate-modal-header {
        padding: 16px;
    }

    .enrollment-modal-body,
    .certificate-modal-body {
        padding: 16px;
    }

    .certificate-modal-body {
        background-position: center top;
    }

    .enrollment-alert {
        padding: 16px;
        gap: 12px;
    }

    .enrollment-modal-title,
    .certificate-modal-title {
        font-size: 18px;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .btn-cancel,
    .btn-confirm {
        width: 100%;
        justify-content: center;
    }
}
