/* ==========================================
   Kelly Fry / Rita Nagy Style Footer CSS
   ========================================== */

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

body>.main-container,
body>.seller-main-container,
body>.buyers-main-container,
body>main {
  flex: 1 0 auto;
  width: 100%;
}

/* Footer Container Wrapper */
.footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0;
  background-color: #ffffff !important;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.15);
  font-family: 'Montserrat', sans-serif;
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  box-sizing: border-box;
}

/* Top White Footer Section */
.footer-top-section {
  padding: 60px 40px 30px 40px;
  max-width: 1350px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  background-color: #ffffff !important;
}

.footer-main-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-column {
  flex: 1;
  min-width: 240px;
}

.footer-column h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 20px;
  text-transform: none;
  letter-spacing: 0.5px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: #555555;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  font-weight: 500;
}

.footer-column ul li a:hover {
  color: #8c0d15;
}

/* Brand Column Details */
.footer-brand-col {
  min-width: 280px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.footer-logo-circle-inner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #8c0d15;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo-circle-inner .logo-kf {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #8c0d15;
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
}

.footer-logo-text .logo-text-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #111111;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.footer-logo-text .logo-text-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 8px;
  color: #666666;
  letter-spacing: 1.5px;
}

/* Sutton West Coast Realty style */
.footer-broker-logo {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  line-height: 1.1;
}

.footer-broker-logo .broker-kw {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: #8c0d15;
  text-transform: lowercase;
  letter-spacing: -0.5px;
}

.footer-broker-logo .broker-bold {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-contact-details p {
  margin: 8px 0;
  font-size: 0.95rem;
  color: #555555;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact-details p i {
  color: #8c0d15;
  font-size: 0.95rem;
}

.footer-contact-details p a {
  color: #555555;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-details p a:hover {
  color: #8c0d15;
}

/* Links column double grid */
.footer-links-grid {
  display: flex;
  gap: 30px;
}

.links-grid-left,
.links-grid-right {
  flex: 1;
}

/* Insights Column */
.insights-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.insight-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.insight-img {
  width: 75px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  background-color: #f1f1f1;
}

.insight-info a {
  font-size: 0.85rem;
  font-weight: 500;
  color: #444444;
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.insight-info a:hover {
  color: #8c0d15;
}

/* Revolutionized column */
.footer-revol-col h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111111;
  line-height: 1.3;
}

.revol-text {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.6;
  margin-top: 15px;
}

/* Divider Line */
.footer-divider {
  border: 0;
  height: 1px;
  background-color: #eaeaea;
  margin: 40px 0 25px 0;
}

/* Address & Social Row */
.footer-address-social-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-address-sec {
  flex: 2;
  min-width: 280px;
}

.footer-address-text {
  font-size: 0.9rem;
  color: #555555;
  font-weight: 600;
  margin: 0;
}

.footer-sub-text {
  font-size: 0.85rem;
  color: #777777;
  margin: 5px 0 0 0;
}

.footer-sub-text-small {
  font-size: 0.75rem;
  color: #aaaaaa;
  margin: 5px 0 0 0;
}

.footer-social-sec {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 200px;
}

.footer-social-circles {
  display: flex;
  gap: 10px;
}

.footer-social-circles a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #8c0d15;
  color: #ffffff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.2s, background-color 0.2s;
}

.footer-social-circles a:hover {
  background-color: #A30000;
  transform: translateY(-2px);
}

/* Footer Bottom Black Bar */
.footer-bottom-black {
  background-color: #121212;
  padding: 20px 40px;
  color: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

.footer-bottom-container {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.copyright-text {
  font-size: 0.85rem;
  color: #999999;
  margin: 0;
  font-weight: 400;
}

.scroll-top-footer-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.2s ease;
}

.scroll-top-footer-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-radius: 6px;
}

.footer-arrow-up-circle {
  width: 42px;
  height: 42px;
  background-color: #8c0d15;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.scroll-top-footer-btn:hover .footer-arrow-up-circle,
.footer-arrow-up-circle:hover {
  background-color: #A30000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(140, 13, 21, 0.4);
}

.scroll-top-footer-btn:active .footer-arrow-up-circle,
.footer-arrow-up-circle:active {
  background-color: #700a10;
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.footer-arrow-up-circle i {
  color: #ffffff;
  font-size: 1rem;
  pointer-events: none;
}

/* Responsiveness overrides */
@media (max-width: 991px) {
  .footer-main-container {
    flex-direction: column !important;
    gap: 35px !important;
  }

  .footer-column,
  .footer-brand-col,
  .footer-links-col,
  .footer-insights-col,
  .footer-revol-col {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .footer-address-social-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .footer-address-sec,
  .footer-social-sec {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .footer-top-section {
    padding: 35px 20px 20px 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .footer-bottom-black {
    padding: 15px 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .footer-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }

  .links-grid-left,
  .links-grid-right {
    flex: 1 1 140px;
    min-width: 130px;
  }

  .footer-bottom-container {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .copyright-text {
    text-align: center;
  }

  .scroll-top-footer-btn {
    padding: 6px;
    margin-top: 2px;
  }

  .footer-arrow-up-circle {
    width: 46px;
    height: 46px;
    border-radius: 8px;
  }

  .footer-arrow-up-circle i {
    font-size: 1.15rem;
  }
}

/* Newsletter Subscription Box */
.footer-newsletter-box {
  margin-top: 18px;
  width: 100%;
}

.newsletter-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111111;
  letter-spacing: 0.3px;
  font-family: 'Montserrat', sans-serif;
}

.newsletter-input-group {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  box-sizing: border-box;
  align-items: stretch;
}

.newsletter-input-group input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #d0d7de;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  background-color: #ffffff;
  color: #222222;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-input-group input:focus {
  border-color: #8c0d15;
  box-shadow: 0 0 0 3px rgba(140, 13, 21, 0.12);
}

.newsletter-input-group input::placeholder {
  color: #8c8c8c;
  font-size: 0.85rem;
}

.newsletter-input-group button {
  height: 44px;
  background-color: #8c0d15;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px;
  padding: 0 22px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.4px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(140, 13, 21, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.newsletter-input-group button:hover {
  background-color: #A30000;
  box-shadow: 0 4px 14px rgba(140, 13, 21, 0.35);
  transform: translateY(-1px);
}

.newsletter-input-group button:active {
  background-color: #700a10;
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(140, 13, 21, 0.2);
}

.newsletter-input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.newsletter-spinner {
  font-size: 0.95rem;
  color: #ffffff;
}

.newsletter-feedback {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  min-height: 18px;
  line-height: 1.4;
  font-family: 'Montserrat', sans-serif;
}

.newsletter-feedback.success {
  color: #28a745;
}

.newsletter-feedback.error {
  color: #dc3545;
}

@media (max-width: 767px) {
  .footer-newsletter-box {
    margin-top: 15px;
    max-width: 100%;
  }

  .newsletter-input-group {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .newsletter-input-group {
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
  }

  .newsletter-input-group input {
    width: 100% !important;
    height: 48px;
    font-size: 16px; /* Prevents auto-zoom on iOS mobile browsers */
    padding: 0 16px;
    border-radius: 8px;
    box-sizing: border-box;
  }

  .newsletter-input-group button {
    width: 100% !important;
    height: 48px;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0 24px;
    border-radius: 8px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(140, 13, 21, 0.28);
  }
}