@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

/*
 * Yirental blog header/footer — native PHP port of the next-web SiteNav / SiteFooter.
 *
 * SKIN BOUNDARY: when next-web's header/footer design changes, re-sync ONLY this file.
 * Design tokens below mirror next-web/src/app/globals.css @theme; component rules below
 * translate the Tailwind classes from site-nav.tsx / site-footer.tsx / cta-button.tsx.
 *
 * Everything is namespaced under `.yt-*` and uses class selectors so it cannot leak into
 * (or be overridden by) the digeco theme, Bootstrap, or WooCommerce styles.
 */

:root {
  --yt-ink: #1e2230;
  --yt-ink2: #414b60;
  --yt-mute: #6b7488;
  --yt-faint: #9aa2b4;
  --yt-brand: #e8743b;
  --yt-brand-dark: #c95c28;
  --yt-paper: #fbf9f6;
  --yt-line: #ece8e2;
  --yt-radius-lg: 0.75rem; /* rounded-lg */
  --yt-radius-xl: 1.05rem; /* rounded-xl (next-web --radius * 1.4) */
  --yt-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================ Header / nav ============================ */
.yt-nav {
  /* fixed (not sticky): digeco sets `#page { overflow: hidden }`, which would
     break position: sticky on a descendant. fixed is immune to ancestor overflow. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  border-bottom: 1px solid transparent;
  background: rgba(251, 249, 246, 0.85); /* paper/85 */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s, border-color 0.3s;
  font-family: var(--yt-font);
}
.yt-nav.is-scrolled {
  border-color: var(--yt-line);
  box-shadow: 0 4px 20px -16px rgba(30, 34, 48, 0.3);
}

/* spacer reserves the fixed nav's height so page content starts below it */
.yt-nav-spacer {
  height: 74px;
}

/* push the fixed nav below the WordPress admin bar when it is present */
.admin-bar .yt-nav {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .yt-nav {
    top: 46px;
  }
}
.yt-nav__inner {
  margin-inline: auto;
  display: flex;
  height: 74px;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  padding-inline: 32px;
  box-sizing: border-box;
}
.yt-nav__brand {
  display: flex;
  align-items: center;
}
.yt-nav__links {
  display: flex;
  gap: 34px;
}
.yt-nav__link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--yt-ink2);
  text-decoration: none;
  transition: color 0.2s;
}
.yt-nav__link:hover {
  color: var(--yt-brand);
}
.yt-nav__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* logo lockup — scale by height, width follows the intrinsic ratio */
.yt-logo {
  width: auto;
  display: block;
}
.yt-logo--nav {
  height: 44px;
}
.yt-logo--drawer {
  height: 36px;
}
.yt-logo--footer {
  height: 40px;
}

/* CTA button (mirrors cta-button.tsx `base`) */
.yt-cta {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--yt-radius-xl);
  background: var(--yt-brand);
  padding: 14px 28px;
  font-family: var(--yt-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(232, 116, 59, 0.55);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.yt-cta:hover {
  transform: translateY(-2px);
  background: var(--yt-brand-dark);
  color: #fff;
  box-shadow: 0 14px 24px -10px rgba(232, 116, 59, 0.6);
}
.yt-cta__arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.yt-cta:hover .yt-cta__arrow {
  transform: translateX(2px);
}
.yt-cta--nav {
  padding: 10px 22px;
}
.yt-cta--block {
  width: 100%;
}

/* hamburger (hidden on desktop, shown <=900px) */
.yt-burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border-radius: var(--yt-radius-xl);
  border: 1px solid var(--yt-line);
  background: #fff;
  cursor: pointer;
}
.yt-burger span {
  display: block;
  height: 2px;
  width: 19px;
  border-radius: 2px;
  background: var(--yt-ink);
}

/* ============================ Mobile drawer ============================ */
.yt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(30, 34, 48, 0.4);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.yt-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.yt-drawer {
  position: fixed;
  inset-block: 0;
  right: 0;
  z-index: 130;
  width: 84%;
  max-width: 340px;
  box-sizing: border-box;
  padding: 22px;
  background: var(--yt-paper);
  font-family: var(--yt-font);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.yt-drawer.is-open {
  transform: translateX(0);
}
.yt-drawer__head {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.yt-drawer__close {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--yt-radius-lg);
  background: transparent;
  color: var(--yt-ink2);
  cursor: pointer;
  transition: background 0.2s;
}
.yt-drawer__close:hover {
  background: rgba(236, 232, 226, 0.6);
}
.yt-drawer__close svg {
  width: 20px;
  height: 20px;
}
.yt-drawer__nav {
  display: flex;
  flex-direction: column;
}
.yt-drawer__link {
  border-bottom: 1px solid var(--yt-line);
  padding: 13px 0;
  font-weight: 500;
  color: var(--yt-ink);
  text-decoration: none;
}
.yt-drawer__link:last-child {
  border-bottom: 0;
}
.yt-drawer__actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* body scroll lock while the drawer is open */
body.yt-no-scroll {
  overflow: hidden;
}

/* ============================ Footer ============================ */
.yt-footer {
  border-top: 1px solid var(--yt-line);
  background: #fff;
  padding-top: 60px;
  padding-bottom: 36px;
  font-family: var(--yt-font);
}
.yt-footer__inner {
  margin-inline: auto;
  max-width: 1180px;
  padding-inline: 32px;
  box-sizing: border-box;
}
.yt-footer__grid {
  margin-bottom: 44px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.yt-footer__brand {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}
.yt-footer__tagline {
  margin: 12px 0 0;
  max-width: 32ch;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--yt-mute);
}
.yt-footer__col-title {
  margin: 0 0 16px;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--yt-faint);
}
.yt-footer__link {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--yt-ink2);
  text-decoration: none;
  transition: color 0.2s;
}
.yt-footer__link:hover {
  color: var(--yt-brand);
}
.yt-footer__link--plain:hover {
  color: var(--yt-ink2);
}
.yt-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--yt-line);
  padding-top: 24px;
  font-size: 0.84rem;
  color: var(--yt-faint);
}
.yt-footer__legal {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yt-footer__legal a {
  color: inherit;
  text-decoration: none;
}
.yt-footer__legal a:hover {
  color: var(--yt-brand);
}
.yt-footer__dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.45;
}

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
  .yt-nav__links {
    display: none;
  }
  .yt-cta--nav {
    display: none;
  }
  .yt-burger {
    display: flex;
  }
  .yt-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 720px) {
  .yt-nav__inner {
    padding-inline: 22px;
  }
  .yt-footer__inner {
    padding-inline: 22px;
  }
}
