/* =============================================================
   AZDATA FIX PACK – sửa lỗi giao diện
   Nạp SAU cùng để ghi đè. (submenu desktop, tương phản chữ/nền)
   ============================================================= */

/* -------------------------------------------------------------
   1) SUBMENU DESKTOP TỰ TẮT – tạo "cầu nối" lấp khe hở 10px
   Khi rê chuột từ menu cha xuống submenu sẽ không bị mất hover.
   ------------------------------------------------------------- */
.az-nav-list > li.menu-item-has-children { position: relative; }

.az-nav-list > li > ul.sub-menu::before {
  content: '';
  position: absolute;
  top: -14px;          /* phủ đúng khe hở top: calc(100% + 10px) */
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

/* Giữ submenu mở khi hover bất kỳ đâu trong nhánh (kể cả khoảng đệm) */
.az-nav-list > li:hover > ul.sub-menu,
.az-nav-list > li > ul.sub-menu:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}
.az-nav-list > li > ul.sub-menu > li:hover > ul.sub-menu,
.az-nav-list > li > ul.sub-menu > li > ul.sub-menu:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}
/* Cầu nối cho submenu cấp 2 (mở sang phải) */
.az-nav-list > li > ul.sub-menu > li > ul.sub-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  width: 12px;
  height: 100%;
  background: transparent;
}

/* -------------------------------------------------------------
   2) TƯƠNG PHẢN CHỮ / NỀN – tránh chữ chìm vào nền
   ------------------------------------------------------------- */

/* Ô nhập liệu: luôn nền sáng tương phản, chữ tối — đọc được trên mọi nền */
.az-domain-checker-wrap input,
.azc-wrap input,
.az-cart-checkout-wrap input,
.az-cart-checkout-wrap textarea,
.az-cart-checkout-wrap select,
input[type="text"]:not(.wp-admin input),
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea,
select {
  color: #0f172a;
  background-color: #ffffff;
}
.az-domain-checker-wrap input::placeholder,
.azc-wrap input::placeholder,
input::placeholder,
textarea::placeholder { color: #64748b; opacity: 1; }

/* Khối nội dung trên nền tối: đảm bảo chữ sáng */
.az-section,
.az-hero,
.az-cta-section,
.az-banner-section { color: var(--az-text-light, #e2e8f0); }

.az-section h1, .az-section h2, .az-section h3, .az-section h4,
.az-hero h1, .az-hero h2, .az-hero h3 { color: var(--az-text-white, #f8fafc); }

.az-section p, .az-section li,
.az-hero p { color: var(--az-text-light, #cbd5e1); }

/* Khối nền SÁNG (light) – ép chữ tối cho dễ đọc */
.az-section--light,
.az-bg-light,
section[style*="background:#fff"],
section[style*="background: #fff"],
section[style*="background:#ffffff"] {
  color: #1e293b;
}
.az-section--light h1, .az-section--light h2, .az-section--light h3,
.az-bg-light h1, .az-bg-light h2, .az-bg-light h3 { color: #0f172a; }

/* Badge/nhãn không bị trùng màu nền */
.az-hero-badge,
.az-pricing-badge,
.az-eyebrow {
  color: #ffffff;
}

/* Nút: đảm bảo chữ tương phản nền nút */
.az-btn-primary { color: #ffffff !important; }
.az-btn-outline { color: var(--az-primary, #10b981) !important; }
.az-btn-secondary { color: var(--az-text-light); !important; }

/* Card kết quả tra cứu tên miền (nền trắng) – chữ tối */
.azc-card, .azc-card .azc-name { color: #0f172a; }

/* Liên kết trong nội dung sáng */
.az-richtext-section a { color: var(--az-primary, #10b981); }

/* Sửa select option (một số trình duyệt nền tối) */
select option { color: #0f172a; background: #ffffff; }

/* =============================================================
   TRANG DANH MỤC / ARCHIVE – làm đẹp
   ============================================================= */
.az-archive-header {
  text-align: center;
  padding: 48px 0 36px;
  background:
    radial-gradient(1200px 240px at 50% -40%, rgba(16,185,129,.18), transparent 70%),
    var(--az-bg-section, #1e293b);
  border-bottom: 1px solid var(--az-border, rgba(255,255,255,.08));
}
.az-archive-header h1 { color: var(--az-text-white, #f8fafc); font-size: clamp(1.6rem, 3vw, 2.4rem); }
.az-archive-header p { color: var(--az-text-muted, #94a3b8); }

.az-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.az-post-card {
  display: flex;
  flex-direction: column;
  background: var(--az-bg-card, #1e293b);
  border: 1px solid var(--az-border, rgba(255,255,255,.08));
  border-radius: 16px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.az-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  border-color: rgba(16,185,129,.35);
}
.az-post-card-image { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--az-bg-page, #0f172a); }
.az-post-card-image a { display: block; width: 100%; height: 100%; }
.az-post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.az-post-card:hover .az-post-card-image img { transform: scale(1.05); }
.az-post-card-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2.6rem; opacity: .5; }
.az-post-card-image .az-post-cat {
  position: absolute; top: 12px; left: 12px;
  background: var(--az-primary, #10b981); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.az-post-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.az-post-meta { display: flex; gap: 8px; font-size: .78rem; color: var(--az-text-muted, #94a3b8); margin-bottom: 8px; }
.az-post-card-body h3 { font-size: 1.08rem; line-height: 1.4; margin: 0 0 8px; }
.az-post-card-body h3 a { color: var(--az-text-white, #f1f5f9); text-decoration: none; }
.az-post-card-body h3 a:hover { color: var(--az-primary, #10b981); }
.az-post-excerpt { color: var(--az-text-muted, #94a3b8); font-size: .9rem; line-height: 1.6; margin: 0 0 14px; }
.az-post-readmore { margin-top: auto; color: var(--az-primary, #10b981); font-weight: 700; font-size: .88rem; text-decoration: none; align-self: flex-start; }
.az-post-readmore:hover { gap: 6px; letter-spacing: .3px; }

/* Phân trang */
.az-pagination { margin-top: 32px; }
.az-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; margin: 0 3px;
  border-radius: 10px; border: 1px solid var(--az-border, rgba(255,255,255,.1));
  color: var(--az-text-light, #cbd5e1); text-decoration: none; font-weight: 600;
  transition: all .18s ease;
}
.az-pagination .page-numbers:hover { border-color: var(--az-primary, #10b981); color: var(--az-primary, #10b981); }
.az-pagination .page-numbers.current { background: var(--az-primary, #10b981); border-color: var(--az-primary, #10b981); color: #fff; }
.az-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }

@media (max-width: 480px) {
  .az-posts-grid { grid-template-columns: 1fr; }
}

/* =============================================================
   MENU MOBILE – gọn lại (actions 1 hàng + social)
   ============================================================= */
.az-mobile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.az-mobile-actions .az-mq {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--az-text-light);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}
.az-mobile-actions .az-mq:hover { border-color: var(--az-primary, #10b981); color: var(--az-primary, #10b981); }
.az-mobile-social { display: inline-flex; align-items: center; margin-left: auto; }
/* Thu nhỏ social icon trong menu mobile */
.az-mobile-social .az-social-icons { gap: 6px !important; }
.az-mobile-social .az-social-icon-btn { width: 30px !important; height: 30px !important; }
.az-mobile-social .az-social-icon-btn svg { width: 16px; height: 16px; }

/* Ảnh đại diện đánh giá khách hàng (bo tròn, phủ khung) */
.az-testimonial-avatar-img { padding: 0 !important; overflow: hidden; }
.az-testimonial-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
