/*
 * CCBalloonFest header and footer
 * Easy-find terms: header, nav, footer, btn, icon
 */

/* HEADER */
.site-header {
  position: fixed;
  z-index: 1030;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--color-white);
  box-shadow: 0 0.2rem 0.8rem rgba(8, 28, 53, 0.06);
  transition: height 180ms ease, box-shadow 180ms ease;
}
.site-header.is-compact { height: var(--header-height-compact); box-shadow: var(--shadow-low); }
.header-inner { display: flex; width: min(calc(100% - 2rem), var(--content-width)); height: 100%; align-items: center; gap: clamp(0.8rem, 2vw, 1.75rem); margin-inline: auto; }
.header-logo { position: relative; z-index: 1; display: inline-flex; width: clamp(8.8rem, 12vw, 11.4rem); flex: 0 0 auto; align-items: center; align-self: stretch; }
.header-logo a { display: inline-flex; width: 100%; height: 100%; align-items: center; }
.header-logo img { width: 100%; max-height: 5.7rem; object-fit: contain; transition: max-height 180ms ease, width 180ms ease; }
.site-header.is-compact .header-logo img { max-height: 4.1rem; }
.header-spacer { height: var(--header-height); transition: height 180ms ease; }
.header-spacer.is-compact { height: var(--header-height-compact); }

/* NAV */
.desktop-nav { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; justify-content: flex-end; }
.desktop-nav .mod-menu,
.desktop-nav .navbar-nav { display: flex; align-items: center; gap: clamp(0.08rem, 0.45vw, 0.45rem); margin: 0; padding: 0; list-style: none; }
.desktop-nav .nav-link { display: inline-flex; min-height: 2.75rem; align-items: center; border-bottom: 0.16rem solid transparent; padding: 0.65rem 0.48rem; color: var(--color-navy-deep); font-size: 0.94rem; line-height: 1; text-decoration: none; text-transform: uppercase; }
.desktop-nav .nav-link:hover,
.desktop-nav .nav-link[aria-current="page"],
.desktop-nav .current > .nav-link { border-bottom-color: var(--color-festival-red); color: var(--color-festival-red-dark); }
.desktop-nav .dropdown-menu { --bs-dropdown-border-radius: 0; --bs-dropdown-border-color: var(--color-gray-200); min-width: 14rem; border-top: 0.25rem solid var(--color-golden-yellow); padding: 0.4rem 0; box-shadow: var(--shadow-low); }
.desktop-nav .dropdown-item { min-height: 2.75rem; padding: 0.65rem 1rem; color: var(--color-navy-deep); font-weight: 600; }
.desktop-nav .dropdown-item:hover,
.desktop-nav .dropdown-item:focus { background: var(--color-gray-050); color: var(--color-festival-red-dark); }

.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.52rem; }
.header-cta .btn { min-height: 2.75rem; padding-inline: 1rem; white-space: nowrap; }
.mobile-menu-toggle { display: none; width: 3rem; height: 3rem; align-items: center; justify-content: center; border: 0.12rem solid var(--color-navy); border-radius: 0.08rem; background: var(--color-white); color: var(--color-navy); }
.mobile-menu-toggle svg { width: 1.55rem; height: 1.55rem; }

.social-menu,
.header-social .mod-menu,
.footer-social .mod-menu { display: flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.social-link,
.social-menu a,
.header-social .mod-menu a,
.footer-social .mod-menu a { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: var(--color-navy); color: var(--color-white); text-decoration: none; }
.social-link:hover,
.social-menu a:hover,
.header-social .mod-menu a:hover,
.footer-social .mod-menu a:hover { background: var(--color-festival-red); color: var(--color-white); }
.social-link img,
.social-menu img,
.header-social .mod-menu img,
.footer-social .mod-menu img { width: 1.2rem; height: 1.2rem; object-fit: contain; }

/* Mobile Bootstrap OFFCANVAS navigation */
.offcanvas { --bs-offcanvas-width: min(90vw, 24rem); }
.offcanvas-header { border-bottom: 0.2rem solid var(--color-golden-yellow); }
.offcanvas-title { font-size: 2rem; text-transform: uppercase; }
.mobile-nav .mod-menu,
.mobile-nav .navbar-nav { margin: 0; padding: 0; list-style: none; }
.mobile-nav .nav-link,
.mobile-nav .dropdown-item { display: flex; min-height: 3.15rem; align-items: center; padding: 0.72rem 0.25rem; color: var(--color-navy-deep); font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.mobile-nav .dropdown-menu { position: static !important; transform: none !important; border: 0; border-left: 0.2rem solid var(--color-golden-yellow); border-radius: 0; padding: 0 0 0 0.9rem; box-shadow: none; }
.mobile-nav .nav-link[aria-current="page"] { color: var(--color-festival-red-dark); }
.mobile-offcanvas-actions { display: grid; gap: 1rem; margin-top: 1.5rem; }

/* FOOTER */
.site-footer { border-top: 0.35rem solid var(--color-golden-yellow); background: var(--color-navy-deep); color: #dce6ef; }
.footer-main { display: grid; grid-template-columns: 1.25fr 0.85fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.footer-block h2,
.footer-block h3 { color: var(--color-white); font-size: 1.65rem; }
.footer-block a { color: var(--color-white); }
.footer-menu .mod-menu,
.footer-menu ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 1.5rem; }
.footer-menu li { break-inside: avoid; margin-bottom: 0.42rem; }
.footer-search .form-control { min-height: 3rem; border-radius: 0; }
.footer-search .btn { min-height: 3rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.18); padding-block: 1.25rem; }
.footer-bottom-inner { display: grid; gap: 0.65rem; }
.footer-bottom-inner > * { margin-block: 0; }
.copyright { margin: 0; font-size: 0.94rem; }
.debug-position { background: #fff; color: #111; }

/* TOPBAR */
.topbar {
  position: fixed;
  z-index: 1040;
  inset: 0 0 auto;
  min-height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0.35rem 1rem;
  background: var(--color-golden-yellow);
  color: var(--color-navy-deep);
  font-weight: 700;
  text-align: center;
}
.topbar + .site-header { top: 2.5rem; }
.topbar + .site-header + .header-spacer { height: calc(var(--header-height) + 2.5rem); }
.topbar + .site-header + .header-spacer.is-compact { height: calc(var(--header-height-compact) + 2.5rem); }

/* A long urgent notice must grow naturally instead of overlapping the header. */
@supports selector(body:has(.topbar)) {
  body:has(.topbar) .topbar { position: relative; }
  body:has(.topbar) .site-header { position: sticky; top: 0; }
  body:has(.topbar) .header-spacer { display: none; }
}
