/**
 * Frontend Styles for Edmark LMS
 * Theme-agnostic styling that works with any WordPress theme
 */

/* Reset and Base Styles */
.edmark-lms-wrapper {
    max-width: 100%;
    clear: both;
}



.edmark-lms-wrapper *,
.edmark-lms-wrapper *::before,
.edmark-lms-wrapper *::after {
    box-sizing: border-box;
}

/* Clear floats */
.edmark-course-layout::after,
.edmark-batch-layout::after,
.edmark-location-layout::after {
    content: "";
    display: table;
    clear: both;
}

/* Course Grid */
.edmark-courses-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
    list-style: none;
    padding: 0;
}

.edmark-courses-columns-1 {
    grid-template-columns: 1fr;
}

.edmark-courses-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

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

/* Responsive Grid */
@media (max-width: 1024px) {
    .edmark-courses-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .edmark-courses-columns-3,
    .edmark-courses-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .edmark-courses-grid {
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .edmark-courses-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* Course Card */
.edmark-course-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.edmark-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.edmark-course-thumbnail {
    position: relative;
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.edmark-course-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.edmark-course-title {
    margin: 0 0 15px;
    font-size: 20px;
    line-height: 1.4;
}

.edmark-course-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.edmark-course-title a:hover {
    color: #0073aa;
}

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

.edmark-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.edmark-course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.edmark-course-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.edmark-course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.edmark-course-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.edmark-course-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f39c12;
}

.edmark-course-price {
    font-size: 20px;
    font-weight: bold;
    color: #0073aa;
}

.edmark-course-price .free {
    color: #46b450;
}

/* Single Course */
.edmark-course-single .entry-header {
    margin-bottom: 30px;
}

.edmark-course-meta-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.edmark-course-meta-header span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.edmark-course-meta-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.edmark-course-layout,
.edmark-batch-layout,
.edmark-location-layout {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 40px !important;
    margin: 30px 0 !important;
    align-items: start !important;
}

.edmark-course-main,
.edmark-batch-main,
.edmark-location-main {
    min-width: 0;
    width: 100%;
}

@media (max-width: 992px) {
    .edmark-course-layout,
    .edmark-batch-layout,
    .edmark-location-layout {
        grid-template-columns: 1fr !important;
    }
    
    .edmark-course-sidebar,
    .edmark-batch-sidebar,
    .edmark-location-sidebar {
        order: -1;
        margin-bottom: 30px;
    }
}

.edmark-course-thumbnail {
    margin-bottom: 30px;
}

.edmark-course-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.edmark-course-categories {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.edmark-course-categories h3 {
    margin-bottom: 15px;
}

.edmark-course-categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.edmark-course-categories li a {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f1;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.3s ease;
}

.edmark-course-categories li a:hover {
    background: #0073aa;
    color: #fff;
}

.edmark-course-sidebar,
.edmark-batch-sidebar,
.edmark-location-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.edmark-course-sidebar-inner > div,
.edmark-batch-sidebar-inner > div,
.edmark-location-sidebar-inner > div {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

@media (max-width: 992px) {
    .edmark-course-sidebar,
    .edmark-batch-sidebar,
    .edmark-location-sidebar {
        position: static;
    }
}

.edmark-course-price-box,
.edmark-batch-price-box {
    text-align: center;
}

.edmark-course-price-box .price,
.edmark-batch-price-box .price {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 20px;
    display: block;
}

.edmark-course-price-box .price.free,
.edmark-batch-price-box .price.free {
    color: #46b450;
}

.edmark-enroll-button {
    display: block;
    width: 100%;
    padding: 15px 30px;
    background: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.edmark-enroll-button:hover {
    background: #005a87;
    color: #fff !important;
}

.edmark-enroll-button:disabled,
.edmark-enroll-button[disabled] {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.edmark-course-info-box h3,
.edmark-batch-info-box h3,
.edmark-location-info-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
}

.edmark-course-info-box ul,
.edmark-batch-info-box ul,
.edmark-location-info-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.edmark-course-info-box li,
.edmark-batch-info-box li,
.edmark-location-info-box li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
}

.edmark-course-info-box li:last-child,
.edmark-batch-info-box li:last-child,
.edmark-location-info-box li:last-child {
    border-bottom: none;
}

.edmark-course-info-box .dashicons,
.edmark-batch-info-box .dashicons,
.edmark-location-info-box .dashicons {
    flex-shrink: 0;
    margin-top: 2px;
    color: #0073aa;
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Course Categories */
.edmark-course-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.edmark-category-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.edmark-category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.edmark-category-item a {
    text-decoration: none;
    color: #333;
}

.edmark-category-item h3 {
    margin: 0 0 10px;
    color: #0073aa;
}

.edmark-category-item p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.edmark-category-item .course-count {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: #f0f0f1;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

/* Filters */
.edmark-courses-filters {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.edmark-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.edmark-filter-form button {
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.edmark-filter-form button:hover {
    background: #005a87;
}

/* Pagination */
.edmark-pagination {
    margin: 40px 0;
    text-align: center;
}

.edmark-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.edmark-pagination a,
.edmark-pagination span {
    display: inline-block;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s ease;
}

.edmark-pagination a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.edmark-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Course Batches */
.edmark-course-batches {
    margin-top: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.edmark-course-batches h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
}

.edmark-batches-list {
    display: grid;
    gap: 20px;
}

.edmark-batch-item {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.edmark-batch-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
}

.edmark-batch-item.edmark-batch-inactive {
    opacity: 0.6;
    border-color: #ccc;
}

.edmark-batch-item.edmark-batch-full {
    border-color: #ff9800;
}

.edmark-batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.edmark-batch-name {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.edmark-batch-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.edmark-batch-status.edmark-status-available {
    background: #4caf50;
    color: #fff;
}

.edmark-batch-status.edmark-status-full {
    background: #ff9800;
    color: #fff;
}

.edmark-batch-status.edmark-status-inactive {
    background: #9e9e9e;
    color: #fff;
}

.edmark-batch-details {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.edmark-batch-details > div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.edmark-batch-details .dashicons {
    color: #0073aa;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.edmark-batch-details strong {
    color: #333;
}

.edmark-batch-description {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.edmark-batch-description p:last-child {
    margin-bottom: 0;
}

.edmark-batch-actions {
    text-align: center;
}

.edmark-batch-enroll-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.edmark-batch-enroll-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.edmark-batch-enroll-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.edmark-batch-enroll-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.edmark-course-locations-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.edmark-course-locations-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.edmark-course-locations-box li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.edmark-course-locations-box li:last-child {
    border-bottom: none;
}

.edmark-course-locations-box .dashicons {
    flex-shrink: 0;
    margin-top: 2px;
    color: #0073aa;
}

/* Course Curriculum & Syllabus */
.edmark-course-curriculum-section {
    margin: 40px 0;
    padding: 0;
    background: transparent;
}

.curriculum-header {
    text-align: center;
    margin-bottom: 40px;
}

.curriculum-title {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
}

.curriculum-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.curriculum-items {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.curriculum-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.curriculum-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.curriculum-item-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s ease;
}

.curriculum-item.has-topics .curriculum-item-header:hover {
    background: #fafafa;
}

.curriculum-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    border-radius: 6px;
    margin-right: 16px;
}

.curriculum-item-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #dc2626;
}

.curriculum-item-info {
    flex: 1;
    min-width: 0;
}

.curriculum-item-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.curriculum-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.curriculum-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.curriculum-item-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #6b7280;
}

.curriculum-item-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    padding: 0;
}

.curriculum-item-toggle:hover {
    background: #f3f4f6;
    border-radius: 4px;
}

.curriculum-item-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.curriculum-item.open .curriculum-item-toggle .dashicons {
    transform: rotate(180deg);
}

.curriculum-item-topics-list {
    padding: 0 20px 16px 76px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

.curriculum-item-topics-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.curriculum-item-topics-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.curriculum-item-topics-list li .dashicons {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: #dc2626;
    margin-top: 2px;
}

.curriculum-item.has-topics .curriculum-item-header {
    cursor: pointer;
}

.curriculum-item.open .curriculum-item-topics-list {
    display: block !important;
}

.curriculum-footer {
    margin-top: 20px;
    padding: 20px 24px;
    border-radius: 8px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.curriculum-total-duration {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.curriculum-total-duration strong {
    font-weight: 600;
    margin-right: 6px;
}

.curriculum-total-duration span {
    font-size: 16px;
    font-weight: 700;
}

.curriculum-footer-note {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
}

/* Responsive Curriculum */
@media (max-width: 768px) {
    .edmark-course-curriculum-section {
        margin: 30px 0;
    }
    
    .curriculum-title {
        font-size: 24px;
    }
    
    .curriculum-subtitle {
        font-size: 13px;
    }
    
    .curriculum-items {
        gap: 10px;
    }
    
    .curriculum-item-header {
        padding: 14px 16px;
    }
    
    .curriculum-item-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .curriculum-item-icon .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    .curriculum-item-title {
        font-size: 15px;
    }
    
    .curriculum-item-meta {
        font-size: 12px;
        gap: 12px;
    }
    
    .curriculum-item-toggle {
        width: 28px;
        height: 28px;
        margin-left: 8px;
    }
    
    .curriculum-footer {
        padding: 20px 15px;
    }
    
    .curriculum-total-duration {
        font-size: 16px;
    }
    
    .curriculum-total-duration span {
        font-size: 20px;
    }
    
    .curriculum-item-topics-list {
        padding: 0 16px 12px 64px;
    }
    
    .curriculum-item-topics-list li {
        font-size: 13px;
        padding: 6px 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .edmark-course-batches {
        padding: 20px;
    }
    
    .edmark-batch-item {
        padding: 20px;
    }
    
    .edmark-batch-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
