/* ============================================================
   BAILI FINANCE (ASIA) COMPANY LIMITED
   Global Stylesheet — Shared header, footer, nav, animations
   ============================================================ */

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #a8852e, #c9a84c, #e2c06a, #c9a84c);
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

@keyframes progressShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   TOP BAR — ENHANCED
   ============================================================ */
#top-bar {
  background: var(--navy, #0a1628);
  border-bottom: 1px solid rgba(201,168,76,.15);
  padding: 9px 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease;
  will-change: transform;
}

#top-bar.tb-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.top-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.tb-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 12px;
  color: rgba(255,255,255,.68);
  white-space: nowrap;
}

.tb-item i { color: var(--gold, #c9a84c); font-size: 11px; }
.tb-item a { color: rgba(255,255,255,.68); transition: color .25s; }
.tb-item a:hover { color: var(--gold, #c9a84c); }

.tb-social { display: flex; gap: 8px; }

.tb-social a {
  width: 27px; height: 27px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: rgba(255,255,255,.5);
  transition: all .3s ease;
}

.tb-social a:hover {
  border-color: var(--gold, #c9a84c);
  color: var(--gold, #c9a84c);
  background: rgba(201,168,76,.08);
}

/* ============================================================
   HEADER — ENHANCED
   ============================================================ */
#site-header {
  position: fixed;
  left: 0; right: 0;
  top: 38px;
  z-index: 1000;
  transition: top .4s cubic-bezier(.4,0,.2,1), box-shadow .4s ease;
  will-change: top;
}

#site-header.scrolled {
  top: 0;
  box-shadow: 0 4px 32px rgba(0,0,0,.3);
}

.header-bg {
  background: rgba(9,20,38,.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(201,168,76,.1);
  transition: background .4s ease, border-color .4s ease;
}

#site-header.scrolled .header-bg {
  background: rgba(7,15,28,.99);
  border-bottom-color: rgba(201,168,76,.18);
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 32px;
  max-width: 1260px;
  margin: 0 auto;
}

/* ---- Logo ---- */
.site-logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-main {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .5px;
  line-height: 1;
}

.logo-main span { color: var(--gold, #c9a84c); }

.logo-sub {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 9.5px;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

.logo-zh {
  font-size: 11.5px;
  color: rgba(255,255,255,.32);
  letter-spacing: 1.5px;
}

/* ---- Primary Nav ---- */
nav#primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav#primary-nav ul li a {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
  padding: 10px 13px;
  border-radius: 2px;
  position: relative;
  display: block;
  transition: color .3s ease;
}

nav#primary-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 13px; right: 13px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold, #c9a84c), var(--gold-light, #e2c06a));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}

nav#primary-nav ul li a:hover,
nav#primary-nav ul li.active a {
  color: var(--gold, #c9a84c);
}

nav#primary-nav ul li a:hover::after,
nav#primary-nav ul li.active a::after {
  transform: scaleX(1);
}

.nav-cta, .nav-cta-active {
  background: var(--gold, #c9a84c) !important;
  color: var(--navy, #0a1628) !important;
  padding: 10px 22px !important;
  border-radius: 2px !important;
  font-weight: 800 !important;
  transition: all .3s ease !important;
}

.nav-cta:hover {
  background: var(--gold-light, #e2c06a) !important;
  box-shadow: 0 6px 20px rgba(201,168,76,.35) !important;
  transform: translateY(-1px) !important;
}

.nav-cta::after, .nav-cta-active::after { display: none !important; }

.nav-cta-active {
  box-shadow: 0 4px 16px rgba(201,168,76,.38) !important;
}

/* ============================================================
   HAMBURGER — MORPHING X
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  cursor: pointer;
  padding: 9px 8px;
  z-index: 1001;
  position: relative;
  transition: border-color .3s ease, background .3s ease;
}

.hamburger:hover {
  border-color: var(--gold, #c9a84c);
  background: rgba(201,168,76,.06);
}

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .38s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   MOBILE DRAWER — SLIDES IN FROM RIGHT
   ============================================================ */

/* Semi-transparent backdrop */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .42s cubic-bezier(.4,0,.2,1);
}

/* Panel sliding in from right */
.nav-drawer-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 90vw);
  background: var(--navy, #0a1628);
  border-left: 1px solid rgba(201,168,76,.18);
  z-index: 1051;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .44s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: -12px 0 48px rgba(0,0,0,.4);
}

/* Active open state */
.nav-drawer.open .nav-drawer-overlay {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer.open .nav-drawer-panel {
  transform: translateX(0);
}

/* Drawer Header */
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
  flex-shrink: 0;
}

.nav-drawer-logo { display: flex; flex-direction: column; gap: 3px; }

.nav-drawer-logo > span:first-child {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .4px;
  line-height: 1;
}

.nav-drawer-logo > span:first-child strong {
  color: var(--gold, #c9a84c);
}

.nav-drawer-logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,.28);
  letter-spacing: 1.5px;
}

.nav-drawer-close {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
  flex-shrink: 0;
}

.nav-drawer-close:hover {
  background: var(--gold, #c9a84c);
  color: var(--navy, #0a1628);
  border-color: var(--gold, #c9a84c);
  transform: rotate(90deg);
}

/* Drawer Navigation Links */
.nav-drawer-links {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex: 1;
}

.nav-drawer-links li {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity .38s ease, transform .38s ease;
}

/* Stagger each link when drawer opens */
.nav-drawer.open .nav-drawer-links li { opacity: 1; transform: translateX(0); }
.nav-drawer.open .nav-drawer-links li:nth-child(1) { transition-delay: .06s; }
.nav-drawer.open .nav-drawer-links li:nth-child(2) { transition-delay: .10s; }
.nav-drawer.open .nav-drawer-links li:nth-child(3) { transition-delay: .14s; }
.nav-drawer.open .nav-drawer-links li:nth-child(4) { transition-delay: .18s; }
.nav-drawer.open .nav-drawer-links li:nth-child(5) { transition-delay: .22s; }
.nav-drawer.open .nav-drawer-links li:nth-child(6) { transition-delay: .26s; }
.nav-drawer.open .nav-drawer-links li:nth-child(7) { transition-delay: .30s; }

.nav-drawer-links li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: all .28s ease;
  position: relative;
}

.nav-drawer-links li a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold, #c9a84c);
  transform: scaleY(0);
  transition: transform .28s ease;
}

.nav-drawer-links li a:hover { color: #fff; background: rgba(201,168,76,.06); padding-left: 30px; }
.nav-drawer-links li a:hover::before { transform: scaleY(1); }

.nav-drawer-links li a .dl-icon {
  color: var(--gold, #c9a84c);
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-drawer-links li a.drawer-active {
  color: var(--gold, #c9a84c);
  background: rgba(201,168,76,.05);
}

.nav-drawer-links li a.drawer-active::before { transform: scaleY(1); }

/* Contact Us CTA in drawer */
.nav-drawer-links li:last-child a {
  margin: 14px 20px 10px;
  background: var(--gold, #c9a84c);
  color: var(--navy, #0a1628) !important;
  border-radius: 3px;
  border-bottom: none;
  justify-content: center;
  font-weight: 800;
  padding: 14px 20px !important;
  box-shadow: 0 6px 20px rgba(201,168,76,.3);
}

.nav-drawer-links li:last-child a:hover {
  background: var(--gold-light, #e2c06a);
  padding-left: 20px !important;
  box-shadow: 0 10px 28px rgba(201,168,76,.45);
  transform: translateY(-1px);
}

.nav-drawer-links li:last-child a::before { display: none; }

/* Drawer Footer */
.nav-drawer-footer {
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,.01);
  flex-shrink: 0;
}

.nav-drawer-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.42);
}

.nav-drawer-footer > div i {
  color: var(--gold, #c9a84c);
  font-size: 12px;
  width: 14px;
}

.nav-drawer-footer > div a {
  color: rgba(255,255,255,.42);
  transition: color .25s;
}

.nav-drawer-footer > div a:hover { color: var(--gold, #c9a84c); }

/* ============================================================
   FOOTER — ENHANCED
   ============================================================ */

/* Pre-footer CTA strip */
.footer-cta-strip {
  background: linear-gradient(135deg, #132d5e 0%, #1e4d8c 50%, #132d5e 100%);
  border-top: 1px solid rgba(201,168,76,.15);
  padding: 52px 0;
  position: relative;
  overflow: hidden;
}

.footer-cta-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(201,168,76,.07) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.footer-cta-strip-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-cta-strip-text h3 {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.2;
}

.footer-cta-strip-text p {
  font-size: 15px;
  color: rgba(255,255,255,.58);
  line-height: 1.7;
}

.footer-cta-strip-btn {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 15px 34px;
  background: var(--gold, #c9a84c);
  color: var(--navy, #0a1628);
  border-radius: 2px;
  border: 2px solid var(--gold, #c9a84c);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: all .3s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.footer-cta-strip-btn:hover {
  background: var(--gold-light, #e2c06a);
  border-color: var(--gold-light, #e2c06a);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(201,168,76,.42);
}

/* Footer body */
footer { background: var(--navy, #0a1628); }

.footer-body { padding: 80px 0 48px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 52px;
}

.fl {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}

.fl span { color: var(--gold, #c9a84c); }

.fl-zh {
  font-size: 12px;
  color: rgba(255,255,255,.28);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.footer-logo-wrap > p {
  font-size: 14px;
  color: rgba(255,255,255,.42);
  line-height: 1.85;
  margin-bottom: 24px;
}

.f-social { display: flex; gap: 10px; flex-wrap: wrap; }

.f-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  transition: all .32s cubic-bezier(.4,0,.2,1);
}

.f-social a:hover {
  border-color: var(--gold, #c9a84c);
  color: var(--gold, #c9a84c);
  background: rgba(201,168,76,.09);
  transform: translateY(-3px);
}

.f-col h5 {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold, #c9a84c);
  margin-bottom: 22px;
  position: relative;
  padding-bottom: 14px;
}

.f-col h5::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 2px;
  background: var(--gold, #c9a84c);
  border-radius: 1px;
}

.f-links { display: flex; flex-direction: column; gap: 8px; }

.f-links a {
  font-size: 14px;
  color: rgba(255,255,255,.48);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  transition: all .28s ease;
}

.f-links a i {
  font-size: 9px;
  color: var(--gold, #c9a84c);
  transition: transform .28s ease;
  flex-shrink: 0;
}

.f-links a:hover { color: #fff; }
.f-links a:hover i { transform: translateX(5px); }

.f-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.f-contact-item i {
  color: var(--gold, #c9a84c);
  font-size: 14px;
  margin-top: 3px;
  flex-shrink: 0;
}

.f-contact-item span {
  font-size: 14px;
  color: rgba(255,255,255,.48);
  line-height: 1.65;
}

.f-contact-item a {
  color: rgba(255,255,255,.48);
  transition: color .25s;
}

.f-contact-item a:hover { color: var(--gold, #c9a84c); }

/* Footer bottom */
.footer-btm {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 24px 0;
}

.footer-btm-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.f-copy { font-size: 13px; color: rgba(255,255,255,.28); }
.f-copy span { color: rgba(255,255,255,.48); }

.f-reg {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 11px;
  color: rgba(255,255,255,.22);
  letter-spacing: .5px;
}

/* ============================================================
   BACK TO TOP — PULSING RING
   ============================================================ */
.btt {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 48px; height: 48px;
  background: var(--gold, #c9a84c);
  color: var(--navy, #0a1628);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 6px 24px rgba(201,168,76,.45);
  opacity: 0;
  transform: translateY(20px) scale(.8);
  transition: all .42s cubic-bezier(.4,0,.2,1);
  z-index: 900;
  pointer-events: none;
  text-decoration: none;
}

.btt.vis {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.btt:hover {
  background: var(--gold-light, #e2c06a);
  transform: translateY(-4px) scale(1.07);
  box-shadow: 0 14px 36px rgba(201,168,76,.55);
}

.btt::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,76,.4);
  animation: bttPulse 2.8s ease-in-out infinite;
}

@keyframes bttPulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50%       { transform: scale(1.4); opacity: 0; }
}

/* ============================================================
   ANIMATION SYSTEM
   ============================================================ */

/* New data-anim attribute system */
[data-anim] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: .78s;
  transition-timing-function: cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}

[data-anim].anim-in { opacity: 1; transform: none !important; }

[data-anim="fade-up"]    { transform: translateY(44px); }
[data-anim="fade-down"]  { transform: translateY(-32px); }
[data-anim="fade-left"]  { transform: translateX(-44px); }
[data-anim="fade-right"] { transform: translateX(44px); }
[data-anim="zoom-in"]    { transform: scale(.88); }
[data-anim="flip-up"]    { transform: rotateX(12deg) translateY(30px); transform-origin: bottom; }
[data-anim="fade-in"]    { transform: none; }

/* Delay helpers */
[data-delay="50"]  { transition-delay: .05s; }
[data-delay="100"] { transition-delay: .10s; }
[data-delay="150"] { transition-delay: .15s; }
[data-delay="200"] { transition-delay: .20s; }
[data-delay="250"] { transition-delay: .25s; }
[data-delay="300"] { transition-delay: .30s; }
[data-delay="350"] { transition-delay: .35s; }
[data-delay="400"] { transition-delay: .40s; }
[data-delay="450"] { transition-delay: .45s; }
[data-delay="500"] { transition-delay: .50s; }
[data-delay="600"] { transition-delay: .60s; }

/* Legacy .reveal system (still used in existing pages) */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .78s cubic-bezier(.4,0,.2,1), transform .78s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}

.reveal.vis { opacity: 1; transform: none; }
.reveal.d1  { transition-delay: .10s; }
.reveal.d2  { transition-delay: .20s; }
.reveal.d3  { transition-delay: .30s; }
.reveal.d4  { transition-delay: .40s; }

/* Float animation for hero elements */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.float-anim { animation: floatY 5s ease-in-out infinite; }

/* Shimmer underline on headings */
.gold-underline {
  position: relative;
  display: inline-block;
}

.gold-underline::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--gold, #c9a84c), var(--gold-light, #e2c06a), var(--gold-dark, #a8852e));
  background-size: 200% 100%;
  border-radius: 1px;
  animation: underlineShimmer 3s linear infinite;
}

@keyframes underlineShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   GENERAL RESPONSIVE — ALL BREAKPOINTS
   ============================================================ */

/* ---- 1080px ---- */
@media (max-width: 1080px) {
  nav#primary-nav { display: none !important; }
  .hamburger { display: flex !important; }
}

/* ---- 768px ---- */
@media (max-width: 768px) {
  .header-flex { padding: 0 20px; height: 68px; }
  .container { padding: 0 22px !important; }

  footer .footer-grid   { grid-template-columns: 1fr 1fr; gap: 36px; }
  footer .footer-body   { padding: 52px 0 36px; }
  footer .footer-btm-flex { flex-direction: column; text-align: center; gap: 10px; }

  .footer-cta-strip-inner { flex-direction: column; gap: 22px; text-align: center; }
  .footer-cta-strip { padding: 36px 0; }

  #top-bar .tb-item:nth-child(3) { display: none; }

  .btt { bottom: 22px; right: 22px; width: 44px; height: 44px; font-size: 15px; }
}

/* ---- 640px ---- */
@media (max-width: 640px) {
  .container { padding: 0 18px !important; }

  #top-bar { display: none !important; }
  #site-header { top: 0 !important; }

  .header-flex { height: 62px; padding: 0 18px; }
  .logo-main   { font-size: 16px; }
  .logo-sub    { font-size: 8px; letter-spacing: 1.8px; }
  .logo-zh     { display: none; }

  footer .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  footer .footer-body { padding: 40px 0 28px; }
  .footer-cta-strip   { padding: 28px 0; }

  .btt { bottom: 16px; right: 16px; width: 42px; height: 42px; font-size: 14px; }
  .btt::before { display: none; }

  .f-reg { display: none; }
}

/* ---- 480px ---- */
@media (max-width: 480px) {
  .header-flex { height: 58px; }
  .logo-main   { font-size: 15px; }
  .hamburger   { padding: 8px 7px; }
  .hamburger span { width: 20px; }
}

/* ---- 375px ---- */
@media (max-width: 375px) {
  .header-flex { height: 56px; padding: 0 14px; }
  .logo-main   { font-size: 14px; }
  .logo-sub    { letter-spacing: 1.2px; }
}

/* ---- Touch device optimizations ---- */
@media (hover: none) and (pointer: coarse) {
  .btt::before { display: none; }
  nav#primary-nav ul li a:hover::after { transform: scaleX(0); }
}

/* ---- Reduced motion preference ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  #scroll-progress { animation: none; }
  .btt::before { animation: none; }
  .float-anim  { animation: none; }
}

/* ============================================================
   HERO BACKGROUND IMAGES
   ============================================================ */

.page-hero-bg {
  background-image: url('../images/hero-banner.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.9;
}

/* Page-specific hero backgrounds */
#hero .page-hero-bg {
  background-image: url('../images/hero-banner.svg');
}

#about-hero .page-hero-bg {
  background-image: url('../images/about-team.svg');
  background-size: contain;
  background-position: center right;
  opacity: 0.7;
}

#contact-hero .page-hero-bg {
  background-image: url('../images/contact-office.svg');
  background-size: contain;
  background-position: center left;
  opacity: 0.8;
}

#finance-hero .page-hero-bg,
#instruments-hero .page-hero-bg,
#loan-hero .page-hero-bg {
  background-image: url('../images/finance-chart.svg');
  background-size: contain;
  background-position: center right;
  opacity: 0.7;
}

#ppps-hero .page-hero-bg {
  background-image: url('../images/ppps-energy.svg');
  background-size: contain;
  background-position: center right;
  opacity: 0.7;
}

/* Team banner background */
#team-banner {
  background-image: url('../images/about-team.svg');
  background-size: contain;
  background-position: center right;
  background-repeat: no-repeat;
  opacity: 0.8;
}

/* Header background */
#site-header {
  background-image: url('../images/header-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================================
   PAGE SECTIONS — SHARED RESPONSIVE OVERRIDES
   ============================================================ */

/* Ensure all section paddings collapse gracefully */
@media (max-width: 768px) {
  .section-pad    { padding: 64px 0 !important; }
  .section-pad-sm { padding: 40px 0 !important; }

  .sh { margin-bottom: 44px !important; }
}

@media (max-width: 640px) {
  .section-pad    { padding: 48px 0 !important; }
  .section-pad-sm { padding: 32px 0 !important; }

  .sh { margin-bottom: 36px !important; }
}

/* Page hero responsive */
@media (max-width: 768px) {
  #page-hero { padding-top: 92px; }
  .page-hero-content { padding: 56px 0 90px !important; }
  .page-hero-h1 { font-size: clamp(26px, 6vw, 46px) !important; }
}

@media (max-width: 640px) {
  #page-hero { padding-top: 80px; }
  .page-hero-content { padding: 44px 0 80px !important; }
  .page-hero-h1 { font-size: clamp(22px, 8vw, 38px) !important; }
  .page-hero-sub { font-size: 15px !important; }
}

/* Hero section */
@media (max-width: 768px) {
  #hero .hero-content { padding: 130px 0 90px !important; }
  .hero-h1 { font-size: clamp(26px, 6.5vw, 52px) !important; }
}

@media (max-width: 640px) {
  #hero .hero-content { padding: 100px 0 80px !important; }
  .hero-h1 { font-size: clamp(22px, 9vw, 40px) !important; }
  .hero-sub { font-size: 15px !important; }
  .hero-btns { flex-direction: column; align-items: flex-start !important; }
  .hero-btns .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-btns .btn { font-size: 11px !important; padding: 14px 24px !important; }
}

/* Stats bar */
@media (max-width: 768px) {
  .stats-bar .stats-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 480px) {
  .stats-bar .stats-grid { grid-template-columns: 1fr !important; }
  .stats-bar .stat-item { border-right: none !important; border-bottom: 1px solid rgba(201,168,76,.15); }
}

/* Services / cards grid */
@media (max-width: 768px) {
  .svc-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 480px) {
  .svc-grid { grid-template-columns: 1fr !important; }
  .why-grid { grid-template-columns: 1fr !important; }
}

/* 2-column layouts (intro sections) */
@media (max-width: 768px) {
  .two-col-grid,
  .intro-grid,
  .loc-grid,
  .contact-main-grid,
  .location-grid,
  .contact-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
}

/* Instrument cells grid */
@media (max-width: 768px) {
  .instr-wrapper { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 480px) {
  .instr-wrapper { grid-template-columns: 1fr !important; }
}

/* Why strip grids */
@media (max-width: 768px) {
  .why-strip-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 480px) {
  .why-strip-grid { grid-template-columns: 1fr !important; }
}

/* Contact strip */
@media (max-width: 768px) {
  .contact-strip-grid { grid-template-columns: 1fr 1fr !important; }
  .strip-item:nth-child(2) { border-right: none !important; }
  .strip-item:nth-child(3) { border-top: 1px solid var(--border, #dde3ed) !important; }
  .strip-item:nth-child(4) { border-top: 1px solid var(--border, #dde3ed) !important; border-right: none !important; }
}

@media (max-width: 480px) {
  .contact-strip-grid { grid-template-columns: 1fr !important; }
  .strip-item { border-right: none !important; border-top: 1px solid var(--border, #dde3ed) !important; }
  .strip-item:first-child { border-top: none !important; }
}

/* Metrics */
@media (max-width: 768px) {
  .why-metrics { grid-template-columns: 1fr !important; }
}

/* Broker section */
@media (max-width: 640px) {
  .broker-inner { flex-direction: column !important; text-align: center !important; }
}

/* Financing solutions alternating */
@media (max-width: 768px) {
  .sol-section .sol-inner { grid-template-columns: 1fr !important; }
  .sol-section .sol-img { aspect-ratio: 16/9 !important; order: -1 !important; }
}

/* PPPS grids */
@media (max-width: 768px) {
  .products-grid { grid-template-columns: 1fr !important; }
  .storage-grid  { grid-template-columns: 1fr !important; }
  .compliance-grid { grid-template-columns: 1fr !important; }
}

/* Table / form row collapse */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr !important; }
}

/* Buttons full-width on small screens in certain contexts */
@media (max-width: 480px) {
  .cta-btns { flex-direction: column !important; }
  .cta-btns .btn { width: 100%; justify-content: center; }
  .page-cta-btns { flex-direction: column !important; }
  .page-cta-btns .btn { width: 100%; justify-content: center; }
}

/* Section headings on small */
@media (max-width: 640px) {
  .section-title { font-size: clamp(22px, 7vw, 34px) !important; }
  .section-sub   { font-size: 15px !important; }
}

/* Table overflow */
table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

/* Images full-width */
@media (max-width: 640px) {
  .map-placeholder { aspect-ratio: 4/3 !important; }
}
