/* ==========================================================================
   Wanderlust 100 - World's Top 100 Travel Destinations
   Modern, Ultra-responsive, High-Performance Stylesheet
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Cambria", serif;
  
  /* Primary Theme Palette */
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  
  /* Neutral Palette (Light Mode) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.12), 0 8px 10px -6px rgba(0,0,0,0.08);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1280px;
}

[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #131d35;
  --bg-elevated: #1e293b;
  --border: #1e293b;
  --border-light: #334155;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
  --shadow-hover: 0 20px 30px rgba(0,0,0,0.6);
}

/* RTL Support for Arabic */
[dir="rtl"] {
  text-align: right;
  direction: rtl;
}

/* Base resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, select, input {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-logo span.highlight {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-icon {
  font-size: 1.5rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Selector Dropdown */
.lang-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 0.45rem 2rem 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

[dir="rtl"] .lang-select {
  padding: 0.45rem 0.85rem 0.45rem 2rem;
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--primary);
  outline: none;
}

.lang-select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 0.85rem;
  font-size: 0.8rem;
  pointer-events: none;
  color: var(--text-muted);
}

[dir="rtl"] .lang-select-wrapper::after {
  right: auto;
  left: 0.85rem;
}

/* Theme Toggle Button */
.btn-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-icon:hover {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
  border-bottom: 1px solid var(--border-light);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .hero-badge {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

/* Search and Filters Bar */
.search-filter-box {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-surface);
  padding: 0.85rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
}

.search-input-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.chip-btn {
  white-space: nowrap;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Stats Counter */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* AdSense Placement Slots */
.ad-slot-container {
  margin: 2.5rem auto;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  max-width: var(--max-w);
  overflow: hidden;
}

.ad-label {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: block;
}

.ad-responsive {
  display: block;
  min-height: 90px;
  width: 100%;
}

/* Destinations Grid */
.destinations-section {
  padding: 3rem 0;
  flex: 1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.results-count {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Destination Card */
.dest-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.dest-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(2, 132, 199, 0.4);
}

.dest-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated);
}

.dest-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dest-card:hover .dest-card-img {
  transform: scale(1.08);
}

.dest-badge-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 2;
}

[dir="rtl"] .dest-badge-category {
  left: auto;
  right: 1rem;
}

.dest-badge-rank {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(2, 132, 199, 0.9);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  z-index: 2;
}

[dir="rtl"] .dest-badge-rank {
  right: auto;
  left: 1rem;
}

.dest-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dest-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.dest-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.dest-card-desc {
  font-size: 0.885rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.dest-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.dest-card-tag {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dest-btn-explore {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dest-card:hover .dest-btn-explore {
  transform: translateX(3px);
}

[dir="rtl"] .dest-card:hover .dest-btn-explore {
  transform: translateX(-3px);
}

/* Destination Detail Page */
.detail-hero {
  position: relative;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  padding: 4rem 0 3rem;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.3) 0%, rgba(15,23,42,0.88) 100%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.85);
  flex-wrap: wrap;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: #ffffff;
}

.detail-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.detail-meta-pills {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

/* Detail Main Layout (Article + Sidebar) */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
}

@media (min-width: 992px) {
  .detail-layout {
    grid-template-columns: 2fr 1fr;
  }
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.block-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.block-icon {
  color: var(--primary);
}

.prose {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Highlights Grid */
.highlights-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 600px) {
  .highlights-list {
    grid-template-columns: 1fr 1fr;
  }
}

.highlight-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.highlight-check {
  color: #10b981;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

/* Sidebar Widgets */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.quick-facts {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.925rem;
}

.fact-key {
  color: var(--text-muted);
  font-weight: 500;
}

.fact-val {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

[dir="rtl"] .fact-val {
  text-align: left;
}

/* Share and Actions */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

[dir="rtl"] .footer-links a:hover {
  transform: translateX(-4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .hero-section {
    padding: 3rem 0 2rem;
  }
  .destinations-grid {
    grid-template-columns: 1fr;
  }
  .search-filter-box {
    padding: 0.65rem;
  }
}
