/* ========STYLE Buttom commom=================================================== */
.header-button-2 .header-button a.button {
  color: #ffffff !important;
  letter-spacing: -0.025em !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%) !important;
  border: 0 !important;
  border-radius: 9999px !important;
  justify-content: center !important;
  align-items: center !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 22px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  line-height: 1 !important;

  transition: all 0.25s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.header-button-2 .header-button a.button span {
  color: #ffffff !important;
  position: relative;
  z-index: 2;
}

.header-button-2 .header-button a.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  transition: all 0.55s ease;
}

.header-button-2 .header-button a.button:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 55%, #1e40af 100%) !important;
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 16px 30px rgba(37, 99, 235, 0.38),
    inset 0 1.5px rgba(255, 255, 255, 0.4),
    inset 0 -2.5px rgba(30, 64, 175, 0.5) !important;
}

.header-button-2 .header-button a.button:hover::before {
  left: 130%;
}

.header-button-2 .header-button a.button:active {
  transform: translateY(0) scale(0.98);
}

/* ========STYLE MÀN TIN TỨC=================================================== */
.tm-slide-card {
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%) !important;
}
.tm-blog-slider{
  padding-top: 50px !important;
  margin-top: 50px !important;
}

.tm-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform .65s ease;
}

.tm-slide-card:hover img {
    transform: scale(1.08);
}

.tm-slide-overlay {
background: linear-gradient(
    to top,
    rgba(0,0,0,.88) 0%,
    rgba(0,0,0,.55) 35%,
    rgba(0,0,0,.18) 70%,
    rgba(0,0,0,0) 100%
);
}

/* Swiper buttons: width/height giữ ở CSS vì Tailwind arbitrary value có thể không scan được từ PHP */
.tm-swiper-prev,
.tm-swiper-next {
    position: absolute;
    top: 60% !important;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    color: #fff !important;
    width: 52px;
    height: 72px;
    justify-content: center;
    transform: translateY(-50%) !important;
    transition: all .25s ease;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.tm-swiper-prev{
    left: 0;
    border-radius: 0 999px 999px 0;
}
.tm-swiper-next {
    right: -20px;
    border-radius: 999px 0 0 999px;
}
.tm-swiper-prev iconify-icon,
.tm-swiper-next iconify-icon {
    font-size: 34px;
}
.tm-swiper-prev:hover,
.tm-swiper-next:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    width: 60px;
}

.tm-slider-bullet {
    width: 10px;
    height: 10px;
    display: block;
    border-radius: 50%;
    background: rgba(255,255,255,.8);
    cursor: pointer;
    transition: all .25s ease;
}

.tm-slider-bullet.is-active {
    width: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* List reset: override CSS của Flatsome theme vì Tailwind list-none có thể bị override */
.tm-cat-list,
.tm-latest-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tm-blog-grid {
    display: grid;
    grid-template-columns: repeat(var(--tm-columns), minmax(0, 1fr));
    gap: 30px;
}

.tm-blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform .55s cubic-bezier(.25,.46,.45,.94), filter .55s ease;
}

.tm-blog-card:hover .tm-blog-thumb img {
    transform: scale(1.09);
    filter: brightness(.88) saturate(1.1);
}
.tm-blog-card {
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, border-color .3s ease !important;
}

.tm-blog-card:hover {
    transform: translateY(-8px) !important;
    background-color: #fff !important;
    border-color: #bfdbfe !important;
    box-shadow: 0 24px 48px rgba(0,0,0,.12) !important;
}

.tm-blog-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.22), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
}

.tm-blog-card:hover .tm-blog-thumb::after {
    opacity: 1;
}

.tm-blog-more {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transform: translateY(4px);
    transition: all .25s ease;
}

.tm-blog-card:hover .tm-blog-more {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(37,99,235,.38);
}

.tm-cat-list a.is-active,
.tm-cat-list a:hover {
    color: #2563eb !important;
}
.tm-cat-list a.is-active .tm-folder-icon,
.tm-cat-list a:hover .tm-folder-icon {
    color: #2563eb;
}

.tm-card-cat-tag {
    color: #1d4ed8;
    background: #fff;
    border-radius: 9999px;
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background .22s ease, color .22s ease;
    display: inline-block;
}
.tm-card-cat-tag:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
}

.tm-blog-pagination .page-numbers {
    width: auto;
    min-width: 44px;
    height: 44px;
    padding: 0 17px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #333 !important;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: none !important;
    transition: all .25s ease;
}

.tm-blog-pagination .page-numbers:hover {
    background: #eff6ff;
    color: #2563eb !important;
    transform: translateY(-2px);
}

.tm-blog-pagination .page-numbers.current {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    color: #fff !important;
}

.tm-blog-pagination .page-numbers.prev,
.tm-blog-pagination .page-numbers.next {
    min-width: 110px;
}

@media (max-width: 768px) {
    .tm-blog-grid {
        grid-template-columns: 1fr !important;
    }

    .tm-swiper-prev,
    .tm-swiper-next {
        display: none !important;
    }
}
@media (min-width: 1025px) {
    .tm-blog-sidebar {
        position: sticky;
        top: 90px;
        align-self: start;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .tm-blog-sidebar::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}
@media (max-width: 1366px) {
    .tm-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .tm-blog-slider {
        margin-bottom: 32px;
    }
}

.tm-mobile-cats-scroll::-webkit-scrollbar {
    display: none;
}
.tm-mobile-cats-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.tm-mobile-cat-pill {
    background: #eff6ff;
    color: #334155;
    border: 1.5px solid #dbeafe;
    text-decoration: none !important;
    box-shadow: 0 1px 4px rgba(37,99,235,.06);
}

/* Pill active & hover */
.tm-mobile-cat-pill.is-active,
.tm-mobile-cat-pill:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37,99,235,.28);
}

@media (min-width: 768px) {
    .tm-mobile-cats-strip {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .tm-blog-grid {
        grid-template-columns: 1fr !important;
    }
}
.tm-sidebar-cats-block {
    display: none;
}
@media (min-width: 768px) {
    .tm-sidebar-cats-block {
        display: block;
    }
}

.tm-sidebar-widget { background: #fff; border-radius: 14px; padding: 18px 16px; border: 1px solid #deeaf4; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.tm-sidebar-widget-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #edf2f7; }
.tm-sidebar-widget-title iconify-icon { font-size: 16px; color: #2563eb; }

.tm-sidebar-recent-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f0f4f8; }
.tm-sidebar-recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.tm-sidebar-recent-thumb { flex-shrink: 0; width: 60px; height: 48px; border-radius: 8px; overflow: hidden; background: #eee; display: block; }
.tm-sidebar-recent-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.tm-sidebar-recent-thumb:hover .tm-sidebar-recent-img { transform: scale(1.08); }
.tm-sidebar-recent-info { flex: 1; min-width: 0; }
.tm-sidebar-recent-title { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; font-weight: 700; line-height: 1.45; color: #333; text-decoration: none; margin-bottom: 4px; display: block; transition: color .16s; }
.tm-sidebar-recent-title:hover { color: #2563eb; }
.tm-sidebar-recent-date { display: flex; align-items: center; gap: 3px; font-size: 11px; color: #bbb; }
.tm-sidebar-recent-date iconify-icon { font-size: 11px; color: #2563eb; }
/* ========END STYLE MÀN TIN TỨC=================================================== */

/* === BLOG PAGE SIDEBAR SEARCH FORM === */
.tm-sidebar-search-form { display: block; width: 100%; }
.tm-sidebar-search-input-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.tm-sidebar-search-icon {
    position: absolute; left: 12px; z-index: 1;
    font-size: 18px; color: #64748b;
    display: flex; align-items: center; pointer-events: none; line-height: 0;
}
.tm-sidebar-search-divider {
    position: absolute; left: 38px;
    height: 26px; width: 1px; background: #e2e8f0; z-index: 1;
}
.tm-sidebar-search-input-wrap input.tm-sidebar-search-input,
.tm-sidebar-search-input {
    width: 100% !important; border: 1.5px solid #e2e8f0 !important; border-radius: 10px !important;
    background: #fff !important;
    padding: 13px 14px 13px 52px !important;
    font-size: 13px !important; color: #334155 !important; outline: none !important;
    transition: border-color .25s, box-shadow .25s; box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,.07) !important;
    margin: 0 !important;
}
.tm-sidebar-search-input-wrap input.tm-sidebar-search-input::placeholder,
.tm-sidebar-search-input::placeholder { color: #94a3b8 !important; }
.tm-sidebar-search-input-wrap input.tm-sidebar-search-input:hover { border-color: #cbd5e1 !important; }
.tm-sidebar-search-input-wrap input.tm-sidebar-search-input:focus { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important; }
