/* =========================================================
   Design tokens — "Blueprint" theme
   Inspired by architectural drawings / site plans:
   deep blueprint blue, warm concrete, safety-tape amber accent
   ========================================================= */
:root {
  --ink: #1b2430;          /* near-black blueprint ink */
  --blueprint: #1e3a5f;     /* deep architectural blue */
  --blueprint-light: #2d5580;
  --concrete: #f2efe9;      /* warm off-white background */
  --concrete-dark: #e4ddd0;
  --amber: #e08e2f;         /* safety/hazard accent */
  --amber-dark: #c07420;
  --line: #d7d0c0;
  --white: #ffffff;
  --success: #2f7a4f;
  --danger: #b23b3b;
  --radius: 4px;
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--concrete);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--blueprint);
  margin: 0 0 .5em;
  line-height: 1.2;
}

a { color: var(--blueprint); text-decoration: none; }
a:hover { color: var(--amber-dark); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--blueprint);
  color: var(--white);
  border-bottom: 4px solid var(--amber);
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  position: relative;
}
.site-header .logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: .5px;
  white-space: nowrap;
}
.site-header .logo span { color: var(--amber); }
.site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.site-header nav a {
  color: var(--white);
  margin-left: 18px;
  font-size: .92rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  white-space: nowrap;
}
.site-header nav a:hover { border-bottom-color: var(--amber); color: var(--white); }
.lang-switch { margin-left: 18px; white-space: nowrap; }
.lang-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.7) !important;
  border: 1px solid rgba(255,255,255,.35);
  margin: 0 2px;
}
.lang-pill:hover { color: var(--white) !important; border-color: rgba(255,255,255,.7); }
.lang-pill, .lang-pill:hover { border-bottom: none !important; padding-bottom: 5px; }
.lang-pill.is-active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink) !important;
}
.nav-toggle-checkbox { display: none; }
.nav-toggle-label {
  display: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(30,58,95,.95), rgba(30,58,95,.85)),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.05) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,.05) 40px);
  color: var(--white);
  padding: 64px 0 56px;
  text-align: center;
}
.hero h1 { color: var(--white); font-size: 2.4rem; }
.hero p { max-width: 560px; margin: 0 auto 28px; color: #dbe4ee; }
.hero-search {
  display: flex;
  align-items: stretch;
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 1rem;
  min-width: 0;
}
.hero-search select {
  border: none;
  border-left: 1px solid var(--line);
  padding: 14px 12px;
  font-size: .95rem;
  background: var(--white);
  max-width: 160px;
}
body[dir="rtl"] .hero-search select {
  border-left: none;
  border-right: 1px solid var(--line);
}
.hero-search button {
  background: var(--amber);
  color: var(--ink);
  border: none;
  padding: 14px 26px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
.hero-search button:hover { background: var(--amber-dark); color: var(--white); }

/* ---------- Category cards ---------- */
.categories { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.section-header h2 { margin-bottom: 0; }
.section-header a {
  font-family: var(--font-mono);
  font-size: .8rem;
  text-transform: uppercase;
  color: var(--amber-dark);
  white-space: nowrap;
}
.section-header a:hover { color: var(--blueprint); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blueprint);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(27,36,48,.08);
  border-top-color: var(--amber);
}
.category-card .eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 1px;
  color: var(--amber-dark);
  text-transform: uppercase;
}
.category-card h3 { margin-top: 6px; }
.category-card p { color: #555; font-size: .92rem; }

/* ---------- Banner ad slot ---------- */
.banner-slot {
  margin: 32px 0;
  text-align: center;
}
.banner-slot img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.banner-slot .banner-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: #999;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- Listing cards ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.listing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.listing-card .thumb {
  height: 140px;
  background: var(--concrete-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-family: var(--font-mono);
  font-size: .8rem;
}
.listing-card .body { padding: 16px; }
.listing-card h4 { margin-bottom: 4px; }
.listing-card .city { color: #777; font-size: .85rem; margin-bottom: 10px; }
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  padding: 3px 8px;
  border-radius: 2px;
  text-transform: uppercase;
}
.badge-active { background: #e6f2ea; color: var(--success); }
.badge-pending { background: #fbeee0; color: var(--amber-dark); }
.badge-rejected { background: #fbe9e9; color: var(--danger); }

/* ---------- Forms ---------- */
.auth-box, .form-card {
  max-width: 480px;
  margin: 48px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blueprint);
  border-radius: var(--radius);
  padding: 32px;
}
.form-card.wide { max-width: 720px; }
form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin: 14px 0 4px;
  color: var(--ink);
}
form input, form select, form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font-body);
}
form textarea { min-height: 100px; }
form button, .btn {
  display: inline-block;
  margin-top: 20px;
  background: var(--blueprint);
  color: var(--white);
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
form button:hover, .btn:hover { background: var(--blueprint-light); color: var(--white); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: var(--amber-dark); color: var(--white); }
.btn-danger { background: var(--danger); }
.btn-small { padding: 6px 12px; font-size: .8rem; margin-top: 0; }
.error { color: var(--danger); background: #fbe9e9; padding: 10px 14px; border-radius: var(--radius); }
.success-msg { color: var(--success); background: #e6f2ea; padding: 10px 14px; border-radius: var(--radius); }

/* ---------- Dashboard / Admin tables ---------- */
.dashboard-nav {
  background: var(--ink);
}
.dashboard-nav .container { display: flex; gap: 4px; padding: 0; }
.dashboard-nav a {
  color: #cfd6dd;
  padding: 14px 16px;
  font-size: .9rem;
  border-bottom: 3px solid transparent;
}
.dashboard-nav a:hover, .dashboard-nav a.active {
  color: var(--white);
  border-bottom-color: var(--amber);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  margin-top: 16px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
th { font-family: var(--font-mono); text-transform: uppercase; font-size: .72rem; color: #777; }
.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin: 20px 0; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat-card .num { font-family: var(--font-display); font-size: 1.8rem; color: var(--blueprint); }
.stat-card .label { font-size: .8rem; color: #777; text-transform: uppercase; font-family: var(--font-mono); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #9aa5b1;
  padding: 32px 0;
  margin-top: 48px;
  text-align: center;
  font-size: .85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .category-grid, .listing-grid { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle-label { display: block; }
  .site-header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 14px;
  }
  .nav-toggle-checkbox:checked ~ nav {
    display: flex;
  }
  .site-header nav a {
    margin-left: 0;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }
  .lang-switch { margin-left: 0; padding: 10px 0; }
  .header-inner { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .category-grid, .listing-grid, .stat-cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-search {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .hero-search input {
    min-width: 0;
    flex: 1 1 auto;
    font-size: .82rem;
    padding: 12px 8px;
  }
  .hero-search select {
    max-width: 78px;
    font-size: .72rem;
    padding: 12px 4px;
  }
  .hero-search button {
    width: auto;
    flex-shrink: 0;
    padding: 12px 14px;
    font-size: .82rem;
  }
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------- Gallery (listing item photos) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.gallery-grid .no-photos {
  grid-column: 1 / -1;
  color: #999;
  font-family: var(--font-mono);
  font-size: .85rem;
}
.contact-box {
  background: var(--concrete);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 20px;
}
.image-upload-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.image-upload-preview img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------- Pricing page ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 32px 0 60px;
  align-items: stretch;
}
.pricing-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.pricing-card.is-featured {
  border: 2px solid var(--amber);
  box-shadow: 0 10px 30px rgba(224,142,47,.15);
  transform: translateY(-6px);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
}
.pricing-desc { color: #777; font-size: .88rem; margin-bottom: 16px; }
.pricing-amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blueprint);
  margin-bottom: 20px;
}
.pricing-currency { font-size: 1.2rem; }
.pricing-period { display: block; font-family: var(--font-body); font-size: .8rem; color: #888; font-weight: 400; }
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  flex: 1;
}
body[dir="rtl"] .pricing-features { text-align: right; }
.pricing-features li {
  padding: 6px 0;
  font-size: .92rem;
  color: #444;
  border-bottom: 1px solid var(--concrete-dark);
}
.pricing-features li:last-child { border-bottom: none; }

/* ---------- Lightbox (click-to-zoom) ---------- */
.zoomable { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,18,22,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  padding: 24px;
  animation: lightbox-fade .15s ease;
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-overlay img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
}
