/* =============================================================
   QuietAirNest — components.css
   Top-bar · Header · Logo · Nav · Mobile menu · Footer · Back-to-top
   ============================================================= */

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--primary);
  color: #ccc;
  font-size: 0.85rem;
  padding: 8px 0;
}
.top-bar .container {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.top-bar span { display: flex; align-items: center; gap: 6px; }

/* ===== HEADER ===== */
.header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 14px;
}

/* ===== LOGO — SVG variant (contact, privacy, disclosure) ===== */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.logo-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

/* ===== LOGO — text-badge variant (index, about, terms) ===== */
.logo-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111 0%, #333 50%, #555 100%);
  color: #fff;
  font-weight: 800;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  letter-spacing: 1px;
}

/* ===== LOGO TEXT ===== */
.logo-text { min-width: 0; }
.logo-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
  line-height: 1.2;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-tagline {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== NAV ===== */
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link {
  padding: 10px 18px;
  font-weight: 600;
  color: var(--text);
  border-radius: 50px;
  transition: var(--transition);
  font-size: 0.95rem;
}
.nav-link:hover  { background: var(--accent-light); color: var(--accent); }
.nav-link.active { background: var(--accent); color: var(--primary); }

/* ===== MOBILE MENU BUTTON ===== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
}
.mobile-menu-btn:hover { background: #f3f3f3; }
.mobile-menu-btn span {
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

/* ===== MOBILE NAV DRAWER ===== */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 12px 24px 16px;
}
.mobile-nav .nav-link {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-weight: 600;
}
.mobile-nav .nav-link:last-child { border-bottom: none; }
.mobile-nav.active { display: flex; }

/* ===== FOOTER ===== */
.footer {
  background: var(--primary);
  color: #ccc;
  padding-top: 54px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
  /* Handles pages where footer-inner has no .container wrapper */
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 34px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  align-items: start;
}
.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-direction: column;
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 420px;
  color: #bdbdbd;
  margin-top: 10px;
}
.footer-brand h3 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
}
.footer-brand .tagline {
  color: #9a9a9a;
  font-size: 0.9rem;
  margin-top: 2px;
}
.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 14px;
}
.footer-links a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: #999;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); padding-left: 6px; }

/* Footer bottom bar */
.footer-bottom {
  padding: 22px 0;
  text-align: center;
}
.footer-bottom p { font-size: 0.84rem; color: #8f8f8f; line-height: 1.6; }
.affiliate-disclosure {
  margin-top: 8px;
  font-size: 0.78rem !important;
  color: #6f6f6f !important;
  line-height: 1.6;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 26px;
  right: 22px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover   { transform: translateY(-3px); box-shadow: var(--shadow-xl); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav               { display: none; }
  .mobile-menu-btn   { display: flex; }
  .footer-inner      { grid-template-columns: 1fr; gap: 28px; }
  .top-bar .container { flex-direction: column; gap: 6px; align-items: center; }
}
