/**
 * PCTechComVn — Utilities & Component Styles
 * Child Theme CSS Module
 * Version: 1.0.0 (Sprint 0)
 *
 * Global utility classes dùng chung cho mọi template.
 * Bricks Builder sẽ apply các class này qua "CSS Classes" field.
 */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-fast);
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5); }
/* Shimmer effect — không cần JS */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue-light); }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--orange);
}

.btn-ghost {
  background: var(--white);
  color: var(--blue-dark);
  box-shadow: var(--shadow);
}

/* ── Section Common ── */
section { padding: 60px 0; }

.section-tag {
  display: inline-block;
  background: var(--orange-light);
  color: var(--orange-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.25;
  margin-bottom: 16px;
}
.section-title .accent { color: var(--orange); }

.section-desc {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 600px;
  margin-bottom: 48px;
}

.section-header { text-align: center; }
.section-header .section-desc { margin-left: auto; margin-right: auto; }

/* ── Container ── */
.container {
  width: min(1320px, calc(92vw - var(--side-rail-w)));
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .container { width: min(1200px, 92vw); }
}

/* ── Cards ── */
.card-hover {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── Glow Card ── */
.glow-card { position: relative; }
.glow-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(135deg, var(--orange), var(--blue), var(--green));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}
.glow-card:hover::after {
  opacity: 0.6;
  animation: glowRotate 3s linear infinite;
}

/* ── Pulse Dot ── */
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  right: 28px;
  bottom: 220px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover   { transform: translateY(-4px); }

/* ── Trust Pill ── */
.trust-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}
.trust-pill .icon { font-size: 1.1rem; }

/* Trust pill on dark backgrounds (Hero) */
.hero .trust-pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

/* ── Badge ── */
.badge-online {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
}

.badge-featured {
  background: linear-gradient(135deg, #ff6b00, var(--orange));
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  animation: pulseBadge 2s ease-in-out infinite;
}

/* ── Decorative Background Strip ── */
.deco-strip {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(180deg, var(--blue-deeper), var(--blue-dark), var(--blue-deeper));
  opacity: 0.04;
  pointer-events: none;
  z-index: 2;
}

/* ── Page Background Gradient ── */
.page-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(13, 74, 143, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(232, 135, 10, 0.06) 0%, transparent 50%),
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(13, 74, 143, 0.02) 80px, rgba(13, 74, 143, 0.02) 81px);
  pointer-events: none;
  z-index: 0;
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s;
  pointer-events: none;
}

/* ── Pledge Sticky Bar ("Cam kết 3 Không") ── */
.pledge-sticky {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 997;
  background: linear-gradient(90deg, var(--blue-deeper), var(--blue-dark));
  color: #fff;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.pledge-sticky.visible {
  transform: translateY(0);
  opacity: 1;
}
.pledge-sticky span::before {
  content: '✓ ';
  color: var(--orange);
}

/* ── Sticky Mobile CTA ── */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--blue-deeper);
  border-top: 2px solid var(--orange);
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: none;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.sticky-cta.visible {
  transform: translateY(0);
}
.sticky-cta-inner {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}
.sticky-cta a {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.sticky-cta .sc-call      { background: #22c55e; }
.sticky-cta .sc-zalo       { background: var(--zalo); }
.sticky-cta .sc-messenger  { background: var(--messenger); }

@media (max-width: 768px) {
  .sticky-cta { display: block; }

  .pledge-sticky {
    font-size: 0.7rem;
    padding: 6px 10px;
    gap: 4px 12px;
  }
}

/* ── Remote 50k Dock ── */
.remote-50k-dock {
  position: fixed;
  left: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 10005;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: 200px;
}
.remote-50k-widget {
  position: static;
  background: linear-gradient(135deg, #00a86b, #00965e);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,150,94,0.45);
  animation: widgetBounce 3s ease infinite;
  width: 100%;
}
.remote-50k-widget strong { display: block; font-size: 1.15rem; font-weight: 800; }
.remote-50k-ktv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #062a55, #0d4a8f);
  color: #fff;
  border: 2px solid var(--orange);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 4px 20px rgba(232,135,10,0.35);
  animation: ktvStripPulse 2.5s ease infinite;
}
.remote-50k-ktv .ktv-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.5s ease infinite;
}
.remote-50k-ktv strong { color: var(--orange); font-size: 0.85rem; }
@keyframes ktvStripPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(232,135,10,0.35); }
  50% { box-shadow: 0 4px 28px rgba(232,135,10,0.55); }
}
@keyframes widgetBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (min-width: 1101px) { .remote-50k-dock { left: calc(var(--side-rail-w) + 12px); } }
@media (max-width: 768px) {
  .remote-50k-dock {
    bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    max-width: 160px;
  }
  .remote-50k-widget { padding: 10px 12px; }
  .remote-50k-ktv { font-size: 0.68rem; padding: 8px 10px; }
}
