/* Course Details Page Styles */
#web-course-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 1rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 90px; /* adjust if navbar is taller/shorter */
}

.course-header {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2.5rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.course-image-section {
    position: relative;
    min-width: 400px;
    max-width: 400px;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.course-thumbnail,
.course-thumbnail-placeholder {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-svg {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.badge-row {
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
    pointer-events: none;
    gap: 0;
}

.left-badge, .right-badge {
    pointer-events: auto;
    /* flex: 1; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}
.left-badge {
    text-align: left;
    margin-left: 1.2rem;
    align-items: left;
}
.right-badge {
    text-align: right;
    margin-right: 1.2rem;
    align-items: right;
}

.course-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    white-space: nowrap;
    text-align: center;
}

.course-badge.hidden {
    visibility: hidden;
}

.course-info-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    min-width: 0;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
    margin: 0;
}

.online-indicator {
    font-size: 1.2rem;
    font-weight: 500;
    color: #667eea;
    margin-left: 0.5rem;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 0.9rem;
}

.meta-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.course-description {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.1rem;
}

.course-price-section {
    position: relative;
    flex: 1;
    margin-top: 0;
    align-self: flex-start;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 2.0rem;
    font-weight: 700;
    color: #2d3748;
}

.current-price-vat {
    font-size: 1.0rem;
    color: #a0aec0;
    margin-left: 0.5rem;
}

.early-bird-price-vat {
    font-size: 1.0rem;
    color: #a0aec0;
    margin-left: 0.5rem;
}

.original-price {
    font-size: 1.2rem;
    color: #a0aec0;
    text-decoration: line-through;
}

.early-bird-badge {
    position: absolute;
    top: 0.5rem;
    right: 1.2rem;
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 0.35rem 1.1rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.12);
    white-space: nowrap;
    display: inline-block;
    z-index: 2;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.course-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 1.5rem;
}

.course-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    width: 20px;
    height: 20px;
    fill: #667eea;
}

.syllabus-content,
.learning-outcomes-content,
.prerequisites-content {
    color: #4a5568;
    line-height: 1.7;
    white-space: pre-line;
}

.course-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f7fafc;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #718096;
    font-weight: 500;
}

.info-value {
    color: #2d3748;
    font-weight: 600;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.enrollment-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-available {
    background: #c6f6d5;
    color: #22543d;
}

.status-full {
    background: #fed7d7;
    color: #742a2a;
}

.status-coming-soon {
    background: #fef5e7;
    color: #744210;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .course-header {
        flex-direction: column;
        align-items: stretch;
        min-height: unset;
        gap: 1.5rem;
    }
    .course-image-section {
        min-width: 0;
        max-width: 100%;
        height: 300px;
    }
    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 300px;
    }
    .course-price-section {
        max-width: 100%;
        margin-left: 0;
        margin-top: 1.5rem;
    }
    .course-details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    #web-course-detail-container {
        padding: 1rem 0.75rem;
        margin-top: 80px;
    }
    
    .course-header {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .course-image-section {
        height: 250px;
        margin-bottom: 0.5rem;
    }
    
    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 250px;
    }
    
    .badge-row {
        top: 0.75rem;
    }
    
    .left-badge {
        margin-left: 0.75rem;
    }
    
    .right-badge {
        margin-right: 0.75rem;
    }
    
    .course-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        min-width: 100px;
    }
    
    .course-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .online-indicator {
        font-size: 1rem;
        margin-left: 0.3rem;
    }
    
    .course-meta {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .meta-item {
        font-size: 0.85rem;
        gap: 0.4rem;
    }
    
    .meta-icon {
        width: 14px;
        height: 14px;
    }
    
    .course-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .course-price-section {
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 10px;
    }
    
    .price-display {
        gap: 0.5rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }
    
    .current-price,
    .early-bird-price {
        font-size: 1.6rem;
    }
    
    .original-price {
        font-size: 1rem;
    }
    
    .current-price-vat,
    .early-bird-price-vat {
        font-size: 0.85rem;
        margin-left: 0.3rem;
    }
    
    .early-bird-badge {
        top: 0.5rem;
        right: 0.75rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .add-to-cart-btn {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .course-details-grid {
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .content-section {
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .section-icon {
        width: 18px;
        height: 18px;
    }
    
    .syllabus-content,
    .learning-outcomes-content,
    .prerequisites-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .sidebar-card {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    .sidebar-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .info-item {
        padding: 0.6rem 0;
        font-size: 0.9rem;
    }
    
    .info-label {
        font-size: 0.85rem;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .enrollment-status {
        padding: 0.8rem;
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .course-rating-summary {
        font-size: 1rem;
        margin: 1rem 0 0.8rem 0;
        gap: 0.5rem;
    }
    
    .overall-rating-stars {
        font-size: 1.1rem;
    }
    
    .comments-section {
        padding: 1.5rem;
        margin-top: 2rem;
        border-radius: 10px;
    }
    
    .comments-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .comment-item {
        padding: 0.8rem 0;
    }
    
    .comment-header {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .comment-user {
        font-size: 0.9rem;
    }
    
    .comment-date {
        font-size: 0.8rem;
    }
    
    .comment-body {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .comment-rating {
        font-size: 0.9rem;
        margin-left: 0;
    }
    
    .comment-reply {
        margin: 0.5rem 0 0 0;
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .add-comment-form h3 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .add-comment-form textarea {
        padding: 0.6rem;
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    .add-comment-form select {
        width: 100px;
        padding: 0.35rem 0.6rem;
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .submit-comment-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .login-form-container {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .login-form {
        gap: 1rem;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"] {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .login-btn {
        padding: 0.7rem 0;
        font-size: 1rem;
    }
    
    .login-links {
        margin-top: 1rem;
        gap: 0.4rem;
    }
    
    .register-link,
    .forgot-password-link {
        font-size: 0.9rem;
    }
    
    .alert {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #web-course-detail-container {
        padding: 0.75rem 0.5rem;
    }
    
    .course-image-section {
        height: 200px;
    }
    
    .course-thumbnail,
    .course-thumbnail-placeholder {
        height: 200px;
    }
    
    .course-title {
        font-size: 1.5rem;
    }
    
    .online-indicator {
        font-size: 0.9rem;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .course-price-section {
        padding: 1.25rem;
    }
    
    .current-price,
    .early-bird-price {
        font-size: 1.4rem;
    }
    
    .add-to-cart-btn {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .content-section {
        padding: 1.25rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .sidebar-card {
        padding: 1rem;
    }
    
    .comments-section {
        padding: 1.25rem;
    }
    
    .login-form-container {
        padding: 1.25rem;
    }
}

/* Loading and disabled states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.error-message {
    background: #fed7d7;
    color: #742a2a;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.comments-section {
    margin-top: 3rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    padding: 2rem;
    border: 1px solid #e2e8f0;
}
.comments-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}
.comments-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}
.comment-item {
    border-bottom: 1px solid #f1f1f1;
    padding: 1rem 0;
}
.comment-header {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
}
.comment-user {
    font-weight: 600;
    color: #4a5568;
}
.comment-date {
    font-size: 0.85rem;
    color: #a0aec0;
}
.comment-body {
    font-size: 1.05rem;
    color: #2d3748;
    margin-bottom: 0.2rem;
}
.add-comment-form {
    margin-top: 2rem;
}
.add-comment-form h3 {
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
}
.add-comment-form textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    padding: 0.7rem;
    font-size: 1rem;
    margin-bottom: 0.7rem;
    resize: vertical;
}
.submit-comment-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.submit-comment-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.course-rating-summary {
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.overall-rating-label {
    color: #718096;
    font-weight: 500;
    margin-right: 0.3rem;
}
.overall-rating-value {
    color: #f56565;
    font-weight: 700;
    margin-right: 0.3rem;
}
.overall-rating-stars {
    color: #f6ad55;
    font-size: 1.3rem;
    letter-spacing: 0.1rem;
}
.comments-overall-rating {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.comment-rating {
    color: #f6ad55;
    font-size: 1.1rem;
    margin-left: 0.7rem;
    font-weight: 600;
}
.comment-reply {
    background: #f7fafc;
    border-left: 3px solid #667eea;
    margin: 0.7rem 0 0 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.98rem;
}
.reply-label {
    color: #667eea;
    font-weight: 600;
    margin-right: 0.5rem;
}
.add-comment-form label {
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: block;
}
.add-comment-form select {
    width: 120px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    padding: 0.4rem 0.7rem;
    font-size: 1rem;
    margin-bottom: 0.7rem;
}

.login-form-container {
    max-width: 400px;
    margin: 2.5rem auto 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.08);
    padding: 2rem 2.2rem 1.5rem 2.2rem;
    border: 1px solid #e2e8f0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-form label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.2rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    background: #f7fafc;
    transition: border 0.2s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #667eea;
    outline: none;
    background: #fff;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.login-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.login-links {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.register-link,
.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.register-link:hover,
.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}


.alert {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}
.alert-error, .alert-danger {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* --- Price card visual refinements (non-breaking overrides) --- */
.course-price-section {
	background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
	box-shadow: 0 6px 20px rgba(16, 38, 84, 0.08);
}

.price-display {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.original-price {
	color: #9aa4b2;
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

.early-bird-price {
	font-size: 2.0rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #0ea5e9;
	font-variant-numeric: tabular-nums;
}

.current-price,
.early-bird-price {
	line-height: 1.1;
}

.current-price-vat,
.early-bird-price-vat {
	font-size: 0.95rem;
	color: #94a3b8;
	margin-left: 4px;
}

.early-bird-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #ef4444;
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	padding: 6px 12px;
	border-radius: 9999px;
	box-shadow: 0 6px 14px rgba(239, 68, 68, 0.35);
}

.add-to-cart-btn {
	border-radius: 10px;
	transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.add-to-cart-btn:hover {
	box-shadow: 0 10px 24px rgba(99, 113, 255, 0.35);
	transform: translateY(-1px);
}

.add-to-cart-btn:focus-visible {
	outline: 3px solid #a78bfa;
	outline-offset: 2px;
}

/* Additional mobile refinements */
@media (max-width: 480px) {
	.early-bird-badge {
		font-size: 0.7rem;
		padding: 4px 8px;
		top: 0.4rem;
		right: 0.5rem;
	}
	
	.price-display {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3rem;
	}
	
	.course-meta {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
	}
	
	.meta-item {
		justify-content: flex-start;
	}
}