/*
 LATKEOTV HEADER V3
 Emerald / Gold Stadium Theme

 Scope: Home page header only.
 Preserve existing navigation, login and CMS functionality.
*/

/* ===== LATKEOTV HOME HEADER V3 ===== */

/* Header nằm trên banner, không ảnh hưởng trang khác */
body:has(#site-main.latkeo-emerald-home) {
  background:#002f25;
}

body:has(#site-main.latkeo-emerald-home) .site-header {
  position:relative!important;
  z-index:100!important;
  width:100%!important;
  height:58px!important;
  min-height:58px!important;
  margin:125px 0 0!important;
  background:linear-gradient(
    180deg,
    rgba(0,35,28,.94),
    rgba(0,17,14,.98)
  )!important;
  border-top:1px solid rgba(255,223,126,.85)!important;
  border-bottom:2px solid #e6b74f!important;
  box-shadow:
    0 -4px 18px rgba(0,255,174,.15),
    0 5px 18px rgba(0,0,0,.5)!important;
}

/* Nền sân vận động phía trên menu */
body:has(#site-main.latkeo-emerald-home) .site-header::before {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:100%;
  height:125px;
  background:
    linear-gradient(90deg,rgba(0,24,20,.18),transparent 70%),
    url('/assets/img/latkeo-stadium-banner.webp')
    center center / cover no-repeat;
  pointer-events:none;
}

/* Logo lớn nằm trên banner */
body:has(#site-main.latkeo-emerald-home) .site-header #logo {
  position:absolute!important;
  left:max(24px,calc((100vw - 1450px)/2))!important;
  bottom:calc(100% + 8px)!important;
  z-index:5!important;
  width:285px!important;
  height:110px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

body:has(#site-main.latkeo-emerald-home) .site-header #logo img {
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  filter:drop-shadow(0 5px 8px rgba(0,0,0,.6));
}

/* Thanh menu */
body:has(#site-main.latkeo-emerald-home) .site-header .container {
  max-width:1450px!important;
  height:100%!important;
}

body:has(#site-main.latkeo-emerald-home) .site-header .header-elements {
  height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
}

body:has(#site-main.latkeo-emerald-home) .site-header .listMenuHeader {
  display:flex!important;
  align-items:center!important;
  margin:0!important;
  padding:0!important;
}

body:has(#site-main.latkeo-emerald-home) .site-header .menuItem {
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
}

body:has(#site-main.latkeo-emerald-home) .site-header .menuItem > a {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:43px!important;
  padding:8px 18px!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:800!important;
  text-decoration:none!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  white-space:nowrap!important;
  transition:all .2s ease!important;
}

body:has(#site-main.latkeo-emerald-home) .site-header .menuItem > a:hover {
  color:#ffe38c!important;
  background:rgba(0,110,74,.5)!important;
  border-color:rgba(255,223,126,.6)!important;
}

/* Trang chủ nổi bật vàng */
body:has(#site-main.latkeo-emerald-home) .site-header .menuItem > a[href="/"] {
  background:linear-gradient(180deg,#16694c,#003e30)!important;
  border:1px solid #f2c966!important;
  color:#ffe18a!important;
  box-shadow:
    inset 0 1px 8px rgba(255,231,149,.25),
    0 0 12px rgba(255,213,105,.28)!important;
}

/* Responsive */
@media(max-width:900px) {
  body:has(#site-main.latkeo-emerald-home) .site-header {
    margin-top:100px!important;
  }

  body:has(#site-main.latkeo-emerald-home) .site-header::before {
    height:100px;
  }

  body:has(#site-main.latkeo-emerald-home) .site-header #logo {
    left:15px!important;
    width:205px!important;
    height:85px!important;
  }

  body:has(#site-main.latkeo-emerald-home) .site-header .listMenuHeader {
    display:none!important;
  }
}


/* ===== HEADER V3 - REMOVE DUPLICATE HERO ===== */

/* Chỉ giữ banner sân vận động phía trên menu */
body:has(#site-main.latkeo-emerald-home)
#site-main.latkeo-emerald-home .latkeo-hero {
  display:none!important;
}

/* Thu gọn khu vực thông báo */
body:has(#site-main.latkeo-emerald-home)
#site-main.latkeo-emerald-home .latkeo-top-ticker {
  min-height:30px!important;
  height:30px!important;
  padding:3px 15px!important;
  margin:0!important;
  border-bottom:1px solid rgba(234,190,92,.45)!important;
}

/* Đưa khu vực trận đấu sát phía dưới menu */
#site-main.latkeo-emerald-home .home-tran-dau {
  padding-top:12px!important;
  margin-top:0!important;
}

#site-main.latkeo-emerald-home .sports-container,
#site-main.latkeo-emerald-home .match-hot-section-container {
  padding-top:0!important;
  margin-top:0!important;
}

/* Thu gọn khoảng cách bộ lọc */
#site-main.latkeo-emerald-home .schedule-nav.latkeo-filter-nav {
  margin-top:8px!important;
  margin-bottom:20px!important;
  padding-top:0!important;
}


/* ===== HEADER V3 - EIGHT MENU ITEMS ===== */

@media (min-width:1101px) {

  body:has(#site-main.latkeo-emerald-home)
  .site-header .header-elements {
    gap:12px!important;
  }

  body:has(#site-main.latkeo-emerald-home)
  .site-header .listMenuHeader {
    flex:1!important;
    min-width:0!important;
  }

  body:has(#site-main.latkeo-emerald-home)
  .site-header .menuItem {
    width:100%!important;
    gap:2px!important;
    justify-content:space-between!important;
  }

  body:has(#site-main.latkeo-emerald-home)
  .site-header .menuItem > a {
    padding:8px 10px!important;
    font-size:12px!important;
    font-weight:800!important;
    letter-spacing:0!important;
  }

  body:has(#site-main.latkeo-emerald-home)
  .site-header .contact-email-list {
    flex-shrink:0!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
  }

}

@media (min-width:901px) and (max-width:1100px) {

  body:has(#site-main.latkeo-emerald-home)
  .site-header .menuItem {
    gap:0!important;
  }

  body:has(#site-main.latkeo-emerald-home)
  .site-header .menuItem > a {
    padding:7px 5px!important;
    font-size:10px!important;
  }

}



/* STEP 103 - COMPACT FILTER AND TICKER */

/* Giảm khoảng cách trên khu vực trận đấu */
#site-main.latkeo-emerald-home .home-tran-dau {
  padding-top:0!important;
}

/* Ghi đè padding container từ CSS cũ */
#site-main.latkeo-emerald-home
.home-tran-dau > .container {
  padding-top:0!important;
  padding-bottom:0!important;
}

/* Thu gọn đúng bộ lọc hiện tại */
#site-main.latkeo-emerald-home .schedule-nav {
  margin-top:0!important;
  margin-bottom:10px!important;
  padding-top:8px!important;
  padding-bottom:12px!important;
}

/* Thanh thông báo: tránh cắt chữ */
#site-main.latkeo-emerald-home .latkeo-top-ticker {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  overflow:hidden!important;
  padding-left:20px!important;
  padding-right:20px!important;
}

#site-main.latkeo-emerald-home .latkeo-top-ticker > span {
  flex-shrink:0!important;
}

#site-main.latkeo-emerald-home .latkeo-top-ticker marquee {
  flex:1!important;
  min-width:0!important;
  line-height:24px!important;
}

@media(max-width:760px) {
  #site-main.latkeo-emerald-home .schedule-nav {
    justify-content:flex-start!important;
    padding-top:8px!important;
  }
}

/* STEP 105 - TICKER FIX */

#site-main.latkeo-emerald-home .latkeo-top-ticker {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 24px!important;
  gap:24px!important;
  overflow:hidden!important;
}

#site-main.latkeo-emerald-home .latkeo-top-ticker > span {
  display:inline-block!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
  line-height:36px!important;
}

#site-main.latkeo-emerald-home .latkeo-top-ticker marquee {
  display:block!important;
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
  height:36px!important;
  line-height:36px!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  color:#fff4c5!important;
  font-size:14px!important;
  font-weight:800!important;
}

@media(max-width:760px) {
  #site-main.latkeo-emerald-home .latkeo-top-ticker {
    padding:0 12px!important;
    gap:10px!important;
  }

  #site-main.latkeo-emerald-home .latkeo-top-ticker marquee {
    font-size:12px!important;
  }
}


/* LATKEO_STADIUM_HEADER_170 */

/* Banner sân vận động mới */
body:has(#site-main.latkeo-emerald-home)
.site-header::before {
    background:
      linear-gradient(
        rgba(0,35,27,.35),
        rgba(0,35,27,.58)
      ),
      url('/assets/images/latkeo-stadium-bg.png')
      center 35% / cover no-repeat !important;
}

/* Ẩn logo lớn nằm trên banner */
body:has(#site-main.latkeo-emerald-home)
.site-header #logo {
    display: none !important;
}

/* Giữ menu ở vị trí hiện tại */
body:has(#site-main.latkeo-emerald-home)
.site-header {
    position: relative !important;
}


/* LATKEO_LOGO_RESTORE_175 */

/* Khôi phục logo trên nền sân vận động */
body:has(#site-main.latkeo-emerald-home)
.site-header #logo {
    display: flex !important;
    position: absolute !important;
    left: max(24px, calc((100vw - 1450px)/2)) !important;
    bottom: calc(100% + 12px) !important;
    width: 230px !important;
    height: 105px !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

/* Logo rõ nét, không có nền trắng */
body:has(#site-main.latkeo-emerald-home)
.site-header #logo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

@media (max-width: 768px) {
    body:has(#site-main.latkeo-emerald-home)
    .site-header #logo {
        left: 15px !important;
        width: 165px !important;
        height: 85px !important;
    }
}


/* LATKEO_LOGO_POSITION_176 */

body:has(#site-main.latkeo-emerald-home)
.site-header #logo {
    left: max(24px, calc((100vw - 1450px)/2)) !important;
    bottom: calc(100% + 12px) !important;
    width: 200px !important;
    height: 95px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body:has(#site-main.latkeo-emerald-home)
.site-header #logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

@media (max-width: 768px) {
    body:has(#site-main.latkeo-emerald-home)
    .site-header #logo {
        left: 15px !important;
        width: 155px !important;
        height: 80px !important;
    }
}
