/* ─────────────────────────────────────────────────────────────────────────────
   Deela City Page Styles v1.4
   Upload to: /wp-content/themes/astra/city-page.css
───────────────────────────────────────────────────────────────────────────── */

/* ── Google Font: Poppins ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');

/* ── Astra theme overrides ───────────────────────────────────────────────────
   Force full-width layout by stripping all Astra container constraints.
   These selectors cover every wrapper Astra uses around page content.
── */
body.city-page-template #content,
body.city-page-template #primary,
body.city-page-template .site-content,
body.city-page-template .content-area,
body.city-page-template .ast-container,
body.city-page-template .entry-content,
body.city-page-template article.page,
body.city-page-template .post-page-content {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

body.city-page-template .entry-header {
  display: none !important;
}

body.city-page-template .city-page {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── Tokens ── */
:root {
  --deela-green:      #4caf72;
  --deela-green-dark: #3a9460;
  --deela-text:       #1a1a1a;
  --deela-muted:      #666;
  --deela-border:     #e8e8e8;
  --deela-bg:         #fafafa;
  --deela-white:      #ffffff;
  --deela-radius:     12px;
  --deela-max-width:  1100px;
}

/* ── Base ── */
.city-page {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--deela-text);
  background: var(--deela-white);
}

/* ── Hero ── */
.city-page__hero {
  background: var(--deela-bg);
  border-bottom: 1px solid var(--deela-border);
  padding: 56px 24px 32px;
  text-align: center;
}

.city-page__hero-inner {
  max-width: var(--deela-max-width);
  margin: 0 auto;
}

.city-page__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deela-green);
  margin: 0 0 12px;
}

.city-page__h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--deela-text);
}

.city-page__intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--deela-muted);
  max-width: 600px;
  margin: 0 auto 24px;
}

.city-page__badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.city-page__badge img {
  display: block;
  height: 42px;
  width: auto;
}

.city-page__count {
  max-width: var(--deela-max-width);
  margin: 24px auto 0;
  font-size: 14px;
  color: var(--deela-muted);
  text-align: center;
}

.city-page__count strong {
  color: var(--deela-text);
  font-weight: 700;
}

/* ── Listings grid ── */
.city-page__listings {
  padding: 40px 24px;
  max-width: var(--deela-max-width);
  margin: 0 auto;
}

.city-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.city-page__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--deela-muted);
  font-size: 15px;
  padding: 48px 0;
}

/* ── Card ── */
.city-page__card {
  background: var(--deela-white);
  border: 1px solid var(--deela-border);
  border-radius: var(--deela-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.city-page__card:hover {
  background: #f5f0ff;
  box-shadow: 0 6px 24px rgba(100, 60, 180, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
  border-color: #c9b8f0;
}

/* ── Reserved card ── */
.city-page__card--reserved {
  opacity: 0.65;
  pointer-events: none;
}

/* ── Delivered card ── */
.city-page__card--delivered {
  opacity: 0.45;
  pointer-events: none;
}

.city-page__card-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--deela-bg);
  position: relative;
}

.city-page__reserved-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #f57c00;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.city-page__delivered-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #757575;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.city-page__card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.city-page__card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

/* Card title, no clamp, full text visible */
.city-page__card-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: var(--deela-text);
  word-break: break-word;
}

/* Time of posting, bold italic, same font */
.city-page__card-time {
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: var(--deela-muted);
  margin: 0;
}

/* City label on Sverige page */
.city-page__card-area {
  margin: 0;
  font-size: 12px;
}

.city-page__card-area--city {
  margin: 0;
}

/* Background pill, hugs only the city name text */
.city-page__card-area-badge {
  display: inline;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  color: var(--deela-green-dark);
  background: #e8f5ee;
  padding: 2px 8px;
  border-radius: 4px;
}

.city-page__card-desc {
  font-size: 12px;
  color: var(--deela-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Pagination ── */
.city-page__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 24px 40px;
}

.city-page__page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--deela-white);
  color: var(--deela-green);
  border: 2px solid var(--deela-green);
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.city-page__page-btn:hover {
  background: var(--deela-green);
  color: var(--deela-white);
}

.city-page__page-info {
  font-size: 13px;
  color: var(--deela-muted);
  min-width: 48px;
  text-align: center;
}

/* ── CTA banner ── */
/* ── CTA banner ── */
.city-page__cta-banner {
  background: linear-gradient(135deg, #1e4a2d 0%, #2d6b45 55%, #4caf72 100%);
  padding: 80px 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.city-page__cta-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.city-page__cta-circle--tl {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  width: 500px;
  height: 500px;
  top: -180px;
  left: -160px;
}

.city-page__cta-circle--tl::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  width: 320px;
  height: 320px;
  top: 90px;
  left: 90px;
}

.city-page__cta-circle--tl::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  width: 160px;
  height: 160px;
  top: 170px;
  left: 170px;
}

.city-page__cta-circle--br {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  width: 460px;
  height: 460px;
  bottom: -190px;
  right: -140px;
}

.city-page__cta-circle--br::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  width: 280px;
  height: 280px;
  top: 90px;
  left: 90px;
}

/* Animated exchange arcs */
@keyframes deela-flow-right {
  from { stroke-dashoffset: 40; }
  to   { stroke-dashoffset: 0; }
}
@keyframes deela-flow-left {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 40; }
}

.city-page__cta-arc-right { animation: deela-flow-right 2.4s linear infinite; }
.city-page__cta-arc-left  { animation: deela-flow-left  2.4s linear infinite; }

.city-page__cta-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.city-page__cta-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin: 0 0 18px;
}

.city-page__cta-heading {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.1;
}

.city-page__cta-text {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 36px;
  line-height: 1.7;
}

.city-page__cta-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.city-page__cta-badge-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 0;
  text-decoration: none;
  transition: opacity 0.15s ease;
  width: 160px;
  height: 56px;
  box-sizing: border-box;
  overflow: hidden;
}

.city-page__cta-badge-link:hover {
  opacity: 0.88;
}

.city-page__cta-badge-link img {
  display: block;
  width: 136px;
  height: 40px;
  object-fit: contain;
}

.city-page__cta-trust {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.city-page__cta-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.city-page__cta-trust-item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  flex-shrink: 0;
}

/* ── Related cities ── */
.city-page__related {
  padding: 32px 24px;
  max-width: var(--deela-max-width);
  margin: 0 auto;
}

.city-page__related-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deela-muted);
  margin: 0 0 12px;
  text-align: center;
}

.city-page__related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.city-page__related-list li::after {
  content: "·";
  color: #ccc;
  padding: 0 8px;
}

.city-page__related-list li:last-child::after {
  content: "";
}

.city-page__related-list a {
  font-size: 13px;
  color: var(--deela-muted);
  text-decoration: none;
  white-space: nowrap;
}

.city-page__related-list a:hover {
  color: var(--deela-green);
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .city-page__hero {
    padding: 40px 16px 24px;
  }

  .city-page__listings {
    padding: 24px 16px;
  }

  .city-page__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .city-page__cta-banner {
    padding: 40px 16px;
  }

  .city-page__pagination {
    gap: 10px;
  }

  .city-page__page-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* ── Platform picker popup ── */
.deela-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.deela-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}

.deela-popup__box {
  position: relative;
  z-index: 1;
  background: var(--deela-white);
  border-radius: 16px;
  padding: 32px 28px 28px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.deela-popup__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--deela-text);
  margin: 0 0 6px;
}

.deela-popup__sub {
  font-size: 14px;
  color: var(--deela-muted);
  margin: 0 0 24px;
}

.deela-popup__btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.deela-popup__badge-link {
  display: inline-block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.deela-popup__badge-link:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.deela-popup__badge-link img {
  display: block;
  height: 48px;
  width: auto;
}

.deela-popup__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--deela-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.deela-popup__close:hover {
  color: var(--deela-text);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .city-page__card {
    transition: none;
  }
  .city-page__page-btn {
    transition: none;
  }
}

/* ── FAQ section ── */
.city-page__faq {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 56px;
  border-top: 1px solid #e8e8e8;
}

.city-page__faq-inner {
  width: 100%;
}

.city-page__faq-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 28px;
  font-family: 'Poppins', sans-serif;
}

.city-page__faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.city-page__faq-item {
  border-bottom: 1px solid #e8e8e8;
}

.city-page__faq-item:first-child {
  border-top: 1px solid #e8e8e8;
}

.city-page__faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 40px 18px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  position: relative;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.city-page__faq-q:hover {
  color: #1a1a1a;
  background: none;
  outline: none;
}

.city-page__faq-q:focus {
  outline: none;
}

.city-page__faq-q::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 300;
  color: #4caf72;
  transition: transform 0.2s ease;
  line-height: 1;
}

.city-page__faq-q[aria-expanded="true"]::after {
  content: '-';
}

.city-page__faq-a {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  padding: 0 40px 18px 0;
}

@media (max-width: 600px) {
  .city-page__faq {
    padding: 32px 16px 40px;
  }

  .city-page__faq-title {
    font-size: 18px;
  }
}
