/* ============================================
   LEARNDASH PROFILE - COMPLETE STYLES
   ============================================ */

/* ============================================
   PROFILE HEADER SECTION (Matching Image 6)
   ============================================ */

   .ld-profile-header-wrapper {
    background: #ffffff;
    padding: 40px 0;
    margin-bottom: 50px;
    border-bottom: 1px solid #f0f0f0;
}

/* Profile User Info (Avatar + Name) */
.ld-profile-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.ld-profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f5f5f5;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ld-profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ld-profile-user-name {
    font-size: 32px !important;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px 0 !important;
}

.ld-profile-edit-link {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ld-profile-edit-link:hover {
    color: #d6820c !important;
    text-decoration: underline;
}

/* Stats Cards Container (Horizontal Layout) */
.ld-profile-stats-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .ld-profile-stats-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ld-profile-stats-cards-container {
        grid-template-columns: 1fr;
    }
}

/* Individual Stat Card */
.ld-profile-stat-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ld-profile-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border: 1px solid #d6820c !important;
}

.ld-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 auto 16px;
    background: none;
    border-radius: 50%;
}

.ld-stat-icon .ld-icon {
    font-size: 24px;
    color: #d6820c !important;
}

.ld-tabs-navigation {
    display: flex;
    gap: 20px !important;
    flex-wrap: wrap;
}

.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab {
    border-color: #ccc !important;
    color: #000000 !important;
    font-weight: 500 !important;
    position: inherit;
    border-radius: 10px;
    padding: 8px 20px 8px 20px !important;
    border-bottom: 2px solid #ccc !important;
}

.ld-tab.ld-active {
    background: #d6820c !important;
    color: #FFFFFF !important;
    border-color: #d6820c !important;
    font-size: 20px !important;
    padding: 8px 20px 8px 20px !important;
    border-radius: 10px !important;
    border-bottom: 2px solid #d6820c !important;
}

.learndash-wrapper:not(.ld-registration__outer-wrapper):not(.learndash-wrapper--modern) a:not(.button):not(.screen-reader-shortcut) {
    box-shadow: none!important;
    text-decoration: none;
    text-shadow: none;
}

.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab :hover{
    background-color: #F5EFEB !important;
}
.learndash-wrapper .ld-tabs .ld-tabs-navigation:after {
    display: none !important;
}
.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab:after {
    display:none;
}
.learndash-wrapper .ld-primary-background, .learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab.ld-active:after {
    display: none !important;
}
.ld-course-status {
    border-radius: 6px !important; 
}
.learndash-wrapper:not(.ld-registration__outer-wrapper):not(.learndash-wrapper--modern) a:not(.button):not(.screen-reader-shortcut) {

    border-bottom: 2px solid #ccc !important;
}

.learndash-wrapper:not(.ld-registration__outer-wrapper):not(.learndash-wrapper--modern) .ld-button {
    border-radius: 6px !important;
    color:#fff !important;    
}
.learndash-wrapper .ld-breadcrumbs a, .learndash-wrapper .ld-lesson-item.ld-is-current-lesson .ld-lesson-item-preview-heading, .learndash-wrapper .ld-lesson-item.ld-is-current-lesson .ld-lesson-title, .learndash-wrapper .ld-primary-color-hover:hover, .learndash-wrapper .ld-primary-color, .learndash-wrapper .ld-primary-color-hover:hover, .learndash-wrapper .ld-primary-color, .learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab.ld-active, .learndash-wrapper .ld-button.ld-button-transparent, .learndash-wrapper .ld-button.ld-button-reverse, .learndash-wrapper .ld-icon-certificate, .learndash-wrapper .ld-login-modal .ld-login-modal-login .ld-modal-heading, #wpProQuiz_user_content a, .learndash-wrapper .ld-item-list .ld-item-list-item a.ld-item-name:hover, .learndash-wrapper .ld-focus-comments__heading-actions .ld-expand-button, .learndash-wrapper .ld-focus-comments__heading a, .learndash-wrapper .ld-focus-comments .comment-respond a, .learndash-wrapper .ld-focus-comment .ld-comment-reply a.comment-reply-link:hover, .learndash-wrapper .ld-expand-button.ld-button-alternate {
    color: #FFF !important;
    border: 1px solid #d6820c !important;
    border-bottom: 2px solid #d6820c !important;
    
}

.learndash-wrapper .ld-course-list-item[data-status="in-progress"] .ld-button:not(.ld-primary-background) {
    background-color: #ffffff !important;
}

.learndash-wrapper .ld-button:hover:not([disabled]):not(.ld-button-transparent):not(.ld--ignore-inline-css), #learndash-tooltips .ld-tooltip:after, #learndash-tooltips .ld-tooltip, .ld-tooltip:not(.ld-tooltip--modern) [role="tooltip"], .learndash-wrapper .ld-primary-background, .learndash-wrapper .btn-join:not(.ld--ignore-inline-css), .learndash-wrapper #btn-join:not(.ld--ignore-inline-css), .learndash-wrapper .ld-button:not([disabled]):not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css), .learndash-wrapper .ld-expand-button:not([disabled]), .learndash-wrapper .wpProQuiz_content .wpProQuiz_button:not([disabled]):not(.wpProQuiz_button_reShowQuestion):not(.wpProQuiz_button_restartQuiz), .learndash-wrapper .wpProQuiz_content .wpProQuiz_button2:not([disabled]), .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading, .learndash-wrapper .ld-focus-comments .form-submit #submit, .learndash-wrapper .ld-login-modal input[type='submit']:not([disabled]), .learndash-wrapper .ld-login-modal .ld-login-modal-register:not([disabled]), .learndash-wrapper .wpProQuiz_content .wpProQuiz_certificate a.btn-blue:not([disabled]), .learndash-wrapper .ld-focus .ld-focus-header .ld-user-menu .ld-user-menu-items a:not([disabled]), #wpProQuiz_user_content table.wp-list-table thead th, #wpProQuiz_overlay_close:not([disabled]), .learndash-wrapper .ld-expand-button.ld-button-alternate:not([disabled]) .ld-icon {
    /* background-color: #d17629 !important; */
    color: #d6820c !important;
    border: 1px solid #d6820c !important;
    border-bottom: 1px solid #d6820c !important;
    background-color: #ffffff !important;
}
/* NOT STARTED — white button, orange border/text */
.learndash-wrapper .ld-course-card[data-status="not-started"] .ld-course-card-actions .ld-button.ld-button,
.learndash-wrapper .ld-course-card[data-status="not-started"] .ld-course-card-actions a.ld-button {
    background-color: #d6820c !important;
    color: #fff !important;
    border: 1px solid #d6820c !important;
    box-shadow: none !important;
}

/* Hover state */
.learndash-wrapper .ld-course-card[data-status="not-started"] .ld-course-card-actions .ld-button.ld-button:hover,
.learndash-wrapper .ld-course-card[data-status="not-started"] .ld-course-card-actions a.ld-button:hover {
    background-color: #ffffff !important;
    color: #d6820c !important;
    border-color: #d6820c !important;
}
.ld-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1;
}

.ld-stat-label {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
}

/* ============================================
   MY COURSES SECTION
   ============================================ */

.ld-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 32px;
}

/* ============================================
   FILTER TABS (Matching Image 2 - Pill Style)
   ============================================ */

.ld-course-filters {
    margin-bottom: 32px;
}

.ld-tabs-navigation {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ld-tab {
    display: inline-block;
    padding: 12px 28px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    color: #666666;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ld-tab:hover {
    background: #f8f8f8;
    border-color: #d6820c !important;
    color: #333333;
}

.ld-tab.ld-active {
    background: #d6820c !important;
    color: #ffffff;
    border-color: #d6820c !important;
}

/* ============================================
   COURSE GRID LAYOUT
   ============================================ */

.ld-course-list-content {
    margin-bottom: 40px;
}

.ld-course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

/* Responsive grid */
@media (max-width: 1200px) {
    .ld-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ld-course-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   COURSE CARD
   ============================================ */

.ld-course-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ld-course-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ld-course-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Course Title */
.ld-course-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 20px 0;
    min-height: 50px;
}

.ld-course-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ld-course-card-title a:hover {
    color: #d6820c !important;
}

/* ============================================
   PROGRESS SECTION
   ============================================ */

.ld-course-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ld-course-progress-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.ld-course-progress-steps {
    font-size: 13px;
    color: #666666;
}

/* Progress Bar */
.ld-course-progress-bar {
    margin-bottom: 20px;
}

.ld-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.ld-progress-bar-percentage {
    height: 100%;
    background: linear-gradient(90deg, #d4a155 0%, #c8954a 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* ============================================
   CARD FOOTER (Status + Actions)
   ============================================ */

.ld-course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
}

/* Status Badge */
.ld-course-status {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

.ld-course-status-in-progress {
    background: #fff3e0;
    color: #d6820c !important;
}

.ld-course-status-not-started {
    background: #f5f5f5;
    color: #666666;
}

.ld-course-status-completed {
    background: #e8f5e9;
    color: #4caf50;
}

/* ============================================
   ACTION BUTTONS (Matching Image 4)
   ============================================ */

.ld-course-card-actions {
    margin-left: auto;
}

.ld-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #d6820c !important;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(212, 161, 85, 0.3);
}

.ld-button:hover {
    background: #c8954a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(212, 161, 85, 0.4);
}

.ld-button-transparent {
    background: transparent;
    color: #d6820c !important;
    border: 2px solid #d6820c !important;
    box-shadow: none;
}

.ld-button-transparent:hover {
    background: #d6820c !important;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(212, 161, 85, 0.3);
}

/* Play Icon for Start Button */
.ld-icon-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    border-left: 8px solid currentColor;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: -2px;
}

/* ============================================
   PAGINATION
   ============================================ */

.ld-course-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.ld-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ld-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ld-pagination-link:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #333333;
}

.ld-pagination-link.ld-active {
    background: #d6820c !important;
    border-color: #d6820c !important;
    color: #ffffff;
}

.ld-pagination-prev,
.ld-pagination-next {
    padding: 0 16px;
}

/* ============================================
   NO COURSES FOUND
   ============================================ */

.ld-no-courses-found {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
    font-size: 16px;
}

/* ============================================
   LOADING STATE
   ============================================ */

.ld-course-grid.ld-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.ld-hidden {
    display: none !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ld-course-list-item {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   FILTER TRANSITION
   ============================================ */

.ld-course-list-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ld-course-list-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Search Bar CSS */

/* ===== DEFAULT (Desktop + Tablet) ===== */
.ld-course-search-wrapper {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: flex-start; /* LEFT align (important) */
}

.ld-course-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px !important;
    border: 1px solid #d6820c !important;
    border-radius: 6px !important;
    box-sizing: border-box; /* FIX overflow */
}


/* ===== TABLET (iPad / Surface Pro) ===== */
@media (max-width: 1024px) {
    .ld-course-search-wrapper {
        padding-right: 20px; /* spacing from edge */
    }

    .ld-course-search-input {
        max-width: 100%; /* allow full width if needed */
    }
}


/* ===== MOBILE (ALL PHONES) ===== */
@media (max-width: 768px) {
    .ld-course-search-wrapper {
        padding: 0 15px; /* CRITICAL: prevents edge overflow */
    }

    .ld-course-search-input {
        width: 100%;
        max-width: 100%;
        padding: 12px !important;
        font-size: 16px; /* prevents iOS zoom */
    }
}


/* ===== SMALL PHONES (iPhone SE) ===== */
@media (max-width: 360px) {
    .ld-course-search-wrapper {
        padding: 0 12px;
    }

    .ld-course-search-input {
        padding: 11px !important;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {

     .ld-course-search-wrapper {
        padding: 0 15px; /* prevent edge touching */
        justify-content: stretch;
    }

    .ld-course-search-input {
        max-width: 100%;
        width: 100%;
        font-size: 16px; /* better for mobile typing */
        padding: 14px;
    }
    
    .ld-tabs-navigation {
        gap: 8px;
    }
    
    .ld-tab {
        padding: 10px 20px;
        font-size: 14px;
        }
    /* course page */
    .ld-profile-avatar-large {
        width: 64px;
        height: 64px;
    }
    .ld-profile-stats-cards-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .ld-profile-user-name {
        font-size: 16px !important;
    }
    .ld-tabs-navigation {
        display: flex;
        gap: 10px !important;
        flex-wrap: wrap;
    }
    .learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab {
        border-color: #ccc !important;
        color: #000000 !important;
        font-weight: 500 !important;
        position: inherit;
        border-radius: 10px;
        padding: 4px 10px 4px 10px !important;
        border-bottom: 2px solid #ccc !important;
    }
    .ld-tab.ld-active {
        background: #d6820c !important;
        color: #FFFFFF !important;
        border-color: #d6820c !important;
        font-size: 14px !important;
        padding: 8px 20px 8px 20px !important;
        border-radius: 10px !important;
        border-bottom: 2px solid #d6820c !important;
    }
    .learndash-wrapper .ld-tabs .ld-tabs-navigation {
        align-items: center;
        display: flex;
        margin: 0;
        padding: 0;
        position: relative;
        justify-content: center;
    }
    .ld-section-title {
        font-size: 20px;
        text-align: center;
    }
    .ld-stat-value {
        font-size: 20px;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 8px;
        line-height: 1;
    }
    .ld-course-card-title {
        font-size: 16px;
    }
    .ld-course-card-title {
        min-height: 0px; 
    }
}