/*==============================
  Tutor Course Card Widget Styles
==============================*/

.etcc-course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.etcc-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* --- Header --- */
.etcc-card-header {
    position: relative;
}

.etcc-card-header img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.etcc-badge-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #673AB7; /* Purple */
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.etcc-badge-commission {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #FF9800; /* Orange */
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

/* --- Body --- */
.etcc-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.etcc-course-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    flex-grow: 1; /* Pushes meta down */
}

.etcc-course-title a {
    text-decoration: none;
    color: #1e1e1e;
    transition: color 0.3s ease;
}

.etcc-course-title a:hover {
    color: #673AB7;
}

.etcc-course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.etcc-instructor, .etcc-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.etcc-price-info {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.etcc-price {
    font-size: 24px;
    font-weight: bold;
    color: #1e1e1e;
    margin-bottom: 5px;
}

.etcc-price del {
    font-size: 16px;
    color: #999;
    font-weight: normal;
    margin-right: 8px;
}

.etcc-price ins {
    text-decoration: none;
}

.etcc-commission-text {
    font-size: 14px;
    font-weight: 500;
    color: #4CAF50; /* Green */
    background-color: rgba(76, 175, 80, 0.1);
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* --- Footer --- */
.etcc-card-footer {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.etcc-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.etcc-btn-details {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.etcc-btn-details:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.etcc-btn-getlink {
    background-color: #673AB7;
    color: #fff;
    border: 1px solid #673AB7;
}

.etcc-btn-getlink:hover {
    background-color: #512DA8;
    border-color: #512DA8;
}

/* --- Style for copied state --- */
.etcc-btn-getlink.copied {
    background-color: #4CAF50 !important; /* Green */
    border-color: #4CAF50 !important;
    cursor: default;
}

/*==============================
  Tabs Layout Styles (ĐÃ ĐƯỢC NÂNG CẤP)
==============================*/
.etcc-tabs-wrapper {
    width: 100%;
}

.etcc-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    transition: all 0.3s ease;
    align-items: flex-start;
}

.etcc-tabs-nav li {
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.etcc-tab-content {
    display: none;
}

.etcc-tab-content.active {
    display: block;
}

/* --- Style: Underline (Default) --- */
.etcc-tabs-style-underline .etcc-tabs-nav {
    border-bottom: 2px solid #eee;
}
.etcc-tabs-style-underline .etcc-tabs-nav li {
    padding: 10px 20px;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
}
.etcc-tabs-style-underline .etcc-tabs-nav li.active {
    border-color: #673AB7; /* Hoặc màu active bạn chọn */
    color: #333;
}

/* --- Style: Buttons --- */
.etcc-tabs-style-buttons .etcc-tabs-nav {
    gap: 10px;
}
.etcc-tabs-style-buttons .etcc-tabs-nav li {
    padding: 8px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}
.etcc-tabs-style-buttons .etcc-tabs-nav li.active {
    background-color: #673AB7;
    color: #fff;
    border-color: #673AB7;
}

/* --- Style: Pills --- */
.etcc-tabs-style-pills .etcc-tabs-nav {
    gap: 10px;
}
.etcc-tabs-style-pills .etcc-tabs-nav li {
    padding: 8px 18px;
    border-radius: 50px; /* Bo tròn */
    background-color: #f0f0f0;
}
.etcc-tabs-style-pills .etcc-tabs-nav li.active {
    background-color: #673AB7;
    color: #fff;
}


.etcc-course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Hiển thị 4 cột, bạn có thể thay đổi */
    gap: 20px;
}

.etcc-view-all-wrapper {
    text-align: center;
    margin-top: 30px;
}

.etcc-view-all-btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .etcc-course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767px) {
    .etcc-course-grid {
        grid-template-columns: 1fr;
    }
}