/* Branches List Section */
.branches-list {
  padding: 2rem 0;
}

/* Branches Grid */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Branch Card */
.branch-card {
  background: #fff;
  border: 2px solid #f1f3f4;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #010101 0%, #666 100%);
  transition: width 0.3s ease;
}

.branch-card:hover {
  border-color: #010101;
  transform: scale(1.02);
}

.branch-card:hover::before {
  width: 8px;
}

/* Card Header */
.branch-card__header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px dashed #e9ecef;
}

.branch-card__city {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #010101;
  text-transform: uppercase;
}

.branch-card__district {
  font-size: 1.125rem;
  color: #333;
  margin: 0.375rem 0 0;
  font-weight: 600;
  text-transform: uppercase;
}

/* Card Address */
.branch-card__address {
  padding: 1rem 1.5rem;
  color: #555;
  font-size: 0.8125rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fafafa;
  border-bottom: 1px solid #f1f3f4;
}

.branch-card__address svg {
  color: #999;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

/* Card Actions */
.branch-card__actions {
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.branch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  transition: all 0.25s ease;
  border: 1.5px solid;
  border-radius: 5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.branch-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: currentColor;
  transition: left 0.3s ease;
  opacity: 0.1;
}

.branch-btn:hover::before {
  left: 0;
}

.branch-btn--map {
  background: transparent;
  color: #666;
  border-color: #ddd;
}

.branch-btn--map:hover {
  color: #010101;
  border-color: #010101;
}

.branch-btn--book {
  background: #010101;
  color: #fff;
  border-color: #010101;
}

.branch-btn--book:hover {
  background: #333;
  border-color: #333;
}

.branch-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Results */
.branches-results {
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.branches-results__text {
  color: #6c757d;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

/* Empty State */
.branches-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: #f8f9fa;
  border-radius: 5px;
  border: 2px dashed #dee2e6;
}

.branches-empty__icon {
  margin-bottom: 2rem;
  color: #adb5bd;
}

.branches-empty h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #495057;
}

.branches-empty p {
  color: #6c757d;
  margin: 0;
  font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 48rem) {
  .branches-list {
    padding: 1.5rem 0;
  }
  
  .branches-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .branch-card__header {
    padding: 1.25rem 1.25rem 1rem;
  }
  
  .branch-card__city {
    font-size: 1.125rem;
  }
  
  .branch-card__district {
    font-size: 1rem;
  }
  
  .branch-card__address {
    padding: 1rem 1.25rem;
  }
  
  .branch-card__actions {
    padding: 1.25rem;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .branches-results {
    padding: 1.5rem;
  }
  
  .branches-empty {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 30rem) {
  .branch-card__header {
    padding: 1rem 1rem 0.75rem;
  }
  
  .branch-card__city {
    font-size: 1rem;
  }
  
  .branch-card__district {
    font-size: 0.9375rem;
  }
  
  .branch-card__address {
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
  }
  
  .branch-card__actions {
    padding: 1rem;
  }
}

/* Filter Animation */
.branch-card {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.branch-card.hidden {
  display: none;
}

/* RTL Support */
html[dir="rtl"] .branch-btn svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .branch-card__address svg {
  transform: scaleX(-1);
}

/* Tablet Adjustments */
@media (min-width: 48rem) and (max-width: 64rem) {
  .branches-grid {
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.5rem;
  }
}