/* Style for Driving Course Elementor Addon */
.dc-widget-container {
    border: 1px solid #e5e5e5;
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    position: relative;
    padding-bottom: 25px;
    font-family: inherit;
    border-radius: 2px;
}

.course-widget-header {
    padding: 12px 15px;
    text-align: center;
    color: #fff;
    background-color: #147bc9;
}

.course-widget-header h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
}

.course-widget-subtitle {
    padding: 8px 15px;
    text-align: center;
    color: #fff;
    background-color: #f58720;
}

.course-widget-subtitle p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.course-widget-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.course-widget-accordion {
    padding: 15px 20px 0;
}

.dc-accordion-item {
    border-bottom: 1px solid #f0f0f0;
}

.dc-accordion-item:last-of-type {
    border-bottom: none;
}

.dc-accordion-header {
    cursor: pointer;
    padding: 15px 0;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: #111;
    font-size: 16px;
    transition: all 0.2s;
}

.dc-accordion-item.active .dc-accordion-header {
    background-color: #f6f8fb;
    color: #2b3975;
    font-weight: 700;
    border-bottom: none;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: -1px;
}

.dc-icon {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
}

.dc-icon svg {
    transition: transform 0.3s ease;
    fill: currentColor;
    width: 14px;
    height: 14px;
}

.dc-accordion-item.active .dc-accordion-header .dc-icon {
    left: 20px;
}

.dc-accordion-item.active .dc-accordion-header .dc-icon svg {
    transform: rotate(180deg);
}

.dc-title-text {
    flex-grow: 1;
    text-align: center;
}

.dc-accordion-content {
    display: none;
    padding: 15px 10px;
    text-align: center;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.dc-accordion-content p {
    margin: 0 0 10px;
}

.dc-accordion-content p:last-child {
    margin-bottom: 0;
}

.course-widget-footer {
    text-align: center;
    padding: 20px 20px 0;
}

.section-divider {
    display: block;
    width: 60px;
    height: 3px;
    background-color: #147bc9;
    margin: 0 auto 20px;
}

.dc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ba0000;
    color: #fff !important;
    padding: 14px 25px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
    width: 90%;
    max-width: 320px;
}

.dc-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dc-btn-icon {
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

/* --- Các Class cho Widget Lịch Sát Hạch --- */
.schedule-widget-content {
    padding: 10px;
    width: 100%;
}

.schedule-widget-content iframe {
    width: 100%;
    border: none;
    display: block;
}

.dc-buttons-group {
    display: flex;
    gap: 10px;
    /* Space between buttons */
    justify-content: center;
    width: 100%;
}

.dc-button.dc-button-half {
    flex: 1;
    /* take equal width */
    max-width: initial;
    width: 100%;
    padding: 10px 5px;
    font-size: 13px;
    white-space: nowrap;
}

.dc-button-half .dc-btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/* Tuỳ chỉnh Scrollbar cho Vùng Nhúng */
.dc-custom-scrollbar {
    overflow-y: auto;
    overflow-x: auto;
}

.dc-custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.dc-custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dc-custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dc-custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* --- Widget Thẻ Ôn Thi (Card) --- */
.ec-card {
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

.ec-card.is-highlighted {
    transform: scale(1.02);
    z-index: 10;
}

.ec-header {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    color: #ffffff;
}

.ec-icon {
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-icon svg {
    fill: currentColor;
    width: 38px;
    height: auto;
}

.ec-icon i {
    font-size: 38px;
}

.ec-title {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.ec-body {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-grow: 1;
}

.ec-features {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.ec-features li {
    font-size: 14px;
    margin-bottom: 8px;
    color: #222222;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
}

.ec-features li:last-child {
    margin-bottom: 0;
}

.ec-check {
    font-weight: 800;
    margin-right: 6px;
    font-size: 14px;
}

.ec-text-wrap {
    flex: 1;
}

.ec-action {
    margin-left: 15px;
    flex-shrink: 0;
}

.ec-button {
    display: inline-block;
    padding: 10px 20px;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
    border: none;
}

.ec-button:hover {
    opacity: 0.85;
}

/* Thích ứng di động */
@media screen and (max-width: 600px) {
    .ec-body {
        flex-direction: column;
        align-items: stretch;
    }

    .ec-action {
        margin-left: 0;
        margin-top: 20px;
        text-align: right;
    }
}

/* News Ticker Styles */
.news-ticker-container {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.news-ticker-header {
    background-color: #d11e22;
    /* Default red */
    padding: 10px 15px;
    border-bottom: 2px solid #b71a1d;
}

.news-ticker-heading {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.news-ticker-wrapper {
    overflow: hidden;
    position: relative;
    padding: 15px;
    box-sizing: border-box;
}

.news-ticker-scrollable {
    display: flex;
    flex-direction: column;
    animation: scroll-vertical var(--ticker-speed, 15s) linear infinite;
}

.news-ticker-wrapper:hover .news-ticker-scrollable {
    animation-play-state: paused;
}

@keyframes scroll-vertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.news-ticker-content {
    display: flex;
    flex-direction: column;
}

.news-ticker-item {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dotted #ccc;
}

.news-ticker-item a {
    display: flex;
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
}

.news-ticker-item a:hover .news-ticker-title {
    color: #d11e22;
}

.news-ticker-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
}

.news-ticker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.news-ticker-info {
    flex-grow: 1;
}

.news-ticker-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-ticker-date {
    display: block;
    font-size: 11px;
    color: #888;
}

/* Fix Elementor edit mode hover */
.elementor-editor-active .news-ticker-scrollable {
    animation-play-state: paused;
}

/* Giao diện chính cho News Ticker (Báo tuổi trẻ Style) */

.nt-container {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    overflow: hidden;
    position: relative;
    border: 1px solid #e5e5e5;
    height: 44px;
    /* Fix chiều cao cho cả khung */
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nt-label-wrapper {
    position: relative;
    height: 100%;
    z-index: 10;
}

.nt-label {
    background-color: #ba0000;
    color: #ffffff;
    padding: 0 20px 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 13px;
    position: relative;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mũi tên nhọn nhô ra bên phải nhãn */
.nt-label:after {
    content: '';
    position: absolute;
    right: -12px;
    top: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 12px solid #ba0000;
}

.nt-scroll-wrapper {
    flex-grow: 1;
    overflow: hidden;
    /* Giấu chữ đi ra ngoài khung */
    white-space: nowrap;
    /* Bắt các bài viết nối thành 1 hàng ngang */
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nt-content {
    display: inline-block;
    padding-left: 100%;
    /* Đẩy chữ xuất phát tít bên phải ngoài màn hình */
    animation: nt-marquee linear infinite;
    /* Gọi keyframe animation chạy từ phải sang trái vĩnh viễn */
    will-change: transform;
}

/* Đưa chuột vào thì dừng chạy chữ để người dùng kịp đọc hoặc click */
.nt-scroll-wrapper:hover .nt-content {
    animation-play-state: paused;
}

.nt-content a {
    color: #333333;
    text-decoration: none !important;
    font-size: 14px;
    margin-right: 30px;
    /* Cách ra để chữ bài này không dính bài tiếp theo */
    position: relative;
    transition: color 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.nt-content a:hover {
    color: #ba0000;
}

.nt-dot {
    color: inherit;
    font-size: 15px;
    margin-right: 6px;
    margin-left: -5px;
}

/* Vòng lặp css dịch chuyển vị trí */
@keyframes nt-marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.nt-content.nt-ltr {
    animation-direction: reverse;
}

/* Tùy chỉnh nhẹ cho điện thoại nhỏ */
@media screen and (max-width: 600px) {
    .nt-label {
        font-size: 11px;
        padding: 0 10px 0 8px;
    }

    .nt-content a {
        font-size: 13px;
    }
}

/* --- Thẻ Bài Học Hover (Hover Card Widget) --- */
.tl-hover-card-wrapper {
    background: #ffffff;
    border: 1px solid #e1e9f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tl-hover-card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* Default to square aspect ratio, optional */
    background: #f7f9fc;
    overflow: hidden;
}

.tl-hover-card-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tl-hover-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tl-hover-card-image-wrap:hover .tl-hover-card-overlay {
    opacity: 1;
    visibility: visible;
}

.tl-hover-card-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 15px;
}

.tl-hover-btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl-hover-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.tl-hover-card-title {
    padding: 15px;
    font-weight: bold;
    font-size: 15px;
    background: #fdfdfd;
    border-top: 1px solid #e1e9f0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}