/*
Theme Name: مؤشر العقارات الخليجي
Theme URI: https://aqarat-index.com
Author: Aqarat Index
Description: قالب متخصص لعرض بيانات العقارات الخليجية بشكل احترافي
Version: 2.1.0
Text Domain: aqarat-index
Tags: rtl-language, custom-colors, full-width-template, threaded-comments
*/

/* ======================================================
   DESIGN TOKENS — Gulf Real Estate Premium Theme
   Aesthetic: Editorial luxury. Think Bloomberg meets
   Arabic calligraphy. Dark navy + warm gold + crisp data.
====================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

:root {
  /* Brand Palette */
  --navy:      #0B1426;
  --navy-80:   #1A2640;
  --navy-60:   #243352;
  --navy-40:   #2E4068;
  --gold:      #C9A84C;
  --gold-light:#E8C97A;
  --gold-pale: #F5E9C8;
  --ivory:     #FAF8F3;
  --ivory-2:   #F0EDE4;
  --white:     #FFFFFF;

  /* Semantic */
  --surface:   #FFFFFF;
  --surface-2: #F8F6F1;
  --surface-3: #F0EDE4;
  --border:    rgba(11,20,38,0.10);
  --border-2:  rgba(11,20,38,0.18);
  --text-1:    #0B1426;
  --text-2:    #3A4660;
  --text-3:    #6B7A99;
  --text-4:    #9AA3B8;

  /* Status */
  --up:        #1A7C4F;
  --up-bg:     #E8F5EE;
  --down:      #B8290E;
  --down-bg:   #FBE9E6;
  --neutral:   #5A6A8A;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px;

  /* Typography */
  --font-arabic: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Layout */
  --container: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(11,20,38,0.06), 0 1px 2px rgba(11,20,38,0.04);
  --shadow-md: 0 4px 16px rgba(11,20,38,0.08), 0 1px 4px rgba(11,20,38,0.06);
  --shadow-lg: 0 12px 40px rgba(11,20,38,0.12), 0 2px 8px rgba(11,20,38,0.08);
  --shadow-gold: 0 4px 20px rgba(201,168,76,0.25);
}

/* ======================================================
   RESET & BASE
====================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-arabic);
  background: var(--ivory);
  color: var(--text-1);
  direction: rtl;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
/* Override WordPress block styles that force underlines */
.wp-block-post-content a,
.entry-content a,
.wp-element-button { text-decoration: none !important; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ======================================================
   TYPOGRAPHY SCALE
====================================================== */

.text-display {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  font-weight: 700;
}
.text-h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; }
.text-h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; line-height: 1.3; }
.text-h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.4; }
.text-h4 { font-size: 1rem; font-weight: 600; }
.text-body { font-size: 1rem; line-height: 1.75; }
.text-sm   { font-size: 0.875rem; line-height: 1.6; }
.text-xs   { font-size: 0.75rem; line-height: 1.5; }
.text-muted  { color: var(--text-3); }
.text-gold   { color: var(--gold); }
.text-up     { color: var(--up); }
.text-down   { color: var(--down); }
.font-mono { font-family: 'IBM Plex Mono', monospace; }

/* ======================================================
   LAYOUT
====================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
.container-sm { max-width: 860px; }
.container-lg { max-width: 1440px; }

.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-5); }
.col-span-3  { grid-column: span 3; }
.col-span-4  { grid-column: span 4; }
.col-span-6  { grid-column: span 6; }
.col-span-8  { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--sp-1); } .gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); } .gap-6 { gap: var(--sp-6); }
.flex-wrap { flex-wrap: wrap; }

/* ======================================================
   HEADER / NAVIGATION
====================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,20,38,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--sp-5);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.site-logo .logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--navy);
}
.site-logo .logo-text {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.site-logo .logo-sub {
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.main-nav a.active { color: var(--gold-light); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ======================================================
   HERO SECTION
====================================================== */

.hero {
  background: var(--navy);
  padding: var(--sp-9) 0 var(--sp-8);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(46,64,104,0.6) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Arabic calligraphy watermark */
.hero-bg-text {
  position: absolute;
  left: -2%;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(100px, 18vw, 220px);
  font-weight: 700;
  color: rgba(255,255,255,0.022);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--sp-8);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-5);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.02em;
}
.hero-title .accent { color: var(--gold); }

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: var(--sp-6);
  max-width: 520px;
}

.hero-stats-row {
  display: flex;
  gap: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat .label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}

/* Hero Search Card */
.hero-search-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  backdrop-filter: blur(20px);
}
.hero-search-card h3 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--sp-5);
}

.search-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.form-field select,
.form-field input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--white);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  direction: rtl;
}
.form-field select:focus,
.form-field input:focus {
  outline: none;
  border-color: var(--gold);
}
.form-field select option { background: var(--navy); color: var(--white); }

.btn-search {
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px;
  border-radius: var(--radius-md);
  transition: background 0.2s, transform 0.15s;
  letter-spacing: -0.01em;
}
.btn-search:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-search:active { transform: translateY(0); }

.quick-cities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.quick-city-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.quick-city-btn:hover {
  background: rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.3);
  color: var(--gold-light);
}

/* ======================================================
   CARDS - Price Data Cards
====================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: var(--sp-5); }
.card-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* City Price Card */
.city-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}
.city-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.city-card:hover .city-card-bar { width: 100%; }

.city-card-header {
  padding: var(--sp-5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.city-flag {
  width: 32px; height: 22px;
  border-radius: 3px;
  object-fit: cover;
}
.city-name-ar {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-1);
}
.city-name-en {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
}

.city-price-main {
  padding: 0 var(--sp-5) var(--sp-4);
}
.price-amount {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-unit {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 4px;
}
.price-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: var(--sp-2);
}
.price-change.up   { background: var(--up-bg);   color: var(--up); }
.price-change.down { background: var(--down-bg); color: var(--down); }

.city-card-details {
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.city-detail-item .dl { font-size: 0.7rem; color: var(--text-3); margin-bottom: 2px; }
.city-detail-item .dv { font-size: 0.9rem; font-weight: 600; color: var(--text-1); }

.city-card-bar {
  height: 3px;
  background: var(--gold);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 0 0 2px 2px;
}

/* ======================================================
   DATA TABLE
====================================================== */

.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: right;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 2px solid var(--border-2);
  white-space: nowrap;
  letter-spacing: 0.03em;
  background: var(--surface-2);
}
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table .td-price {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.data-table .td-rank {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
}

/* Inline mini sparkline */
.sparkline-cell { display: flex; align-items: center; gap: var(--sp-2); }
.sparkline { display: inline-block; }

/* ======================================================
   SECTION LABELS / DIVIDERS
====================================================== */

.section {
  padding: var(--sp-8) 0;
}
.section-alt {
  padding: var(--sp-8) 0;
  background: var(--surface-2);
}
.section-dark {
  padding: var(--sp-8) 0;
  background: var(--navy);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.section-label::before {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.section-heading {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.25;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.02em;
}
.section-heading.on-dark { color: var(--white); }

.section-sub {
  font-size: 1rem;
  color: var(--text-3);
  line-height: 1.7;
  max-width: 560px;
}
.section-sub.on-dark { color: rgba(255,255,255,0.5); }

/* ======================================================
   TABS / FILTERS
====================================================== */

.tabs {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--surface-3);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
}
.tab-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-3);
  transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  background: var(--surface);
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
}
.tab-btn.active { color: var(--navy); font-weight: 600; }

/* ======================================================
   BADGES
====================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-gold   { background: var(--gold-pale); color: #7A5C10; border: 1px solid rgba(201,168,76,0.3); }
.badge-up     { background: var(--up-bg);     color: var(--up); }
.badge-down   { background: var(--down-bg);   color: var(--down); }
.badge-neutral { background: var(--surface-3); color: var(--text-3); }
.badge-navy   { background: var(--navy); color: var(--white); }

/* ======================================================
   BUTTONS
====================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary   { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-60); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold      { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-outline   { background: transparent; border: 1.5px solid var(--border-2); color: var(--text-2); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: var(--surface-2); }
.btn-ghost     { background: transparent; color: var(--text-2); padding: 8px 14px; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text-1); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ======================================================
   COMPARE TABLE — Gulf Cities
====================================================== */

.compare-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}

.compare-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: all 0.2s;
}
.compare-card:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); }

.compare-card-top {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.city-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.compare-price-row {
  padding: var(--sp-3) var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.compare-price-row:last-child { border-bottom: none; }
.compare-price-label { font-size: 0.78rem; color: var(--text-3); }
.compare-price-val   { font-size: 0.95rem; font-weight: 700; color: var(--text-1); }

/* ======================================================
   CHART CONTAINER
====================================================== */

.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}
.chart-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  color: var(--text-4);
  font-size: 0.85rem;
}

/* ======================================================
   INDEX BANNER (Live data strip)
====================================================== */

.index-banner {
  background: var(--navy);
  padding: var(--sp-2) 0;
  overflow: hidden;
}
.index-banner-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: banner-scroll 40s linear infinite;
}
.index-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  border-right: 1px solid rgba(255,255,255,0.1);
}
.index-item .city { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.index-item .price { font-size: 0.85rem; font-weight: 700; color: var(--white); }
.index-item .chg { font-size: 0.72rem; }
.index-item .chg.up   { color: #4ADE80; }
.index-item .chg.down { color: #F87171; }
@keyframes banner-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* ======================================================
   METRIC CARDS (KPI row)
====================================================== */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.metric-card .mc-label {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-2);
}
.metric-card .mc-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.metric-card .mc-sub {
  font-size: 0.78rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric-card.gold-accent { border-top: 3px solid var(--gold); }

/* ======================================================
   FOOTER
====================================================== */

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: var(--sp-8) 0 var(--sp-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-7);
  margin-bottom: var(--sp-7);
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-brand-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: var(--sp-3);
  color: rgba(255,255,255,0.4);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}
.footer-gold-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-bottom: var(--sp-7);
}

/* ======================================================
   WIDGETS (Sidebar)
====================================================== */

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-5);
}
.widget-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.05em;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.widget-body { padding: var(--sp-4) var(--sp-5); }

/* ======================================================
   ADSENSE ZONES
====================================================== */

.ad-zone {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-size: 0.72rem;
}
.ad-zone-banner { min-height: 90px; }
.ad-zone-rect   { min-height: 250px; }
.ad-zone-sidebar { min-height: 600px; }

/* ======================================================
   LOADING / SKELETON
====================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text  { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 60%; }
.skeleton-card  { height: 200px; border-radius: var(--radius-lg); }

/* ======================================================
   SEARCH / FILTER BAR
====================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-6);
}
.filter-select {
  flex: 1;
  min-width: 140px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--text-1);
  direction: rtl;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
/* ─── Select options always readable (dark bg, dark text) ─── */
.filter-select option,
select option {
  background: #fff !important;
  color: #0B1426 !important;
}

/* ======================================================
   NOTIFICATION / TOAST
====================================================== */

.toast-container {
  position: fixed;
  bottom: var(--sp-5);
  left: var(--sp-5);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  border-right: 3px solid var(--gold);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-search-card { max-width: 480px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 68px 0 0;
    background: var(--navy);
    padding: var(--sp-5);
    z-index: 99;
    gap: var(--sp-2);
  }
  .main-nav.open a { padding: var(--sp-3) var(--sp-4); font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .hero { padding: var(--sp-7) 0; }
  .hero-stats-row { gap: var(--sp-5); }
  .grid-12 { grid-template-columns: 1fr; }
  .col-span-3,.col-span-4,.col-span-6,.col-span-8 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); text-align: center; }
  .compare-strip { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { gap: var(--sp-2); }
  .filter-select { min-width: 120px; }
  .section, .section-alt, .section-dark { padding: var(--sp-7) 0; }
}

@media (max-width: 480px) {
  .compare-strip { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .tabs { width: 100%; overflow-x: auto; }
}

/* ======================================================
   PRINT
====================================================== */

@media print {
  .site-header, .site-footer, .ad-zone, .index-banner { display: none; }
  .card, .city-card { break-inside: avoid; box-shadow: none; }
}

/* ======================================================
   RESPONSIVE — 2-col layout grids (city page, page, single, index)
   FIX #2, #12: sidebar grids collapse properly on mobile
====================================================== */

.city-layout-grid,
.page-layout-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 280px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .city-layout-grid,
  .page-layout-grid {
    grid-template-columns: 1fr;
  }
  .city-layout-grid > aside,
  .page-layout-grid > aside {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
  }
}

/* Article card image on mobile */
@media (max-width: 540px) {
  .entry-card-grid {
    grid-template-columns: 1fr !important;
  }
  .entry-card-grid > a:first-child {
    height: 180px;
  }
}

/* Utility: truncate long text */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fix: RTL-aware data table for cities grid */
.data-table [data-winner]  { font-weight: 600; color: var(--up); }
.data-table [data-loser]   { color: var(--text-3); }

/* AdSense zones — production styling */
.ad-zone ins { min-height: 50px; }
