/* Course Page - Global Styles */

/* Small reviews link hover styles */
.reviews-link { transition: all 0.3s ease; display: block; cursor: pointer; }
.reviews-link:hover { opacity: 0.9; }
.reviews-link:hover .fa-star { color: #ffc107 !important; }
.reviews-link:hover p { color: #007bff !important; }

/* Course Page Modern Design */
.course-page { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); min-height: 100vh; }

.course-header { background: linear-gradient(135deg, #8F4319 0%, #B45309 100%); color: white; padding: 40px 0; position: relative; overflow: hidden; margin-top: 20px; }
.course-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>'); opacity: 0.3; }
.course-header-content { position: relative; z-index: 2; }
.course-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.course-description { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; line-height: 1.6; }
.course-info { margin-top: 2rem; }
.info-row { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; }
.info-item { display: flex; align-items: center; gap: 0.75rem; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border-radius: 8px; padding: 0.75rem 1rem; border: 1px solid rgba(255,255,255,0.2); transition: all 0.3s ease; min-width: 200px; }
.info-item:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.info-item i { color: white; font-size: 1rem; width: 20px; text-align: center; }
.course-header .instructor-avatar { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; }
.info-label { font-size: 0.8rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; color: white; white-space: nowrap; }
.info-value, .instructor-link { font-size: 0.9rem; font-weight: 600; color: white; text-decoration: none; white-space: nowrap; }
.instructor-link:hover { color: #ffd700; text-decoration: none; }
.rating-info { display: flex; align-items: center; gap: 0.5rem; }
.stars { display: flex; gap: 2px; }
.stars i { color: #ffd700; font-size: 0.8rem; }
.stars i.filled { color: #ffd700; }
.rating-count { font-size: 0.8rem; opacity: 0.8; color: white; }

/* Course Content Layout */
.course-content { padding: 60px 0; background: white; }
.course-layout { display: grid; grid-template-columns: 1fr 350px; gap: 40px; align-items: start; }
.course-main { background: white; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; }
.course-tabs { background: white; }
.course-tabs .nav-tabs { border: none; background: #f8f9fa; padding: 0 1.5rem; }
.course-tabs .nav-link { border: none; background: transparent; color: #6c757d; font-weight: 500; padding: 1rem 1.5rem; border-radius: 0; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem; }
.course-tabs .nav-link:hover { color: #8F4319; background: rgba(143, 67, 25, 0.1); }
.course-tabs .nav-link.active { color: #8F4319; background: white; border-bottom: 3px solid #8F4319; }
.course-tabs .nav-link svg { width: 18px; height: 18px; }
.course-tabs .tab-content { padding: 2rem; }

/* Course Sidebar */
.course-sidebar { position: sticky; top: 20px; }
.course-purchase-card { background: white; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); overflow: hidden; border: 1px solid #e9ecef; }
.course-purchase-card .courses-card-image { position: relative; height: 200px; overflow: hidden; }
.course-purchase-card .courses-card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-video-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: rgba(143, 67, 25, 0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(10px); }
.card-video-icon:hover { background: #8F4319; transform: translate(-50%, -50%) scale(1.1); }
.card-video-icon i { color: white; font-size: 1.2rem; margin-left: 2px; }
.courses-icon { position: absolute; top: 15px; right: 15px; width: 35px; height: 35px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(10px); }
.courses-icon:hover { background: white; transform: scale(1.1); }
.courses-icon i { color: #dc3545; font-size: 1rem; }
.courses-icon.red-heart i { color: #dc3545; }

/* Course Price */
.course-price { padding: 1.5rem; text-align: center; border-bottom: 1px solid #e9ecef; }
.price-free {
  color: #059669;
  font-weight: 600;
  font-size: 1rem;
}
.price-discounted { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.price-current { font-size: 2rem; font-weight: 700; color: #8F4319; }
.price-original { font-size: 1rem; color: #6c757d; text-decoration: line-through; }
.price-normal .price-current { font-size: 2rem; font-weight: 700; color: #8F4319; }
.price-badge-discount { display: inline-block; background: #ffe8e1; color: #CF5C09; border: 1px solid rgba(207,92,9,0.25); font-weight: 700; font-size: 0.85rem; padding: 2px 8px; border-radius: 999px; }

/* Course Features */
.course-features { padding: 1.5rem; border-bottom: 1px solid #e9ecef; }
.feature-item { display: flex; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid #f8f9fa; }
.feature-item:last-child { border-bottom: none; }
.feature-icon { width: 35px; height: 35px; background: linear-gradient(135deg, #8F4319 0%, #B45309 100%); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-right: 1rem; flex-shrink: 0; }
.feature-icon i { color: white; font-size: 0.9rem; }
.feature-content { flex: 1; }
.feature-label { display: block; font-size: 0.85rem; color: #6c757d; margin-bottom: 0.25rem; }
.feature-value { display: block; font-size: 1rem; font-weight: 600; color: #212529; }

/* Course Actions */
.course-actions { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.btn-primary, .btn-secondary, .btn-affiliate { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem 1.5rem; border-radius: 12px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary { background: linear-gradient(135deg, #8F4319 0%, #B45309 100%); color: white; box-shadow: 0 4px 15px rgba(143, 67, 25, 0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #B45309 0%, #8F4319 100%); color: white; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(143, 67, 25, 0.4); }
.btn-secondary { background: #f8f9fa; color: #6c757d; border: 2px solid #e9ecef; }
.btn-secondary:hover { background: #e9ecef; color: #495057; transform: translateY(-1px); }
.btn-affiliate { background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%); color: white; box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3); }
.btn-affiliate:hover { background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%); color: white; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4); }

/* Course Share */
.course-share { padding: 1.5rem; text-align: center; background: #f8f9fa; }
.share-label { display: block; font-size: 0.9rem; color: #6c757d; margin-bottom: 1rem; font-weight: 500; }
.share-buttons { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.share-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: all 0.3s ease; font-size: 1.1rem; }
.share-btn:hover { transform: translateY(-2px); color: white; text-decoration: none; }
.share-btn.facebook { background: #1877f2; }
.share-btn.facebook:hover { background: #166fe5; box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4); }
.share-btn.twitter { background: #1da1f2; }
.share-btn.twitter:hover { background: #1a91da; box-shadow: 0 4px 15px rgba(29, 161, 242, 0.4); }
.share-btn.linkedin { background: #0077b5; }
.share-btn.linkedin:hover { background: #006097; box-shadow: 0 4px 15px rgba(0, 119, 181, 0.4); }
.share-btn.whatsapp { background: #25d366; }
.share-btn.whatsapp:hover { background: #128c7e; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
.share-btn.telegram { background: #0088cc; }
.share-btn.telegram:hover { background: #0077b3; box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4); }
.share-btn.email { background: #ea4335; }
.share-btn.email:hover { background: #d33426; box-shadow: 0 4px 15px rgba(234, 67, 53, 0.4); }

/* Related Courses */
.related-courses { padding: 60px 0; background: #f8f9fa; }
.related-courses-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: 2rem; font-weight: 700; color: #212529; margin-bottom: 1rem; }
.related-courses-grid { background: white; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.related-courses-grid .row { margin: 0; }
.related-courses-grid .col-lg-3, .related-courses-grid .col-md-4, .related-courses-grid .col-sm-6, .related-courses-grid .col-12 { padding: 0.75rem; }
.related-courses-grid .courses-card-body { background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); overflow: hidden; transition: all 0.3s ease; text-decoration: none; color: inherit; display: block; }
.related-courses-grid .courses-card-body:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); text-decoration: none; color: inherit; }
.related-courses-grid .courses-card-image { position: relative; height: 160px; overflow: hidden; }
.related-courses-grid .courses-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.related-courses-grid .courses-card-body:hover .courses-card-image img { transform: scale(1.05); }
.related-courses-grid .courses-text { padding: 1rem; }
.related-courses-grid .courses-text h5 { font-size: 1rem; font-weight: 600; color: #212529; margin-bottom: 0.5rem; line-height: 1.4; }
.related-courses-grid .review-icon-star { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.related-courses-grid .review-icon-star p { margin: 0; font-size: 0.85rem; color: #6c757d; }
.related-courses-grid .review-icon-star i { color: #ffd700; font-size: 0.9rem; }
.related-courses-grid .ellipsis-line-2 { font-size: 0.85rem; color: #6c757d; line-height: 1.4; margin-bottom: 0.75rem; }
.related-courses-grid .courses-price-border { border-top: 1px solid #e9ecef; padding-top: 0.75rem; }
.related-courses-grid .courses-price { display: flex; justify-content: space-between; align-items: center; }
.related-courses-grid .courses-price-left h5 { font-size: 1.1rem; font-weight: 700; color: #8F4319; margin: 0; }
.related-courses-grid .courses-price-left p { font-size: 0.85rem; color: #6c757d; margin: 0; }
.related-courses-grid .courses-price-right { display: flex; align-items: center; gap: 0.25rem; font-size: 0.85rem; color: #6c757d; }

/* Responsive Design */
@media (max-width: 991px) {
  .course-layout { grid-template-columns: 1fr; gap: 30px; }
  .course-sidebar { position: static; }
  .course-title { font-size: 2rem; }
  .course-meta-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
}

@media (max-width: 768px) {
  .course-header { padding: 30px 0; margin-top: 15px; }
  .course-title { font-size: 1.75rem; }
  .course-description { font-size: 1rem; }
  .info-row { flex-direction: column; gap: 1rem; }
  .info-item { width: 100%; min-width: auto; padding: 0.75rem; }
  .course-content { padding: 40px 0; }
  .course-tabs .nav-tabs { padding: 0 1rem; }
  .course-tabs .nav-link { padding: 0.75rem 1rem; font-size: 0.9rem; }
  .course-tabs .tab-content { padding: 1.5rem; }
  .related-courses { padding: 40px 0; }
  .related-courses-grid { padding: 1.5rem; }
  .related-courses-grid .col-lg-3, .related-courses-grid .col-md-4, .related-courses-grid .col-sm-6, .related-courses-grid .col-12 { padding: 0.5rem; }
}

@media (max-width: 576px) {
  .course-title { font-size: 1.5rem; }
  .info-row { gap: 0.75rem; }
  .info-item { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
  .course-tabs .nav-tabs { flex-wrap: wrap; }
  .course-tabs .nav-link { flex: 1; min-width: 120px; text-align: center; }
  .course-tabs .nav-link svg { width: 16px; height: 16px; }
  .btn-primary, .btn-secondary, .btn-affiliate { padding: 0.875rem 1.25rem; font-size: 0.9rem; }
  .share-buttons { gap: 0.5rem; }
  .share-btn { width: 35px; height: 35px; font-size: 1rem; }
}

/* Cart Button Animation */
.btn-secondary { transition: all 0.3s ease; }
.btn-secondary.active { background: #8F4319; color: white; border-color: #8F4319; }
.btn-secondary.active:hover { background: #B45309; border-color: #B45309; }

/* Ensure d-hidden works properly */
.d-hidden { display: none !important; } 

/* Button color override (brand: #CF5C09) */
.btn-primary,
.btn-secondary.active,
.btn-affiliate,
.share-btn.tiktok, /* keep share buttons colors? We'll only target main CTAs */
.course-share .share-btn.share-primary /* placeholder if exists */
{
  background: #CF5C09 !important;
  border-color: #CF5C09 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-secondary.active:hover,
.btn-affiliate:hover {
  background: #CF5C09 !important;
  filter: brightness(0.95);
}

/* Sidebar video icon hover tint stays */ 

/* Stabilize reviews stars row to avoid jitter */
.course-heading-info .icon ul{ display:flex; align-items:center; gap:6px; margin:0; padding:0; list-style:none; }
.course-heading-info .icon ul li{ line-height:1; }
.course-heading-info .icon .fa-star{ transition: color .2s ease; font-size: 15px; }
.course-heading-info .icon p{ margin:0; line-height:1; } 