/**
 * Custom CSS
 * 
 * File này dùng để thêm các CSS tùy chỉnh
 * Bạn có thể thêm CSS của mình vào đây mà không cần sửa các file core
 * 
 * @package arkid
 */

/* ============================================
   Custom Styles - Thêm CSS của bạn ở đây
   ============================================ */

/* Header 2 - Layout Mid Header với Logo 1, Content, Logo 2 */
.header-two .mid-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-two .mid-header .header-logo-left {
    flex: 0 0 auto;
    text-align: left;
}

.header-two .mid-header .mid-header-center {
    flex: 1 1 auto;
    text-align: center;
    margin: 0 auto;
}

.header-two .mid-header .header-logo-right {
    flex: 0 0 auto;
    text-align: right;
}

.header-two .mid-header .header-logo {
    max-width: 250px;
}

.header-two .mid-header .header-logo img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.header-two .mid-header {
   padding: 10px 0;
}

@keyframes BorderBox {
   0%, 100% {
      background-position: 0 0;
  }
  
  50% {
      background-position: 100% 100%;
  }
}

/* li.menu-item-has-children a {
   animation: BorderBox 3s infinite;
    background: linear-gradient(135deg, var(--color-highlight), var(--color-white), var(--color-highlight));
    color: var(--color-highlight);
    background-clip: text;
    text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 400% auto;
    font-weight: 700 !important;
} */

.primary-header-inner {
   height: 35px;
}

.header-menu-wrap ul li>a {
   height: 25px;
   line-height: 25px;
}

.header-2 .header-menu-wrap li ul {
   top: 130%;
}

/* Fix menu con bị đè text lên nhau */
.header-two .header-menu-wrap li ul li {
    padding: 8px 20px !important;
    margin-bottom: 0 !important;
    min-height: auto;
}

.header-two .header-menu-wrap li ul li > a {
   line-height: 1.8 !important;
   height: auto !important;
   display: block;
   white-space: normal;
   word-wrap: break-word;
}

.header-two .header-menu-wrap li ul {
    padding: 5px 0 !important;
}

/* Language Switcher - Polylang (không hiển thị cờ) */
.header-lang-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.lang-switcher-dropdown {
    position: relative;
}

.lang-switcher-toggle {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: inherit;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.lang-switcher-toggle:hover {
    opacity: 0.8;
}

.lang-switcher-toggle .lang-code {
    margin-right: 5px;
}

.lang-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 150px;
    padding: 8px 0;
    margin: 5px 0 0 0;
    list-style: none;
    box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999;
    border-radius: 4px;
}

.lang-switcher-dropdown:hover .lang-switcher-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher-menu li {
    margin: 0;
    padding: 0;
}

.lang-switcher-menu .lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #263a4f;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.5;
}

.lang-switcher-menu .lang-item:hover {
    background-color: #f9f9f9;
    color: #d83631;
}

.lang-switcher-menu .lang-item .lang-name {
    flex: 1;
    margin-right: 8px;
}

.lang-switcher-menu .lang-item .lang-code {
    font-size: 11px;
    color: #6a8695;
    text-transform: uppercase;
    font-weight: 500;
}

.lang-switcher-menu .current-lang .lang-item {
    background-color: #f9f9f9;
    color: #d83631;
    font-weight: 600;
}

.lang-switcher-menu .current-lang .lang-item .lang-code {
    color: #d83631;
}

.gt_selector {
    background: unset;
    border: unset;
    height: 25px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    width: auto;
    padding-right: 0px;
}

.el-blog-posts .meta-info .post-cat, .el-blog-posts .entry_header .post-date {
    font-size: 12px !important;
}

/*.el-blog-posts .meta-info .post-cat:after {*/
/*    display: none;*/
/*}*/

.el-blog-posts .entry_header {
    border-left: unset !important;
}


@media (min-width: 992px) {
    /* Header chính - absolute để đè lên content */
    .header-two.transparent {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99;
    }
    
    /* .admin-bar .header-two.transparent {
        top: 32px;
    } */
    
    /* Đảm bảo các phần tử trong header không bị đè lên nhau - giữ nguyên flow layout */
    .header-two.transparent .mid-header {
        position: relative;
        z-index: 1;
    }
    
    /* Primary-header-two cần position: relative để không bị đè lên mid-header */
    .header-two.transparent .primary-header-two {
        position: relative !important;
        z-index: 1;
        transform: translateY(0) !important;
    }
    
    /* Đảm bảo inner elements có stacking context đúng */
    .header-two.transparent .mid-header-inner {
        position: relative;
        z-index: 1;
    }
    
    .header-two.transparent .primary-header-inner {
        position: relative;
        z-index: 1;
    }
    
    /* Đảm bảo mid-header luôn hiển thị khi scroll (sticky) */
    .header-two.transparent.sticky-header .mid-header,
    .sticky-header .header-two.transparent .mid-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Khi header sticky, đảm bảo mid-header vẫn hiển thị */
    .header-two.sticky-header .mid-header,
    .sticky-header .header-two .mid-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Headroom effect - đảm bảo mid-header không bị ẩn */
    .header-two.headroom--unpinned .mid-header,
    .header-two.headroom--top .mid-header,
    .headroom--unpinned .header-two .mid-header,
    .headroom--top .header-two .mid-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 767px) {
    .section-heading .sub-heading {
        margin-bottom: 0 !important;
    }
    
    .header-lang-switcher {
        position: absolute;
        right: 30px;
    }
}