/* ============================================
   NS Legal — Custom CSS
   GeneratePress Pro + GenerateBlocks Pro
   ============================================ */

/* CSS Custom Properties (Brand Tokens) */
:root {
  --ns-gold: #CFAD7E;
  --ns-gold-dark: #654321;
  --ns-navy: #00204c;
  --ns-navy-alt: #102a4f;
  --ns-body-text: #777777;
  --ns-content-text: #575d6e;
  --ns-footer-text: #8fa4c2;
  --ns-light-bg: #f9f9f9;
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Bellefair&family=Open+Sans:wght@300;400;600;700&family=Oswald:wght@400;500;600&display=swap');

/* ---- Global Typography ---- */
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7em;
  color: var(--ns-body-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bellefair', serif;
  color: var(--ns-navy);
}

/* ---- Button Styles ---- */
.btn-style-one,
.btn-style-two {
  display: inline-block;
  position: relative;
  padding: 12px 35px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
  background-color: var(--ns-gold);
  border: none;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  transition: color 0.3s ease;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
}

.btn-style-one::before,
.btn-style-two::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--ns-navy);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  z-index: -1;
}

.btn-style-one:hover::before,
.btn-style-two:hover::before {
  transform: scaleX(1);
}

.btn-style-one:hover,
.btn-style-two:hover {
  color: #ffffff;
}

.btn-style-three {
  display: inline-block;
  padding: 12px 35px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: currentColor;
  background: transparent;
  border: 1px solid currentColor;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
}

.btn-style-three:hover {
  background-color: var(--ns-navy);
  color: #ffffff;
  border-color: var(--ns-navy);
}

.btn-practice {
  display: inline-block;
  padding: 10px 25px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: var(--ns-gold);
  border: 1px solid var(--ns-gold-dark);
  color: var(--ns-gold-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Open Sans', sans-serif;
}

.btn-practice:hover {
  background-color: var(--ns-navy);
  border-color: var(--ns-navy);
  color: #ffffff;
}

/* ---- Service Page Content Styling ---- */
.service-content strong,
.service-content b {
  color: var(--ns-gold);
}

.service-content a,
.service-content u {
  color: var(--ns-navy-alt);
}

/* ---- List Style One (Service Pages) ---- */
.list-style-one {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-style-one li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--ns-content-text);
  line-height: 1.7em;
}

.list-style-one li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--ns-gold);
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
}

/* ---- Counter Number Styling ---- */
.counter-num {
  font-family: 'Bellefair', serif;
  font-size: 50px;
  color: var(--ns-gold);
  line-height: 1;
}

.counter-suffix {
  font-family: 'Bellefair', serif;
  font-size: 30px;
  color: var(--ns-gold);
}

/* ---- Case Study Card ---- */
.case-card-image {
  height: 420px;
  object-fit: cover;
  width: 100%;
}

/* ---- WeChat QR Code ---- */
.wechat-qr {
  float: left;
  height: 200px;
  margin-right: 20px;
}

/* ---- Google Maps Responsive ---- */
.map-container iframe {
  width: 100%;
  height: 420px;
  border: 0;
}

/* ---- Phone Number Font ---- */
.phone-number {
  font-family: 'Oswald', sans-serif;
}

/* ---- Practice Card Text Truncation ---- */
.two-line-ellipsis {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Accordion / FAQ Styling ---- */
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #e5e5e5;
  font-size: 18px;
  font-weight: 600;
  color: var(--ns-navy);
  font-family: 'Open Sans', sans-serif;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 24px;
  color: var(--ns-gold);
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item .faq-answer {
  padding: 15px 0;
  font-size: 16px;
  line-height: 1.7em;
  color: var(--ns-content-text);
}

/* ---- "Why Choose Us" Feature Cards ---- */

/* Card: white bg, shadow, positioned for gold circle */
.ns-feature-card {
  background-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  transition: box-shadow 500ms ease;
  position: relative;
  overflow: hidden;
}

.ns-feature-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}

/* Gold circle on bottom-right corner */
.ns-feature-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--ns-gold);
  transition: background-color 500ms ease, transform 500ms ease;
}

.ns-feature-card:hover::after {
  background-color: var(--ns-navy);
  transform: scale(1.15);
}

/* Icon: navy default, flip 180° + gold on card hover */
.ns-feature-card .gb-shape {
  color: var(--ns-navy) !important;
  transition: transform 600ms ease, color 600ms ease;
}

.ns-feature-card:hover .gb-shape {
  color: var(--ns-gold) !important;
  transform: scale(-1) rotate(180deg);
}

/* Title: turns gold on card hover */
.ns-feature-card h5 {
  transition: color 500ms ease;
}

.ns-feature-card:hover h5 {
  color: var(--ns-gold) !important;
}

/* ---- "Want to work in Australia" Feature Cards ---- */

/* Card: white bg, shadow, positioned for gold circle */
.ns-feature-card-alt {
  background-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  transition: box-shadow 500ms ease;
  position: relative;
  overflow: hidden;
}

.ns-feature-card-alt:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}

/* Gold circle on bottom-right corner */
/* .ns-feature-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--ns-gold);
  transition: background-color 500ms ease, transform 500ms ease;
} */

.ns-feature-card-alt:hover::after {
  background-color: var(--ns-navy);
  transform: scale(1.15);
}

/* Icon: navy default, flip 180° + gold on card hover */
.ns-feature-card-alt .gb-shape {
  color: var(--ns-navy) !important;
  transition: transform 600ms ease, color 600ms ease;
}

.ns-feature-card-alt:hover .gb-shape {
  color: var(--ns-gold) !important;
  transform: scale(-1) rotate(180deg);
}

/* Title: turns gold on card hover */
.ns-feature-card-alt h5 {
  transition: color 500ms ease;
}

.ns-feature-card-alt:hover h5 {
  color: var(--ns-gold) !important;
}




/* ---- Welcome Section — Pop-out Effect ---- */
.gb-element-home010 {
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.gb-element-home011 {
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: 50px 40px;
}

@media (max-width: 768px) {
  .gb-element-home010 {
    margin-top: -30px;
  }
  .gb-element-home011 {
    padding: 30px 20px;
  }
}

/* ---- Hero & Welcome Buttons — Center-expand Override ---- */
.ns-slide-btn::before {
  transform-origin: center !important;
}

.gb-element-home019 {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.gb-element-home019::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--ns-navy);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.gb-element-home019:hover::before {
  transform: scaleX(1);
}

.gb-element-home019:hover {
  color: #ffffff !important;
}

/* ---- Practice Area Card Hover ---- */
.gb-element-home053 > .gb-element {
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.gb-element-home053 > .gb-element:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

.gb-element-home053 > .gb-element:hover h5 {
  color: var(--ns-gold) !important;
  transition: color 300ms ease;
}

/* ---- FAQ + Form Section ---- */

/* Two-column layout for the section */
.gb-element-home100 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}

/* Align both columns from the top */
.gb-element-home101,
.gb-element-home110 {
  justify-content: flex-start !important;
  padding-top: 80px !important;
}

/* Center content within the full-bleed columns */
.gb-element-home101 {
  padding-left: max(40px, calc((100vw - 1200px) / 2)) !important;
  padding-right: 60px !important;
}

.gb-element-home110 {
  padding-left: 60px !important;
  padding-right: max(40px, calc((100vw - 1200px) / 2)) !important;
}

/* Navy Overlay on left (FAQ) side */
.gb-element-home101::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 32, 76, 0.80);
  z-index: 0;
}

/* ALL children of FAQ side must sit above the navy overlay */
.gb-element-home101 > * {
  position: relative !important;
  z-index: 2 !important;
}

/* Gold separator line under FAQ heading */
.gb-element-home101 > h2 {
  position: relative;
  padding-bottom: 20px !important;
  color: #ffffff !important;
}

.gb-element-home101 > h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--ns-gold);
}

/* Gold separator line under Form heading */
.gb-text-home111 {
  position: relative;
  padding-bottom: 20px !important;
}

.gb-text-home111::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--ns-gold);
}

/* Accordion items: white subtle borders (override baked-in black) */
.gb-element-home101 .gb-accordion__item {
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Accordion toggle text: white */
.gb-element-home101 .gb-accordion__toggle {
  color: #ffffff !important;
}

/* Accordion toggle icon: gold */
.gb-element-home101 .gb-accordion__toggle-icon {
  color: var(--ns-gold) !important;
}

/* Accordion answer text: semi-white */
.gb-element-home101 .gb-accordion__content {
  color: rgba(255, 255, 255, 0.8) !important;
}

.gb-element-home101 .gb-accordion__content p {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Right side: decorative column icon on bottom-right */
.gb-element-home110 {
  position: relative;
  overflow: hidden;
}

.gb-element-home110::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 200px;
  height: 200px;
  background-image: url('/wp-content/uploads/2026/03/fluid-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Ensure form content sits above the decorative icon */
.gb-text-home111,
.gb-element-home112,
.gb-text-home113 {
  position: relative;
  z-index: 1;
}

/* Submit button: centered, not full-width */
.ns-form .btn-style-two {
  width: auto !important;
  min-width: 200px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

@media (max-width: 768px) {
  .gb-element-home100 {
    grid-template-columns: 1fr !important;
  }
}

/* ---- CTA Section (above footer) ---- */

/* Outer section — full width, white bg, overflow visible for gavel */
.ns-cta-section {
  background-color: #ffffff;
  overflow: visible;
  padding: 0;
  position: relative;
}

/* Centering wrapper — max-width 1200px, centered */
.ns-cta-auto-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  padding: 0 15px;
}

/* Inner container — padding-left reserves space for phone image,
   margin-bottom overlaps into footer by 150px */
.ns-cta-inner {
  background-color: #f9f9f8;
  margin-bottom: -150px;
  min-height: 304px;
  overflow: visible;
  padding-left: 580px;
  padding-right: 15px;
  position: relative;
  z-index: 10;
}

/* Gold triangle — bottom-right corner */
.ns-cta-inner::before {
  border-bottom: 150px solid var(--ns-gold);
  border-left: 150px solid transparent;
  bottom: 0;
  content: '';
  position: absolute;
  right: 0;
  z-index: 0;
}

/* Phone image — absolutely positioned left, fills container height */
.ns-cta-image {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 502px;
}

.ns-cta-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* Content area — heading + button, flows within the padded space */
.ns-cta-content {
  padding: 60px 0;
  position: relative;
}

.ns-cta-content h2 {
  color: var(--ns-navy);
  font-family: 'Bellefair', serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 48px;
  margin-bottom: 22px;
  text-transform: uppercase;
}

/* Button — gold bg, navy fill on hover */
.ns-cta-content .gb-text-cta008 {
  background-color: var(--ns-gold);
  background-image: linear-gradient(var(--ns-navy), var(--ns-navy));
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  color: #ffffff;
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  padding: 12px 35px;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-size 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ns-cta-content .gb-text-cta008:hover {
  background-size: 100% 100%;
  color: #ffffff;
}

/* Hammer/gavel — absolute, overflows bottom-right of container */
.ns-cta-hammer {
  bottom: -80px;
  position: absolute;
  right: -80px;
  z-index: 1;
}

.ns-cta-hammer img {
  display: block;
  height: auto;
  transform: rotate(-2deg);
  width: 574px;
}

/* Push gavel further right on wide screens (matches original) */
@media (max-width: 2240px) {
  .ns-cta-hammer {
    right: -320px;
  }
}

/* Hide gavel on tablets and below */
@media (max-width: 1140px) {
  .ns-cta-inner {
    padding-left: 540px;
  }

  .ns-cta-hammer {
    display: none;
  }
}

/* Stack layout on mobile */
@media (max-width: 767px) {
  .ns-cta-inner {
    padding-left: 15px;
    padding-top: 15px;
    text-align: center;
  }

  .ns-cta-image {
    display: block;
    height: auto;
    position: relative;
    width: 100%;
  }

  .ns-cta-image img {
    width: 100%;
  }

  .ns-cta-content h2 {
    font-size: 30px;
    line-height: 36px;
  }
}

/* ---- Footer ---- */

/* Friendly links — inline <a> tags inside the paragraph */
.gb-text-ftr004 a {
  color: var(--ns-gold);
  text-decoration: none;
}

.gb-text-ftr004 a:hover {
  text-decoration: underline;
}

/* Scroll-to-top button — hidden by default, shown via JS */
.ns-scroll-to-top {
  display: none;
  transition: opacity 0.3s ease;
}

.ns-scroll-to-top.visible {
  display: block;
}

.ns-scroll-to-top:hover {
  opacity: 0.8;
}

/* ---- Header & Navigation ---- */

/* Header transparent overlay (sits over hero) */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
}

.site-header .inside-header {
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 30px;
}

/* ---- GB Pro Navigation — Top-level Menu Links ---- */
.gb-navigation .gb-menu .menu-item > .gb-menu-link {
  color: #ffffff;
  font-family: 'Bellefair', serif;
  font-size: 18px;
  font-weight: 400;
  text-decoration: none;
  transition: color 500ms ease;
}

.gb-navigation .gb-menu .menu-item > .gb-menu-link:hover,
.gb-navigation .gb-menu .current-menu-item > .gb-menu-link {
  color: var(--ns-gold);
}

/* ---- Dropdown Submenu Panel ---- */
.gb-navigation .gb-menu .menu-item-has-children {
  position: relative;
}

.gb-navigation .gb-sub-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.10);
  padding: 20px 15px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: top 350ms ease, opacity 350ms ease, visibility 350ms ease;
  z-index: 10;
  list-style: none;
}

.gb-navigation .menu-item-has-children:hover > .gb-sub-menu,
.gb-navigation .menu-item-has-children:focus-within > .gb-sub-menu {
  top: 100%;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Submenu link styles */
.gb-navigation .gb-sub-menu .menu-item > .gb-menu-link {
  color: var(--ns-content-text);
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  padding: 8px 10px !important;
  display: block;
  position: relative;
  white-space: nowrap;
  transition: color 300ms ease, padding-left 300ms ease;
}

/* Submenu // prefix animation on hover */
.gb-navigation .gb-sub-menu .menu-item > .gb-menu-link::before {
  content: '//';
  position: absolute;
  left: 0;
  color: var(--ns-gold);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 300ms ease;
}

.gb-navigation .gb-sub-menu .menu-item > .gb-menu-link:hover {
  color: var(--ns-gold);
  padding-left: 30px !important;
}

.gb-navigation .gb-sub-menu .menu-item > .gb-menu-link:hover::before {
  opacity: 1;
}

/* Level-2 sub-submenu (slides in from right) */
.gb-navigation .gb-sub-menu .gb-sub-menu {
  top: 0;
  left: 120%;
  transition: left 350ms ease, opacity 350ms ease, visibility 350ms ease;
}

.gb-navigation .gb-sub-menu .menu-item-has-children:hover > .gb-sub-menu {
  left: 100%;
  top: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- Sticky Header ---- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

.site-header.is-sticky,
.site-header.sticky-nav {
  position: fixed !important;
  top: 0;
  background: #ffffff !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  animation: fadeInDown 0.5s ease;
}

/* Sticky: nav links switch to navy */
.site-header.is-sticky .gb-navigation .gb-menu .menu-item > .gb-menu-link,
.site-header.sticky-nav .gb-navigation .gb-menu .menu-item > .gb-menu-link {
  color: var(--ns-navy);
}

.site-header.is-sticky .gb-navigation .gb-menu .menu-item > .gb-menu-link:hover,
.site-header.sticky-nav .gb-navigation .gb-menu .menu-item > .gb-menu-link:hover {
  color: var(--ns-gold);
}

/* Sticky: phone number switches to navy */
.site-header.is-sticky .gb-text-hdr004,
.site-header.sticky-nav .gb-text-hdr004 {
  color: var(--ns-navy);
}

.site-header.is-sticky .gb-text-hdr009,
.site-header.sticky-nav .gb-text-hdr009 {
  color: rgba(0,32,76,0.6);
}

/* ---- Navigation Responsive ---- */
@media (max-width: 1024px) {
  .gb-navigation .gb-menu .menu-item > .gb-menu-link {
    font-size: 16px;
  }
}

/* ---- Page Title Bar ---- */
.page-title-overlay {
  position: relative;
}

.page-title-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

/* ---- Hero Slider — Staggered Text Reveal & Crossfade ---- */

/* JS-driven active state overrides for crossfade */
.ns-slide.ns-slide-active {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 1;
}

.ns-slide:not(.ns-slide-active) {
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 0;
}

/* Staggered text reveal — default hidden state */
.ns-slide-title,
.ns-slide-heading,
.ns-slide-text,
.ns-slide-btn {
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: opacity 1000ms ease, transform 1000ms ease;
}

/* Staggered text reveal — active state */
.ns-slide-active .ns-slide-title {
  opacity: 1;
  transform: scaleY(1);
  transition-delay: 300ms;
}

.ns-slide-active .ns-slide-heading {
  opacity: 1;
  transform: scaleY(1);
  transition-delay: 600ms;
}

.ns-slide-active .ns-slide-text {
  opacity: 1;
  transform: scaleY(1);
  transition-delay: 900ms;
}

.ns-slide-active .ns-slide-btn {
  opacity: 1;
  transform: scaleY(1);
  transition-delay: 1200ms;
}

/* Subtitle decorative gold line */
.ns-slide-title {
  position: relative;
  padding-left: 80px;
}

.ns-slide-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 60px;
  height: 2px;
  background-color: var(--ns-gold);
}

/* ---- Contact Form Styling ---- */

/* 2x2 grid for first 4 inputs, textarea + button full-width */
.ns-form {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 15px !important;
}

.ns-form textarea,
.ns-form button {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .ns-form {
    grid-template-columns: 1fr !important;
  }
}

.ns-form input,
.ns-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 0;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  color: #333;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.ns-form input:focus,
.ns-form textarea:focus {
  border-color: var(--ns-gold);
  outline: none;
}

.ns-form textarea {
  height: 120px;
  resize: vertical;
}

/* ---- Scroll to Top Button ---- */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--ns-gold);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  font-size: 20px;
  transition: background 0.3s;
}

.scroll-to-top.visible {
  display: flex;
}

.scroll-to-top:hover {
  background: var(--ns-navy);
}

/* ---- Success/Error Modal ---- */
.form-message {
  padding: 15px;
  margin-top: 10px;
  font-size: 14px;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ---- Case Studies SPA ---- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.case-card {
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.case-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.case-card-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: block;
}

.case-card-image-sm {
  height: 180px;
}

.case-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 32, 76, 0);
  transition: background 0.3s ease;
}

.case-card:hover .case-card-overlay {
  background: rgba(0, 32, 76, 0.3);
}

.case-card-body {
  padding: 20px;
}

.case-card-category {
  font-size: 12px;
  color: var(--ns-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.case-card-visa {
  font-family: 'Bellefair', serif;
  font-size: 18px;
  color: var(--ns-navy);
  margin: 0 0 6px;
  line-height: 1.3;
}

.case-card-name {
  font-size: 14px;
  color: var(--ns-body-text);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card-link {
  font-size: 13px;
  color: var(--ns-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.case-card-link:hover {
  color: var(--ns-gold-dark);
}

/* Case Pagination */
.case-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
}

.case-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--ns-body-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.case-page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--ns-gold);
  color: var(--ns-gold);
}

.case-page-btn.active {
  background: var(--ns-gold);
  border-color: var(--ns-gold);
  color: #fff;
}

.case-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.case-page-ellipsis {
  border: none;
  background: none;
}

/* Case Detail */
.case-detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.case-detail-image img {
  width: 100%;
  height: auto;
}

.case-detail-content h2 {
  font-family: 'Bellefair', serif;
  color: var(--ns-navy);
  margin: 0 0 20px;
}

.case-detail-content p {
  color: var(--ns-content-text);
  line-height: 1.8;
  margin-bottom: 15px;
}

.case-back-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 30px;
  background: var(--ns-gold);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s ease;
}

.case-back-btn:hover {
  background: var(--ns-gold-dark);
}

/* Related Cases */
.case-related {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.case-related-title {
  font-family: 'Bellefair', serif;
  font-size: 28px;
  color: var(--ns-navy);
  margin: 0 0 30px;
}

.case-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Loading Spinner */
.case-loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.case-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: var(--ns-gold);
  border-radius: 50%;
  animation: case-spin 0.8s linear infinite;
}

@keyframes case-spin {
  to { transform: rotate(360deg); }
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 1024px) {
  h1 {
    font-size: 50px !important;
  }

  h2 {
    font-size: 30px !important;
  }

  .case-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .counter-num {
    font-size: 36px;
  }

  .case-card-image {
    height: 180px;
  }

  .case-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .case-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .map-container iframe {
    height: 300px;
  }

  h1 {
    font-size: 32px !important;
  }

  h2 {
    font-size: 24px !important;
  }

  .wechat-qr {
    float: none;
    display: block;
    margin: 0 auto 15px;
  }
}

/* ============================================
   About Us — "Boutique Service" stats section
   Navy mask over background image + gold counters.
   Matches the hero-slide overlay pattern (rgba(0,32,76,0.80)).
   ============================================ */
.gb-element-about050 {
  position: relative;
}

.gb-element-about050::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 32, 76, 0.80);
  z-index: 1;
  pointer-events: none;
}

/* Inner container already has z-index:2 in block CSS; belt-and-braces. */
.gb-element-about050 > * {
  position: relative;
  z-index: 2;
}

/* Force all 4 counters to gold (the first span has no inline color). */
.gb-element-about050 .counter-num {
  color: var(--ns-gold) !important;
}

/* ============================================
   EN-only: widen Practices submenu for longer English labels.
   Longest label "Business Law & Corporate Legal Services" needs ~400px.
   ZH locale (zh-CN) keeps the original 230px min-width.
   ============================================ */
html[lang^="en"] .gb-navigation .gb-sub-menu {
  min-width: 400px;
}

/* ============================================
   "Areas of Practice" 9-card grid — shared between homepage
   and /services/ on both ZH and EN sides.
   Covers two uniqueId prefix sets (home vs. serv) with the same rules.

   Fix 1 — Button hover animation (navy sweeps in from both sides to middle).
   Fix 2 — Button alignment: card is a flex column so the button sticks to
           the bottom even when card text lengths vary.
   ============================================ */

/* --- Fix 2: equal-height cards with the button anchored to the bottom --- */
[class*="gb-element-home054"],
[class*="gb-element-serv014"] {
  display: flex;
  flex-direction: column;
  height: 100%;
}

[class*="gb-element-home056"],
[class*="gb-element-serv016"] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
}

[class*="gb-element-home059"],
[class*="gb-element-serv019"] {
  margin-top: auto;
  align-self: flex-start;
}

/* --- Fix 1: hover animation (two navy halves converge from both sides).
       Shared between:
         - gb-element-home059  — homepage 9-card Learn More buttons
         - gb-element-serv019  — /services/ 9-card Learn More buttons
         - gb-element-hdr005   — header "Book a Consultation" CTA
       All three have the same visual spec: gold base, navy sweeps in on hover,
       text stays white. --- */
[class*="gb-element-home059"],
[class*="gb-element-serv019"],
[class*="gb-element-hdr005"] {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

[class*="gb-element-home059"]::before,
[class*="gb-element-home059"]::after,
[class*="gb-element-serv019"]::before,
[class*="gb-element-serv019"]::after,
[class*="gb-element-hdr005"]::before,
[class*="gb-element-hdr005"]::after {
  content: '';
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background-color: var(--ns-navy);
  transform: scaleX(0);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

[class*="gb-element-home059"]::before,
[class*="gb-element-serv019"]::before,
[class*="gb-element-hdr005"]::before {
  left: 0;
  transform-origin: left;
}

[class*="gb-element-home059"]::after,
[class*="gb-element-serv019"]::after,
[class*="gb-element-hdr005"]::after {
  right: 0;
  transform-origin: right;
}

/* Keep gold base bg on hover so the two navy halves read as sweeping in over it. */
[class*="gb-element-home059"]:hover,
[class*="gb-element-home059"]:focus-visible,
[class*="gb-element-serv019"]:hover,
[class*="gb-element-serv019"]:focus-visible,
[class*="gb-element-hdr005"]:hover,
[class*="gb-element-hdr005"]:focus-visible {
  background-color: var(--ns-gold) !important;
  border-color: var(--ns-navy) !important;
  color: #ffffff !important;
}

[class*="gb-element-home059"]:hover::before,
[class*="gb-element-home059"]:hover::after,
[class*="gb-element-home059"]:focus-visible::before,
[class*="gb-element-home059"]:focus-visible::after,
[class*="gb-element-serv019"]:hover::before,
[class*="gb-element-serv019"]:hover::after,
[class*="gb-element-serv019"]:focus-visible::before,
[class*="gb-element-serv019"]:focus-visible::after,
[class*="gb-element-hdr005"]:hover::before,
[class*="gb-element-hdr005"]:hover::after,
[class*="gb-element-hdr005"]:focus-visible::before,
[class*="gb-element-hdr005"]:focus-visible::after {
  transform: scaleX(1);
}

/* Force inner text spans to white on hover (defeats the global a:hover→accent rule). */
[class*="gb-element-home059"]:hover [class^="gb-text-home060"],
[class*="gb-element-home059"]:focus-visible [class^="gb-text-home060"],
[class*="gb-element-serv019"]:hover [class^="gb-text-serv020"],
[class*="gb-element-serv019"]:focus-visible [class^="gb-text-serv020"],
[class*="gb-element-hdr005"]:hover [class^="gb-text-hdr006"],
[class*="gb-element-hdr005"]:focus-visible [class^="gb-text-hdr006"] {
  color: #ffffff !important;
}

@media (prefers-reduced-motion: reduce) {
  [class*="gb-element-home059"],
  [class*="gb-element-home059"]::before,
  [class*="gb-element-home059"]::after,
  [class*="gb-element-serv019"],
  [class*="gb-element-serv019"]::before,
  [class*="gb-element-serv019"]::after,
  [class*="gb-element-hdr005"],
  [class*="gb-element-hdr005"]::before,
  [class*="gb-element-hdr005"]::after {
    transition: none;
  }
}

/* ---- Team-bio overlay: scroll inside the modal when the bio overflows the viewport ---- */
/* GB Pro's overlay.css sets .gb-overlay__content { max-height:100%; } but no overflow,
   so long bios (e.g. Dayoon Lah) push the CTA button off-screen. Make the panel
   scroll vertically instead so the user can always reach the bottom button. */
.gb-overlay--standard .gb-overlay__content {
  overflow-y: auto;
  overscroll-behavior: contain;
}


/* ========================================================================
 * Hide Categories + Latest Posts widgets in sidebars (added 2026-04-30
 * per client feedback). Applies to all pages whose sidebar uses GB-element
 * boxes wrapping <ul.wp-block-categories> or <ul.wp-block-latest-posts__list>
 * — i.e. the news page, all 9 service pages (ZH+EN), and the category-archive
 * loop-template. Also catches any future page using the same GB pattern.
 *
 * The :has() parent-selector hides the entire wrapping box (heading + widget).
 * Browser support: Chrome 105+, Safari 15.4+, Firefox 121+ (all 2023+).
 * Fallback below targets the widgets directly in case :has() is unavailable.
 * ======================================================================== */
.gb-element:has(> .wp-block-categories),
.gb-element:has(> .wp-block-latest-posts__list),
.gb-element:has(> .wp-block-latest-posts) {
    display: none !important;
}

/* Fallback: hide the inner widget if :has() isn't supported (older browsers).
 * The empty heading box above will still render but is far less obtrusive. */
.wp-block-categories,
.wp-block-latest-posts,
.wp-block-latest-posts__list {
    display: none !important;
}
