/*
 * Navigation styles for blog.busy.app
 *
 * Ghost base: html { font-size: 62.5% } → 1rem = 10px
 * Original Shopify/Webflow: 1rem = 16px → multiply by 1.6 for Ghost rem
 * Ghost layout: .outer padding max(4vmin, 20px), .inner max-width 1200px
 * Ghost breakpoints: 991px, 767px, 600px, 500px
 */

:root {
  --bg: #f5f5f7;
  --light_secondary: #7e7e88;
}

#gh-head { display: none; }


/* ─────────────────────────────────────────────
   Nav bar — mirrors Ghost .gh-head
   height 88px, font-size 1.6rem, padding via max(4vmin,20px)
   ───────────────────────────────────────────── */

nav.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  padding: 0 max(4vmin, 20px);
  height: 88px;
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  line-height: 1.3em;
  box-sizing: border-box;
}

.container_nav {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  column-gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
}


/* ─────────────────────────────────────────────
   Platform dropdown (desktop)
   ───────────────────────────────────────────── */

.platform_dropdown {
  position: relative;
}

.platform_dropdown-toggle {
  color: var(--light_secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  transition: color 0.2s;
}

.platform_dropdown-toggle:hover { color: #000; }

.platform_dropdown-toggle .nav_logo {
  opacity: 0.5;
  transition: opacity 0.2s;
}
.platform_dropdown-toggle:hover .nav_logo {
  opacity: 1;
}

.nav_logo {
  width: 120px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.chevron {
  width: 10px;
  height: 7px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: currentColor;
}

.platform_dropdown.is-open .chevron {
  transform: rotate(180deg);
}

.platform_list {
  background-color: #fff;
  border-radius: 12px;
  padding: 6px;
  position: absolute;
  top: calc(100% + 6px);
  left: -20px;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 10;
}

.platform_dropdown.is-open .platform_list {
  display: block;
}

.nav_category-item {
  color: var(--light_secondary);
  background-color: #fff;
  border-radius: 8px;
  width: max-content;
  min-width: 200px;
  padding: 14px 16px 12px;
  transition: background-color 0.2s, color 0.2s;
  display: block;
  text-decoration: none;
  white-space: nowrap;
}

.nav_category-item:hover {
  background-color: var(--bg);
  color: #000;
}

.nav_category-item.current { color: #000; }

.nav_category-item .nav_logo {
  opacity: 0.5;
  transition: opacity 0.2s;
}
.nav_category-item:hover .nav_logo,
.nav_category-item.current .nav_logo {
  opacity: 1;
}

.paragraph-m {
  font-size: 1.3rem;
  font-weight: 480;
  line-height: 1.4;
  margin-top: 4px;
}


/* ─────────────────────────────────────────────
   Nav links — Ghost nav uses font-weight 500, 1.6rem
   ───────────────────────────────────────────── */

.nav_menu-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav_category--open { display: none; }
.nav_arrow { display: none; }

.navlinks_wrap {
  display: flex;
  min-width: 0;
}

.navlinks_wrap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: center;
}

.navlinks_wrap li { margin: 0; }

.navlinks_wrap li a {
  color: var(--light_secondary);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.navlinks_wrap li a:hover {
  color: #3f3f44;
}

.navlinks_wrap li.nav-current a {
  color: #000;
}


/* ─────────────────────────────────────────────
   Right side: subscribe + badge
   ───────────────────────────────────────────── */

.nav_actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav_actions .email-subscribe-button {
  padding: 12px 16px;
  font-size: 1.2rem;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: none;
}

.nav_link-on-app {
  color: #000;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 5px 6px;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.works-with-busy_img {
  height: 30px;
  width: auto;
}


/* ─────────────────────────────────────────────
   Social icons + arrows — hidden on desktop
   ───────────────────────────────────────────── */

.nav_social-icons-wrap { display: none; }
.nav_social-icon { width: 2.2rem; }


/* ─────────────────────────────────────────────
   Burger button — hidden on desktop
   ───────────────────────────────────────────── */

.nav_menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.menu_line-1,
.menu_line-2,
.menu_line-3 {
  background-color: #000;
  width: 22px;
  height: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

body.nav-open .menu_line-1 {
  transform: translateY(8px) rotate(45deg);
}
body.nav-open .menu_line-2 {
  opacity: 0;
}
body.nav-open .menu_line-3 {
  transform: translateY(-8px) rotate(-45deg);
}


/* ─────────────────────────────────────────────
   Body content
   ───────────────────────────────────────────── */

.outer {
  padding-bottom: max(4vmin, 20px);
}

.article-header.gh-canvas {
  padding-top: 5rem;
}


/* ─────────────────────────────────────────────
   Footer overrides
   ───────────────────────────────────────────── */

.footer.is-dark {
  padding-left: max(4vmin, 20px);
  padding-right: max(4vmin, 20px);
}

.footer .container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}


/* ═════════════════════════════════════════════
   TABLET ≤ 991px
   ═════════════════════════════════════════════ */

@media (max-width: 991px) {
  .container_nav {
    column-gap: 24px;
  }

  .navlinks_wrap ul {
    gap: 16px;
  }

  .navlinks_wrap li a {
    font-size: 1.5rem;
  }

  .nav_logo {
    width: 100px;
  }

  .works-with-busy_img {
    height: 28px;
  }

  .nav_actions .email-subscribe-button {
    padding: 6px 12px;
    font-size: 1rem;
  }
}


/* ═════════════════════════════════════════════
   BURGER MODE ≤ 767px
   Original: 480px breakpoint, mapped to Ghost 767px
   All rem values: original × 1.6 (16px → 10px base)
   ═════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* --- Nav bar shrinks --- */
  nav.nav {
    z-index: 99;
    position: fixed;
    inset: 0 0 auto;
    height: auto;
    padding: 1.6rem 2rem;
    display: grid;
    grid-template-columns: 1fr min-content;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
    background-color: #fff;
    transition: transform 0.3s ease;
  }

  nav.nav.nav--hidden {
    transform: translateY(-100%);
  }

  .container_nav {
    display: flex;
    justify-content: space-between;
    gap: 1.6rem;
    width: 100%;
    z-index: 2;
  }

  /* --- Hide desktop-only elements --- */
  .nav_actions { display: none; }
  .platform_dropdown .chevron { display: none; }

  /* --- Burger visible --- */
  .nav_menu-button {
    display: flex;
    position: relative;
    z-index: 100001;
    height: 4.8rem;
    overflow: hidden;
  }

  .menu_line-1,
  .menu_line-2,
  .menu_line-3 {
    width: 2.5rem;
    height: 2px;
    background-color: var(--light_secondary);
  }

  /* --- Platform dropdown: inline logo matches desktop gray tone --- */
  .platform_list { display: none !important; }

  .nav_logo {
    width: 9.6rem;
  }

  /* --- Full-screen overlay --- */
  .nav_menu-wrap {
    display: none;
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background-color: rgba(238, 238, 238, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 8rem 4.8rem 4.8rem;
    overflow-y: auto;
  }

  body.nav-open .nav_menu-wrap {
    display: flex;
  }

  /* --- Platform cards (mobile) --- */
  .nav_category--open {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }

  .nav_category--open .nav_category-item {
    background-color: #fff;
    border-radius: 0.8rem;
    width: auto;
    min-width: 0;
    padding: 2.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: normal;
  }

  .nav_category--open .nav_category-item .nav_logo {
    opacity: 1;
    width: 12.3rem;
  }

  .nav_category--open .paragraph-m {
    font-size: 1.6rem;
  }

  .nav_category--open .nav_category-item,
  .navlinks_wrap li a {
    width: 100%;
    box-sizing: border-box;
  }

  .nav_arrow {
    display: inline-flex;
    width: 1rem;
    height: auto;
    flex-shrink: 0;
    opacity: 0.3;
  }

  /* --- Nav links as white cards --- */
  .navlinks_wrap {
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
    width: 100%;
  }

  .navlinks_wrap ul {
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
  }

  .navlinks_wrap li {
    width: 100%;
    line-height: 1.6em;
    padding-left: 0;
  }

  .navlinks_wrap li a {
    background-color: #fff;
    border-radius: 0.8rem;
    padding: 2.4rem;
    font-size: 2.24rem;
    font-weight: 400;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: normal;
    color: var(--light_secondary);
    width: 100%;
    box-sizing: border-box;
  }

  .navlinks_wrap li.nav-current a {
    color: #000;
  }

  .navlinks_wrap li a::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 2rem;
    background: url("../img/nav-arrow.svg") no-repeat center / contain;
    flex-shrink: 0;
    margin-left: 1.6rem;
    opacity: 0.3;
  }

  /* --- Social icons row --- */
  .nav_social-icons-wrap {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 2.4rem;
    width: 100%;
    margin-top: 1.6rem;
  }

  .nav_social-icon {
    width: 2.2rem;
    filter: brightness(0);
  }
}


/* ═════════════════════════════════════════════
   SMALL MOBILE ≤ 500px
   ═════════════════════════════════════════════ */

@media (max-width: 500px) {
  nav.nav {
    padding: 1.2rem 2rem;
  }

  .nav_logo {
    width: 8rem;
  }

  .nav_menu-wrap {
    padding: 6.4rem 3.2rem 3.2rem;
  }

  .nav_category--open .nav_category-item,
  .navlinks_wrap li a {
    padding: 1.8rem;
    font-size: 2rem;
  }

  .nav_category--open .paragraph-m {
    font-size: 1.4rem;
  }

  .menu_line-1,
  .menu_line-2,
  .menu_line-3 {
    width: 2rem;
  }

  .nav_menu-button {
    height: 4rem;
    width: 3.2rem;
  }
}
