/* ============================================================================
   JugaadBox - Shared Tool Frame
   Consistent header, footer, ad slots and baseline for every tool page.
   Load this on every tool page together with jugaadbox-frame.js
   ============================================================================ */

:root {
  --tvf-primary-blue: #F68827;
  --tvf-primary-purple: #D96F14;
  --tvf-dark-bg: #F0EFC6;
  --tvf-dark-surface: #F7F6E2;
  --tvf-dark-elevated: #FDFCF1;
  --tvf-text-primary: #292929;
  --tvf-text-secondary: #5A5A52;
  --tvf-text-muted: #86867A;
  --tvf-gradient-primary: linear-gradient(135deg, var(--tvf-primary-blue) 0%, var(--tvf-primary-purple) 100%);
  --tvf-border-subtle: rgba(41, 41, 41, 0.14);
}

/* ---------- Shared ambience (cursor glow + background shapes) ----------
   Both are injected by jugaadbox-ambience.js on every page, so the styles
   live here where every tool page already picks them up. */
.jb-ambience {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(246, 136, 39, 0.20) 0%, rgba(246, 136, 39, 0.06) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: multiply;
}

/* Page content must sit above the background canvas. */
.tvf-navbar,
.tvf-breadcrumb,
.tvf-related,
.tvf-footer,
.tvf-ad,
main,
.app-container,
.container,
.tool-section {
  position: relative;
  z-index: 1;
}

/* ---------- Unified tool page heading ----------
   Each tool shipped its own h1 class (.title, .page-title, .header-title,
   .hero-title, .tv-tool-title, .tvx-h1, or a bare h1). They are all given the
   same gradient display treatment here so every tool page headline matches. */
.tvf-navbar ~ h1,
.tvx-h1,
.page-title,
.header-title,
.hero-title,
.tv-tool-title,
h1.title,
.tool-header h1,
.app-header h1,
header h1,
main > h1 {
  font-family: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  background: linear-gradient(135deg, #E2760F 0%, #B85A0C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #B85A0C; /* fallback where background-clip is unsupported */
}

/* The tagline under the headline, normalised the same way. */
.tvx-subtitle,
.page-subtitle,
.header-subtitle,
.hero-subtitle,
.tv-tool-subtitle,
.tool-header p,
.app-header > p {
  color: #5A5A52;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* ---------- Shared Navbar ---------- */
.tvf-navbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(240, 239, 198, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--tvf-border-subtle);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tvf-navbar * {
  box-sizing: border-box;
}

.tvf-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tvf-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--tvf-text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.tvf-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* The wordmark logo already contains the brand name. */
.tvf-logo span {
  display: none;
}

.tvf-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.tvf-nav-links a {
  color: var(--tvf-text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tvf-nav-links a:hover {
  color: var(--tvf-primary-blue);
}

.tvf-home-btn {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--tvf-border-subtle);
  border-radius: 50px;
  color: var(--tvf-text-primary) !important;
  transition: all 0.2s ease;
}

.tvf-home-btn:hover {
  border-color: var(--tvf-primary-blue);
  box-shadow: 0 6px 16px rgba(41, 41, 41, 0.12);
}

/* ---------- Breadcrumb ---------- */
.tvf-breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0;
  font-size: 0.82rem;
  color: var(--tvf-text-muted);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tvf-breadcrumb a {
  color: var(--tvf-text-secondary);
  text-decoration: none;
}

.tvf-breadcrumb a:hover {
  color: var(--tvf-primary-blue);
}

/* ---------- Ad slots ---------- */
.tvf-ad-slot {
  max-width: 1000px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tvf-ad-slot .tvf-ad-placeholder {
  width: 100%;
  min-height: 90px;
  border: 1px dashed var(--tvf-border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tvf-text-muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- Related tools strip ---------- */
.tvf-related {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding: 2rem 1.5rem 0;
  border-top: 1px solid var(--tvf-border-subtle);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tvf-related h2 {
  color: var(--tvf-text-primary);
  font-size: 1.3rem;
  margin: 0 0 1.25rem;
}

.tvf-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.tvf-related-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--tvf-dark-elevated);
  border: 1px solid var(--tvf-border-subtle);
  border-radius: 12px;
  text-decoration: none;
  color: var(--tvf-text-primary);
  transition: all 0.2s ease;
}

.tvf-related-card:hover {
  border-color: var(--tvf-primary-blue);
  transform: translateY(-3px);
}

.tvf-related-card .tvf-rc-emoji {
  font-size: 1.6rem;
}

.tvf-related-card .tvf-rc-name {
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Shared Footer ---------- */
.tvf-footer {
  margin-top: 3rem;
  background: var(--tvf-dark-bg);
  border-top: 1px solid var(--tvf-border-subtle);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tvf-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.tvf-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
}

.tvf-footer-brand .tvf-logo {
  font-size: 1.05rem;
}

.tvf-footer-brand p {
  color: var(--tvf-text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

.tvf-footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tvf-footer-col h4 {
  color: var(--tvf-text-primary);
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.tvf-footer-col a {
  color: var(--tvf-text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.tvf-footer-col a:hover {
  color: var(--tvf-primary-blue);
}

.tvf-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--tvf-border-subtle);
  color: var(--tvf-text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .tvf-nav-links {
    gap: 0.9rem;
  }
  .tvf-nav-links a:not(.tvf-home-btn) {
    display: none;
  }
  .tvf-footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
}
