/* ==========================================================================
   FOOTER COMPONENT STYLES (footer.css)
   Scoped styling for global Coldwell Banker White Wings footer,
   newsletter subscription bar, discovery columns, and subfooter bar.
   Fully responsive across all breakpoints (Desktop, Tablet, Phablet, Mobile).
   ========================================================================== */

.cb-footer {
  background-color: var(--primary, #012169);
  color: var(--text-inverse, #ffffff);
  font-family: var(--font-brand);
  position: relative;
  width: 100%;
  overflow-x: hidden;
  padding-top: 3.25rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .cb-footer {
    padding-top: 3.75rem;
    padding-bottom: 2.25rem;
  }
}

@media (min-width: 768px) {
  .cb-footer {
    padding-top: 4.5rem;
    padding-bottom: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .cb-footer {
    padding-top: 5.5rem;
    padding-bottom: 3.25rem;
  }
}

@media (min-width: 1280px) {
  .cb-footer {
    padding-top: 6rem;
    padding-bottom: 3.5rem;
  }
}

/* Container Constraint */
.cb-footer__container {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .cb-footer__container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 768px) {
  .cb-footer__container {
    padding: 0 3.5rem;
  }
}

@media (min-width: 1280px) {
  .cb-footer__container {
    padding: 0 4.5rem;
  }
}

/* ==========================================================================
   MAIN GRID: Left Brand Info & Right Navigation Columns
   ========================================================================== */
.cb-footer__main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .cb-footer__main-grid {
    gap: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .cb-footer__main-grid {
    grid-template-columns: 35% 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

@media (min-width: 1280px) {
  .cb-footer__main-grid {
    grid-template-columns: 35% 1fr;
    gap: 4.5rem;
  }
}

@media (min-width: 1536px) {
  .cb-footer__main-grid {
    grid-template-columns: 36% 1fr;
    gap: 5.5rem;
  }
}

/* ==========================================================================
   LEFT COLUMN: Logo, Support Coordinates & Social Channels
   ========================================================================== */
.cb-footer__brand-col,
.cb-footer__nav-col {
  min-width: 0;
  max-width: 100%;
}

.cb-footer__brand-col {
  display: flex;
  flex-direction: column;
}

/* Logo */
.cb-footer__logo {
  display: inline-block;
  margin-bottom: 1.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
  width: fit-content;
}

@media (min-width: 480px) {
  .cb-footer__logo {
    margin-bottom: 1.75rem;
  }
}

@media (min-width: 768px) {
  .cb-footer__logo {
    margin-bottom: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .cb-footer__logo {
    margin-bottom: 2.75rem;
  }
}

.cb-footer__logo:hover {
  opacity: 0.9;
}

.cb-footer__logo-img {
  height: 24px;
  width: auto;
  max-width: 195px;
  display: block;
  filter: brightness(0) invert(1);
}

@media (min-width: 480px) {
  .cb-footer__logo-img {
    height: 28px;
    max-width: 225px;
  }
}

@media (min-width: 768px) {
  .cb-footer__logo-img {
    height: 32px;
    max-width: 250px;
  }
}

@media (min-width: 1024px) {
  .cb-footer__logo-img {
    height: 35px;
    max-width: 260px;
  }
}

/* Contact & Support Group */
.cb-footer__contact-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .cb-footer__contact-group {
    flex-direction: row;
    gap: 3.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .cb-footer__contact-group {
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
}

.cb-footer__contact-item {
  display: flex;
  flex-direction: column;
}

.cb-footer__contact-label {
  font-size: 0.8125rem;
  font-weight: 300;
  color: #a8a8a8;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

@media (min-width: 768px) {
  .cb-footer__contact-label {
    font-size: 0.875rem;
  }
}

.cb-footer__contact-value {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  word-break: break-word;
  overflow-wrap: break-word;
}

.cb-footer__contact-value:hover {
  color: var(--accent, #3668F5);
}

.cb-footer__contact-value--phone {
  font-size: 0.9375rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .cb-footer__contact-value--phone {
    font-size: 1rem;
  }
}

.cb-footer__contact-value--email {
  font-size: 0.875rem;
  font-weight: 300;
}

@media (min-width: 768px) {
  .cb-footer__contact-value--email {
    font-size: 0.9375rem;
  }
}

/* Social Media Channels */
.cb-footer__social-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .cb-footer__social-group {
    gap: 0.85rem;
  }
}

.cb-footer__social-heading {
  font-size: 0.8125rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .cb-footer__social-heading {
    font-size: 0.875rem;
  }
}

.cb-footer__social-icons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .cb-footer__social-icons {
    gap: 1.5rem;
  }
}

.cb-footer__social-link {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.95;
}

.cb-footer__social-link:hover {
  color: var(--accent, #3668F5);
  opacity: 1;
  transform: translateY(-2px);
}

.cb-footer__social-link svg,
.cb-footer__social-link img,
.cb-footer__social-img {
  display: block;
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   RIGHT COLUMN: Newsletter + 3 Navigation Columns
   ========================================================================== */
.cb-footer__nav-col {
  display: flex;
  flex-direction: column;
}

/* Newsletter Subscription */
.cb-footer__newsletter {
  margin-bottom: 2.25rem;
  width: 100%;
}

@media (min-width: 768px) {
  .cb-footer__newsletter {
    margin-bottom: 3rem;
    max-width: 580px;
  }
}

@media (min-width: 1024px) {
  .cb-footer__newsletter {
    margin-bottom: 4rem;
    max-width: 100%;
  }
}

.cb-footer__newsletter-title {
  font-size: 0.8125rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin: 0 0 0.85rem 0;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .cb-footer__newsletter-title {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
}

.cb-footer__newsletter-form {
  background-color: #0a1730;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 0 0 0 0.85rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 480px) {
  .cb-footer__newsletter-form {
    min-height: 50px;
    padding: 0 0 0 1rem;
  }
}

@media (min-width: 768px) {
  .cb-footer__newsletter-form {
    min-height: 52px;
    padding: 0 0 0 1rem;
  }
}

.cb-footer__newsletter-form:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.cb-footer__newsletter-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #a8a8a8 !important;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 0rem 0.65rem 0rem;
  box-sizing: border-box;
  font-family: inherit;
}

@media (min-width: 480px) {
  .cb-footer__newsletter-input {
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    padding: 0.75rem 0rem 0.75rem 0rem;
  }
}

.cb-footer__newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  opacity: 1;
  letter-spacing: 0.05em;
}

@media (min-width: 480px) {
  .cb-footer__newsletter-input::placeholder {
    letter-spacing: 0.06em;
  }
}

.cb-footer__newsletter-btn {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .cb-footer__newsletter-btn {
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    padding: 1rem;
  }
}

.cb-footer__newsletter-btn:hover {
  color: var(--accent, #3668F5);
}

.cb-footer__newsletter-feedback {
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  line-height: 1.4;
  display: none;
}

.cb-footer__newsletter-feedback.is-visible {
  display: block;
}

.cb-footer__newsletter-feedback.is-success {
  color: #4ade80;
}

.cb-footer__newsletter-feedback.is-error {
  color: #f87171;
}

/* ==========================================================================
   3 DISCOVERY COLUMNS (Popular Search, Quick Links, Discover)
   ========================================================================== */
.cb-footer__nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1.25rem;
}

/* On mobile (< 640px): Popular Search takes full width so longer links fit cleanly */
.cb-footer__nav-group--popular {
  grid-column: 1 / -1;
}

/* On phablet (480px - 639px): Popular Search 4 links split into 2 neat sub-columns */
@media (min-width: 480px) and (max-width: 639px) {
  .cb-footer__nav-grid {
    gap: 2rem 1.5rem;
  }

  .cb-footer__nav-group--popular .cb-footer__nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1.5rem;
  }
}

/* On tablet & desktop (>= 640px): 3 balanced columns side-by-side */
@media (min-width: 640px) {
  .cb-footer__nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .cb-footer__nav-group--popular {
    grid-column: auto;
  }

  .cb-footer__nav-group--popular .cb-footer__nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }
}

@media (min-width: 1280px) {
  .cb-footer__nav-grid {
    gap: 3rem;
  }
}

.cb-footer__nav-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cb-footer__nav-heading {
  font-size: 0.75rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin: 0 0 0.85rem 0;
  line-height: 1.3;
}

@media (min-width: 480px) {
  .cb-footer__nav-heading {
    font-size: 0.8125rem;
    margin-bottom: 1.15rem;
  }
}

@media (min-width: 768px) {
  .cb-footer__nav-heading {
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .cb-footer__nav-heading {
    margin-bottom: 2.2rem;
    white-space: nowrap;
  }
}

.cb-footer__nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .cb-footer__nav-links {
    gap: 0.7rem;
  }
}

.cb-footer__nav-link {
  color: #a8a8a8;
  font-size: 0.75rem;
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  line-height: 1.4;
  display: inline-block;
  padding: 0.15rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
  word-break: break-word;
}

.cb-footer__nav-link.is-active {
  color: var(--accent, #3668F5);
  font-weight: 500;
}

@media (min-width: 480px) {
  .cb-footer__nav-link {
    font-size: 0.8125rem;
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .cb-footer__nav-link {
    white-space: nowrap;
  }
}

.cb-footer__nav-link:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.cb-footer__nav-link--disabled,
.cb-footer__nav-link[aria-disabled="true"] {
  cursor: default !important;
  pointer-events: none;
}

/* ==========================================================================
   HORIZONTAL DIVIDER & SUBFOOTER
   ========================================================================== */
.cb-footer__divider {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.25);
  margin-top: 2.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
  .cb-footer__divider {
    margin-top: 2.75rem;
    margin-bottom: 1.75rem;
  }
}

@media (min-width: 768px) {
  .cb-footer__divider {
    margin-top: 3.5rem;
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .cb-footer__divider {
    margin-top: 4.5rem;
    margin-bottom: 2.25rem;
  }
}

@media (min-width: 1280px) {
  .cb-footer__divider {
    margin-top: 5.5rem;
  }
}

.cb-footer__subfooter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cb-footer__subfooter {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
  }
}

.cb-footer__copyright {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cb-footer__disclaimer,
.cb-footer__rights {
  font-size: 0.75rem;
  font-weight: 400;
  color: #a8a8a8;
  line-height: 1.5;
  margin: 0;
}

.cb-footer__recaptcha-notice {
  font-size: 0.6875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
  margin: 0.15rem 0 0;
}

.cb-footer__recaptcha-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.cb-footer__recaptcha-link:hover {
  color: #ffffff;
}

@media (min-width: 480px) {

  .cb-footer__disclaimer,
  .cb-footer__rights {
    font-size: 0.8125rem;
  }
}

.cb-footer__legal-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .cb-footer__legal-nav {
    gap: 0.4rem;
  }
}

.cb-footer__legal-link {
  font-size: 0.75rem;
  font-weight: 400;
  color: #a8a8a8;
  text-decoration: none;
  padding: 0.2rem 0;
  display: inline-block;
  transition: color 0.2s ease;
}

@media (min-width: 480px) {
  .cb-footer__legal-link {
    font-size: 0.8125rem;
    padding: 0;
  }
}

.cb-footer__legal-link:hover {
  color: #ffffff;
}

.cb-footer__legal-sep {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  user-select: none;
}

@media (min-width: 480px) {
  .cb-footer__legal-sep {
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   GLOBAL TOAST NOTIFICATION (Auto-Dismissing 5000ms Alert per AGENTS.md)
   ========================================================================== */
.cb-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100000;
  max-width: 420px;
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.35s ease;
}

.cb-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.cb-toast__body {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background-color: var(--primary, #012169);
  color: #ffffff;
  padding: 0.95rem 1.25rem;
  border-left: 4px solid var(--accent, #3668F5);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cb-toast.is-error .cb-toast__body {
  border-left-color: #ef4444;
}

.cb-toast__icon-wrap {
  color: var(--accent, #3668F5);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.cb-toast.is-error .cb-toast__icon-wrap {
  color: #ef4444;
}

.cb-toast__text-wrap {
  flex: 1;
}

.cb-toast__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cb-toast__message {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 2px;
  line-height: 1.4;
}

.cb-toast__close-btn {
  background: transparent;
  border: none;
  padding: 4px;
  color: #ffffff;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.cb-toast__close-btn:hover {
  opacity: 1;
}

@media (max-width: 639px) {
  .cb-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* Suppress floating Google reCAPTCHA v3 badge to maintain pristine luxury layout */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

