:root {
  --bg: #f6fbff;
  --bg-soft: #e9f5ff;
  --card: #ffffff;
  --ink: #0f2a3d;
  --muted: #5f7280;
  --primary: #0b8f87;
  --primary-dark: #0a6f69;
  --accent: #ff8c42;
  --accent-soft: #ffe7d8;
  --border: #d4e5f2;
  --shadow: 0 12px 35px rgba(8, 54, 86, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--ink);
  background: #eceeef;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  z-index: -1;
  opacity: 0.35;
}

.shape-1 {
  width: 360px;
  height: 360px;
  background: #c8f0ea;
  top: -80px;
  left: -80px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: #ffd4b4;
  bottom: -90px;
  right: -90px;
}

.hero {
  padding: 14px 18px 6px;
}

.hero__content {
  max-width: 1180px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e3e4e6;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 17px 17px 14px;
  animation: floatIn 0.8s ease;
  position: relative;
}

.tag {
  display: inline-block;
  margin: 0;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--primary-dark);
  background: #d8f4f1;
  padding: 4px 12px;
  border-radius: 999px;
}

h1 {
  margin: 11px 0 4px;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  text-align: center;
}

.subtitle {
  margin: 0 auto;
  color: var(--muted);
  max-width: 490px;
  font-size: 0.9rem;
  text-align: center;
}

.hero-logo-slot {
  margin: 0 auto;
  text-align: center;
}

.hero-logo {
  width: min(304px, 60vw);
  height: auto;
  display: block;
  margin: 0 auto;
}

.brand-sheet {
  max-width: 343px;
  margin: 0 auto;
  text-align: center;
  padding: 4px 4px 1px;
}

.brand-title {
  margin: 7px 0 0;
  font-size:0.75rem;
  color: #000000;
  font-weight: 700;
}

.operators {
  margin-top: 7px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.operator {
  width: 63px;
  height: 45px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #d7dde1;
  padding: 5px;
}

.operator-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.brand-divider {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.brand-divider .line {
  width: 38%;
  height: 2px;
  background: #6f6476;
  border-radius: 3px;
}

.brand-divider .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.brand-divider .dot-blue {
  background: #2196d3;
}

.brand-divider .dot-green {
  background: #a6ca3f;
}

.brand-divider .dot-red {
  background: #f5282e;
}

.brand-offer {
  margin: 6px 0 0;
  font-size: clamp(0.88rem, 1.68vw, 1.23rem);
  font-weight: 700;
  color: #8a9b2f;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 11px;
}

.btn {
  border: 0;
  border-radius: 9px;
  padding: 7px 11px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 143, 135, 0.35);
}

.btn-secondary {
  background: var(--accent-soft);
  color: #7b4208;
}

.btn-manage {
  background: #e7eff8;
  color: #1c4670;
  display: none;
}

.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.db-status {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.db-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.18);
}

.db-status__dot--ok {
  background: #18a34a;
  box-shadow: 0 0 0 4px rgba(24, 163, 74, 0.2);
}

.db-status__dot--error {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
}

.db-status__dot--pending {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.db-status__text {
  display: none;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px 26px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.slider-panel {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
  animation: floatIn 0.8s ease;
}

.slider-head h2 {
  margin: 4px 0 2px;
  font-size: 1.1rem;
}

.slider-head p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.slider {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #cfe4f2;
  background: #f0f8ff;
}

.slides {
  position: relative;
  min-height: 420px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.55s ease, transform 1s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(10, 40, 59, 0.58);
  color: #ffffff;
  font-size: 1.35rem;
  cursor: pointer;
  z-index: 2;
}

.slider-btn:hover {
  background: rgba(10, 40, 59, 0.78);
}

.slider-btn.prev {
  right: 12px;
}

.slider-btn.next {
  left: 12px;
}

.slider-dots {
  position: absolute;
  inset-inline: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.62);
}

.dot.active {
  width: 24px;
  background: #ffffff;
}

.map-panel,
.branches-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
  animation: floatIn 0.85s ease;
}

.map-panel h2,
.branches-panel h2 {
  margin: 4px 0 12px;
  font-size: 1.1rem;
}

#map {
  height: 510px;
  border-radius: 12px;
  border: 1px solid #cfe4f2;
}

.branches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.branches-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-show-all {
  background: #fdecea;
  color: #9b1c1c;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.nearest-label {
  font-size: 0.86rem;
  color: var(--primary-dark);
  background: #e1f8f5;
  padding: 4px 10px;
  border-radius: 999px;
}

.branches-list {
  display: grid;
  gap: 10px;
  max-height: 510px;
  overflow: auto;
  padding-inline-end: 4px;
}

.branches-list--nearest-mode {
  gap: 12px;
}

.branch-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.branch-card.nearest {
  border-color: #54c9bd;
  box-shadow: 0 8px 20px rgba(11, 143, 135, 0.16);
}

.branches-list--nearest-mode .branch-card {
  border-color: rgba(84, 201, 189, 0.35);
  background: linear-gradient(180deg, #f6fffe 0%, #ecfbf8 100%);
}

.branches-list--nearest-mode .branch-card--nearest-view {
  border-color: #54c9bd;
  box-shadow: 0 10px 24px rgba(11, 143, 135, 0.15);
  transform: translateY(-1px);
}

.branches-list--nearest-mode .branch-card--nearest-view .branch-name {
  color: #0b6b66;
}

.branch-name {
  margin: 0 0 4px;
  font-size: 1rem;
}

.branch-meta {
  margin: 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.branch-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.link-btn {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.link-map {
  background: #eaf4ff;
  color: #114b82;
}

.link-dir {
  background: #fff0e3;
  color: #8b4a07;
}

.footer {
  text-align: center;
  padding: 10px 16px 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .slider {
    aspect-ratio: 16 / 8;
    max-height: 340px;
  }

  .slides {
    min-height: 0;
    height: 100%;
  }

  .slide,
  .slide a {
    width: 100%;
    height: 100%;
  }

  .slide img {
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 640px) {
  .slider {
    aspect-ratio: 16 / 9;
    max-height: 250px;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero__content {
    border-radius: 14px;
    padding: 12px;
  }

  .operator {
    width: 72px;
    height: 54px;
    padding: 5px;
  }

  .brand-divider .line {
    width: 30%;
  }

  .brand-divider .dot {
    width: 10px;
    height: 10px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .slides {
    min-height: 0;
    height: 100%;
  }

  .slide img {
    min-height: 0;
    max-height: none;
  }

  .slider-btn {
    width: 36px;
    height: 36px;
  }

  #map {
    height: 380px;
  }

  .branches-list {
    max-height: 420px;
  }
}
