/*
 * Yuvau Digital — Compact floating header + organised footer legal bar (v1)
 *
 * This file is the single authority for header/footer responsive geometry.
 * Global viewport primitives are owned by assets/css/responsive.css; page-specific
 * geometry remains in the corresponding page/component stylesheet.
 */

/* =========================================================
   1. HEADER — compact, content-width floating pill (desktop)
   ========================================================= */
@media (min-width: 1025px) {
  .yu-site-header {
    position: fixed;
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    /* max-content, not fit-content: with left:50% the available width is only half the viewport,
       and header children carry min-width:0, so fit-content shrank the pill below its content and
       pushed the YouTube icon out of it. */
    width: max-content;
    min-width: 0;
    max-width: calc(100% - 32px);
    border-radius: 999px;         /* true floating pill */
  }

  .yu-site-header::before { border-radius: inherit; }

  /* Scoped (body .yu-site-header ...) so an unscoped .yu-container{width;margin-inline:auto} printed
     later by a page template can never narrow the contents inside the pill. */
  body .yu-site-header .yu-header-inner {
    width: auto;
    max-width: none;
    margin: 0;
    min-height: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 5px 12px 5px 18px;
  }

  .yu-brand      { flex: 0 0 auto; margin: 0; }
  .yu-brand-logo { max-height: 38px; max-width: 124px; width: auto; height: auto; }

  .yu-nav {
    flex: 0 0 auto;               /* never stretch to fill the pill */
    width: auto;
    min-width: max-content;       /* never let the menu shrink below its content */
    margin: 0;
    justify-content: flex-start;
  }

  /* Logo and social icons keep their full width so the last icon always sits inside the pill. */
  .yu-brand,
  .yu-social-nav { flex-shrink: 0; min-width: max-content; }

  .yu-primary-menu {
    gap: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .yu-primary-menu a {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .yu-social-nav {
    flex: 0 0 auto;
    margin: 0 0 0 4px;
    padding-left: 12px;
    gap: 5px;
    border-left: 1px solid rgba(48, 104, 232, .14);  /* quiet divider before the icons */
  }

  .yu-social-link { width: 30px; height: 30px; font-size: 10px; }
  .yu-social-link svg { width: 15px; height: 15px; }
}

/* Slightly tighter at the desktop / tablet boundary so nothing wraps. */
@media (min-width: 1025px) and (max-width: 1180px) {
  .yu-header-inner { gap: 8px; padding-inline: 12px 8px; }
  .yu-brand-logo   { max-width: 108px; }
  .yu-primary-menu a { padding-inline: 9px; font-size: 12.5px; }
  .yu-social-nav   { padding-left: 8px; }
}

/* Once the page scrolls, tuck the pill a little closer to the top edge. */
@media (min-width: 1025px) {
  .yu-site-header.is-scrolled { top: 8px; }
}

/* Hero sections were padded for the old taller header — reclaim that space. */
@media (min-width: 1025px) {
  .yu-page-hero { padding-top: 120px; }
  .yu-hero      { padding-top: 104px; }
}

/* =========================================================
   2. FOOTER — organised legal / policy bar
   ========================================================= */
.yu-site-footer .yu-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  min-height: 0;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(48, 104, 232, .10);
}

.yu-site-footer .yu-footer-bottom > p {
  margin: 0;
  flex: 0 0 auto;
  color: #7a8495;
  font-size: 13px;
}

/* Policy links: one tidy row, dot-separated, wraps cleanly when narrow. */
.yu-site-footer .yu-footer-legal { flex: 1 1 auto; min-width: 0; }

.yu-site-footer .yu-footer-legal ul,
.yu-site-footer .yu-footer-menu {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.yu-site-footer .yu-footer-legal li,
.yu-site-footer .yu-footer-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.yu-site-footer .yu-footer-legal li::marker,
.yu-site-footer .yu-footer-menu li::marker { content: ""; }

.yu-site-footer .yu-footer-legal li + li::before,
.yu-site-footer .yu-footer-menu li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  margin: 0 12px;
  border-radius: 50%;
  background: rgba(48, 104, 232, .35);
  flex: 0 0 auto;
}

.yu-site-footer .yu-footer-legal a,
.yu-site-footer .yu-footer-menu a {
  color: #4b5870;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color .2s ease;
}
.yu-site-footer .yu-footer-legal a:hover,
.yu-site-footer .yu-footer-legal a:focus-visible,
.yu-site-footer .yu-footer-menu a:hover,
.yu-site-footer .yu-footer-menu a:focus-visible { color: #3068e8; }

/* Keep the last link clear of the floating WhatsApp button (desktop). */
@media (min-width: 1025px) {
  .yu-site-footer .yu-footer-bottom { padding-right: 84px; }
}

/* Tablet / mobile: copyright under the links, everything left-aligned. */
@media (max-width: 1024px) {
  .yu-site-footer .yu-footer-bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 88px;         /* room for the WhatsApp button */
  }
  .yu-site-footer .yu-footer-legal { width: 100%; }
  .yu-site-footer .yu-footer-legal ul,
  .yu-site-footer .yu-footer-menu { justify-content: flex-start; }
}

/* Where the row can wrap, drop the dot separators (a wrapped line would start with a dot)
 * and use plain spacing instead. */
@media (max-width: 1180px) {
  .yu-site-footer .yu-footer-legal ul,
  .yu-site-footer .yu-footer-menu { gap: 8px 20px; }
  .yu-site-footer .yu-footer-legal li + li::before,
  .yu-site-footer .yu-footer-menu li + li::before { display: none; }
}

@media (max-width: 520px) {
  .yu-site-footer .yu-footer-legal ul,
  .yu-site-footer .yu-footer-menu { font-size: 12.5px; gap: 8px 18px; }
}

/* =========================================================
   3. Logged-in admin bar — keep the floating header below it
   (the WordPress admin bar is 32px desktop / 46px mobile and was
   covering the top of the header for logged-in users).
   ========================================================= */
@media (min-width: 783px) {
  .admin-bar .yu-site-header { top: 44px; }
  .admin-bar .yu-site-header.is-scrolled { top: 40px; }
}
@media (max-width: 782px) {
  .admin-bar .yu-site-header { top: 56px; }
}


/* Stage 1 — header responsive contract. Header geometry is owned exclusively by this file. */
@media (min-width: 1025px) {
  /* Compact floating pill: sized by its content (never a full-width bar), always inside the viewport. */
  .yu-site-header { width: max-content; max-width: calc(100% - 32px); }
  .yu-header-inner { min-width: 0; }
}
@media (min-width: 1025px) and (max-width: 1180px) {
  .yu-site-header { width: max-content; max-width: calc(100% - 32px); }
  .yu-header-inner { gap: 10px; padding-inline: 10px; }
  .yu-brand-logo { max-width: 136px; max-height: 42px; }
  .yu-primary-menu a { padding-inline: 7px; font-size: 12px; }
}
