/* ============================================================
   ArabLanka.com — Main Stylesheet
   Modern dark theme with Sri Lankan & Gulf-inspired accents
   ============================================================ */

/* === CSS VARIABLES === */
:root {
  --primary:        #FF6B35;
  --primary-dark:   #E85520;
  --primary-glow:   rgba(255, 107, 53, 0.25);
  --secondary:      #1E3A5F;
  --accent:         #FFD700;
  --accent-glow:    rgba(255, 215, 0, 0.2);
  --success:        #2ECC71;
  --danger:         #E74C3C;
  --warning:        #F39C12;
  --info:           #3498DB;

  --dark:           #0A1628;
  --dark-2:         #0F2040;
  --dark-3:         #162B4D;
  --dark-4:         #1E3A5F;
  --card-bg:        #0D1E38;
  --card-border:    rgba(255, 107, 53, 0.12);
  --glass:          rgba(255, 255, 255, 0.04);
  --glass-border:   rgba(255, 255, 255, 0.08);

  --text:           #E8EDF2;
  --text-muted:     #8899AA;
  --text-dim:       #5A6E85;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  30px;

  --shadow:     0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:  0 8px 48px rgba(0, 0, 0, 0.6);
  --glow:       0 0 30px var(--primary-glow);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-head:  'Poppins', sans-serif;
  --font-body:  'Inter', sans-serif;

  --nav-height: 68px;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--primary-glow); color: var(--primary); }

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

img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.25;
  font-weight: 700;
}

/* === LAYOUT === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-header { margin-bottom: 48px; text-align: center; }
.section-header h2 { font-size: 2rem; margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled { background: rgba(10, 22, 40, 0.99); box-shadow: var(--shadow); }

.nav-container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.logo-accent { color: var(--primary); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link i { font-size: 0.8rem; }
.nav-link:hover { color: var(--text); background: var(--glass); }
.nav-link.active { color: var(--primary); background: var(--primary-glow); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--glass);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}
.nav-icon-btn:hover { background: var(--primary-glow); color: var(--primary); }

.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--dark);
}

/* User Menu */
.user-menu { position: relative; }
.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-xl);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.user-trigger:hover { background: var(--dark-3); border-color: var(--primary); }
.user-trigger i { font-size: 0.7rem; color: var(--text-muted); }
.user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--dark-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}
.user-dropdown.open { display: block; animation: dropIn 0.2s ease; }
.user-dropdown-header {
  padding: 16px;
  background: var(--dark-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--glass-border);
}
.user-dropdown-header strong { font-size: 0.9rem; }
.user-dropdown-header small { color: var(--text-muted); font-size: 0.78rem; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 0.875rem;
  color: var(--text);
  transition: background var(--transition);
}
.user-dropdown a:hover { background: var(--glass); }
.user-dropdown a i { width: 16px; color: var(--text-muted); }
.user-dropdown .text-danger { color: var(--danger); }
.user-dropdown .text-danger i { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--glass-border); margin: 4px 0; }

/* Communities Nav Dropdown */
.nav-has-dropdown { position: relative; }
.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: var(--dark-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  z-index: 200;
}
.nav-has-dropdown:hover .nav-submenu { display: block; animation: dropIn 0.2s ease; }
.nav-submenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-submenu a:hover { background: var(--glass); color: var(--text); }
.nav-submenu a i { width: 15px; font-size: 0.82rem; color: var(--primary); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
  color: #fff;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text);
  border-color: var(--dark-4);
}
.btn-secondary:hover { background: var(--dark-4); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--glass-border);
}
.btn-ghost:hover { background: var(--glass); color: var(--text); border-color: var(--primary); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c0392b; color: #fff; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-xl { padding: 18px 48px; font-size: 1.1rem; border-radius: var(--radius); }
.btn-full { width: 100%; }

/* === CARDS === */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-glow); }
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--glass-border); }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--glass-border); background: var(--glass); }

/* === FORMS === */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.form-label span { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark-2);
  border: 1.5px solid var(--dark-4);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  outline: none;
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:focus { border-color: var(--primary); background: var(--dark-3); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control:focus-visible { outline: none; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238899AA' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

textarea.form-control { resize: vertical; min-height: 120px; }

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 6px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: var(--primary-glow); color: var(--primary); border: 1px solid rgba(255,107,53,0.3); }
.badge-success { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.badge-info    { background: rgba(52,152,219,0.15); color: var(--info); border: 1px solid rgba(52,152,219,0.3); }
.badge-warning { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }
.badge-danger  { background: rgba(231,76,60,0.15); color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }
.badge-accent  { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(255,215,0,0.3); }

/* === FLASH MESSAGES === */
.flash {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 16px auto;
  max-width: 900px;
  animation: slideDown 0.3s ease;
}
.flash-success { background: rgba(46,204,113,0.15); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.flash-error   { background: rgba(231,76,60,0.15); color: var(--danger); border: 1px solid rgba(231,76,60,0.3); }
.flash-info    { background: rgba(52,152,219,0.15); color: var(--info); border: 1px solid rgba(52,152,219,0.3); }
.flash-warning { background: rgba(243,156,18,0.15); color: var(--warning); border: 1px solid rgba(243,156,18,0.3); }

/* === AVATAR === */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-initials {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  flex-shrink: 0;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 16px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--dark-2);
  border: 1px solid var(--dark-4);
  transition: all var(--transition);
}
.page-btn:hover { background: var(--primary-glow); color: var(--primary); border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   HOME PAGE
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
  margin-top: calc(var(--nav-height) * -1);
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(255,107,53,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 30%, rgba(30,58,95,0.6) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(255,215,0,0.05) 0%, transparent 60%),
    linear-gradient(160deg, #0A1628 0%, #0F2040 50%, #0A1628 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 40px 40px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 80px 0;
}

.hero-flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease;
}
.hero-flag-pill span { font-size: 1.1rem; }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 540px;
  margin-bottom: 36px;
  animation: fadeUp 0.7s ease 0.2s both;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.3s both;
}

/* Explore Platform button — visible against dark hero bg */
.hero .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
  animation: fadeUp 0.7s ease 0.4s both;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat .stat-num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}
.hero-stat .stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.hero-visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px;
  z-index: 2;
}

.hero-card-preview {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  animation: floatCard 4s ease-in-out infinite;
}
.hero-card-preview:nth-child(2) { animation-delay: 1s; margin-left: 40px; }
.hero-card-preview:nth-child(3) { animation-delay: 2s; margin-left: 20px; }

/* === MODULE GRID === */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 16px 0;
}

.module-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--module-color, var(--primary));
  transition: height var(--transition);
}
.module-card:hover::before { height: 6px; }
.module-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--module-color-rgb, 255,107,53), 0.2);
  border-color: rgba(255,255,255,0.12);
}

.module-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  background: rgba(var(--module-color-rgb, 255,107,53), 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--module-color, var(--primary));
  margin-bottom: 20px;
  transition: transform var(--transition);
}
.module-card:hover .module-icon { transform: scale(1.1) rotate(-5deg); }

.module-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text);
}
.module-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.module-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.module-meta .count {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--module-color, var(--primary));
}

.module-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(var(--module-color-rgb, 255,107,53), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--module-color, var(--primary));
  font-size: 0.85rem;
  transition: all var(--transition);
}
.module-card:hover .module-arrow { background: var(--module-color, var(--primary)); color: #fff; transform: translateX(4px); }

/* Module colors */
.module-chat    { --module-color: #4CAF50; --module-color-rgb: 76,175,80; }
.module-jobs    { --module-color: #2196F3; --module-color-rgb: 33,150,243; }
.module-qa      { --module-color: #9C27B0; --module-color-rgb: 156,39,176; }
.module-info    { --module-color: #FF9800; --module-color-rgb: 255,152,0; }
.module-news    { --module-color: #00BCD4; --module-color-rgb: 0,188,212; }
.module-buysell { --module-color: #E91E63; --module-color-rgb: 233,30,99; }
.module-slnews  { --module-color: #FF5722; --module-color-rgb: 255,87,34; }

/* === NEWS CARDS === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.news-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--dark-3);
}
.news-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark-3), var(--dark-4));
  color: var(--text-dim);
  font-size: 2rem;
}

.news-card-body { padding: 20px; }
.news-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.news-source-name { font-size: 0.75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }
.news-source-time { font-size: 0.75rem; color: var(--text-dim); margin-left: auto; }

.news-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-title:hover { color: var(--primary); }

.news-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.news-split .news-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

/* === JOB CARDS === */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.job-card:hover { transform: translateY(-3px); border-color: rgba(33,150,243,0.4); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }

.job-card-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.job-company-logo {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--secondary), var(--dark-4));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.job-info { flex: 1; min-width: 0; }
.job-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.job-company { font-size: 0.82rem; color: var(--text-muted); }

.job-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.job-location { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-muted); }
.job-location i { color: var(--primary); }

.job-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.job-salary { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: var(--success); }
.job-type-badge { font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-xl); background: rgba(33,150,243,0.15); color: var(--info); }

/* === Q&A CARDS === */
.qa-list { display: flex; flex-direction: column; gap: 16px; }

.qa-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  transition: all var(--transition);
}
.qa-card:hover { border-color: rgba(156,39,176,0.4); box-shadow: var(--shadow); }

.qa-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
}
.qa-vote-count {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-muted);
}
.qa-vote-count.voted { color: var(--primary); }
.qa-vote-label { font-size: 0.7rem; color: var(--text-dim); }
.qa-solved { color: var(--success); font-size: 1.4rem; }

.qa-content {}
.qa-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.qa-title:hover { color: var(--primary); }
.qa-excerpt { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.qa-meta { display: flex; align-items: center; gap: 16px; font-size: 0.78rem; color: var(--text-dim); flex-wrap: wrap; }
.qa-meta i { color: var(--primary); }

/* === LISTING CARDS === */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.listing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.listing-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--dark-3);
  position: relative;
}
.listing-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.listing-card:hover .listing-img img { transform: scale(1.06); }
.listing-sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--danger);
  letter-spacing: 2px;
  transform: rotate(-15deg);
}

.listing-body { padding: 16px; }
.listing-price {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}
.listing-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.listing-meta { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; color: var(--text-dim); }

/* === CHAT === */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
}

.chat-sidebar {
  background: var(--dark-2);
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
  padding: 20px 0;
}

.chat-sidebar-header {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 12px;
}
.chat-sidebar-header h3 { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.chat-room-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  width: 100%;
  text-align: left;
  color: var(--text-muted);
  border-radius: 0;
  transition: all var(--transition);
  font-size: 0.9rem;
}
.chat-room-btn:hover { background: var(--glass); color: var(--text); }
.chat-room-btn.active { background: var(--primary-glow); color: var(--primary); }
.chat-room-btn .room-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--dark);
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--dark-2);
}
.chat-header h2 { font-size: 1.05rem; }
.chat-header p { font-size: 0.82rem; color: var(--text-muted); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message { display: flex; align-items: flex-start; gap: 12px; }
.chat-message-content { flex: 1; }
.chat-message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-username { font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.chat-time { font-size: 0.72rem; color: var(--text-dim); }
.chat-text {
  background: var(--dark-2);
  border: 1px solid var(--glass-border);
  border-radius: 4px 12px 12px 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  max-width: 600px;
  word-wrap: break-word;
}
.chat-message.own .chat-message-content { display: flex; flex-direction: column; align-items: flex-end; }
.chat-message.own .chat-message-header { flex-direction: row-reverse; }
.chat-message.own .chat-username { color: var(--accent); }
.chat-message.own .chat-text { background: var(--secondary); border-radius: 12px 4px 12px 12px; }

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  background: var(--dark-2);
}
.chat-input-form { display: flex; gap: 12px; align-items: flex-end; }
.chat-input-form .form-control { min-height: unset; resize: none; height: 44px; }

/* === COUNTRY INFO === */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

.country-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.country-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: var(--text); }

.country-card-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--dark-3), var(--dark-4));
  position: relative;
  overflow: hidden;
}
.country-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--card-bg));
}

.country-card-body { padding: 20px; flex: 1; }
.country-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.country-capital { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.country-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.country-stat-item { font-size: 0.78rem; color: var(--text-dim); }
.country-stat-item strong { display: block; color: var(--text-muted); font-size: 0.82rem; }

/* === PAGE HEADERS === */
.page-header {
  background: linear-gradient(160deg, var(--dark-2) 0%, var(--dark) 100%);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--glass-border);
  padding: 80px 0 56px;
  min-height: 220px;
  display: flex;
  align-items: center;
}
.page-header .container { width: 100%; }
.page-header h1 { font-size: 2.2rem; margin-bottom: 10px; }
.page-header p { color: var(--text-muted); font-size: 1rem; }

.page-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* === FILTERS BAR === */
.filters-bar {
  background: var(--dark-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filters-bar .form-group { margin-bottom: 0; flex: 1; min-width: 160px; }

/* === AUTH PAGES === */
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(255,107,53,0.1) 0%, transparent 60%), var(--dark);
}

.auth-card {
  width: 100%;
  max-width: 500px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.auth-card-header {
  padding: 36px 40px 28px;
  text-align: center;
  background: linear-gradient(135deg, var(--dark-2), var(--dark-3));
  border-bottom: 1px solid var(--glass-border);
}
.auth-card-header h2 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card-header p { color: var(--text-muted); font-size: 0.9rem; }

.auth-card-body { padding: 32px 40px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.auth-footer {
  padding: 20px 40px 32px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
}

/* === DETAIL PAGES === */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
@media (max-width: 1024px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-main {}
.detail-sidebar { position: sticky; top: calc(var(--nav-height) + 20px); }

/* External job HTML description (gulfjobs.lk etc.) */
.external-job-desc p  { margin: 0 0 12px; }
.external-job-desc ul { margin: 0 0 14px 20px; padding: 0; }
.external-job-desc li { margin-bottom: 5px; list-style: disc; }
.external-job-desc strong { color: var(--text); font-weight: 600; }
.external-job-desc a  { color: var(--primary); word-break: break-all; }

.detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}
.detail-meta i { color: var(--primary); }

.answer-form { margin-top: 40px; }
.answer-list { margin-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.answer-card {
  background: var(--dark-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
}
.answer-card.accepted { border-color: var(--success); background: rgba(46,204,113,0.05); }
.accepted-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--success);
  margin-bottom: 12px;
}

/* === EMPTY STATES === */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3.5rem; color: var(--text-dim); margin-bottom: 20px; display: block; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 0.9rem; max-width: 360px; margin: 0 auto 24px; }

/* === UTILITY === */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.divider { height: 1px; background: var(--glass-border); margin: 24px 0; }

/* === FOOTER === */
.footer {
  background: var(--dark-2);
  border-top: 1px solid var(--glass-border);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 300px;
}

.social-links { display: flex; gap: 10px; }
.social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.social-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.footer-links h4 { font-size: 0.875rem; font-weight: 700; color: var(--text); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links ul li a {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}
.footer-links ul li a i { width: 14px; color: var(--text-dim); }
.footer-links ul li a:hover { color: var(--primary); }
.footer-links ul li a:hover i { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-dim); }
.footer-bottom-right { display: flex; gap: 20px; }
.footer-bottom-right a { font-size: 0.82rem; color: var(--text-dim); transition: color var(--transition); }
.footer-bottom-right a:hover { color: var(--primary); }

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.fade-up    { animation: fadeUp 0.5s ease both; }
.animate-in { animation: fadeIn 0.4s ease both; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--dark-2) 25%, var(--dark-3) 50%, var(--dark-2) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--dark-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
  .news-split { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .hero-content { max-width: 100%; }
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    width: 280px;
    height: calc(100vh - var(--nav-height));
    background: var(--dark-2);
    border-right: 1px solid var(--glass-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    gap: 0;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  .nav-menu.open { left: 0; }
  .nav-menu .nav-link { width: 100%; padding: 14px 24px; border-radius: 0; font-size: 0.95rem; }
  .nav-has-dropdown { width: 100%; }
  .nav-has-dropdown .nav-link { width: 100%; padding: 14px 24px; border-radius: 0; }
  .nav-submenu {
    position: static;
    display: block;
    transform: none;
    background: rgba(255,255,255,0.03);
    border: none;
    border-left: 2px solid var(--primary-glow);
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-left: 24px;
  }
  .nav-submenu a { padding: 10px 16px; font-size: 0.875rem; }
  .hamburger { display: flex; }
  .nav-overlay.open { display: block; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .hero h1 { font-size: 2.2rem; }
  .hero-desc { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 20px; }
  .modules-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .module-card { padding: 20px; }
  .module-icon { width: 48px; height: 48px; font-size: 1.2rem; margin-bottom: 14px; }
  .module-card h3 { font-size: 1rem; }
  .news-grid { grid-template-columns: 1fr; }
  .jobs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .auth-card-header, .auth-card-body, .auth-footer { padding-left: 24px; padding-right: 24px; }
  .page-header { padding: 52px 0 32px; min-height: 160px; }
  .page-header h1 { font-size: 1.6rem; }
  .filters-bar { flex-direction: column; }
  .filters-bar .form-group { min-width: 100%; }
  .nav-actions .btn-ghost { display: none; }
  .user-name { display: none; }
}

@media (max-width: 480px) {
  .modules-grid { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { justify-content: space-around; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .qa-card { grid-template-columns: 1fr; }
  .qa-votes { flex-direction: row; }
}
