/* Typography: add robust fallback stack to reduce layout shifts while web fonts load */
body {
  font-family: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size-adjust: 0.5; /* Helps match fallback size to Source Sans Pro's x-height to reduce CLS */
}

/* Ensure icon fonts don't cause FOIT: add font-display: swap for Font Awesome */
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../webfonts/fa-solid-900.woff2') format('woff2'),
       url('../webfonts/fa-solid-900.woff') format('woff');
}
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../webfonts/fa-regular-400.woff2') format('woff2'),
       url('../webfonts/fa-regular-400.woff') format('woff');
}
@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../webfonts/fa-brands-400.woff2') format('woff2'),
       url('../webfonts/fa-brands-400.woff') format('woff');
}

.align-right {
  text-align: right;
}

.align-left {
  text-align: left;
}

.carousel-caption
{
  background: rgba(0,0,0,0.4);
}

#header {
  padding: 4em 0 15em 0;
}

#header header {
    padding: 0 0 1.5em 0;
}

#header header h1 {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
  max-width: 100%;
  letter-spacing: normal !important;
  word-spacing: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  text-transform: none;
}

@media (max-width: 576px) {
  #header header h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    text-align: center;
  }
}

a.navbar-brand {
  border-bottom: none;
}

a.nav-link:hover {
  border-bottom: solid 3px rgba(232, 163, 72, 1);
}
a.nav-link {
  border-bottom: solid 3px rgba(53, 184, 143, 0.5);
}

img.header-logo {
  width: 4em;
}

.brand-name-desktop {
  height: 40px;
  width: auto;
  margin-left: 8px;
}

.brand-name-mobile {
  height: 26px;
  width: auto;
  margin-left: 6px;
}

button.navbar-toggler {
  width: auto;
}

ul li{
  margin-top: 0;
}

.call-fab {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 1050;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #28a745;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.call-fab:hover, .call-fab:focus {
  color: #fff !important;
  background-color: #218838;
  text-decoration: none;
}
.call-fab .fa-phone {
  font-size: 22px;
}

@media (max-width: 991.98px) {
  body {
    padding-top: 80px;
  }
  section[id], article[id] {
    scroll-margin-top: 90px;
  }
}

/* Performance: avoid expensive fixed backgrounds on mobile */
@media (max-width: 1024px) {
  body {
    background-attachment: scroll, scroll !important;
    background-position: top left, center top !important;
    background-size: auto, cover !important;
  }
}

/* Ensure checkboxes and radio buttons are visible in the Info Collection form */
form[name="infoform"] input[type="checkbox"],
form[name="infoform"] input[type="radio"],
#infoform input[type="checkbox"],
#infoform input[type="radio"],
.form-check-input {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
  position: static;
  opacity: 1;
  width: auto;
  height: auto;
  margin: 0 0.5rem 0 0;
  display: inline-block;
  vertical-align: middle;
  background: none;
  box-shadow: none;
}

/* Align labels nicely next to controls */
.form-check-label {
  margin: 0 1rem 0 0.25rem;
}

/* Ensure inline groups wrap on small screens */
.form-control .form-check.form-check-inline {
  margin-right: 1rem;
}

/* Align Income Slips checkboxes neatly on Info Form */
form[name="infoform"] .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
form[name="infoform"] .form-check-input {
  margin: 0 0.5rem 0 0;
}
form[name="infoform"] .form-check-label {
  margin: 0; /* override generic margins for tighter alignment */
}

/* Improve spacing and readability on Info Collection form */
form[name="infoform"] .row.gtr-50 > [class*='col-'] {
  margin-bottom: 1rem;
}
form[name="infoform"] label {
  display: inline-block;
  margin-bottom: 0.35rem;
}
form[name="infoform"] h2,
form[name="infoform"] h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}
form[name="infoform"] .form-control,
form[name="infoform"] input.text,
form[name="infoform"] textarea.form-control,

/* Make radio/checkbox groups wrap and breathe */
form[name="infoform"] .p-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
form[name="infoform"] .form-check.form-check-inline {
  margin-right: 1rem;
  margin-bottom: 0.25rem;
}
/* Slightly larger line-height for better readability */
form[name="infoform"] {
  line-height: 1.5;
}

/* Anchor offset for fixed navbar across all screen sizes */
section[id], article[id] {
  scroll-margin-top: 110px;
}

/* Theme-colored primary CTA buttons (use brand orange) */
.btn-warning {
  color: #212529;
  background-color: #E8A348; /* brand accent */
  border-color: #E3992F;
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
  color: #212529;
  background-color: #D8902A;
  border-color: #CF851C;
}

/* FAQ styles */
.faq-list summary {
  cursor: pointer;
  list-style: none; /* remove default marker for consistent look */
  font-weight: 500; /* normal weight by default */
  position: relative;
  padding: 0.75rem 0.5rem 0.75rem 1.75rem; /* more space around question + room for arrow */
}
/* Hide default marker in WebKit for consistency */
.faq-list summary::-webkit-details-marker { display: none; }

/* Add a right-facing arrow that rotates down when open */
.faq-list summary::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px; /* triangle */
  border-color: transparent transparent transparent #E3992F; /* brand accent color */
  transition: transform 0.2s ease;
}
/* Bold the question when answer is expanded */
details[open] > summary {
  font-weight: 700;
}
/* Rotate arrow down when open */
.faq-list details[open] > summary::before {
  transform: translateY(-50%) rotate(90deg);
}
/* Optional: add a subtle divider between items */
.faq-list details {
  padding: 0.5rem 0;
  margin: 0.15rem 0; /* a little breathing room between items */
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.faq-list details:last-child {
  border-bottom: none;
}
/* Indent answer content to align with question text */
.faq-list details > *:not(summary) {
  padding: 0 0.5rem 0.75rem 1.75rem;
}


/* Contact Us mobile layout adjustments: stack fields and map, remove inner scrollbars */
@media (max-width: 900px) {
  /* Make sure the row wraps and each column takes full width */
  #contactus .row { display: flex; flex-wrap: wrap; }
  #contactus .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Ensure the table wrapper with contact details does not create its own scrollbar */
  #contactus .table-wrapper { overflow-x: visible; }

  /* Add a little spacing between the fields and the map when stacked */
  #contactus .map-embed { padding-top: 0.5rem; }
}

/* Slightly shorter map on very small phones */
@media (max-width: 480px) {
  #contactus .map-embed iframe { height: 300px; }
}

/* Make Testimonials section use the same green banner background as former "Why Us" */
#testimonials {
  position: relative;
  color: #fff;
  text-shadow: 0 0 0.5px rgba(255, 255, 255, 0.25);
  text-align: center;
  background: #35b88f url("images/banner.svg") top center no-repeat; /* start lines at top of green section */
  padding: 5em 0 5em 0;
  margin: 0;
  background-size: 125% auto;
}
#testimonials a { color: inherit; border-bottom-color: rgba(255, 255, 255, 0.5); }
#testimonials a:hover { border-bottom-color: rgba(255, 255, 255, 0); }
#testimonials footer { margin: 2em 0 0 0; }

/* Remove guiding line and arrow from the testimonials box */
#testimonials .box { margin-top: 0; }
#testimonials .box:before,
#testimonials .box:after { display: none !important; content: none !important; }

/* Ensure testimonial content inside the white box remains readable on the green background */
#testimonials .box.style3 {
  background: #fff;
  color: #333; /* dark text for readability */
  text-shadow: none; /* remove global white shadow */
}
/* Fix button contrast inside white testimonials box */
#testimonials .box.style3 .btn-outline-light {
  color: #333;
  border-color: #333;
}
#testimonials .box.style3 .btn-outline-light:hover,
#testimonials .box.style3 .btn-outline-light:focus {
  color: #fff;
  background-color: #333;
  border-color: #333;
}

/* Make the bottom CTA button readable: match testimonials text color (white) */
#testimonials footer .button.style2 {
  background: transparent;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.9);
  text-shadow: 0 0 0.5px rgba(255, 255, 255, 0.25);
}
#testimonials footer .button.style2:hover,
#testimonials footer .button.style2:focus {
  background: rgba(255,255,255,0.12);
  color: #fff !important;
  text-shadow: 0 0 0.5px rgba(255, 255, 255, 0.25);
}
