/* OneDollarOneAd - Global Professional Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #2457D6;
  --primary-hover: #1b44ab;
  --primary-light: #EEF4FF;
  --secondary: #16A6A1;
  --secondary-hover: #11837f;
  --secondary-light: #E6F7F6;
  
  --bg-main: #F7F9FC;
  --surface: #FFFFFF;
  --surface-alt: #F1F4F9;
  
  --text-main: #182230;
  --text-muted: #667085;
  --text-light: #98A2B3;
  
  --border: #E5EAF1;
  --border-focus: #2457D6;
  
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  --shadow-sm: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar & Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}
.site-logo span.highlight {
  color: var(--primary);
}
.site-logo .logo-badge {
  background: var(--secondary-light);
  color: var(--secondary);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language selector */
.lang-selector {
  position: relative;
  display: inline-block;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}
.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  padding: 6px 0;
}
.lang-menu.show {
  display: block;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-main);
  font-size: 0.875rem;
}
.lang-menu a:hover {
  background: var(--surface-alt);
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--secondary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--secondary-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--surface-alt);
  border-color: var(--text-light);
  color: var(--text-main);
}
.btn-post-ad {
  background: linear-gradient(135deg, #2457D6 0%, #16A6A1 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(36, 87, 214, 0.25);
}
.btn-post-ad:hover {
  background: linear-gradient(135deg, #1b44ab 0%, #11837f 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(36, 87, 214, 0.35);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

/* Flash alerts */
.flash-container {
  margin: 16px auto;
  max-width: 1240px;
  padding: 0 20px;
}
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.alert-success {
  background: var(--success-bg);
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.alert-error {
  background: var(--danger-bg);
  color: #991B1B;
  border: 1px solid #FECACA;
}
.alert-info {
  background: var(--info-bg);
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* Hero Section */
.hero-section {
  padding: 60px 0 40px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  max-width: 860px;
  margin: 0 auto 18px;
  line-height: 1.15;
}
.hero-title span.accent {
  background: linear-gradient(135deg, #2457D6 0%, #16A6A1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 32px;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Large Search Box */
.search-bar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  max-width: 960px;
  margin: 0 auto;
}
.search-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
}
.search-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}
.search-input-group:last-child {
  border-right: none;
}
.search-input-group input, .search-input-group select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 10px 0;
}

/* Section common */
.section-wrap {
  padding: 50px 0;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
}
.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Ad Card */
.ad-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.ad-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #CBD5E1;
}
.ad-card-media {
  position: relative;
  height: 180px;
  background: var(--surface-alt);
  overflow: hidden;
}
.ad-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.ad-card:hover .ad-card-media img {
  transform: scale(1.03);
}
.ad-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(24, 34, 48, 0.85);
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.ad-card-price {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.ad-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.ad-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 6px;
}
.ad-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.ad-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Category Cards */
.cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cat-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}
.cat-card-icon {
  font-size: 2rem;
}
.cat-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}
.cat-card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Value Props / Why advertise */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.why-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.why-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.why-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* How It Works Steps */
.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  position: relative;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
}
.step-num {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--surface-alt);
  line-height: 1;
}
.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}
.step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.footer-col ul li a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .search-form {
    grid-template-columns: 1fr;
  }
  .search-input-group {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .header-nav {
    display: none;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
