/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

.background-search{
	background-image: linear-gradient(to bottom, white 145px, transparent 145px, transparent calc(100% - 146px), white calc(100% - 146px)), linear-gradient(to right, #d7ebfe 60%, #0171dc 60%);
    background-position: 100% 0, 0 0;
    background-size: 40% 100%, 100% 100%;
    background-repeat: no-repeat;
}

.absolute-footer{
	display:none;
}

/* Giới hạn tiêu đề bài viết trong danh sách Blog thành 2 dòng và thêm dấu ... */
.blog-archive .post-title,
.archive .post-title,
.blog .post-title,
.badge-container + .box-text .post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Số dòng hiển thị tối đa, có thể đổi thành 1 hoặc 3 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 2); /* Đảm bảo chiều cao khung đều nhau */
}

/* Giới hạn tiêu đề trong widget Bài viết mới ở thanh sidebar (nếu cần) */
.widget_recent_entries ul li a {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Cắt trên 1 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.img_contact .img-inner{
	background-color: #0171DC1A;
    border-radius: 20px;
}

.img_contact{
	top: -25px;
    background-color: #ffffff;
	border-radius: 20px;
}

.absolute_image{
	position: absolute;
    bottom: -100px;
    right: 0;
}

/* ========================================================
   CUSTOM MEDICAL BLOG CARD LAYOUT
   ======================================================== */

/* Đưa khoảng cách các cột về tỉ lệ đều đẹp */
.custom-medical-card .col-inner {
    height: 100%;
}

.custom-medical-card .card-box-wrapper {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease-in-out;
}

.custom-medical-card .card-box-wrapper:hover {
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.08);
    transform: translateY(-3px);
    border-color: #dbeafe;
}

/* Phần Ảnh & Badge */
.custom-medical-card .card-image-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background-color: #f1f5f9;
}

.custom-medical-card .card-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.custom-medical-card .card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.custom-medical-card .card-box-wrapper:hover .card-thumb-img {
    transform: scale(1.04);
}

.is-divider{ display:none}
/* Badge Ngày tháng màu xanh góc phải */
.custom-medical-card .card-date-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #0073e6;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 0px 6px 0px 6px;
    letter-spacing: 0.2px;
    z-index: 2;
    pointer-events: none;
}

/* Nội dung Card */
.custom-medical-card .card-content-wrap {
    padding: 12px 4px 4px 4px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Meta: Tác giả & Comment */
.custom-medical-card .card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 10px;
}

.custom-medical-card .meta-author,
.custom-medical-card .meta-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.custom-medical-card .meta-separator {
    color: #cbd5e1;
}

/* Tiêu đề bài viết */
.custom-medical-card .card-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 14px 0;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-medical-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.custom-medical-card .card-title a:hover {
    color: #0073e6;
}

/* Nút Xem Thêm */
.custom-medical-card .card-action {
    margin-top: auto;
}

.custom-medical-card .card-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.custom-medical-card .card-readmore-btn:hover {
    color: #0073e6;
}

.custom-medical-card .card-readmore-btn svg {
    transition: transform 0.2s ease;
}

.custom-medical-card .card-readmore-btn:hover svg {
    transform: translate(2px, -2px);
}


/* ========================================================
   CUSTOM SIDEBAR THEO MẪU (Search, Box bo góc & Tag Pills)
   ======================================================== */

/* Khung widget bo tròn viền xám nhẹ */

#secondary .widget {
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

#secondary .widget_search{
	border:none;
}
/* Tiêu đề widget có sóng xanh gợn nhẹ */
#secondary .widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: none;
    margin-bottom: 6px;
}

#secondary .widget-title::after {
    content: "" !important;
    display: block;
    width: 38px;
    height: 10px;
    margin-top: 6px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10' fill='none' stroke='%230073e6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M2 5 Q 6 1, 10 5 T 18 5 T 26 5 T 34 5' /%3E%3C/svg%3E");
}

/* Danh mục bài viết kèm số lượng (01) */
#secondary .widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

#secondary .widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 13.5px;
    color: #475569;
}

#secondary .widget_categories li a {
    color: #334155;
    text-decoration: none;
}

#secondary .widget_categories li a:hover {
    color: #0073e6;
}

/* Widget Tag Cloud dạng viên thuốc viền xanh nhạt */
#secondary .widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

#secondary .widget_tag_cloud a {
    font-size: 12px !important;
    color: #0073e6 !important;
    background-color: #f0f7ff;
    border: 1px solid #bae6fd;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

#secondary .widget_tag_cloud a:hover {
    background-color: #0073e6;
    color: #ffffff !important;
    border-color: #0073e6;
}

/* Form Search hình viên thuốc bo tròn và nút xanh */
#secondary .widget_search form {
    position: relative;
}

#secondary .widget_search input[type="search"] {
    border-radius: 25px;
    border: 1px solid #e2e8f0;
    padding: 10px 45px 10px 18px;
    font-size: 13.5px;
    width: 100%;
	height:100%;
}

#secondary .widget_search button,
#secondary .widget_search .ux-search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    background: #0073e6;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container thanh tab */
.news_tab > ul.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-bottom: none !important;
  padding: 10px 0 20px 0;
  margin-bottom: 20px;
}

/* Kiểu dáng từng tab thường */
.news_tab > ul.nav > li.tab {
  margin: 0 !important;
}

.news_tab > ul.nav > li.tab > a {
  display: inline-block;
  padding: 8px 22px !important;
  background-color: #ffffff;
  color: #0073e6 !important;
  border-radius: 50px !important;
  border: none !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Hover tab */
.news_tab > ul.nav > li.tab:not(.active) > a:hover {
  background-color: #f0f7ff;
  color: #005bb5 !important;
}

/* Kiểu dáng Tab Active (Nền xanh, chữ trắng, bóng đổ) */
.news_tab > ul.nav > li.tab.active {
  position: relative;
}

.news_tab > ul.nav > li.tab.active > a {
  background-color: #0073e6 !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 115, 230, 0.35);
}

/* Mũi tên nhọn chỉ xuống ở tab Active */
.news_tab > ul.nav > li.tab.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #0073e6;
  z-index: 2;
}

/* Ẩn các icon mặc định của theme nếu không dùng */
.news_tab > ul.nav > li.tab i {
  display: none !important;
}

/* Card Container */
.blog_style .box-blog-post {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog_style .box-blog-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Ảnh bo tròn góc bên trong */
.blog_style .box-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.blog_style .box-image .image-cover {
  border-radius: 12px;
}

/* ==============================================
   TÙY BIẾN BADGE NGÀY THÁNG THÀNH DẠNG VIÊN THUỐC / CHỮ NHẬT
   ============================================== */
.blog_style .box-blog-post .post-date.badge {
  /* Ghi đè cấu trúc tròn mặc định của Flatsome */
  top: 14px;            /* Cách lề trên thẻ */
  right: 14px;          /* Ghim góc trên bên phải */
  left: auto;
  width: auto;
  height: auto;
  min-width: unset;
  min-height: unset;
  line-height: normal;
  border-radius: 6px 6px 6px 12px; /* Bo góc nhẹ */
  background-color: #0073e6;
  padding: 5px 12px;
  box-shadow: 0 2px 8px rgba(0, 115, 230, 0.35);
  z-index: 5;
}

/* Format chữ ngày tháng hiển thị nằm ngang cùng 1 dòng */
.blog_style .post-date .badge-inner {
  display: flex !important;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background-color:unset;
}

/* Ẩn thẻ <br> mặc định của Flatsome */
.blog_style .post-date .badge-inner br {
  display: none !important;
}

/* Thêm chữ "Ngày " phía trước ngày */
.blog_style .post-date .badge-inner::before {
  content: "Ngày ";
}

/* Chữ số ngày */
.blog_style .post-date .post-date-day {
  font-weight: 600;
  font-size: 12px;
}

/* Chữ tháng */
.blog_style .post-date .post-date-month {
  font-size: 12px !important;
}

/* ==============================================
   PHẦN TEXT & TIÊU ĐỀ & NÚT XEM THÊM
   ============================================== */
.blog_style .box-text {
  text-align: left !important;
  padding: 14px 4px 4px 4px !important;
}

.blog_style .is-divider {
  display: none !important;
}

/* Dòng meta nếu bài không có ảnh hoặc fallback meta */
.blog_style .post-meta {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #8c9ba5;
  margin-bottom: 8px;
}

/* Tiêu đề bài viết */
.blog_style .post-title {
  margin: 0 0 14px 0 !important;
}

.blog_style .post-title a {
  color: #172b4d !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.blog_style .post-title a:hover {
  color: #0073e6 !important;
}

/* Nút XEM THÊM trỏ góc */
.blog_style .box-text-inner::after {
  content: "XEM THÊM ↗";
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #6b778c;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.blog_style .box-blog-post:hover .box-text-inner::after {
  color: #0073e6;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/
.background-search {
	background-image: none;
	background-color: #d7ebfe;
}
	
}