.watermark-bg {
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.85) 0%, rgba(248,250,249,0.95) 100%), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 100 100"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="serif" font-size="60" font-weight="bold" fill="%231b4332" opacity="0.04">TT</text></svg>');
}
.gold-gradient-text {
    background: linear-gradient(135deg, #AA820A 0%, #D4AF37 50%, #F3E5AB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.card-shadow {
    box-shadow: 0 6px 20px -4px rgba(27, 67, 50, 0.08);
}
.card-shadow:hover {
    box-shadow: 0 12px 28px -4px rgba(27, 67, 50, 0.15);
}

/* Link menu của trang đang xem */
.nav-link.active { color: #1b4332; font-weight: 700; }
.nav-link.active::after { width: 100%; }
#mobileMenu a.active { color: #1b4332; font-weight: 700; }

/* ===== TỐI ƯU CHO ĐIỆN THOẠI (Android / iOS, máy cũ & mới) ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
img { max-width: 100%; }
button, a, [onclick] { touch-action: manipulation; }

/* Khóa cuộn trang nền khi đang xem ảnh (iOS hay bị cuộn xuyên) */
html.no-scroll, body.no-scroll { overflow: hidden; }

/* Ảnh trong khung xem: không bị tràn khi thanh địa chỉ iOS/Android co giãn */
.viewer-img { max-height: calc(100vh - 11rem); max-height: calc(100dvh - 11rem); }
#imageViewerModal .max-h-\[80vh\] { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
#imageViewerModal { overscroll-behavior: contain; padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: max(1rem, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
#closeViewer { top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); }

/* Nút nổi Zalo/Facebook không bị che bởi thanh home của iPhone */
.fixed.right-4.bottom-5 { bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + .5rem)); right: max(1rem, env(safe-area-inset-right)); }

/* Safari cũ (iOS < 15) chưa hỗ trợ aspect-ratio: dùng padding-top thay thế */
@supports not (aspect-ratio: 1 / 1) {
    [class*="aspect-["] { position: relative; height: 0; }
    .aspect-\[4\/3\] { padding-top: 75%; }
    .aspect-\[16\/9\] { padding-top: 56.25%; }
    [class*="aspect-["] > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}

/* Máy không hỗ trợ blur: nền đặc hơn để vẫn đọc rõ */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    header.sticky { background-color: #fff; }
    #imageViewerModal { background-color: rgba(2, 6, 23, .92); }
}

/* Máy yếu / người dùng tắt hiệu ứng: bỏ chuyển động */
@media (prefers-reduced-motion: reduce) {
    * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Vòng sóng nút nổi: dùng top/right/bottom/left thay inset (iOS < 14.1) */
.float-btn::before, .float-btn::after { top: 0; right: 0; bottom: 0; left: 0; }
