/*
Theme Name:  Eduma Child
Theme URI:   
Description: Child theme của Eduma
Author:      
Author URI:  
Template:    eduma
Version:     1.0.0
Text Domain: eduma-child
*/

/* =========================================================
   OVERLAY cho MAIN HEADER MENU — chỉ khi có class affix-top
   ========================================================= */

/* Overlay gradient chỉ hiện khi header ở trạng thái đầu trang */
#masthead.affix-top::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Đẩy nội dung lên trên overlay — chỉ khi affix-top */
#masthead.affix-top > * {
    position: relative;
    z-index: 1;
}

/* Text-shadow khi affix-top để chữ nổi bật */
#masthead.affix-top .main-navigation a,
#masthead.affix-top .site-title a {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   TESTIMONIAL — các thẻ cao bằng nhau
   ========================================================= */

/*
 * Swiper v8 đặt `.swiper-slide { height: 100% }`.
 *
 * Theo spec flexbox, align-items:stretch CHỈ kéo giãn item có cross-size là
 * `auto`. Slide có height khai báo sẵn (100%) nên không được kéo giãn; rồi
 * chính 100% đó lại tính theo wrapper có chiều cao không xác định nên rơi về
 * chiều cao nội dung. Kết quả: mỗi thẻ một chiều cao, viền so le nhau.
 *
 * Trả height về auto là stretch hoạt động trở lại, mọi thẻ cao bằng thẻ dài nhất.
 * Chỉ áp cho testimonial để không đụng các slider khác.
 */
.thim-ekits-testimonial__inner .swiper-slide {
    height: auto;
}

/*
 * Ở layout mặc định, thẻ CHÍNH LÀ slide nên rule trên là đủ.
 * Chỉ khi thẻ nằm lồng bên trong slide mới cần kéo nó cao hết phần được giãn —
 * lưu ý dùng dấu ">" chứ không gộp chung selector với slide, vì gộp vào sẽ có
 * specificity cao hơn và đè chết height:auto ở trên.
 */
.thim-ekits-testimonial__inner .swiper-slide > .thim-ekits-testimonial__article {
    height: 100%;
}


/* =========================================================
   LIST COURSE — chiều cao item slider
   ========================================================= */

/*
 * Đi kèm inc/nana-list-course-item-height.php. Class nana-course-* được
 * Elementor gắn lên wrapper widget theo switch trong editor.
 *
 * Cùng lỗi Swiper `.swiper-slide { height: 100% }` như testimonial ở trên.
 * Có hai kiểu DOM cần lo:
 *  - Skin Slider: slide CHÍNH LÀ .thim-ekits-course__item.
 *  - Slider mobile (skin Default): JS bọc thêm <div class="swiper-slide">
 *    ra ngoài item.
 * Nên chỗ nào cũng dùng :is() để bắt cả hai.
 */
.elementor-widget-thim-ekits-list-course.nana-course-equal-height .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
}

.elementor-widget-thim-ekits-list-course.nana-course-equal-height .swiper-slide > .thim-ekits-course__item {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/*
 * Loop item template: root là div.elementor, bên trong là các container
 * cấp cao nhất. Chỉ kéo container CUỐI cho cao hết thẻ (nếu template có
 * nhiều container cấp 1, ví dụ ảnh + nội dung, thì ảnh giữ nguyên).
 */
.elementor-widget-thim-ekits-list-course.nana-course-equal-height
:is(.swiper-slide.thim-ekits-course__item, .swiper-slide > .thim-ekits-course__item) > .elementor {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.elementor-widget-thim-ekits-list-course.nana-course-equal-height
:is(.swiper-slide.thim-ekits-course__item, .swiper-slide > .thim-ekits-course__item) > .elementor > .e-con:last-child {
    flex-grow: 1;
}

/* Markup mặc định của widget (không dùng loop item). */
.elementor-widget-thim-ekits-list-course.nana-course-equal-height
:is(.swiper-slide.thim-ekits-course__item, .swiper-slide > .thim-ekits-course__item) > .thim-ekits-course__content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/*
 * Ghim phần cuối xuống đáy: cho container cuối ở mỗi cấp lồng nhau ăn hết
 * khoảng trống, rồi widget cuối cùng dùng margin-top:auto để rơi xuống đáy.
 * Container boxed có thêm lớp .e-con-inner nên bắt cả hai.
 */
.elementor-widget-thim-ekits-list-course.nana-course-pin-last .thim-ekits-course__item
:is(.e-con, .e-con-inner) > .e-con:last-child {
    flex-grow: 1;
}

.elementor-widget-thim-ekits-list-course.nana-course-pin-last .thim-ekits-course__item
:is(.e-con, .e-con-inner) > .elementor-widget:last-child,
.elementor-widget-thim-ekits-list-course.nana-course-pin-last .thim-ekits-course__item
.thim-ekits-course__content > :last-child {
    margin-top: auto;
}


/* =========================================================
   THẺ SẢN PHẨM — con trỏ chuột cho ảnh mở quick view
   ========================================================= */

/*
 * Widget thim-loop-item-featured-image chỉ in ra <img> trần, không bọc <a>.
 * assets/js/nana-list-product-quick-view.js bắt click trên div wrapper của
 * widget để mở quick view, nhưng vì không phải link nên trình duyệt không tự
 * đổi con trỏ — người dùng không biết là bấm được.
 *
 * Chỉ áp trong .thim-ekits-product để không đụng ảnh ở chỗ khác dùng cùng widget.
 */
.thim-ekits-product .elementor-widget-thim-loop-item-featured-image {
    cursor: pointer;
}


.navigation .navbar-nav #magic-line {
    background: #ffffff !important;
}

.top_site_main .page-title-wrapper .page-title::before {
    background-color: #ffffff !important;
}