/**
 * Elementor Product Course Widgets Styles
 */

/* Product Course Info Widget - Full Info */
.product-course-info {
    width: 100%;
}

.course-info-item {
    margin-bottom: 20px;
}

.course-info-item:last-child {
    margin-bottom: 0;
}

.course-info-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.course-info-value {
    color: #555;
}

/* Video styling */
.course-video-item .course-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.course-video-item .course-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery styling */
.course-gallery {
    display: grid;
    gap: 15px;
}

.course-gallery img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-gallery a:hover img {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Product Course Field Widget - Single Field */
.course-field-wrapper {
    width: 100%;
}

/* Layout styles */
.course-field-layout-vertical {
    display: flex;
    flex-direction: column;
}

.course-field-layout-horizontal {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.course-field-layout-horizontal .course-field-label {
    flex-shrink: 0;
    min-width: 150px;
}

.course-field-layout-horizontal .course-field-value {
    flex: 1;
}

.course-field-layout-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.course-field-label {
    font-weight: 600;
}

.course-field-value {
    color: #555;
}

/* Video in single field */
.course-field-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.course-field-video iframe,
.course-field-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery in single field */
.course-field-gallery {
    display: grid;
    gap: 15px;
    width: 100%;
}

.course-field-gallery img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-field-gallery a {
    display: block;
    overflow: hidden;
}

.course-field-gallery a:hover img {
    transform: scale(1.05);
}

/* Fallback text */
.course-field-fallback {
    color: #999;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .course-field-layout-horizontal {
        flex-direction: column;
    }
    
    .course-field-layout-horizontal .course-field-label {
        margin-bottom: 8px;
        margin-right: 0 !important;
    }
    
    .course-gallery,
    .course-field-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .course-gallery,
    .course-field-gallery {
        grid-template-columns: 1fr !important;
    }
}

/* Elementor Editor Alert Styles */
.elementor-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid;
    background-color: #f8f9fa;
}

.elementor-alert-info {
    border-color: #2196F3;
    color: #1976D2;
}

.elementor-alert-warning {
    border-color: #ff9800;
    color: #f57c00;
}

/* Course Card Styles */
#course-card .elementor-widget-theme-post-featured-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
    height: auto;
}

/* Icon list items in same row */
#course-card .elementor-icon-list-items {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

#course-card .elementor-icon-list-item {
    flex: 0 0 auto;
}

/* Title limited to 2 lines */
#course-card .elementor-heading-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    font-size: 24px;
    min-height: 67px; /* 24px * 1.4 * 2 lines = 67.2px */
    margin: 0;
}

#course-card .elementor-heading-title a {
    display: inline;
    text-decoration: none;
    color: inherit;
}

/* Short description limited to 3 lines */
#course-card .woocommerce-product-details__short-description,
#course-card .woocommerce-product-details__short-description p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    margin: 0;
}

/* Responsive adjustments for course card */
@media (max-width: 768px) {
    #course-card .elementor-icon-list-items {
        gap: 10px;
    }
}

