/* SFH-CUSTOM 2026-08-22
   Base + UI trẻ em cho sfh.scoutvn.com
   Không sửa main.min.css / frontend.min.css — file này được enqueue qua layout master.
*/

/* ---------- 1. Bảng màu & base ---------- */
:root {
    --sfh-green: #1B7A4E;
    --sfh-green-dark: #0B3D2E;
    --sfh-gold: #E8A317;
    --sfh-cream: #FFF8E7;
    --sfh-radius: 16px;
}

html {
    font-size: 17px;
}

body {
    line-height: 1.65;
}

@media (max-width: 767px) {
    html {
        font-size: 16px;
    }
}

/* ---------- 2. Typography dễ đọc ---------- */
body,
.tg-page-content,
.course-content,
.lesson-content {
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
}

/* ---------- 3. Nút / hit area ---------- */
.btn,
.tg-btn,
button[type="submit"],
.header-search button,
.tg-banner__content .btn,
.course-item .btn,
.tg-course__content .btn {
    min-height: 48px;
    border-radius: var(--sfh-radius) !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--sfh-gold);
    outline-offset: 2px;
}

/* ---------- 4. Header / topbar trẻ em ---------- */
.tg-header__top {
    background: #f4fbf6 !important;
    border-bottom: 1px solid #d9ede2;
    font-size: 0.92rem;
}

.tg-header__area {
    background: #ffffff;
}

.logo img {
    max-height: 55px;
    width: auto;
}

/* ---------- 5. Ẩn giỏ hàng khi 100% miễn phí ---------- */
.header-cart,
.mini-cart-icon:not(.user_icon),
.mini-cart,
a[href*="/cart"],
.menu-cart,
.tg-header-cart {
    display: none !important;
}

@media (max-width: 991px) {
    .tgmobile__menu .mini-cart-icon:not(.user_icon) {
        display: none !important;
    }
}

/* ---------- 6. Cookie banner mobile ---------- */
.cc-window,
.cookieconsent,
#cookie-consent,
.cc-banner {
    max-width: 100% !important;
    max-height: 38vh !important;
    overflow: auto !important;
    font-size: 14px !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
}

.cc-window .cc-btn,
.cookieconsent button,
.cc-banner button {
    min-height: 44px !important;
    width: 100% !important;
    margin-top: 8px !important;
}

/* ---------- 7. Course / lesson dễ đọc ---------- */
.course-content,
.lesson-content,
.tg-page-content {
    font-size: 1.05rem;
    max-width: 46rem;
}

.course-content img,
.lesson-content img,
.tg-page-content img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* ---------- 8. Card rating 0 ---------- */
.course-item[data-rating="0"] .rating,
.tg-course-item[data-rating="0"] .rating,
.course-item:has(.rating .zero-rating) .rating,
.tg-course-item:has(.rating .zero-rating) .rating {
    display: none !important;
}

/* ---------- 9. Cookie banner z-index ---------- */
.cc-window,
.cc-banner,
#cookie-consent {
    z-index: 9999 !important;
}

/* ---------- 10. Giảm hiệu ứng chuyển động cho người dùng nhạy cảm ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 11. Header đơn giản cho trẻ em ---------- */
.tgmenu__navbar-wrap .navigation > li > a {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tgmenu__navbar-wrap .navigation > li:hover > a {
    background-color: var(--sfh-cream);
    color: var(--sfh-green-dark);
}

/* User menu icon */
.sfh-user-menu,
.sfh-user-menu .cart-count {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--sfh-cream);
    color: var(--sfh-green-dark);
}

.sfh-user-menu .cart-count img {
    width: 22px;
    height: 22px;
    filter: invert(26%) sepia(95%) saturate(500%) hue-rotate(115deg) brightness(90%) contrast(91%);
}

.menu_user_list {
    min-width: 210px;
    border-radius: 12px;
    padding: 10px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: none;
}

.menu_user_list li a {
    display: block;
    padding: 10px 18px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #333;
    transition: background-color 0.15s ease;
}

.menu_user_list li a:hover {
    background-color: var(--sfh-cream);
    color: var(--sfh-green-dark);
}

/* Mobile login menu */
.mobile_menu_login {
    gap: 10px;
    margin-bottom: 20px;
}

.mobile_menu_login li a {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 12px;
    background-color: var(--sfh-cream);
    color: var(--sfh-green-dark);
    font-weight: 600;
    font-size: 1rem;
}

.tgmobile__search .form-select,
.tgmobile__search input {
    min-height: 44px;
    border-radius: 10px;
    font-size: 1rem;
}

/* ---------- 12. Swiper navigation lớn hơn dễ chạm ---------- */
.courses-button-prev,
.courses-button-next,
.categories-button-prev,
.categories-button-next {
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- 13. Tab khóa học dễ bấm ---------- */
#courseTab .nav-link {
    min-height: 44px;
    padding: 10px 18px;
    font-weight: 600;
    border-radius: 12px;
}

/* ---------- 14. Hero banner text dễ đọc ---------- */
.banner__content .title {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    line-height: 1.2;
}

.banner__content p {
    font-size: 1.05rem;
}

/* ---------- 15. Section title dễ nhìn ---------- */
.section__title .sub-title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section__title .title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.25;
}

/* ---------- 16. FAQ accordion dễ bấm ---------- */
.accordion-button {
    min-height: 52px;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 14px 18px;
    line-height: 1.4;
}

.accordion-body p {
    font-size: 1rem;
    line-height: 1.7;
}

/* ---------- 17. Trang chi tiết bài học cho trẻ em ---------- */
.courses__details-content .nav-link {
    min-height: 44px;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 18px;
}

/* Nút CTA lớn, nổi bật */
.sfh-btn-kids {
    min-height: 56px;
    font-size: 1.15rem;
    border-radius: 16px;
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
}

/* Curriculum item dễ đọc */
.course-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 1rem;
    min-height: 52px;
}

.course-item-link .item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.course-item-link .item-name {
    flex: 1 1 auto;
    line-height: 1.4;
}

.course-item-link .item-badge {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--sfh-cream);
    color: var(--sfh-green-dark);
}

.course-item-link .item-badge.free {
    background-color: #d4edda;
    color: #155724;
}

.course-item-link .item-badge.locked {
    background-color: #f8f9fa;
    color: #6c757d;
}

.course-item.open-item .course-item-link {
    background-color: #f4fbf6;
}

/* Sidebar dễ nhìn */
.courses__cost-wrap .title {
    color: var(--sfh-green);
    font-size: 1.75rem;
}

.courses__information-wrap li {
    font-size: 1rem;
    padding: 12px 0;
}

.courses__information-wrap li span {
    font-weight: 600;
    color: #333;
}

/* Ẩn share buttons trên mobile vì không cần thiết */
@media (max-width: 767px) {
    .courses__details-social {
        display: none !important;
    }
}

/* ---------- 18. Course card trẻ em ---------- */
.sfh-course-card {
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.sfh-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.sfh-course-card .courses__item-thumb img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sfh-course-card .title {
    font-size: 1.1rem;
    line-height: 1.35;
    min-height: 48px;
}

.sfh-course-card .author {
    font-size: 0.95rem;
    color: #555;
}

.sfh-course-card .already-enrolled-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 1rem;
    border-radius: 12px;
}

/* ---------- 19. Form filter dễ dùng ---------- */
.courses__sidebar .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.courses__sidebar .form-check-label {
    font-size: 1rem;
    padding-left: 6px;
    line-height: 1.4;
}

.courses__sidebar .widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
}

/* ---------- 20. Sort dropdown dễ bấm ---------- */
.courses-top-right-select .orderby {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 1rem;
}

/* ---------- 21. Auth pages (login/register) cho trẻ em ---------- */
.sfh-auth-card {
    border-radius: 20px;
    padding: 40px 30px;
}

.sfh-auth-card .title {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.sfh-auth-card .form-grp label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.sfh-auth-card .form-grp input {
    min-height: 52px;
    border-radius: 12px;
    font-size: 1rem;
    padding: 10px 14px;
}

/* ---------- 22. Learning player cho trẻ em ---------- */
.sfh-learning-header {
    font-size: 1rem;
    font-weight: 600;
}

.sfh-learning-header a {
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 8px 14px;
}

.sfh-learning-header .wsus__course_header_btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
}

.wsus__course_sidebar .accordion-button {
    min-height: 56px;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 16px 18px;
}

.wsus__course_sidebar .form-check {
    min-height: 44px;
    padding: 10px 0;
    align-items: center;
    gap: 10px;
}

.wsus__course_sidebar .form-check-input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wsus__course_sidebar .form-check-label {
    font-size: 0.98rem;
    line-height: 1.4;
    flex: 1;
}

.wsus__course_sidebar .form-check-label img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.video_tabs_area .nav-link {
    min-height: 44px;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
}

/* ---------- 23. Student dashboard cho trẻ em ---------- */
.dashboard__counter-item {
    border-radius: 16px;
    padding: 20px;
    min-height: 140px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dashboard__counter-item .content p {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.dashboard__counter-item .content .count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sfh-green-dark);
}

.dashboard__sidebar-menu a {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard__sidebar-menu a img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.dashboard__content-title .title {
    font-size: 1.35rem;
    font-weight: 700;
}

.dashboard__sidebar-wrap .dashboard__sidebar-title .title {
    font-size: 1.05rem;
    font-weight: 700;
}

/* ---------- 24. Footer cho trẻ em ---------- */
.footer__widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.footer__link li a {
    font-size: 1rem;
    padding: 6px 0;
    display: inline-block;
}

.footer__content p {
    font-size: 1rem;
    line-height: 1.7;
}

.footer__social img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
