/**
 * LearnDash Styles for Australis Theme
 *
 * @package Australis
 */

/* ========================================
   LearnDash Wrapper
======================================== */
.australis-learndash-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   Course Grid
======================================== */
.australis-courses-catalog .courses-grid,
.australis-user-courses .courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* ========================================
   Course Card
======================================== */
.course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.course-card .course-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-card .course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.05);
}

.course-card .course-content {
    padding: 20px;
}

.course-card .course-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.course-card .course-content h3 a {
    color: #1a1a2e;
    transition: color 0.3s ease;
}

.course-card .course-content h3 a:hover {
    color: #7c3aed;
}

.course-card .course-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.course-card .course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.course-card .course-price {
    font-size: 18px;
    font-weight: 700;
    color: #7c3aed;
}

/* ========================================
   Progress Bar
======================================== */
.course-progress {
    margin-bottom: 15px;
}

.progress-bar {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 13px;
    color: #666;
}

/* ========================================
   LearnDash Course Page
======================================== */
.learndash-wrapper {
    font-family: inherit;
}

.learndash-wrapper .ld-course-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.learndash-wrapper .ld-item-list-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.learndash-wrapper .ld-item-list-item:hover {
    border-color: #7c3aed;
}

.learndash-wrapper .ld-item-list-item-preview {
    padding: 15px 20px;
}

.learndash-wrapper .ld-status-icon {
    color: #7c3aed;
}

.learndash-wrapper .ld-status-complete .ld-status-icon {
    color: #10b981;
}

/* ========================================
   LearnDash Buttons
======================================== */
.learndash-wrapper .ld-button,
.learndash-wrapper input[type="submit"],
.learndash-buy-button {
    background: #7c3aed;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.learndash-wrapper .ld-button:hover,
.learndash-wrapper input[type="submit"]:hover,
.learndash-buy-button:hover {
    background: #6d28d9;
    color: #fff;
}

/* ========================================
   Focus Mode
======================================== */
.ld-focus .ld-focus-header {
    background: #1a1a2e;
}

.ld-focus .ld-focus-sidebar {
    background: #f9fafb;
}

.ld-focus .ld-focus-content {
    padding: 40px;
}

/* ========================================
   Quiz Styles
======================================== */
.learndash-wrapper .wpProQuiz_content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.learndash-wrapper .wpProQuiz_question {
    margin-bottom: 30px;
}

.learndash-wrapper .wpProQuiz_questionListItem {
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.learndash-wrapper .wpProQuiz_questionListItem:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerCorrect {
    border-color: #10b981;
    background: #d1fae5;
}

.learndash-wrapper .wpProQuiz_questionListItem.wpProQuiz_answerIncorrect {
    border-color: #ef4444;
    background: #fee2e2;
}

/* ========================================
   Certificates
======================================== */
.learndash-wrapper .ld-certificate-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.learndash-wrapper .ld-certificate-link:hover {
    transform: scale(1.05);
    color: #fff;
}

/* ========================================
   Course Navigation
======================================== */
.learndash-wrapper .ld-content-actions {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 30px;
}

.learndash-wrapper .ld-content-action a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7c3aed;
    font-weight: 500;
    transition: color 0.3s ease;
}

.learndash-wrapper .ld-content-action a:hover {
    color: #6d28d9;
}

/* ========================================
   Profile
======================================== */
.learndash-wrapper .ld-profile-summary {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.learndash-wrapper .ld-profile-summary .ld-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.learndash-wrapper .ld-profile-summary .ld-profile-avatar img {
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* ========================================
   Courses Catalog Page
======================================== */
.courses-catalog-page {
    min-height: 80vh;
}

.courses-catalog-page .page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.courses-catalog-page .page-header h1 {
    margin: 0 0 15px;
    font-size: 2.5rem;
}

.courses-catalog-page .page-header p {
    margin: 0;
    opacity: 0.85;
    font-size: 1.1rem;
}

.courses-catalog-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ========================================
   Courses Filters Sidebar
======================================== */
.courses-filters {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-form .filter-group {
    margin-bottom: 20px;
}

.filters-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
    font-size: 14px;
}

.filters-form input[type="text"],
.filters-form select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filters-form input[type="text"]:focus,
.filters-form select:focus {
    outline: none;
    border-color: #7c3aed;
}

.btn-filter {
    width: 100%;
    margin-top: 10px;
}

.btn-clear {
    width: 100%;
    margin-top: 10px;
    text-align: center;
}

/* ========================================
   Courses Results Info
======================================== */
.courses-results-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.results-count {
    color: #666;
    font-size: 14px;
}

.active-filter {
    background: #f5f3ff;
    color: #7c3aed;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* ========================================
   Courses Main Grid
======================================== */
.courses-main .courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ========================================
   Enhanced Course Card
======================================== */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card .course-thumbnail {
    position: relative;
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.course-badge.free {
    background: #10b981;
    color: #fff;
}

.course-badge.sale {
    background: #ef4444;
    color: #fff;
}

.course-placeholder-img {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.course-card .course-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card .course-title {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.4;
}

.course-card .course-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.course-card .course-title a:hover {
    color: #7c3aed;
}

.course-card .course-excerpt {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

/* ========================================
   Course Categories
======================================== */
.course-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.course-category {
    background: #f3f4f6;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.course-category:hover {
    background: #7c3aed;
    color: #fff;
}

/* ========================================
   Course Teacher Info
======================================== */
.course-teacher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.course-teacher .teacher-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.course-teacher .teacher-link:hover .teacher-name {
    color: #7c3aed;
}

.teacher-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.teacher-name {
    font-size: 13px;
    color: #666;
    transition: color 0.3s ease;
}

/* ========================================
   Course Meta
======================================== */
.course-card .course-meta {
    margin-bottom: 12px;
}

.course-card .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 12px;
}

.course-card .meta-item svg {
    width: 14px;
    height: 14px;
}

/* ========================================
   Course Footer (Price + CTA)
======================================== */
.course-card .course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.course-card .course-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: #7c3aed;
}

.price-free {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
}

/* ========================================
   No Results
======================================== */
.no-courses-found {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-courses-found h3 {
    margin: 0 0 10px;
    color: #1a1a2e;
}

.no-courses-found p {
    color: #666;
    margin-bottom: 20px;
}

/* ========================================
   Pagination
======================================== */
.courses-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 0 0;
    padding: 0;
}

.courses-pagination .pagination-numbers {
    display: flex;
    align-items: center;
    gap: 10px;
}

.courses-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #EFEAF4;
    background: #FFF;
    color: #353535;
    font-family: Urbanist, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.courses-pagination .page-numbers:hover {
    background: #EFEAF4;
    border-color: #7754A0;
}

.courses-pagination .page-numbers.current {
    background: #5B318C;
    border-color: #7754A0;
    color: #FFF;
}

.courses-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    width: auto;
}

.courses-pagination .page-numbers.dots:hover {
    background: transparent;
    border: none;
}

/* Botones Anterior/Siguiente con SVG */
.courses-pagination .page-numbers.prev,
.courses-pagination .page-numbers.next {
    font-size: 0;
    border: none;
    background: transparent;
    width: 24px;
    height: 24px;
    padding: 0;
    position: relative;
}

.courses-pagination .page-numbers.prev::before,
.courses-pagination .page-numbers.next::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Flecha Siguiente */
.courses-pagination .page-numbers.next::before {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cD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DE5OTkgMTAuNzk5NiA5LjA1ODg4IDEwLjcwNjJDOS4wOTc3NiAxMC42MTI3IDkuMTU0NzYgMTAuNTI3OCA5LjIyNjU3IDEwLjQ1NjRMMTMuNjgyMyA2TDE0LjQ5OTYgNi44MTcyN0wxMC4zMTc2IDExTDE0LjUwMDMgMTUuMTgyN1oiIGZpbGw9IiNGREZFRkYiLz4KPC9zdmc+');
}

/* Hover para prev/next */
.courses-pagination .page-numbers.prev:hover::before,
.courses-pagination .page-numbers.next:hover::before {
    opacity: 0.8;
}

/* Estado deshabilitado - cuando no hay más páginas */
.courses-pagination .page-numbers.prev.disabled::before,
.courses-pagination .page-numbers.next.disabled::before {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0iI0VGRUFGNCIvPgogIDxwYXRoIGQ9Ik05LjQ5OTY1IDguODE3MjdMMTAuMzE3NyA4TDE0Ljc3MzQgMTIuNDU0MUMxNC44NDUyIDEyLjUyNTUgMTQuOTAyMiAxMi42MTA0IDE0Ljk0MTEgMTIuNzAzOUMxNC45OCAxMi43OTczIDE1IDEyLjg5NzYgMTUgMTIuOTk4OEMxNSAxMy4xMDAxIDE0Ljk4IDEzLjIwMDQgMTQuOTQxMSAxMy4yOTM4QzE0LjkwMjIgMTMuMzg3MyAxNC44NDUyIDEzLjQ3MjIgMTQuNzczNCAxMy41NDM2TDEwLjMxNzcgMThMOS41MDA0MiAxNy4xODI3TDEzLjY4MjQgMTNMOS40OTk2NSA4LjgxNzI3WiIgZmlsbD0iI0NDQyIvPgo8L3N2Zz4=');
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    .courses-pagination .page-numbers {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* ========================================
   Teacher Card
======================================== */
.australis-teacher-card {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.teacher-avatar-large img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.teacher-info .teacher-name {
    margin: 0 0 5px;
    font-size: 20px;
    color: #1a1a2e;
}

.teacher-info .teacher-role {
    display: inline-block;
    background: #f5f3ff;
    color: #7c3aed;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.teacher-info .teacher-bio {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.teacher-stats .stat {
    color: #888;
    font-size: 14px;
}

.teacher-stats .stat strong {
    color: #1a1a2e;
}

/* ========================================
   Teachers List
======================================== */
.australis-teachers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.teacher-item {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.teacher-item:hover {
    transform: translateY(-3px);
}

.teacher-item .teacher-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.teacher-details h4 {
    margin: 0 0 5px;
    font-size: 16px;
}

.teacher-details h4 a {
    color: #1a1a2e;
    text-decoration: none;
}

.teacher-details h4 a:hover {
    color: #7c3aed;
}

.teacher-details .teacher-bio {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.teacher-details .teacher-courses {
    color: #7c3aed;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   Column Variations
======================================== */
.australis-courses-catalog.columns-2 .courses-grid {
    grid-template-columns: repeat(2, 1fr);
}

.australis-courses-catalog.columns-3 .courses-grid {
    grid-template-columns: repeat(3, 1fr);
}

.australis-courses-catalog.columns-4 .courses-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
    .courses-catalog-container {
        grid-template-columns: 1fr;
    }

    .courses-filters {
        position: static;
    }

    .australis-courses-catalog.columns-4 .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .australis-courses-catalog .courses-grid,
    .australis-user-courses .courses-grid,
    .courses-main .courses-grid {
        grid-template-columns: 1fr;
    }

    .learndash-wrapper .ld-content-actions {
        flex-direction: column;
        gap: 15px;
    }

    .ld-focus .ld-focus-content {
        padding: 20px;
    }

    .courses-catalog-page .page-header {
        padding: 40px 20px;
    }

    .courses-catalog-page .page-header h1 {
        font-size: 1.8rem;
    }

    .australis-teacher-card {
        flex-direction: column;
        text-align: center;
    }

    .australis-teachers-list {
        grid-template-columns: 1fr;
    }

    .australis-courses-catalog.columns-2 .courses-grid,
    .australis-courses-catalog.columns-3 .courses-grid,
    .australis-courses-catalog.columns-4 .courses-grid {
        grid-template-columns: 1fr;
    }

    .courses-results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
