/**
 * Branch / Office landing page (content type: offices, full view mode).
 * Loaded via khusheim/branch library from node--offices--full.html.twig.
 * Works for both LTR (en) and RTL (ar) — see the [dir="rtl"] block at the end.
 */

.branch-page {
  --branch-blue: #005495;
  --branch-blue-dark: #00377a;
  --branch-red: #a41e22;
  --branch-ink: #333;
  --branch-muted: #6d6e71;
  --branch-line: #e6e8ec;
  --branch-wa: #25d366;
  --branch-wa-dark: #128c7e;
  color: var(--branch-ink);
  margin: 0 0 40px;
}

/* Layout: info column + map column */
.branch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: stretch;
}

.branch-info,
.branch-map {
  flex: 1 1 380px;
  min-width: 0;
}

/* Info card */
.branch-card {
  background: #fff;
  border: 1px solid var(--branch-line);
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: 0 6px 24px rgba(0, 55, 122, 0.06);
  height: 100%;
}

.branch-card h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 20px;
  color: var(--branch-blue-dark);
  border-bottom: 3px solid var(--branch-red);
  padding-bottom: 12px;
  display: inline-block;
}

/* Detail rows */
.branch-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--branch-line);
}
.branch-detail:last-of-type { border-bottom: 0; }

.branch-detail .b-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 84, 149, 0.08);
  color: var(--branch-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.branch-detail .b-body { flex: 1 1 auto; min-width: 0; }

.branch-detail .b-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--branch-muted);
  margin-bottom: 2px;
}

.branch-detail .b-value,
.branch-detail .b-value a {
  font-size: 16px;
  color: var(--branch-ink);
  word-break: break-word;
  text-decoration: none;
}
.branch-detail .b-value a:hover { color: var(--branch-blue); text-decoration: underline; }

.branch-detail .b-value + .b-value { margin-top: 4px; }

/* Working hours list */
.branch-hours { margin: 4px 0 0; padding: 0; list-style: none; }
.branch-hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  padding: 3px 0;
}
.branch-hours .b-day { color: var(--branch-ink); }
.branch-hours .b-time { color: var(--branch-muted); white-space: nowrap; }
.branch-hours .b-closed { color: var(--branch-red); }

/* Action buttons */
.branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.branch-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  border: 0;
  cursor: pointer;
}
.branch-btn:hover { transform: translateY(-2px); text-decoration: none; }

.branch-btn svg { width: 20px; height: 20px; flex: 0 0 auto; fill: currentColor; }

.branch-btn--whatsapp { background: var(--branch-wa); color: #fff; }
.branch-btn--whatsapp:hover { background: var(--branch-wa-dark); color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .35); }

.branch-btn--directions { background: var(--branch-blue); color: #fff; }
.branch-btn--directions:hover { background: var(--branch-blue-dark); color: #fff; box-shadow: 0 8px 20px rgba(0, 84, 149, .3); }

/* Map */
.branch-map { display: flex; }
.branch-map-frame {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--branch-line);
  box-shadow: 0 6px 24px rgba(0, 55, 122, 0.06);
}
.branch-map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* About this branch: image + description */
.branch-about {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  margin: 0 0 34px;
}
.branch-about-media {
  flex: 1 1 320px;
  min-width: 0;
}
.branch-about-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 55, 122, 0.10);
}
.branch-about-text {
  flex: 1.4 1 360px;
  min-width: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--branch-ink);
}
.branch-about-text > *:first-child { margin-top: 0; }
.branch-about-text > *:last-child { margin-bottom: 0; }
.branch-about-text h2,
.branch-about-text h3 { color: var(--branch-blue-dark); }
/* No image -> description spans the full width */
.branch-about:not(.has-image) .branch-about-text { flex-basis: 100%; }

/* Responsive */
@media (max-width: 767px) {
  .branch-about { gap: 18px; margin-bottom: 26px; }
  .branch-about-media { flex-basis: 100%; }
  .branch-about-text { flex-basis: 100%; font-size: 15px; }
  .branch-card { padding: 22px 18px; border-radius: 10px; }
  .branch-card h2 { font-size: 19px; }
  .branch-actions { flex-direction: column; }
  .branch-btn { justify-content: center; width: 100%; }
  .branch-map-frame { min-height: 260px; }
}

/* RTL (Arabic) */
[dir="rtl"] .branch-card h2 { display: block; }
[dir="rtl"] .branch-detail .b-label { letter-spacing: 0; }
[dir="rtl"] .branch-hours li { direction: rtl; }
