/* فروع نايوش هوب — منسوخ من تصميم صفحة فروع ERP (newhome/branches) */

.branches-showcase {
  margin: 34px 0 26px;
}

.branches-head {
  text-align: right;
  margin-bottom: 16px;
}

.branches-head h1 {
  margin: 0;
  color: #1d222b;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.2px;
}

.branches-head p {
  margin: 10px 0 0;
  color: #5f6672;
  font-size: 17px;
  font-weight: 600;
}

.branches-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 22px;
  align-items: center;
}

.branches-toolbar input,
.branches-toolbar select {
  min-height: 47px;
  border: 1px solid #d7dbe4;
  border-radius: 14px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #1f232b;
  background: #fff;
}

.branches-toolbar input::placeholder {
  color: #8b93a2;
}

.branches-filter-all {
  min-height: 47px;
  border: 1px solid rgba(185, 10, 26, 0.35);
  background: #fff;
  color: #b40d1f;
  border-radius: 14px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.branches-filter-all:hover {
  background: #fff1f3;
}

.branches-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.branch-card {
  border-radius: 22px;
  border: 1px solid #eceef4;
  background: #fff;
  box-shadow: 0 16px 30px rgba(11, 14, 20, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.branch-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 42px rgba(10, 14, 22, 0.14);
}

.branch-card-top {
  --branch-flag-size: 70px;
  --branch-flag-overlap: 34px;
  position: relative;
  min-height: 96px;
  background: #f3f5f9;
  padding: 18px 18px calc(var(--branch-flag-overlap) + 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.branch-badge {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #a11222;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid #f0d3d8;
}

.branch-flag {
  width: var(--branch-flag-size);
  height: var(--branch-flag-size);
  border-radius: 999px;
  object-fit: contain;
  position: absolute;
  right: auto;
  left: 50%;
  bottom: calc(-1 * var(--branch-flag-overlap));
  transform: translateX(-50%);
  border: 4px solid #fff;
  box-shadow: 0 12px 24px rgba(14, 20, 29, 0.18);
  background: #fff;
  padding: 5px;
}

.branch-content {
  padding: 44px 18px 18px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.branch-title {
  margin: 0;
  color: #171c24;
  font-size: 20px;
  line-height: 1.22;
  font-weight: 900;
}

.branch-title span {
  display: block;
  color: #888;
  font-size: 14px;
  font-weight: 700;
  margin-top: 3px;
}

.branch-hours {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f5562;
  font-size: 14px;
  font-weight: 700;
}

.branch-hours i {
  color: #b10f1f;
}

.branch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}

.branch-btn {
  min-height: 43px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid #d9dde6;
  background: #fff;
  color: #1f232b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.branch-btn.primary {
  background: linear-gradient(135deg, #d70000, #8f000d);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(160, 6, 24, 0.25);
}

.branch-btn:hover {
  transform: translateY(-2px);
}

.branch-card-actions {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}

@media (max-width: 1020px) {
  .branch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .branches-toolbar {
    grid-template-columns: 1fr;
  }

  .branch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .branches-head {
    text-align: center;
  }

  .branch-card {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
  }

  .branch-flag {
    position: absolute;
    right: 12px;
    left: auto;
    transform: none;
  }

  .branch-content {
    text-align: right;
    width: 100%;
  }

  .branch-hours {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .branch-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .branch-actions a,
  .branch-actions button {
    min-height: 42px;
  }
}
