:root {
  --ink: #21103d;
  --berry: #9f123f;
  --berry-dark: #7d0e34;
  --rose: #f8e9ee;
  --ivory: #fffaf6;
  --sage: #6f8b7a;
  --gold: #c29a5b;
  --line: rgba(33, 16, 61, 0.14);
  --shadow: 0 24px 70px rgba(55, 22, 43, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Tajawal", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(194, 154, 91, 0.16), transparent 28rem),
    linear-gradient(135deg, #fffaf6 0%, #f8e9ee 54%, #edf3eb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 36px 0 24px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: stretch;
}

.brand-panel,
.contact-panel,
.mini-directory {
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-panel {
  min-height: 620px;
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 246, 0.72)),
    repeating-linear-gradient(135deg, rgba(159, 18, 63, 0.055) 0 1px, transparent 1px 18px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.logo {
  width: min(100%, 350px);
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 18px 26px rgba(159, 18, 63, 0.13));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--berry);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.95;
  color: var(--ink);
}

.tagline {
  width: min(420px, 100%);
  margin: 0 auto;
  color: rgba(33, 16, 61, 0.72);
  font-size: 1.2rem;
  line-height: 1.8;
}

.contact-panel {
  padding: 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.66);
}

.branch-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.branch-tab {
  min-height: 52px;
  border: 0;
  border-radius: 15px;
  color: rgba(33, 16, 61, 0.68);
  background: transparent;
  font: 800 1rem/1 "Tajawal", Arial, sans-serif;
  cursor: pointer;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.branch-tab:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.branch-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--berry), var(--ink));
  box-shadow: 0 12px 26px rgba(159, 18, 63, 0.25);
}

.sub-branch-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}

.sub-branch-switch[hidden] {
  display: none;
}

.sub-branch-tab {
  min-height: 44px;
  border: 1px solid rgba(159, 18, 63, 0.18);
  border-radius: 14px;
  color: rgba(33, 16, 61, 0.72);
  background: rgba(255, 255, 255, 0.68);
  font: 800 0.94rem/1 "Tajawal", Arial, sans-serif;
  cursor: pointer;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.sub-branch-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(159, 18, 63, 0.36);
}

.sub-branch-tab.is-active {
  color: var(--berry);
  border-color: rgba(159, 18, 63, 0.34);
  background: rgba(248, 233, 238, 0.86);
}

.branch-card {
  min-height: 520px;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 250, 246, 0.96), rgba(255, 255, 255, 0.86)),
    linear-gradient(45deg, rgba(111, 139, 122, 0.09), transparent);
  border: 1px solid rgba(33, 16, 61, 0.08);
}

.branch-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.branch-badge,
.branch-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.9rem;
  font-weight: 800;
}

.branch-badge {
  color: #fff;
  background: var(--berry);
}

.branch-status {
  color: var(--sage);
  background: rgba(111, 139, 122, 0.13);
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
}

#branchDescription {
  max-width: 560px;
  margin-bottom: 26px;
  color: rgba(33, 16, 61, 0.72);
  font-size: 1.13rem;
  line-height: 1.9;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  gap: 10px;
  margin-bottom: 26px;
}

.action-btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 18, 63, 0.35);
  box-shadow: 0 14px 28px rgba(33, 16, 61, 0.11);
}

.action-btn.primary {
  color: #fff;
  border-color: var(--berry);
  background: linear-gradient(135deg, var(--berry), var(--berry-dark));
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.contact-list div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.contact-list dt {
  color: var(--berry);
  font-weight: 800;
}

.contact-list dd {
  margin: 0;
  color: rgba(33, 16, 61, 0.78);
  line-height: 1.7;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-row a {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--berry);
  border: 1px solid rgba(159, 18, 63, 0.22);
  background: rgba(255, 255, 255, 0.8);
  font-size: 1.35rem;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.social-row a:hover {
  transform: translateY(-2px);
  color: #fff;
  background: var(--ink);
}

.social-row .instagram:hover {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.social-row .facebook:hover {
  background: #1877f2;
}

.social-row .tiktok:hover {
  background: #111;
}

.social-row .telegram:hover {
  background: #229ed9;
}

.mini-directory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--line);
}

.mini-directory div {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.68);
}

.mini-directory strong {
  display: block;
  margin-bottom: 4px;
  color: var(--berry);
}

.mini-directory span {
  color: rgba(33, 16, 61, 0.7);
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 22px, 560px);
    padding-top: 14px;
  }

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

  .brand-panel {
    min-height: auto;
    padding: 24px 20px 28px;
    border-radius: 24px;
  }

  .logo {
    width: min(76%, 260px);
  }

  .tagline {
    font-size: 1rem;
  }

  .contact-panel {
    padding: 12px;
    border-radius: 24px;
  }

  .branch-card {
    min-height: auto;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .contact-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 460px) {
  .page-shell {
    width: min(100% - 14px, 420px);
  }

  .branch-switch,
  .sub-branch-switch,
  .mini-directory {
    grid-template-columns: 1fr;
  }

  .branch-topline {
    align-items: flex-start;
  }

  .branch-badge,
  .branch-status {
    width: 100%;
    justify-content: center;
  }
}
