:root {
    --primary-color: #0a486ff7;
    --primary-dark: #073454;
    --primary-light: #0d5a94;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-light: #f8f9fa;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;
}

/* Main Container */
.external-course-detail-container {
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 3rem);
    min-height: calc(100vh - 200px);
    min-height: calc(100dvh - 200px);
    background: linear-gradient(-135deg, #bae6fd 0%, #e0f2fe 30%, #ffffff 60%, #f0f9ff 100%);
}

/* Course Detail Layout */
.course-detail-layout {
    display: flex;
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-top: clamp(1rem, 2vw, 2rem);
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
}

/* Left Panel - Course Details */
.course-details-panel {
    flex: 2;
    min-width: 0;
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 2rem);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: #9ca3af;
}

/* Course Provider */
.course-provider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.provider-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.provider-name-small {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #374151;
    font-weight: 500;
}

/* Course Title */
.course-title-large {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Instructor Info */
.instructor-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.instructor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.instructor-details {
    display: flex;
    flex-direction: column;
}

.instructor-label {
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.instructor-name {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #1f2937;
    font-weight: 500;
}

/* Enroll Section */
.enroll-section {
    margin-top: 2rem;
    width: 100%;
    max-width: 320px;
}

.btn-enroll-large {
    width: 100%;
    padding: clamp(0.875rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-enroll-large:hover {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.enrollment-date {
    text-align: center;
    margin-top: 0.75rem;
    color: #6b7280;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.enrollment-count {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Right Panel - Course Image */
.course-image-panel {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.course-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    aspect-ratio: 4 / 3;
}

.course-image-bg {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    content-visibility: auto;
}

.course-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, #bae6fd 0%, #e0f2fe 30%, #ffffff 60%, #f0f9ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.course-image-placeholder .placeholder-icon {
    font-size: clamp(4rem, 10vw, 6rem);
    color: rgba(59, 130, 246, 0.2);
}

.logo-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.logo-overlay img {
    max-width: 100px;
    height: auto;
}

/* Bottom Summary Bar */
.course-summary-bar {
    background: white;
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 2rem);
    margin-top: clamp(1.5rem, 3vw, 2rem);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem;
}

.summary-value {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.summary-label {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.summary-description {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    color: #9ca3af;
    line-height: 1.4;
}

.stars {
    color: #fbbf24;
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 0.25rem;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Desktop (1400px+) - Default styles above */

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .course-image-panel {
        min-height: 350px;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 350px;
    }
}

/* Tablet Landscape / Small Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .course-detail-layout {
        flex-direction: column;
    }

    .course-details-panel,
    .course-image-panel {
        flex: 1;
        width: 100%;
    }
    
    .course-image-panel {
        min-height: 300px;
        max-height: 400px;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 300px;
    }

    .course-summary-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .enroll-section {
        max-width: 100%;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    .external-course-detail-container {
        padding: 1rem;
    }
    
    .course-details-panel {
        padding: 1rem;
    }
    
    .course-image-panel {
        min-height: 250px;
        max-height: 350px;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 250px;
    }
    
    .enroll-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .btn-enroll-large {
        max-width: 100%;
    }
}

/* Mobile Landscape / Large Mobile (576px - 767px) */
@media (max-width: 767px) {
    .external-course-detail-container {
        padding: 0.75rem;
    }
    
    .course-details-panel {
        padding: 0.75rem;
    }
    
    .course-image-panel {
        min-height: 200px;
        max-height: 280px;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 200px;
    }

    .course-summary-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    
    .summary-item {
        padding: 0.25rem;
    }
    
    .summary-description {
        display: none;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
    }
    
    .instructor-info {
        margin-bottom: 1.5rem;
    }
    
    .instructor-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .external-course-detail-container {
        padding: 0.5rem;
        min-height: calc(100vh - 150px);
        min-height: calc(100dvh - 150px);
    }
    
    .course-details-panel {
        padding: 0.5rem;
    }
    
    .course-detail-layout {
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .breadcrumbs {
        margin-bottom: 1rem;
    }
    
    .course-provider {
        margin-bottom: 0.75rem;
    }
    
    .provider-logo-small {
        width: 32px;
        height: 32px;
    }
    
    .course-image-panel {
        min-height: 180px;
        max-height: 240px;
        border-radius: 8px;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 180px;
    }
    
    .course-image-placeholder .placeholder-icon {
        font-size: 3rem;
    }
    
    .logo-overlay img {
        max-width: 60px;
    }

    .course-summary-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .summary-item {
        padding: 0.25rem;
    }
    
    .summary-value {
        font-size: 1rem;
    }
    
    .summary-label {
        font-size: 0.75rem;
    }
    
    .btn-enroll-large {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .enroll-section {
        margin-top: 1.5rem;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .external-course-detail-container {
        padding: 0.25rem;
    }
    
    .course-details-panel {
        padding: 0.25rem;
    }
    
    .course-image-panel {
        min-height: 150px;
        max-height: 200px;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 150px;
    }
    
    .course-summary-bar {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .summary-value {
        font-size: 0.9rem;
    }
    
    .summary-label {
        font-size: 0.7rem;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .external-course-detail-container {
        min-height: auto;
    }
    
    .course-detail-layout {
        flex-direction: row;
        align-items: stretch;
    }
    
    .course-details-panel {
        flex: 1.5;
    }
    
    .course-image-panel {
        flex: 1;
        min-height: 200px;
        max-height: none;
    }
    
    .course-image-container,
    .course-image-bg,
    .course-image-placeholder {
        min-height: 200px;
    }
    
    .course-summary-bar {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .summary-description {
        display: none;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .course-image-bg {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .btn-enroll-large {
        transition: none;
    }
}

/* Print styles */
@media print {
    .external-course-detail-container {
        background: white;
        padding: 1rem;
    }
    
    .course-image-panel {
        max-height: 300px;
    }
    
    .course-summary-bar {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .btn-enroll-large {
        display: none;
    }
}
