/* ============================================
   Course Single Page - Modern & Clean Design
   Brand Colors: #1B5278 (Primary Blue), #5FCFE5 (Light Blue)
   ============================================ */

:root {
    --primary-color: #1B5278;
    --secondary-color: #5FCFE5;
    --accent-color: #E5893E;
    --success-color: #4CAF50;
    --text-dark: #2C3E50;
    --text-gray: #5A6C7D;
    --bg-light: #F8F9FB;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(27, 82, 120, 0.08);
    --shadow-md: 0 4px 20px rgba(27, 82, 120, 0.12);
    --shadow-lg: 0 8px 30px rgba(27, 82, 120, 0.15);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Hero Section
   ============================================ */
.course-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a6a93 100%);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(95, 207, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(229, 137, 62, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.course-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb .current {
    color: white;
    font-weight: 500;
}

/* Hero Grid */
.course-hero-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: start;
}

/* Course Info */
.course-info {
    color: white;
}

.course-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.course-badge.badge-purchased {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid var(--success-color);
    color: #a5d6a7;
}

.course-badge.badge-free {
    background: rgba(229, 137, 62, 0.2);
    border: 2px solid var(--accent-color);
    color: #ffb74d;
}

.course-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

.course-description {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

/* Course Stats */
.course-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 22px;
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Purchase Card (Sidebar)
   ============================================ */
.course-sidebar {
    position: relative;
}

.purchase-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 100px;
    transition: var(--transition);
}

.purchase-card.sticky {
    box-shadow: 0 12px 40px rgba(27, 82, 120, 0.2);
}

.course-image {
    width: 100%;
    height: 260px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-image-placeholder i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.4);
}

.purchase-card-body {
    padding: 32px;
}

/* Price Section */
.price-section {
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--bg-light);
    margin-bottom: 28px;
}

.price {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.price.price-free {
    font-size: 40px;
    color: var(--success-color);
}

.price-note {
    font-size: 14px;
    color: var(--text-gray);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 12px;
}

.btn:last-child {
    margin-bottom: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2a6a93);
    color: white;
    box-shadow: 0 4px 15px rgba(27, 82, 120, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(27, 82, 120, 0.4);
}

.btn-large {
    padding: 20px 32px;
    font-size: 18px;
}

.btn-telegram {
    background: linear-gradient(135deg, #0088cc, #00a0d9);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.btn-telegram:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #1eb854);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.access-buttons {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--bg-light);
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-gray);
}

.feature-item i {
    color: var(--success-color);
    font-size: 18px;
    min-width: 20px;
}

/* ============================================
   Content Section
   ============================================ */
.course-content-section {
    padding: 80px 20px;
    background: var(--bg-light);
}

.course-content-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Content Blocks */
.content-block {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.content-block:hover {
    box-shadow: var(--shadow-md);
}

.block-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.block-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 14px;
    flex-shrink: 0;
}

.block-icon i {
    font-size: 26px;
    color: white;
}

.block-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.block-content {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.8;
}

.block-content p {
    margin-bottom: 20px;
}

/* Learning Grid */
.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.learning-item {
    display: flex;
    align-items: start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
}

.learning-item:hover {
    background: rgba(95, 207, 229, 0.1);
    transform: translateX(5px);
}

.learning-item i {
    color: var(--success-color);
    font-size: 22px;
    margin-top: 2px;
    flex-shrink: 0;
}

.learning-item span {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

/* Info Note */
.info-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: rgba(95, 207, 229, 0.1);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    margin-top: 24px;
}

.info-note i {
    color: var(--accent-color);
    font-size: 20px;
}

.info-note span {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
}

/* Steps List */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-item {
    display: flex;
    gap: 20px;
    align-items: start;
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-info p {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

/* Instructor Block */
.instructor-block {
    background: linear-gradient(135deg, rgba(27, 82, 120, 0.05), rgba(95, 207, 229, 0.05));
    border: 2px solid rgba(27, 82, 120, 0.1);
}

.instructor-content {
    display: flex;
    gap: 32px;
    align-items: start;
}

.instructor-avatar {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: var(--shadow-md);
}

.instructor-details h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.instructor-title {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.instructor-bio {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.instructor-badges {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.badge-item i {
    font-size: 20px;
    color: var(--primary-color);
}

.badge-item span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   Related Courses
   ============================================ */
.related-courses-section {
    padding: 80px 20px;
    background: white;
}

.related-courses-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--secondary-color);
    gap: 12px;
}

.related-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.related-course-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.related-course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.related-course-image {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    overflow: hidden;
}

.related-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-course-card:hover .related-course-image img {
    transform: scale(1.1);
}

.related-course-image .course-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-course-image .course-image-placeholder i {
    font-size: 70px;
    color: rgba(255, 255, 255, 0.4);
}

.related-course-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-course-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.related-course-content p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid var(--bg-light);
}

.related-course-footer .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.related-course-footer .free {
    color: var(--success-color);
    font-size: 20px;
}

.view-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    transition: var(--transition);
}

.related-course-card:hover .view-link {
    gap: 10px;
}

/* ============================================
   CTA Section
   ============================================ */
.course-cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a6a93 100%);
    position: relative;
    overflow: hidden;
}

.course-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.cta-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    flex-shrink: 0;
}

.cta-icon i {
    font-size: 50px;
    color: #25D366;
}

.cta-content {
    flex: 1;
}

.cta-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: white;
    color: var(--primary-color);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    gap: 16px;
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .breadcrumb,
[dir="rtl"] .course-stats,
[dir="rtl"] .instructor-badges {
    direction: rtl;
}

[dir="rtl"] .learning-item:hover {
    transform: translateX(-5px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .course-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .course-sidebar {
        order: -1;
    }
    
    .purchase-card {
        position: static;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .instructor-content {
        flex-direction: column;
        text-align: center;
    }
    
    .instructor-avatar {
        margin: 0 auto;
    }
    
    .instructor-badges {
        justify-content: center;
    }
    
    .cta-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .course-hero {
        padding: 120px 0 60px;
    }
    
    .course-title {
        font-size: 32px;
    }
    
    .course-description {
        font-size: 16px;
    }
    
    .course-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .block-header h2 {
        font-size: 24px;
    }
    
    .learning-grid {
        grid-template-columns: 1fr;
    }
    
    .content-block {
        padding: 28px;
    }
    
    .related-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .course-hero {
        padding: 100px 0 40px;
    }
    
    .course-title {
        font-size: 26px;
    }
    
    .course-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    .purchase-card-body {
        padding: 24px;
    }
    
    .price {
        font-size: 40px;
    }
    
    .content-block {
        padding: 24px;
    }
    
    .block-header {
        flex-direction: column;
        text-align: center;
    }
    
    .block-icon {
        margin: 0 auto;
    }
    
    .instructor-details h3 {
        font-size: 24px;
    }
    
    .cta-icon {
        width: 80px;
        height: 80px;
    }
    
    .cta-icon i {
        font-size: 40px;
    }
}
