/**
 * Custom LearnDash Course Template CSS
 */

:root {
    --clct-dark-navy: #071426;
    --clct-secondary-navy: #0d2b45;
    --clct-main-blue: #168fd0;
    --clct-light-bg: #f6f8fb;
    --clct-white: #ffffff;
    --clct-text-muted: #6b7280;
    --clct-border-color: #e5e7eb;
    --clct-radius: 12px;
    --clct-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --clct-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --clct-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Astra Full Width Breakout */
body.single-sfwd-courses .site-content .ast-container,
body.single-sfwd-courses .ast-container,
body.single-sfwd-courses .content-area,
body.single-sfwd-courses .site-main {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.clct-course-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    direction: rtl;
    background: var(--clct-light-bg);
    font-family: 'Inter', 'Roboto', 'Outfit', sans-serif;
    color: #374151;
    line-height: 1.6;
}

.clct-container {
    width: min(1240px, calc(100% - 48px));
    margin-inline: auto;
}

/* Hero Section */
.clct-hero {
    background: linear-gradient(135deg, var(--clct-dark-navy) 0%, var(--clct-secondary-navy) 100%);
    color: var(--clct-white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.clct-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.clct-hero-content h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--clct-white);
}

.clct-hero-excerpt {
    font-size: 19px;
    opacity: 0.85;
    margin-bottom: 30px;
    max-width: 650px;
    line-height: 1.6;
}

/* Visitor Hero CTA Refinement */
.clct-visitor-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.clct-primary-enroll {
    width: 100%;
    max-width: 340px;
}

.clct-primary-enroll .learndash-wrapper .ld-button,
.clct-primary-enroll .learndash-wrapper .btn-blue {
    width: 100% !important;
    padding: 18px 40px !important;
    font-size: 18px !important;
    background: linear-gradient(90deg, #168fd0 0%, #0e70a4 100%) !important;
    border-radius: 50px !important;
    text-align: center !important;
    display: block !important;
    box-shadow: 0 10px 20px rgba(22, 143, 208, 0.2) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

.clct-login-helper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-right: 10px;
}

.clct-login-helper .learndash-wrapper {
    margin: 0 !important;
    display: inline-block !important;
}

.clct-login-helper .ld-login-button,
.clct-login-helper .ld-button {
    background: transparent !important;
    border: none !important;
    color: #4dbfff !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    box-shadow: none !important;
    min-width: 0 !important;
}

.clct-login-helper .ld-icon {
    display: none !important;
}

.clct-hero-cta {
    margin-bottom: 20px;
}

.clct-hero-cta .learndash-wrapper {
    margin: 0 !important;
}

.clct-hero-progress {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: var(--clct-radius);
    max-width: 480px;
}

.clct-hero-media img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--clct-shadow-lg);
    object-fit: cover;
    border: 8px solid rgba(255, 255, 255, 0.03);
}

/* Body Layout */
.clct-body {
    padding: 80px 0;
}

.clct-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

/* Cards */
.clct-card {
    background: var(--clct-white);
    border-radius: var(--clct-radius);
    box-shadow: var(--clct-shadow);
    padding: 40px;
    margin-bottom: 40px;
}

.clct-card-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--clct-light-bg);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--clct-dark-navy);
}

/* LearnDash Buttons Global (Shared) */
.clct-course-page .learndash-wrapper .ld-button,
.clct-course-page .learndash-wrapper .btn-blue,
.clct-course-page .learndash-wrapper input[type='submit'] {
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Content Readability */
.clct-main .clct-card p {
    line-height: 1.85;
    margin-bottom: 24px;
    font-size: 18px;
    color: #4b5563;
    max-width: 850px;
}

/* Course Status Row Customization */
.clct-main .learndash-wrapper .ld-course-status {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 30px !important;
    margin-bottom: 40px !important;
    box-shadow: var(--clct-shadow-sm) !important;
}

.clct-main .learndash-wrapper .ld-course-status .ld-course-status-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.clct-main .learndash-wrapper .ld-course-status .ld-course-status-label {
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 700 !important;
    color: var(--clct-text-muted) !important;
}

.clct-main .learndash-wrapper .ld-course-status .ld-course-status-price {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: var(--clct-dark-navy) !important;
}

/* Style the button in the overview row specifically */
.clct-main .learndash-wrapper .ld-course-status .ld-course-status-action .ld-button {
    padding: 10px 24px !important;
    font-size: 14px !important;
    background: var(--clct-primary-color, #168fd0) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

/* Sidebar Summary Card */
.clct-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clct-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--clct-border-color);
}

.clct-summary-item:last-child {
    border-bottom: none;
}

.clct-summary-label {
    color: var(--clct-text-muted);
    font-weight: 600;
    font-size: 15px;
}

.clct-summary-value {
    font-weight: 700;
    color: var(--clct-dark-navy);
    font-size: 15px;
}

/* Responsive */
@media (max-width: 1100px) {
    .clct-layout {
        grid-template-columns: 1fr;
    }

    .clct-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .clct-hero-content h1,
    .clct-hero-excerpt {
        margin-inline: auto;
    }

    .clct-hero-cta {
        justify-content: center;
    }

    .clct-visitor-actions {
        align-items: center;
    }

    .clct-login-helper {
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    .clct-hero {
        padding: 60px 0;
    }

    .clct-hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .clct-hero-cta>* {
        width: 100%;
    }

    .clct-primary-enroll {
        max-width: none;
    }

    .clct-login-helper {
        width: 100%;
        justify-content: center;
    }
}