/* ═══════════════════════════════════════════════════════════
   Q'TERRA QUY NHƠN – Responsive Enhancements & Utilities
   ═══════════════════════════════════════════════════════════ */

/* ─── SCROLL PROGRESS BAR ─── */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tc-deep), var(--tc-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed;
  bottom: 140px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(26,18,16,0.8);
  border: 1px solid rgba(232,120,74,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tc-light);
  font-size: 1.1rem;
  z-index: 888;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--tc-deep);
  border-color: var(--tc-light);
}

/* ─── COOKIE / PRIVACY NOTICE ─── */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 8888;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-notice.show { transform: translateY(0); }

.cookie-notice a {
  color: var(--tc-light);
  text-decoration: underline;
}

.cookie-accept {
  background: var(--tc-main);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── SECTION DIVIDER WAVE ─── */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

/* ─── COUNTER ANIMATION ─── */
.counter-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ─── IMAGE LAZY LOAD ─── */
img[data-src] {
  filter: blur(8px);
  transition: filter 0.4s;
}

img[data-src].loaded {
  filter: blur(0);
}

/* ─── UTILITY CLASSES ─── */
.text-tc    { color: var(--tc-main); }
.text-light { color: rgba(255,255,255,0.75); }
.fw-bold    { font-weight: 700; }
.text-center { text-align: center; }

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

/* ─── FOCUS STYLES (ACCESSIBILITY) ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tc-main);
  outline-offset: 3px;
}

/* ─── PRINT STYLES ─── */
@media print {
  .header, .float-buttons, .popup-overlay, .success-toast { display: none !important; }
  .hero { min-height: auto; padding: 40px 24px; }
  .hero-bg { display: none; }
  .hero-content { color: var(--charcoal); }
  .dark-section { background: var(--warm-white); color: var(--charcoal); }
  body { font-size: 12pt; }
}
