/* ============================================================
   APPG Fair Business Banking — Shared Styles
   (header, topbar, footer, bottom bar, scroll-top)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --lime: #c8d400;
  --lime-light: #e3e980;
  --dark: #46515f;
  --text: #4d4d4f;
  --text-light: #6b7280;
  --white: #fff;
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   TOP BAR (light, links lime)
   ============================================================ */
.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 60px;
  font-size: 13px;
  gap: 12px;
}
.topbar a { color: var(--lime); font-size: 13px; }
.topbar svg { width: 16px; height: 16px; fill: var(--lime); }
.topbar .search-icon { cursor: pointer; color: var(--text); }

/* ============================================================
   HEADER
   ============================================================ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-badge {
  background: var(--dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}
.logo-badge .parl-icon {
  width: 32px;
  height: 32px;
  fill: white;
  margin-bottom: 2px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-text .fair {
  font-size: 20px;
  font-weight: 700;
  color: var(--lime);
  font-family: 'Libre Franklin', sans-serif;
}
.logo-text .business {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  font-family: 'Libre Franklin', sans-serif;
}
.logo-text .banking {
  font-size: 20px;
  font-weight: 300;
  color: var(--dark);
  font-family: 'Libre Franklin', sans-serif;
}
.logo-text .underline {
  width: 60px;
  height: 3px;
  background: var(--lime);
  margin-top: 4px;
}

/* ============================================================
   NAV
   ============================================================ */
nav > ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}
nav > ul > li {
  position: relative;
  list-style: none;
}
nav > ul > li > a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
nav > ul > li > a.active { color: var(--lime); }
nav > ul > li > a:hover { color: var(--lime); }

/* ============================================================
   FOOTER
   ============================================================ */
footer.site-footer {
  background: #3d4856;
  padding: 50px 60px;
  color: rgba(255,255,255,0.7);
}
.footer-inner {
  display: grid;
  grid-template-columns: 220px repeat(6, 1fr);
  gap: 30px;
}
.footer-logo-badge {
  display: inline-flex;
  background: #fff;
  padding: 6px 10px;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.footer-logo-badge .badge-dark {
  background: var(--dark);
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.footer-logo-badge .brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--lime);
  font-family: 'Libre Franklin', sans-serif;
  line-height: 1.2;
}
.footer-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  margin-top: 10px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--lime); }
.footer-col ul li.year-header {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-top: 10px;
  margin-bottom: 6px;
}

/* ============================================================
   BOTTOM BAR
   ============================================================ */
.bottom-bar {
  background: #353f4b;
  padding: 14px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.bottom-bar a { color: var(--lime); }
.bottom-bar svg { width: 16px; height: 16px; fill: var(--lime); }

/* ============================================================
   SCROLL TO TOP (round)
   ============================================================ */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.scroll-top::after {
  content: '↑';
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .topbar, header { padding-left: 30px; padding-right: 30px; }
  nav > ul { gap: 22px; }
  .footer-inner {
    grid-template-columns: 220px repeat(3, 1fr);
  }
  footer.site-footer, .bottom-bar { padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 850px) {
  header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  nav > ul {
    flex-wrap: wrap;
    gap: 18px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .bottom-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
@media (max-width: 500px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   HEADER NAV — DROPDOWN SUB-MENU
   ============================================================ */
header nav > ul > li.has-sub > a .caret {
  font-size: 10px;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.2s;
}
header nav > ul > li.has-sub:hover > a .caret {
  transform: rotate(180deg);
}

header nav > ul > li.has-sub > ul.sub-menu {
  display: block !important;
  flex-direction: column !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  min-width: 240px;
  background: #fff;
  border-top: 3px solid var(--lime);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 1000;
}

header nav > ul > li.has-sub:hover > ul.sub-menu,
header nav > ul > li.has-sub:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

header nav > ul > li.has-sub > ul.sub-menu > li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

header nav > ul > li.has-sub > ul.sub-menu > li > a {
  display: block !important;
  padding: 10px 20px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--dark) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  border-left: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

header nav > ul > li.has-sub > ul.sub-menu > li > a:hover,
header nav > ul > li.has-sub > ul.sub-menu > li > a[aria-current="page"] {
  color: var(--lime) !important;
  background: #f8f8f8;
  border-left-color: var(--lime);
}

header nav > ul > li.has-sub > ul.sub-menu > li > a.parent-link {
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  letter-spacing: 0.5px !important;
  color: var(--lime) !important;
  border-bottom: 1px solid #ececec;
}

/* Last 3 dropdowns open right-aligned to avoid overflow */
header nav > ul > li.has-sub:nth-last-child(-n+3) > ul.sub-menu {
  left: auto !important;
  right: 0 !important;
}

/* ============================================================
   ACTIVE / CURRENT LINK STATES
   ============================================================ */
header nav > ul > li > a[aria-current="page"] {
  color: var(--lime) !important;
}

.footer-col ul li a[aria-current="page"],
.footer-col h4 a[aria-current="page"] {
  color: var(--lime) !important;
}

.footer-col h4 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col h4 a:hover {
  color: var(--lime);
}

.footer-col .year-header a {
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
  transition: color 0.15s;
}
.footer-col .year-header a:hover { color: var(--lime); }

/* Mobile: dropdowns become static-vertical */
@media (max-width: 850px) {
  header nav > ul > li.has-sub > ul.sub-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none;
    border-top: none;
    border-left: 2px solid var(--lime);
    margin-left: 16px;
    background: transparent;
  }
  header nav > ul > li.has-sub > a .caret { display: none; }
}
