/* ============================================
   Office Closings - Scroll-Based Reveal
   ============================================ */

/* Wrapper for the entire closings section */
.kw-closings-section-wrapper {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Show when scrolled into view */
.kw-closings-section-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hide the closings list until JavaScript formats it */
/* .kw-office-closings {
  opacity: 0;
  transition: opacity 0.5s ease-in;
} */

.kw-office-closings.formatted {
  opacity: 1;
}

/* ============================================
   Office Closings Stats
   ============================================ */

.kw-closings-stats {
  display: none; /* Hidden until populated by JS */
  background: linear-gradient(135deg, #800000 0%, #a00000 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.kw-closings-stats h3 {
  margin: 0 0 20px;
  font-size: 1.8em;
  color: white;
}

.kw-closings-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-box {
  background: rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 1em;
  opacity: 0.9;
}

/* ============================================
   Office Closings Container
   ============================================ */

.kw-closings-container {
  min-height: 300px;
  position: relative;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.kw-closings-container.expanded {
  max-height: none;
}

.kw-closings-container.expanded::after {
  display: none;
}

/* Fade out effect at bottom when collapsed */
.kw-closings-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent 0%, white 100%);
  pointer-events: none;
}

/* Load More Button */
.kw-closings-load-more {
  text-align: center;
  margin: 30px 0;
}

#load-more-closings {
  display: none; /* Hidden until JS shows it */
}

/* ============================================
   Agent Links in Closings
   ============================================ */

.kw-agent-link {
  color: #0066cc; /* Standard web blue */
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.kw-agent-link:hover {
  color: #0052a3; /* Darker blue on hover */
  border-bottom-color: #0052a3;
  text-decoration: underline;
}

.kw-agent-link:visited {
  color: #0052a3; /* Purple for visited links */
}

.kw-agent-link:active {
  color: #cc0000; /* Red when clicking */
}