/*
 * Cyprus Atlas — front-end styles.
 *
 * Written logical-property-first (inline-start/end rather than left/right) so
 * the same stylesheet serves Hebrew RTL and Latin/Greek LTR without a separate
 * -rtl.css build. Every horizontal value below is direction-aware.
 */

.atlas-page {
  --atlas-fg: #1c2833;
  --atlas-muted: #5d6d7e;
  --atlas-line: #e3e8ee;
  --atlas-accent: #16a085;
  --atlas-bg-soft: #f7f9fb;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
  padding-block: 24px 48px;
  color: var(--atlas-fg);
  line-height: 1.65;
}

.atlas-rtl { direction: rtl; }

/* Hebrew needs a slightly larger size and looser leading to match Latin. */
.atlas-rtl .atlas-h1,
.atlas-rtl .atlas-lede { line-height: 1.75; }

.atlas-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 12px;
  list-style: none;
  font-size: 14px;
  color: var(--atlas-muted);
}
.atlas-breadcrumbs li + li::before {
  content: "›";
  margin-inline-end: 6px;
  color: var(--atlas-line);
}
.atlas-rtl .atlas-breadcrumbs li + li::before { content: "‹"; }

.atlas-h1 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 8px; }
.atlas-lede { font-size: 18px; color: var(--atlas-muted); margin: 0 0 24px; }

.atlas-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 20px; }
.atlas-stat {
  flex: 1 1 120px;
  padding: 14px 16px;
  background: var(--atlas-bg-soft, #f7f9fb);
  border: 1px solid var(--atlas-line, #e3e8ee);
  border-radius: 10px;
  text-align: center;
}
.atlas-stat strong { display: block; font-size: 24px; }
.atlas-stat span { font-size: 13px; color: var(--atlas-muted, #5d6d7e); }
.atlas-stat-total { background: var(--atlas-accent, #16a085); color: #fff; border-color: transparent; }
.atlas-stat-total span { color: rgba(255,255,255,.85); }

.atlas-map-wrap { margin-block: 24px; }
.atlas-map {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  background: var(--atlas-bg-soft);
}
.atlas-attribution { font-size: 12px; color: var(--atlas-muted, #5d6d7e); margin-block-start: 6px; }

.atlas-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}
.atlas-category-grid a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}
.atlas-category-grid a:hover { border-color: var(--atlas-accent); background: var(--atlas-bg-soft); }
.atlas-cat-count { font-variant-numeric: tabular-nums; color: var(--atlas-muted); font-size: 14px; }

.atlas-result-list, .atlas-street-list, .atlas-nearby, .atlas-list { padding-inline-start: 0; list-style: none; }
.atlas-street-list { columns: 3 200px; column-gap: 24px; }
.atlas-street-list li { break-inside: avoid; }

.atlas-result { padding-block: 14px; border-block-end: 1px solid var(--atlas-line); }
.atlas-result h3 { margin: 0 0 4px; font-size: 18px; }
.atlas-address, .atlas-phone, .atlas-hours { margin: 2px 0; font-size: 14px; color: var(--atlas-muted); }

.atlas-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin-block: 20px; }
.atlas-facts dt { font-weight: 600; color: var(--atlas-muted); }
.atlas-facts dd { margin: 0; }

.atlas-inline-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.atlas-inline-links a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--atlas-line);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  color: inherit;
}

.atlas-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.atlas-gallery img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; }
.atlas-gallery figure { margin: 0; }
.atlas-gallery figcaption { font-size: 12px; color: var(--atlas-muted); }

.atlas-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 20px; }
.atlas-pagination a { padding: 6px 11px; border: 1px solid var(--atlas-line); border-radius: 6px; text-decoration: none; color: inherit; }
.atlas-pagination a.is-current { background: var(--atlas-accent); color: #fff; border-color: transparent; }

.atlas-empty { padding: 24px; text-align: center; color: var(--atlas-muted); background: var(--atlas-bg-soft); border-radius: 10px; }

.atlas-faq { margin-block: 28px; }
.atlas-faq-item {
  border: 1px solid var(--atlas-line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-block-end: 8px;
  background: var(--atlas-bg-soft);
}
.atlas-faq-item summary { font-weight: 600; cursor: pointer; }
.atlas-faq-item p { margin: 8px 0 0; }

.atlas-updated { font-size: 13px; color: var(--atlas-muted); margin-block-start: 28px; }

.atlas-editor-note {
  margin-block-start: 32px;
  padding: 14px 16px;
  border: 1px dashed #c39b3a;
  border-radius: 10px;
  background: #fffaf0;
  font-size: 14px;
}
.atlas-editor-note h3 { margin: 0 0 6px; font-size: 15px; }

/* Map controls */
.atlas-ctrl {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-inline-size: calc(100% - 20px);
}
.atlas-ctrl input, .atlas-ctrl select {
  padding: 7px 10px;
  border: 1px solid var(--atlas-line, #e3e8ee);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.atlas-3d-btn {
  position: absolute;
  inset-block-end: 28px;
  inset-inline-start: 10px;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid var(--atlas-line, #e3e8ee);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.atlas-3d-btn[aria-pressed="true"] { background: var(--atlas-accent, #16a085); color: #fff; border-color: transparent; }

.atlas-cluster {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--atlas-accent, #16a085); color: #fff;
  font-weight: 600; font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  cursor: pointer; border: 2px solid #fff;
}
.atlas-pin {
  inline-size: 12px; block-size: 12px; border-radius: 50%;
  background: #e4572e; border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.maplibregl-popup-content { font-size: 14px; border-radius: 10px; }
.atlas-rtl .maplibregl-popup-content { direction: rtl; text-align: right; }

@media (prefers-color-scheme: dark) {
  .atlas-page { --atlas-fg:#e8eef4; --atlas-muted:#9aa9b8; --atlas-line:#2b3743; --atlas-bg-soft:#151c23; }
  .atlas-editor-note { background:#241f14; }
  .atlas-ctrl input, .atlas-ctrl select { background:#1b232b; color:#e8eef4; }
}

.atlas-hub-intro { font-size: 17px; max-inline-size: 72ch; }
.atlas-hub-intro p:first-child { font-size: 18px; }
.atlas-hub-body { max-inline-size: 72ch; border-inline-start: 3px solid var(--atlas-accent, #16a085); padding-inline-start: 16px; margin-block: 24px; }

/* ---------------------------------------------------------------------------
   Home page: pillars, hub grid, provenance.

   The hub list is the site's internal link graph made visible, so it has to
   stay readable at ~70 links. Multi-column with a right-aligned count keeps it
   scannable instead of turning into a wall; `columns` rather than grid so the
   list reflows to one column on a phone without a media query.
   --------------------------------------------------------------------------- */
.atlas-home-intro { margin-block-end: 24px; }

.atlas-pillars { list-style: none; padding-inline-start: 0; margin-block: 12px 28px; }
.atlas-pillars li {
  padding-block: 7px;
  border-block-end: 1px solid var(--atlas-border, #e6e9ec);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.atlas-pillars li a { text-decoration: none; font-weight: 500; }
.atlas-pillars li a:hover { text-decoration: underline; }

.atlas-count {
  margin-inline-start: auto;
  font-size: 13px;
  color: var(--atlas-muted, #5d6d7e);
  font-variant-numeric: tabular-nums;
}

.atlas-cols { columns: 3 220px; column-gap: 32px; }
.atlas-cols li { break-inside: avoid; }

.atlas-provenance {
  font-size: 13.5px;
  color: var(--atlas-muted, #5d6d7e);
  border-inline-start: 3px solid var(--atlas-border, #e6e9ec);
  padding-inline-start: 12px;
  margin-block: 16px 24px;
}

@media (prefers-color-scheme: dark) {
  .atlas-pillars li { border-block-end-color: #333a40; }
  .atlas-provenance { border-inline-start-color: #333a40; }
}
