/* ============================================================
   Bonita Beach Trailer Park Co-op — custom template stylesheet
   Replaces ja_purity_iv/T4.
     - body/nav font: Poppins (deliberate choice, overriding the
       source T4 config's Karla — Poppins is what's actually used
       throughout existing SP Page Builder page content, so the
       template now matches rather than falling back to Karla)
     - heading font: Public Sans, weight 500 (still matches source T4 config)
     - h1 40px / h2 32px / h3 24px / h4 18px / h5 16px / h6 14px
     - header: sticky, #ffffff bg, box-shadow 0 2px 8px rgba(0,0,0,.08)
     - link color: #0d6efd (T4/Bootstrap default — never customized)
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: #212529;
  background: #fff;
  padding-top: 90px; /* compensates for the fixed header, matches live site */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Public Sans', sans-serif;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 0.5em;
}
h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

a {
  color: #0d6efd;
  text-decoration: none;
}
a:hover, a:focus {
  color: #0a58ca;
}

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

.bbtp-container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) {
  .bbtp-container { max-width: 540px; }
}
@media (min-width: 768px) {
  .bbtp-container { max-width: 720px; }
}
@media (min-width: 992px) {
  .bbtp-container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .bbtp-container { max-width: 1050px; }
}
@media (min-width: 1400px) {
  .bbtp-container { max-width: 1100px; }
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.bbtp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bbtp-header-wrap {
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.bbtp-brand {
  min-width: 0;
  overflow: hidden;
}
.bbtp-brand a {
  display: block;
  color: rgba(0, 0, 0, 0.9);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bbtp-brand .site-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.bbtp-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.bbtp-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.bbtp-nav li {
  position: relative;
}
.bbtp-nav > ul > li > a {
  position: relative;
  display: block;
  padding: 12px 16px;
  color: rgba(0, 0, 0, 0.55);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
}
.bbtp-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.bbtp-nav > ul > li > a:hover::after {
  transform: scaleX(1);
}
.bbtp-nav > ul > li > a:hover {
  color: rgba(0, 0, 0, 0.7);
}
.bbtp-nav .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-top: 5px solid currentColor;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

/* Dropdown submenus (About Us, Shareholder Access) */
.bbtp-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 8px 0;
  z-index: 1040;
}
.bbtp-nav .submenu li a {
  display: block;
  padding: 10px 20px;
  color: #212529;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
}
.bbtp-nav .submenu li a:hover {
  background: #f8f9fa;
  color: #1e2125;
}
.bbtp-nav li.has-children:hover > .submenu,
.bbtp-nav li.has-children.is-open > .submenu {
  display: block;
}

/* Mobile nav toggle */
.bbtp-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
}
.bbtp-nav-toggle-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: inherit;
  font-family: 'Poppins', sans-serif;
}

@media (max-width: 1300px) {
  .bbtp-nav {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    display: block;
    overflow-y: auto;
    max-height: 0;
    transition: max-height 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
  .bbtp-nav ul {
    display: block;
    padding: 8px 0;
  }
  .bbtp-nav > ul > li > a {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
  }
  .bbtp-nav .submenu {
    position: static;
    box-shadow: none;
    background: #f8f9fa;
    padding-left: 12px;
  }
  .bbtp-nav.has-open {
    max-height: calc(100vh - 90px);
  }
  .bbtp-nav-toggle {
    display: block;
  }
}

/* At very narrow phone widths, the logo text's locked nowrap width
   (added to fix desktop wrapping) combined with the MENU toggle no
   longer fits alongside it — shrink the logo and tighten the header
   gap here specifically so the toggle button always has room. */
@media (max-width: 480px) {
  .bbtp-header-wrap {
    gap: 12px;
  }
  .bbtp-brand .site-name {
    font-size: 15px;
  }
}

/* ============================================================
   BREADCRUMBS / MAIN
   ============================================================ */
#bbtp-breadcrumbs:empty { display: none; }
.bbtp-header-r:empty { display: none; }
#bbtp-breadcrumbs {
  padding-top: 12px;
  font-size: 14px;
  color: #6c757d;
}

#bbtp-main {
  min-height: 40vh;
}

/* Center all text content on the home page only. Scoped via the
   body.is-home class set in index.php (Joomla's active-menu-item
   "home" flag). Broadened beyond a single inherited rule, and backed
   with !important, since SP Page Builder's own bundled CSS sets
   left-alignment on some elements with enough specificity to beat a
   plain inherited value. */
body.is-home #bbtp-main {
  text-align: center;
}
body.is-home #bbtp-main h1,
body.is-home #bbtp-main h2,
body.is-home #bbtp-main h3,
body.is-home #bbtp-main h4,
body.is-home #bbtp-main h5,
body.is-home #bbtp-main h6,
body.is-home #bbtp-main p,
body.is-home #bbtp-main li,
body.is-home #bbtp-main .sppb-addon,
body.is-home #bbtp-main .sppb-addon-content {
  text-align: center !important;
}

/* Homepage headline/lede specifically use Poppins (matching the site's
   body/nav font) rather than the site-wide Public Sans heading font —
   a deliberate one-off choice for the home page only. */
body.is-home #bbtp-main h1,
body.is-home #bbtp-main .lead {
  font-family: 'Poppins', sans-serif;
}

/* ============================================================
   FOOTER
   ============================================================ */
.bbtp-footer {
  border-top: 1px solid #e9ecef;
  margin-top: 40px;
}
.bbtp-footer-wrap {
  padding-top: 24px;
  padding-bottom: 24px;
}
.bbtp-footer-bottom {
  font-size: 14px;
  color: #6c757d;
  text-align: center;
}

/* ============================================================
   JOOMLA CORE VIEW BASE STYLES
   Login form, registration, password reset, and any other core
   Joomla component view (not SP Page Builder content) render using
   generic Bootstrap classes — .btn, .form-control, .list-group,
   .alert, .control-group — that this template previously had zero
   styling for, since all prior work targeted SP Page Builder pages
   and the header/nav/footer chrome only. That's the confirmed root
   cause of the login/Shareholder-Documents-landing-page rendering
   unstyled, oversized, and off-center: these are genuinely stock,
   uncustomized Bootstrap 5 defaults (confirmed against the real
   T4 compiled CSS), not a guess.
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.btn-primary {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}
.btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}
.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}
.btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
}
.w-100 { width: 100%; }

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  display: block;
  width: 100%;
  padding: 0.4375rem 1rem;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  border: 1px solid #495057;
  border-radius: 0.25rem;
  box-sizing: border-box;
}

fieldset { border: none; padding: 0; margin: 0; }
legend { font-size: 1.1em; font-weight: 600; margin-bottom: 0.5rem; }

.form-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.5rem;
}
.form-check-input { width: 16px; height: 16px; }
.form-check-label { font-weight: 400; }

.control-group { margin-bottom: 1rem; }
.control-group .control-label { display: block; font-weight: 500; margin-bottom: 4px; }

.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  border-radius: 0.25rem;
  list-style: none;
}
.list-group-item {
  display: block;
  padding: 0.5rem 1rem;
  color: #495057;
  text-decoration: none;
  border-bottom: 1px solid #e9ecef;
}
.list-group-item:hover {
  background: #f8f9fa;
  color: #212529;
}
.list-group-item:last-child { border-bottom: none; }

.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-danger, .alert-error { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }
.alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }

/* Login / registration / reset-password page: center in a card,
   matching how these views should read on any Joomla site rather
   than sprawling unstyled across the full content width. */
.com-users-login,
.login,
.com-users-registration,
.com-users-remind,
.com-users-reset {
  max-width: 480px;
  margin: 40px auto;
  padding: 32px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  text-align: left;
}
.com-users-login .page-header h1,
.login .page-header h1 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}
.com-users-login__submit .controls,
.com-users-registration .controls,
.com-users-remind .controls,
.com-users-reset .controls {
  margin-top: 12px;
}
.com-users-login__options {
  margin-top: 16px;
}
