/*
Theme Name: Quốc Nam BĐS - Personal Brand & Real Estate Hub
Theme URI: https://quocnambds.id.vn/
Author: Quốc Nam BĐS
Author URI: https://canhokimcuong.danang.vn/
Description: Custom WordPress Theme độc lập, siêu nhẹ, chuẩn SEO dành riêng cho thương hiệu cá nhân Quốc Nam BĐS Đà Nẵng. Refactor UI/UX Pro Max, Mobile First, tương thích 100% PHP 8.3 & WordPress 6.x+, tích hợp hệ thống Backlink Dofollow chiến lược cho Căn Hộ Kim Cương & Thuê Nhà Nhanh.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quocnambds
*/

/* ==========================================================================
   1. DESIGN TOKENS & SYSTEM VARIABLES (UI/UX Pro Max Real Estate)
   ========================================================================== */
:root {
  /* Brand Obsidian & Slate Neutrals */
  --color-brand-obsidian: #090d16;
  --color-primary: #0f172a;
  --color-primary-light: #1e293b;
  --color-primary-card: #182234;
  --color-text-heading: #0f172a;
  --color-text-body: #334155;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  
  /* Luxury Gold & Warm Champagne Accents */
  --color-accent: #d97706;
  --color-accent-hover: #b45309;
  --color-accent-light: #fef3c7;
  --color-gold-400: #fbbf24;
  --color-gold-500: #f59e0b;
  --color-gold-600: #d97706;
  --color-gold-700: #b45309;
  --color-gold-champagne: #ecd28f;
  
  /* Trust Emerald & Blue Accents */
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-emerald-bg: #ecfdf5;
  --color-sky-500: #0284c7;
  --color-sky-600: #0369a1;

  /* Surfaces & Borders */
  --color-bg-base: #f8fafc;
  --color-bg-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;

  /* Touch & Layout Scale */
  --min-touch-target: 44px;
  --bottom-bar-height: 68px;
  --safe-bottom-space: env(safe-area-inset-bottom, 0px);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-text-body);
  background-color: var(--color-bg-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Accessibility: Skip to Content */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  border-radius: 8px;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-to-content:focus {
  top: 16px;
  outline: 3px solid var(--color-accent);
}

/* Visible keyboard focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-gold-500);
  outline-offset: 2px;
}

/* Luxury Serif & Sans Classes */
.font-serif {
  font-family: var(--font-serif);
}
.font-sans {
  font-family: var(--font-sans);
}

/* Fluid responsive typography */
.headline-hero {
  font-size: clamp(2rem, 5vw + 1rem, 3.75rem);
  line-height: 1.15;
}
.headline-section {
  font-size: clamp(1.65rem, 3.5vw + 0.5rem, 2.5rem);
  line-height: 1.25;
}
.headline-card {
  font-size: clamp(1.2rem, 2vw + 0.2rem, 1.45rem);
  line-height: 1.35;
}

/* ==========================================================================
   2. LUXURY VISUAL STYLES & GLASSMORPHISM
   ========================================================================== */
.glass-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.glass-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.glass-card-dark {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Metallic Gold Gradients */
.gold-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
}

.gold-gradient-text {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 45%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-shine-border {
  border: 1px solid rgba(217, 119, 6, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.gold-shine-border:hover {
  border-color: rgba(217, 119, 6, 0.7);
  box-shadow: 0 0 20px -3px rgba(217, 119, 6, 0.15);
}

/* Soft Luxury Shadows */
.luxury-shadow {
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
}

.luxury-shadow-hover {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}
.luxury-shadow-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.1), 0 8px 12px -4px rgba(15, 23, 42, 0.03);
}

/* ==========================================================================
   3. MOBILE FIRST UTILITIES & TOUCH TARGETS
   ========================================================================== */
/* Touch target guarantee */
.touch-target {
  min-height: var(--min-touch-target);
  min-width: var(--min-touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile bottom spacing compensation */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--bottom-bar-height) + var(--safe-bottom-space) + 16px);
  }
}

/* Smooth horizontal scrollable chips for mobile filters */
.scroll-touch-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.scroll-touch-x::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Active touch feedback */
.active-press {
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.active-press:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* ==========================================================================
   4. CUSTOM RANGE SLIDER (Mobile & Desktop optimized)
   ========================================================================== */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #334155;
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover,
input[type=range]::-webkit-slider-thumb:active {
  transform: scale(1.18);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
  cursor: grabbing;
}

input[type=range]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* ==========================================================================
   5. REVEAL ANIMATIONS & ACCESSIBILITY (prefers-reduced-motion)
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 80ms; }
.delay-200 { transition-delay: 160ms; }
.delay-300 { transition-delay: 240ms; }
.delay-400 { transition-delay: 320ms; }

/* Subtle pulse ring for high-priority CTA */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(217, 119, 6, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
  }
}

.btn-pulse {
  animation: pulse-ring 2.4s infinite;
}

@keyframes live-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
.animate-ping-slow {
  animation: live-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Respect user's motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
  }
  .btn-pulse,
  .animate-ping-slow {
    animation: none !important;
  }
}

/* ==========================================================================
   6. MODAL & OVERLAY STYLING
   ========================================================================== */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-active .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Drawer Mobile Menu */
.mobile-drawer {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-drawer.is-open {
  transform: translateX(0);
}

/* Filter Project Cards Transition */
.project-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.project-card.is-hidden {
  display: none !important;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
