*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #FFFFFF; color: #2E3A59; font-family: 'Plus Jakarta Sans', 'PJS Fallback', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #8FD3C8; outline-offset: 2px; }
[hidden] { display: none !important; }

/* WordPress menu inside the header */
.g-nav ul, .g-nav li { list-style: none; margin: 0; padding: 0; }
.g-nav li { display: flex; }
.g-nav a { text-decoration: none; }

/* Explore dropdown (home page sections) */
.g-dd { position: relative; display: flex; }
.g-dd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; color: #2E3A59; font: inherit; cursor: pointer; transition: background-color .15s; }
.g-dd-btn svg { transition: transform .15s; }
.g-dd-btn:hover, .g-dd.is-open .g-dd-btn { background: #EEF1F7; }
.g-dd.is-open .g-dd-btn svg { transform: rotate(180deg); }
.g-dd-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 330px; padding: 8px; background: #FFFFFF; border: 1px solid #E4E8F0; border-radius: 16px; box-shadow: 0 12px 32px rgba(46,58,89,0.14); display: none; flex-direction: column; gap: 2px; }
.g-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.g-dd.is-open .g-dd-menu { display: flex; }
@media (hover: hover) { .g-dd:hover .g-dd-menu { display: flex; } .g-dd:hover .g-dd-btn { background: #EEF1F7; } }
.g-nav .g-dd-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #2E3A59; }
.g-nav .g-dd-item:hover, .g-nav .g-dd-item:focus-visible, .g-nav .g-dd-item[aria-current] { background: #EEF1F7; }
.g-dd-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: #E3F4F1; color: #2E3A59; display: flex; align-items: center; justify-content: center; }
.g-dd-item strong { display: block; font-size: 15px; font-weight: 700; }
.g-dd-item small { display: block; font-size: 13px; font-weight: 500; color: #4A5470; margin-top: 1px; }

/* FAQ answers keep the design spacing */
.g-faq-answer p { margin: 0 0 10px; }
.g-faq-answer p:last-child { margin-bottom: 0; }

/* Ordinary pages (Our team, Contact, blog posts...) */
.g-page { padding: clamp(40px, 7vw, 80px) 24px clamp(64px, 9vw, 112px); }
.g-page-inner { max-width: 860px; margin: 0 auto; }
.g-page-title { margin: 0 0 24px; font-size: clamp(32px, 6vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.g-content { font-size: 18px; line-height: 1.7; color: #2E3A59; }
.g-content a { color: #2E3A59; font-weight: 600; }
.g-content h2, .g-content h3 { line-height: 1.2; letter-spacing: -0.02em; }
.g-content img { border-radius: 16px; }
.g-content .wp-block-button__link { background: #2E3A59; color: #FFFFFF; border-radius: 999px; padding: 14px 26px; text-decoration: none; }
.g-pager { margin-top: 40px; }
article + article { margin-top: 56px; padding-top: 40px; border-top: 1px solid #E4E8F0; }
.g-footer-legal p { margin: 0 0 10px; }
.g-footer-legal p:last-child { margin-bottom: 0; }

/* Chatway's own bubble is replaced by the "Live chat" row in the Let's talk panel. */
.chatway--container .chatway--trigger-container { display: none !important; }
#g-livechat[hidden] { display: none !important; }

/* Keep the live chat window above the Let's talk button and fully on screen. */
.chatway--frame-container {
  top: auto !important;
  bottom: 92px !important;
  right: 20px !important;
  width: 300px !important;
  height: min(420px, calc(100vh - 120px)) !important;
  max-height: calc(100vh - 120px) !important;
}
.chatway--frame-container .chatway--widget-frame { height: 100% !important; }
@media (max-width: 600px) {
  /* Chatway goes full screen on phones (hiding its own header and our Close button). Keep it a smaller box above the Close button instead. */
  html body .chatway--container .chatway--frame-container.chatway--frame-container { position: fixed !important; top: auto !important; left: 12px !important; right: 12px !important; bottom: 84px !important; width: auto !important; height: min(480px, calc(100vh - 200px)) !important; height: min(480px, calc(100dvh - 200px)) !important; max-height: none !important; transform: none !important; border-radius: 18px !important; overflow: hidden !important; box-shadow: 0 12px 40px rgba(20,28,48,0.28) !important; }
  html body .chatway--container .chatway--frame-container .chatway--widget-frame.chatway--widget-frame { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-height: none !important; transform: none !important; }
  body.chatway-is-open .g-chatwrap { z-index: 1001 !important; }
}

/* Back to top */
.g-totop { pointer-events: auto; width: 44px; height: 44px; margin-right: 6px; border-radius: 50%; border: 1.5px solid #D6DCE8; background: #FFFFFF; color: #2E3A59; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(20,28,48,0.18); transition: background-color .15s, transform .15s; }
.g-totop:hover, .g-totop:focus-visible { background: #EEF1F7; transform: translateY(-2px); }

/* Text / email message form inside the Let's talk panel (computers) */
.g-msgform { padding: 10px 12px 12px; }
.g-msg-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px -4px; padding: 4px 6px; border: 0; background: none; color: #4A5470; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.g-msg-back:hover { background: #EEF1F7; color: #2E3A59; }
.g-msg-title { font-size: 15px; font-weight: 800; color: #2E3A59; }
.g-msg-intro { margin: 3px 0 10px; font-size: 12.5px; line-height: 1.45; color: #4A5470; }
.g-msg-label { display: block; margin: 8px 0 4px; font-size: 12.5px; font-weight: 700; color: #2E3A59; }
.g-msg-input { display: block; width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1.5px solid #D6DCE8; border-radius: 10px; font: inherit; font-size: 14px; color: #2E3A59; background: #FFFFFF; resize: vertical; }
.g-msg-input:focus { outline: none; border-color: #2E3A59; box-shadow: 0 0 0 3px rgba(143,211,200,0.5); }
.g-msg-input[aria-invalid="true"] { border-color: #C2413A; }
.g-msg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.g-msg-error { margin: 8px 0 0; font-size: 12.5px; color: #C2413A; font-weight: 600; }
.g-msg-send { display: block; width: 100%; margin-top: 12px; padding: 11px; border: 0; border-radius: 999px; background: #2E3A59; color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.g-msg-send:hover { background: #3A4769; }
.g-msg-send[disabled] { opacity: 0.6; cursor: wait; }
.g-msg-done { text-align: center; padding: 8px 4px 2px; }
.g-msg-check { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; background: #E3F4F1; color: #2E7D6E; display: flex; align-items: center; justify-content: center; }

/* Phone menu */
.g-burger { display: none; width: 44px; height: 44px; border: 1.5px solid #D6DCE8; border-radius: 12px; background: #FFFFFF; color: #2E3A59; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.g-burger-close { display: none; }
.g-burger[aria-expanded="true"] .g-burger-open { display: none; }
.g-burger[aria-expanded="true"] .g-burger-close { display: block; }
.g-mnav { position: absolute; left: 0; right: 0; top: 100%; z-index: 55; background: #FFFFFF; border-top: 1px solid #E4E8F0; box-shadow: 0 18px 30px rgba(46,58,89,0.16); max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 20px; }
.g-mnav-group { display: flex; flex-direction: column; }
.g-mnav-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-size: 17px; font-weight: 700; color: #2E3A59; text-decoration: none; border-bottom: 1px solid #EEF1F7; }
.g-mnav-head { margin: 18px 4px 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #4A5470; }
.g-mnav-sub { display: flex; align-items: center; gap: 12px; padding: 9px 4px; color: #2E3A59; text-decoration: none; border-radius: 12px; }
.g-mnav-sub strong { display: block; font-size: 15px; font-weight: 700; }
.g-mnav-sub small { display: block; font-size: 13px; color: #4A5470; }
.g-mnav-cta, .g-mnav-call { display: block; text-align: center; margin-top: 12px; padding: 14px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; }
.g-mnav-cta { margin-top: 20px; background: #2E3A59; color: #FFFFFF !important; }
.g-mnav-call { border: 1.5px solid #D6DCE8; color: #2E3A59; }
@media (max-width: 820px) { .g-burger { display: flex; } }
@media (min-width: 821px) { .g-mnav { display: none !important; } }
@media (max-width: 820px) {
  .g-header-in { flex-wrap: nowrap !important; padding: 12px 16px !important; gap: 10px !important; }
  .g-header-actions { flex-wrap: nowrap !important; gap: 8px !important; }
  .g-header-cta { padding: 10px 16px !important; font-size: 14px !important; white-space: nowrap; }
  .g-logo { height: 36px !important; }
  body.g-mnav-open .g-chatwrap { display: none !important; }
}
@media (max-width: 340px) { .g-header-cta { display: none !important; } }
/* Thin white ring around the chat button on phones, so it stands out on dark sections. */
@media (max-width: 820px) { .g-chatbtn { border: 2px solid #FFFFFF !important; } }

/* Menu stays at the top while scrolling (computer and phone). */
.g-header { position: sticky !important; top: 0; z-index: 60; background: rgba(255,255,255,0.97) !important; backdrop-filter: saturate(1.4) blur(6px); -webkit-backdrop-filter: saturate(1.4) blur(6px); }
.g-header.is-scrolled { box-shadow: 0 4px 18px rgba(46,58,89,0.08); }
html { scroll-padding-top: 88px; }
.admin-bar .g-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .g-header { top: 46px; } html { scroll-padding-top: 76px; } }
@media (max-width: 600px) { .admin-bar .g-header { top: 0; } }

/* Chat panel: bigger and easier to tap on phones. */
@media (max-width: 600px) {
  .g-chatwrap { right: 16px !important; bottom: 16px !important; }
  #g-chat-panel [role="dialog"] { width: calc(100vw - 32px) !important; max-width: 440px; font-size: 16px !important; max-height: calc(100vh - 150px) !important; max-height: calc(100dvh - 150px) !important; border-radius: 20px !important; }
  #g-chat-panel [role="dialog"] > div:first-child { padding: 14px 16px !important; gap: 12px !important; }
  #g-chat-panel [role="dialog"] > div:first-child > span { width: 38px !important; height: 38px !important; }
  #g-chat-panel [role="dialog"] > div:first-child > div > div:first-child { font-size: 18px !important; }
  #g-chat-panel [role="dialog"] > div:first-child > div > div:last-child { font-size: 14px !important; }
  #g-chat-rows { padding: 12px !important; gap: 8px !important; }
  .g-chatrow { padding: 10px 12px !important; gap: 12px !important; border-radius: 14px !important; }
  .g-chatrow > span:first-child { width: 38px !important; height: 38px !important; border-radius: 12px !important; }
  .g-chatrow > span:first-child svg { width: 21px; height: 21px; }
  .g-chatrow > span:last-child > span:first-child { font-size: 16.5px; }
  .g-chatrow > span:last-child > span:last-child { font-size: 13.5px !important; }
  #g-chat-rows > a.g-slate { padding: 14px !important; font-size: 16px !important; }
  .g-msgform { padding: 14px 16px 16px; }
  .g-msg-back { font-size: 15px; }
  .g-msg-title { font-size: 19px; }
  .g-msg-intro, .g-msg-label, .g-msg-error { font-size: 14.5px; }
  .g-msg-input { font-size: 16px; padding: 12px 13px; }
  .g-msg-send { font-size: 16px; padding: 14px; }
}

.g-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2E3A59; box-shadow: 0 0 0 2px rgba(255,255,255,0.45); }
.g-dot.on { background: #1E9E5A; animation: g-pulse 2s ease-out infinite; }
@keyframes g-pulse { 0% { box-shadow: 0 0 0 0 rgba(46,204,113,0.6); } 70% { box-shadow: 0 0 0 7px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }
@media (prefers-reduced-motion: reduce) { .g-dot.on { animation: none; } }

/* "New" tag on Mortgage news in the menus. */
.g-new { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #F5B82E; color: #2E3A59; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; vertical-align: 2px; }
