/*
Theme Name: Corvona (Ultimate Dark Glass Edition)
Theme URI: https://trendthemeswp.com/products/corvona/
Author: Trendthemeswp 
Description: Final optimized version with Apple-inspired Liquid Glass, universal Indigo hover effects, and fixed button contrast.
Requires at least: 5.9
Version: 2.0.0
*/

/* ==========================================================================
   1. GLOBAL STYLES & LINK HOVER (TẤT CẢ LINK HOVER MÀU TÍM XANH)
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

/* Tùy chỉnh thẻ Link cơ bản: Bỏ gạch chân, đổi màu mượt mà */
a {
  text-decoration: none !important;
  transition: all 0.3s ease !important;
}

/* HIỆU ỨNG HOVER CHUNG TOÀN TRANG: TÍM XANH INDIGO */
a:hover {
  color: #5B5CE6 !important;
}

/* Xóa viền focus (viền đen) khi click chuột vào link/nút */
a:focus, a:active, button:focus, input:focus {
  outline: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   2. APPLE LIQUID GLASS EFFECT (Kính mờ tự động cho các khối)
   ========================================================================== */
.liquid-glass,
.has-box-shadow,
.wp-block-navigation__submenu-container,
.wp-block-navigation__responsive-container-content,
.faq-border {
  background: rgba(255, 255, 255, 0.08) !important; 
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
  border-radius: 16px !important;
}

/* ==========================================================================
   3. BUTTONS (SỬA LỖI CHỮ CHÌM + HOVER TÍM XANH)
   ========================================================================== */
.wp-block-button__link {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 98px !important; /* Bo tròn hoàn toàn kiểu nút Apple */
  
  /* BẮT BUỘC MÀU CHỮ LÀ TRẮNG ĐỂ KHÔNG BỊ TÀNG HÌNH NHƯ ẢNH */
  color: #ffffff !important; 
  
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.wp-block-button__link:hover {
  background-color: #5B5CE6 !important; /* Nền chuyển tím xanh */
  color: #ffffff !important; /* Chữ vẫn giữ màu trắng */
  border-color: transparent !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(91, 92, 230, 0.4) !important; /* Bóng đổ tím xanh */
}

.wp-block-button__link:active {
  transform: scale(0.96);
}

/* ==========================================================================
   4. NAVIGATION MENU (TRẮNG TINH TẾ & HOVER TÍM XANH)
   ========================================================================== */
/* Mặc định chữ menu là màu trắng */
.wp-block-navigation-item a, 
.wp-block-navigation .wp-block-navigation-item__content {
  color: #ffffff !important;
  padding: 15px 15px;
  transition: all 0.3s ease !important;
}

/* Hover Menu: Tắt nền xám, chữ đổi Tím Xanh Indigo */
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus,
.wp-block-navigation-item a:hover,
.wp-block-navigation-item a:focus {
  opacity: 1 !important; 
  background-color: transparent !important; 
  color: #5B5CE6 !important; 
  text-shadow: 0 0 10px rgba(91, 92, 230, 0.4) !important;
}

form .wp-block-search__inside-wrapper button {
  box-shadow: unset;
}

form .wp-block-search__input {
  font-size: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #fff;
}

.wp-block-search__inside-wrapper:focus-within .wp-block-site-title,
.expanded .wp-block-site-title {
  display: none !important;
}

@media screen and (min-width: 1000px) {
  .wp-block-navigation .has-child:where(:not(.open-on-click)):hover > .wp-block-navigation__submenu-container {
    animation: fadeScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top center;
  }
  button.wp-block-navigation__submenu-icon.wp-block-navigation-submenu__toggle {
    position: absolute;
    right: 4px;
  }
}

@keyframes fadeScaleIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0px) scale(1); }
}

/* ==========================================================================
   5. RESPONSIVE NAVIGATION (MENU ĐIỆN THOẠI)
   ========================================================================== */
@media screen and (max-width: 1020px) {
  .wp-block-navigation__responsive-container,
  .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
    display: none;
  }

  .wp-block-navigation__responsive-container-close {
    background: transparent;
    border-radius: 50%;
    backdrop-filter: blur(10px);
  }

  .wp-block-navigation__responsive-container-close svg,
  .wp-block-navigation__responsive-container-open svg {
    width: 42px;
    height: 42px;
  }

  .wp-block-navigation__responsive-container-close {
    top: -20px;
    right: 20px;
  }

  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: block;
  }

  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }

  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    padding: 1.5em;
  }

  .wp-block-navigation .wp-block-navigation__responsive-container-content ul:first-child {
    width: 100%; gap: 0 !important; border-bottom: none;
  }

  .wp-block-navigation .wp-block-navigation__responsive-container-content ul:first-child li.wp-block-navigation-item {
    width: 100%; gap: 0 !important; border: none !important;
  }

  .wp-block-navigation .wp-block-navigation__responsive-container-content ul:first-child li.wp-block-navigation-item a {
    width: calc(100% - 48px); padding: 12px 24px 12px; line-height: 30px;
  }

  .wp-block-navigation .wp-block-navigation__responsive-container-content ul:first-child li.wp-block-navigation-item .wp-block-navigation__submenu-icon {
    display: block !important; margin-left: 15px; padding: 3px 10px; float: right;
    font-size: 19px; line-height: 1; position: absolute; right: 0; height: 42px; width: 42px;
  }

  .wp-block-navigation .wp-block-navigation__responsive-container-content ul:first-child li.wp-block-navigation-item .wp-block-navigation-submenu__toggle[aria-expanded="true"] + ul.wp-block-navigation__submenu-container {
    display: block; margin: 0;
  }
}

/* ==========================================================================
   6. WOOCOMMERCE & COMPONENTS
   ========================================================================== */
@media (max-width: 653px) {
  .woocommerce div.product { width: 100%; }
}
.summary.entry-summary form button { padding: 10px; border-radius: 8px; }
@media (max-width: 1100px) {
  .corvona-product-item-box .products-wrapper .products-items {
    grid-template-columns: auto auto auto; gap: 32px;
  }
}
.woocommerce .products .product:hover .wc-booster-quick-view {
  opacity: 1; visibility: visible;
}

/* ==========================================================================
   7. ICONS & MISC
   ========================================================================== */
.wp-block-group .arrow-right a { border-bottom: 2px solid transparent; }
.wp-block-group .arrow-right a::after {
  content: "\f061"; font-family: "Font Awesome 5 Free"; margin-left: 6px; font-weight: 600; transition: transform 0.3s ease;
}
.wp-block-group .arrow-right a:hover::after { transform: translateX(4px); }

.wp-block-post-date::before { content: "\f508"; font-family: "Dashicons"; font-weight: 600; padding-right: 5px; font-size: 12px; }
.post-author-name.wp-block-post-author-name::before { content: "\f110"; font-family: "Dashicons"; font-weight: 600; padding-right: 5px; font-size: 12px; }
.taxonomy-category.wp-block-post-terms::before { font-size: 12px; content: "\f022"; font-family: "Font Awesome 5 Free"; font-weight: 600; margin-right: 6px; }

/* Các icon đổi mặc định thành màu Tím Xanh */
.pricing-icon::before { font-family: "Font Awesome 5 Free"; font-weight: 900; padding-right: 7px; font-size: 16px; content: "\f058"; color: #5B5CE6; }
.log-out::before { font-family: "Font Awesome 5 Free"; font-weight: 900; padding-right: 7px; font-size: 16px; content: "\f007"; color: #5B5CE6; cursor: pointer; }
.log-out { border-radius: 6px; }

/* Nút cuộn lên đầu trang */
#wptravel-scroll-to-top {
   background: rgba(255,255,255,0.15) !important;
   backdrop-filter: blur(10px);
   border: 1px solid rgba(255,255,255,0.2) !important;
   border-radius: 50% !important;
   cursor: pointer;
   color: #ffffff !important;
   transition: all 0.3s ease;
}
#wptravel-scroll-to-top:hover {
   transform: scale(1.1);
   background: #5B5CE6 !important;
}

.location-icon::before{ font-family: "Font Awesome 5 Free"; font-weight: 600; content: '\f3c5'; margin-right: 9px; }
.list:before{ content: "\f058"; font-family: "Font Awesome 5 Free"; margin-right: 8px; font-weight: 600; color: #5B5CE6; }
.star:before{ content: "\f005"; font-family: "Font Awesome 5 Free"; margin-right: 8px; font-weight: 600; color: #5B5CE6; }
.overlap-img figure{ margin-left: -15px; }