/* =====================================
   Branches Page Styles
   ===================================== */

.branches-page {
  width: 100%;
  background: #222222;
  color: #ffffff;
  min-height: 100vh;
}

.branches-page *,
.branches-page *::before,
.branches-page *::after {
  box-sizing: border-box;
}

/* =====================================
   Hero Section
   ===================================== */
.branches-hero {
  position: relative;
  width: 100%;
  height: 394px;
  overflow: hidden;
  margin-bottom: 40px;
}

.branches-hero__image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.branches-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.branches-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(34, 34, 34, 0.9) 100%
  );
}

.branches-hero__content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
}

.branches-hero__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  color: #ffffff;
  margin: 0;
}

/* =====================================
   Container
   ===================================== */
.branches__container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 94px 80px;
}

/* =====================================
   Breadcrumb
   ===================================== */
.branches-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  margin-bottom: 40px;
  padding: 20px 0;
  direction: rtl;
  opacity: 0.6;
}

.branches-breadcrumb__link {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.branches-breadcrumb__link:hover {
  opacity: 1;
}

.branches-breadcrumb__current {
  color: #ffffff;
}

.branches-breadcrumb__separator {
  color: #ffffff;
}

/* =====================================
   Search Box
   ===================================== */
.branches-search {
  margin-bottom: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.branches-search__wrapper {
  position: relative;
  flex: 1;
  max-width: 600px;
}

.branches-search__input {
  width: 100%;
  padding: 16px 50px 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 16px;
  color: #ffffff;
  transition: all 0.3s ease;
  direction: rtl;
  text-align: right;
}

.branches-search__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.branches-search__input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.branches-search__icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.branches-search__icon svg {
  width: 20px;
  height: 20px;
}

/* =====================================
   Branches Grid
   ===================================== */
.branches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* =====================================
   Branch Card
   ===================================== */
.branch-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 32px 24px 24px;
  transition: all 0.3s ease;
}

.branch-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Franchise Button */
.branches-franchise-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border: none;
  border-radius: 30px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.branches-franchise-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.branches-franchise-btn:hover::before {
  opacity: 1;
}

.branches-franchise-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.branches-franchise-btn:active {
  transform: translateY(0);
}

.branches-franchise-btn span,
.branches-franchise-btn svg {
  position: relative;
  z-index: 1;
}

/* =====================================
   Section
   ===================================== */
.branches-section {
  margin-bottom: 80px;
}

.branches-section__title {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
  color: #ffffff;
  text-align: center;
  margin: 0 0 60px 0;
}

/* =====================================
   Brand Shop Badge
   ===================================== */
.branch-card__badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background: rgba(255, 14, 147, 0.2);
  border-radius: 14px;
  z-index: 2;
}

.branch-card__badge span {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 500;
  font-size: 16px;
  color: #ffffff;
  opacity: 0.76;
}

/* =====================================
   Logo
   ===================================== */
.branch-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  margin-bottom: 24px;
}

.branch-card__logo-svg {
  width: auto;
  height: 40px;
}

/* =====================================
   Content
   ===================================== */
.branch-card__content {
  text-align: right;
}

.branch-card__city {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.4;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.branch-card__name {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #ffffff;
  opacity: 0.7;
  margin: 0 0 20px 0;
}

/* =====================================
   Info
   ===================================== */
.branch-card__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.branch-card__info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 14px;
  line-height: 1.6;
  color: #ffffff;
  opacity: 0.8;
}

.branch-card__info-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.6;
}

.branch-card__info-item span {
  flex: 1;
  text-align: right;
}

/* =====================================
   Empty State
   ===================================== */
.branches-empty {
  text-align: center;
  padding: 80px 20px;
}

.branches-empty p {
  font-family: 'PeydaFaNumWeb', sans-serif !important;
  font-size: 18px;
  color: #ffffff;
  opacity: 0.6;
}

/* =====================================
   Editor Styles
   ===================================== */
.branches-page-block-editor {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
}

/* =====================================
   Responsive Design
   ===================================== */

/* Large Desktop - 4 columns */
@media (min-width: 1440px) {
  .branches-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
}

/* Desktop - 3 columns */
@media (min-width: 1025px) and (max-width: 1439px) {
  .branches-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* Tablet - 2 columns */
@media (max-width: 1024px) {
  .branches-hero {
    height: 350px;
  }

  .branches-hero__title {
    font-size: 40px;
  }

  .branches__container {
    padding: 0 50px 60px;
  }

  .branches-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .branches-section {
    margin-bottom: 60px;
  }

  .branches-section__title {
    font-size: 26px;
    margin-bottom: 40px;
  }
  
  .branches-search__wrapper {
    max-width: 500px;
  }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
  .branches-hero {
    height: 280px;
  }

  .branches-hero__title {
    font-size: 32px;
  }

  .branches__container {
    padding: 0 30px 40px;
  }

  .branches-breadcrumb {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .branches-search {
    margin-bottom: 40px;
  }
  
  .branches-search__wrapper {
    max-width: 100%;
  }
  
  .branches-search__input {
    padding: 14px 45px 14px 20px;
    font-size: 15px;
  }
  
  .branches-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .branch-card {
    padding: 24px;
  }

  .branch-card__city {
    font-size: 22px;
  }

  .branch-card__name {
    font-size: 15px;
  }

  .branch-card__info-item {
    font-size: 13px;
  }

  .branches-section {
    margin-bottom: 50px;
  }

  .branches-section__title {
    font-size: 24px;
    margin-bottom: 30px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .branches-hero {
    height: 240px;
  }

  .branches-hero__title {
    font-size: 26px;
  }

  .branches__container {
    padding: 0 20px 30px;
  }

  .branch-card {
    padding: 20px;
  }

  .branch-card__badge {
    top: 15px;
    right: 15px;
    padding: 6px 12px;
  }

  .branch-card__badge span {
    font-size: 14px;
  }
  
  .branches-search__input {
    padding: 12px 40px 12px 18px;
    font-size: 14px;
  }
  
  .branches-search__icon svg {
    width: 18px;
    height: 18px;
  }
}