/* =========================
   HEADER BASE
========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 1000;
  transition: transform 0.35s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
}

/* Hide on scroll */
.site-header.hide {
  transform: translateY(-100%);
}

/* =========================
   HEADER INNER
========================= */

.header-inner {
  max-width: 1200px;
  height: 70px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   LOGO
========================= */

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.logo-text strong {
  color: #2563eb;
  font-weight: 800;
}

/* =========================
   NAVIGATION (DESKTOP)
========================= */

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: #4b5563;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #eff6ff;
  color: #2563eb;
}

/* =========================
   HAMBURGER BUTTON
========================= */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 6px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #111827;
  margin: 6px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* =========================
   MOBILE STYLES
========================= */

@media (max-width: 768px) {

  .site-header {
    height: 64px;
  }

  .header-inner {
    height: 64px;
    padding: 0 12px;
  }

  .logo-text {
    font-size: 15px;
  }

  /* Show hamburger */
  .menu-toggle {
    display: block;
  }

  /* Mobile nav drawer */
  @media (max-width: 768px) {

  /* Hide nav by default */
  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;

    background: #ffffff;
    flex-direction: column;
    gap: 4px;
    padding: 12px;

    border-bottom: 1px solid #e5e7eb;

    /* 🔴 THIS IS THE FIX */
    display: none;
  }

  /* Show ONLY when hamburger is clicked */
  .site-nav.open {
    display: flex;
  }

}

/* =========================
   TOOL PAGE SPECIFIC STYLES
========================= */
body.has-fixed-header {
  padding-top: 70px;
}

@media (max-width: 768px) {
  body.has-fixed-header {
    padding-top: 64px;
  }
}

.tool-hero {
  padding-top: 40px;
  padding-bottom: 40px;
  margin-bottom: 40px;
}

.tool-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.tool-hero-content h1 {
  font-size: 2.5rem;
  color: #1f2937;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.tool-hero-content p {
  color: #6b7280;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Main content spacing */
.tool-page {
  min-height: calc(100vh - 200px);
  padding-top: 20px;
}

/* Container override for tool pages */
.tool-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* === FORCE DEVICE-SPECIFIC ADS === */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }
}


/* ===== AD CONTAINER CENTERING ===== */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

/* Desktop banner size safety */
.ad-desktop iframe,
.ad-desktop ins,
.ad-desktop img {
    max-width: 728px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

/* Mobile banner size safety */
.ad-mobile iframe,
.ad-mobile ins,
.ad-mobile img {
    max-width: 300px;
    width: 100%;
    justify-content: center;
    align-items: center;
}