:root {
  --primary-green: #4a7c59;
  --primary-green-dark: #3d6849;
  --primary-green-light: #5a8c69;
  --secondary-orange: #f59e0b;
  --secondary-purple: #8b5cf6;
  --secondary-blue: #3b82f6;
  --secondary-red: #ef4444;
  --text-dark: #1f2937;
  --text-muted: #6c757d;
  --text-light: #9ca3af;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --success-green: #28a745;
  --danger-red: #dc3545;
  --warning-orange: #fd7e14;
  --info-blue: #17a2b8;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* Modal Backdrop Fix - Prevent stuck backdrops */
.modal-backdrop.fade:not(.show) {
  display: none !important;
}

/* Ensure body doesn't have stuck modal styles */
body:not(.modal-open) {
  overflow: auto !important;
  padding-right: 0 !important;
}

.navbar {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* ── Nav links ── */
.nav-link {
  color: var(--text-muted);
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  transition: color .2s, background .2s;
  font-weight: 500;
  font-size: .9rem;
  border-radius: 6px;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-green);
  background: rgba(74,124,89,.07);
}

.nav-link.active {
  color: var(--primary-green);
  font-weight: 600;
}

/* Active underline accent */
.navbar-nav .nav-item > .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--primary-green);
  border-radius: 2px;
}

/* ── Dropdown panel ── */
.navbar-nav .dropdown-menu {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 0.5rem 0;
  min-width: 220px;
  animation: navDropIn .15s ease;
  margin-top: -1px !important;
}

@keyframes navDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section header inside dropdown */
.navbar-nav .dropdown-menu .dropdown-header {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-green);
  padding: 0.6rem 1rem 0.3rem;
}

/* Dropdown items */
.navbar-nav .dropdown-menu .dropdown-item {
  padding: 0.55rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: #374151;
  border-radius: 6px;
  margin: 1px 6px;
  width: calc(100% - 12px);
  transition: background .15s, color .15s;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.navbar-nav .dropdown-menu .dropdown-item i {
  width: 16px;
  text-align: center;
  margin-top: 2px;
  color: var(--primary-green);
  flex-shrink: 0;
}

.navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar-nav .dropdown-menu .dropdown-item:focus {
  background: rgba(74,124,89,.09);
  color: var(--primary-green);
}

.navbar-nav .dropdown-menu .dropdown-item.active,
.navbar-nav .dropdown-menu .dropdown-item:active {
  background: var(--primary-green);
  color: #fff;
}

.navbar-nav .dropdown-menu .dropdown-item.active i,
.navbar-nav .dropdown-menu .dropdown-item:active i {
  color: #fff;
}

/* Item description line */
.navbar-nav .dropdown-item .nav-item-desc {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.2;
  margin-top: 1px;
}

.navbar-nav .dropdown-item:hover .nav-item-desc {
  color: rgba(74,124,89,.7);
}

/* Divider */
.navbar-nav .dropdown-divider {
  margin: 0.35rem 0.75rem;
  border-color: #f0f0f0;
}

/* ── User avatar button ── */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem !important;
  border-radius: 50px !important;
  border: 1.5px solid var(--border-color);
  transition: border-color .2s, box-shadow .2s !important;
}

.user-menu-btn:hover {
  border-color: var(--primary-green) !important;
  box-shadow: 0 0 0 3px rgba(74,124,89,.1) !important;
  background: transparent !important;
}

.user-avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar-small .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* User dropdown wider */
.user-dropdown {
  min-width: 240px !important;
  margin-top: -1px !important;
  z-index: 1050 !important;
  background: #fff !important;
}

/* User info header block */
.user-dropdown .user-info-header {
  padding: 0.85rem 1rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, rgba(74,124,89,.08) 0%, rgba(74,124,89,.04) 100%);
  border-radius: 10px 10px 0 0;
}

.user-dropdown .user-info-header .user-full-name {
  font-weight: 700;
  font-size: .9rem;
  color: #111827;
  line-height: 1.3;
}

.user-dropdown .user-info-header .user-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary-green);
  background: rgba(74,124,89,.12);
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 4px;
}

/* Help icon button */
.help-nav-btn {
  padding: 0.4rem 0.5rem !important;
  border-radius: 6px !important;
  color: var(--text-muted) !important;
  font-size: 1rem;
  line-height: 1;
  border: none !important;
  background: transparent !important;
}

.help-nav-btn:hover {
  color: var(--primary-green) !important;
  background: rgba(74,124,89,.07) !important;
}

.btn-primary {
  background-color: var(--primary-green);
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: var(--primary-green-dark);
}

.btn-outline-primary {
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  background-color: transparent;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-outline-primary:hover {
  background-color: var(--primary-green);
  color: white;
}

.profile-header {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background-color: var(--primary-green);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.profile-details h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.profile-badge {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.profile-stats {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-item i {
  color: var(--primary-green);
  font-size: 1.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.progress-section {
  margin-top: 1.5rem;
}

.progress-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.progress {
  height: 12px;
  border-radius: 6px;
  background-color: #e9ecef;
}

.progress-bar {
  background-color: var(--primary-green);
  border-radius: 6px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  text-align: center;
}

.project-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.meta-item i {
  font-size: 0.875rem;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  background-color: #e8f5e9;
  color: var(--primary-green);
}

.difficulty-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-easy {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.badge-medium {
  background-color: #fff3cd;
  color: #856404;
}

.badge-hard {
  background-color: #f8d7da;
  color: #721c24;
}

.btn-action {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s;
  cursor: pointer;
}

.btn-action:hover {
  background-color: var(--primary-green-dark);
}

.sidebar-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.criteria-list {
  list-style: none;
}

.criteria-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.criteria-item:last-child {
  border-bottom: none;
}

.criteria-label {
  color: var(--text-dark);
  font-size: 0.9rem;
}

.criteria-value {
  color: var(--text-muted);
  font-weight: 500;
}

.stats-list {
  list-style: none;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.stats-item:last-child {
  border-bottom: none;
}

.stats-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.icon-green {
  background-color: #e8f5e9;
  color: var(--primary-green);
}

.icon-blue {
  background-color: #e3f2fd;
  color: #1976d2;
}

.stats-content {
  flex: 1;
}

.stats-label {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
}

.stats-sublabel {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.leaderboard-list {
  list-style: none;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.rank-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
}

.leaderboard-name {
  flex: 1;
  color: var(--text-dark);
  font-weight: 500;
}

.leaderboard-score {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary-green);
  font-weight: 600;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card-content h3 {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stat-card-content .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.challenge-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  height: 100%;
  border: 1px solid var(--border-color);
}

.challenge-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.challenge-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.challenge-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-secondary {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: #e9ecef;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-active {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.badge-evaluation {
  background-color: #fff3cd;
  color: #856404;
}

.update-time {
  color: var(--text-light);
  font-size: 0.875rem;
  text-align: right;
  margin-top: 1rem;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1055;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: block;
}

.modal-dialog {
  max-width: 600px;
  width: 90%;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-green);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-cancel {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-cancel:hover {
  background-color: var(--bg-light);
}

.marketplace-header {
  text-align: center;
  margin-bottom: 3rem;
}

.marketplace-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.marketplace-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.token-balance {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.token-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.token-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-green);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.token-details h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.token-details p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.token-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.token-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-green);
}

.token-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.search-filters {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
}

.search-bar {
  position: relative;
  margin-bottom: 1rem;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-tabs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border: none;
  background-color: transparent;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 6px;
}

.filter-tab.active,
.filter-tab:hover {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.product-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.product-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.availability-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #e8f5e9;
  color: #2e7d32;
}

.badge-unavailable {
  background-color: #f5f5f5;
  color: var(--text-muted);
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.product-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.product-provider {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.product-rating i {
  color: #ffc107;
}

.product-rating span {
  font-weight: 600;
  color: var(--text-dark);
  margin-left: 0.25rem;
}

.product-type-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--bg-light);
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.price-tokens {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-green);
  font-weight: 600;
}

.price-currency {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.btn-buy {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-buy:hover {
  background-color: var(--primary-green-dark);
}

.btn-buy:disabled {
  background-color: var(--bg-light);
  color: var(--text-muted);
  cursor: not-allowed;
}

.special-offers {
  margin-top: 3rem;
}

.offer-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.offer-icon {
  font-size: 4rem;
}

.offer-content {
  flex: 1;
}

.offer-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.offer-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.offer-price {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.original-price {
  text-decoration: line-through;
  color: var(--text-muted);
}

.discounted-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
}

.discount-badge {
  background-color: #ff5252;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-buy-pack {
  padding: 0.75rem 2rem;
  background-color: var(--primary-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-buy-pack:hover {
  background-color: var(--primary-green-dark);
}

.submit-project-header {
  text-align: center;
  margin-bottom: 3rem;
}

.submit-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.submit-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.challenges-section {
  margin-bottom: 3rem;
}

.challenges-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 1.5rem;
}

.challenge-submit-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.challenge-submit-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.challenge-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.challenge-organizer {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.badge-open {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.challenge-details {
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.detail-row i {
  width: 20px;
}

.challenge-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

.btn-participate {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s;
  cursor: pointer;
}

.btn-participate:hover {
  background-color: var(--primary-green-dark);
}

.submit-form-section {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-section-header i {
  color: var(--primary-green);
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.step-indicator {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-left: auto;
}

.progress-bar-container {
  margin-bottom: 2rem;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.btn-submit {
  padding: 0.75rem 2rem;
  background-color: var(--primary-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.3s;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: var(--primary-green-dark);
}

.btn-primary-custom {
  background: var(--primary-green);
  border: 2px solid var(--primary-green);
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary-custom:hover {
  background: var(--primary-green-dark);
  border-color: var(--primary-green-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.btn-outline-custom {
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  background: white;
  padding: 0.625rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline-custom:hover {
  background: var(--primary-green);
  color: white;
}

.btn-secondary-custom {
  background: var(--secondary-orange);
  border: 2px solid var(--secondary-orange);
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-secondary-custom:hover {
  background: #d97706;
  border-color: #d97706;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.btn-orange {
  background: var(--secondary-orange);
  border: none;
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-orange:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.hero-section {
  background: var(--bg-white);
  color: var(--text-dark);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 50%;
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-section h1 .highlight {
  color: #fbbf24;
}

.hero-section p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  color: var(--text-muted);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.stat-icon.green {
  background: rgba(74, 124, 89, 0.1);
  color: var(--primary-green);
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--secondary-blue);
}

.stat-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--secondary-purple);
}

.stat-icon.orange {
  background: rgba(245, 158, 11, 0.1);
  color: var(--secondary-orange);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
}

.highlight-text {
  color: var(--primary-green);
  font-weight: 600;
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  height: 100%;
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.feature-list li {
  color: var(--text-gray);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.feature-list li::before {
  content: '•';
  color: var(--primary-green);
  font-weight: 700;
  font-size: 1.25rem;
}

.challenge-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.badge-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.ouvert {
  background: rgba(74, 124, 89, 0.1);
  color: var(--primary-green);
}

.badge-status.bientot {
  background: rgba(59, 130, 246, 0.1);
  color: var(--secondary-blue);
}

.challenge-description {
  color: var(--text-gray);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.challenge-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gray);
  font-size: 0.875rem;
}

.info-item i {
  color: var(--primary-green);
}

.category-badge.environnement {
  background: rgba(74, 124, 89, 0.1);
  color: var(--primary-green);
}

.category-badge.social {
  background: rgba(139, 92, 246, 0.1);
  color: var(--secondary-purple);
}

.category-badge.agriculture {
  background: rgba(245, 158, 11, 0.1);
  color: var(--secondary-orange);
}

.category-badge.sante {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.criteria-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.criteria-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-gray);
}

.winner-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  display: flex;
  align-items: start;
  gap: 1.5rem;
}

.winner-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.winner-icon {
  width: 48px;
  height: 48px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-orange);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.winner-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.winner-event {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.winner-description {
  color: var(--text-gray);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.winner-amount {
  color: var(--primary-green);
  font-weight: 700;
  font-size: 1rem;
}

.cta-section {
  background: var(--primary-green);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
  transition: all 0.3s;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

footer {
  background: var(--primary-green-dark);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 15px;
}

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

.footer-section h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s;
  text-decoration: none;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-outline-green {
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  background: transparent;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline-green:hover {
  background: var(--bg-light);
  border-color: var(--bg-light);
  color: var(--text-dark);
}

.hero-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.hero-list li {
  position: relative;
  padding-left: 1.25rem;
}

.hero-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-size: 1.5rem;
  line-height: 1;
  top: 3px;
}

.hero-list li.item-green::before {
  color: var(--primary-green);
}

.hero-list li.item-orange::before {
  color: var(--secondary-orange);
}

.hero-list li.item-gray::before {
  color: var(--text-light);
}

.hero-image-wrapper {
  position: relative;
}

.hero-stat-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  font-weight: 600;
}

.hero-stat-badge.top-right {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1rem;
}

.hero-stat-badge.mid-left {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  font-size: 1rem;
}

.hero-stat-badge.bottom-left {
  bottom: 1.5rem;
  left: 1.5rem;
  font-size: 1rem;
}

.hero-stat-badge strong {
  font-size: 1.25rem;
  font-family: var(--font-serif);
  display: block;
  color: var(--text-dark);
}

.hero-stat-badge span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.text-green {
  color: var(--primary-green);
}

.text-red {
  color: var(--secondary-red);
}

.text-orange {
  color: var(--secondary-orange);
}

.top-badge-red {
  display: inline-block;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  color: var(--secondary-red);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.top-badge-red i {
  margin-right: 0.5rem;
}

.problem-stat-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-dark);
}

.problem-stat-item h3 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--secondary-red);
}

.problem-stat-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.top-badge-light-green {
  display: inline-block;
  background-color: #f0f5f2;
  border-radius: 50px;
  padding: 0.35rem 1rem;
  color: var(--primary-green-dark);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.top-badge-light-green i {
  margin-right: 0.5rem;
}

.solution-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s;
}

.solution-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.solution-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.icon-bg-red {
  background-color: #ef4444;
}

.icon-bg-yellow {
  background-color: #f59e0b;
}

.icon-bg-dark {
  background-color: var(--text-dark);
}

.solution-content h5 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.solution-content p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.9rem;
}

.process-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 1.75rem;
  color: white;
}

.stat-item-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-item-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.video-embed-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.video-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-feature-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.video-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.video-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.video-feature-card h5 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.video-feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.actor-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.actor-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: white;
}

.icon-bg-green {
  background: var(--primary-green);
}

.icon-bg-orange {
  background: var(--secondary-orange);
}

.actor-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.actor-quote {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.text-orange-quote {
  color: var(--secondary-orange);
}

.actor-list {
  list-style: none;
  padding-left: 0;
  text-align: left;
  margin-top: 1.5rem;
  color: var(--text-dark);
}

.actor-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.actor-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-size: 1.5rem;
  line-height: 1;
  top: 3px;
}

.list-green li::before {
  color: var(--primary-green-dark);
}

.list-orange li::before {
  color: var(--secondary-orange);
}

.btn-actor {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
}

.btn-actor-green {
  background-color: var(--primary-green);
  color: white;
}

.btn-actor-green:hover {
  background-color: var(--primary-green-dark);
  color: white;
}

.btn-actor-orange {
  background-color: var(--secondary-orange);
  color: white;
}

.btn-actor-orange:hover {
  background-color: #d97706;
  color: white;
}

.top-badge-gray {
  display: inline-block;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.top-badge-gray i {
  color: var(--primary-green);
  margin-right: 0.5rem;
}

.testimonial-card-large {
  background-color: var(--bg-white);
  border: 2px solid var(--primary-green);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.testimonial-card-large .quote-icon {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.testimonial-card-large p {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.author-block h5 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
}

.author-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.stat-card-small {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-card-small h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.stat-card-small p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.platform-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  height: 100%;
  overflow: hidden;
}

.platform-card-content {
  padding: 2rem;
}

.platform-card h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.action-list {
  list-style: none;
  padding-left: 0;
}

.action-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.action-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: white;
}

.action-list li.item-green::before {
  background-color: var(--primary-green);
}

.action-list li.item-orange::before {
  background-color: var(--secondary-orange);
}

.next-step-block {
  background-color: var(--bg-light);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.next-step-block h5 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.next-step-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.community-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.community-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-circle.icon-green {
  background-color: rgba(74, 124, 89, 0.1);
  color: var(--primary-green);
}

.icon-circle.icon-orange {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--secondary-orange);
}

.icon-circle.icon-dark-green {
  background-color: var(--primary-green-dark);
  color: white;
}

.card-title-serif {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.winner-block {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.numbered-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.numbered-circle.circle-gray {
  background-color: var(--text-muted);
}

.numbered-circle.circle-orange {
  background-color: var(--secondary-orange);
}

.winner-block h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.winner-block p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.info-pill-green {
  background-color: rgba(74, 124, 89, 0.1);
  color: var(--primary-green-dark);
  font-weight: 600;
  border-radius: 50px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.winner-block span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.evaluator-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.evaluator-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.evaluator-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.evaluator-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.evaluator-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.evaluator-meta i {
  margin-right: 0.25rem;
  font-size: 0.8rem;
}

.evaluator-meta span:first-child {
  color: var(--secondary-orange);
  font-weight: 500;
}

.evaluator-meta span:first-child::after {
  content: "•";
  margin: 0 0.5rem;
  color: var(--text-muted);
  font-weight: 400;
}

.card-challenge-active {
  background-color: #f7f9f8;
}

.sponsor-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.sponsor-badge {
  background-color: var(--primary-green);
  color: white;
  font-weight: 500;
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.sponsor-badge i {
  margin-right: 0.35rem;
}

.challenge-prize {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.challenge-prize span {
  color: var(--text-dark);
}

.challenge-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--text-muted);
}

.challenge-details-grid i {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-green);
}

.challenge-details-grid strong {
  display: block;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.challenge-details-grid span {
  font-size: 0.8rem;
}

.btn-dark-green {
  background: var(--primary-green-dark);
  border: 2px solid var(--primary-green-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-dark-green:hover {
  background: #2a4c37;
  border-color: #2a4c37;
  color: white;
}

.bottom-update-badge {
  display: inline-block;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.bottom-update-badge .green-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary-green);
  border-radius: 50%;
  margin-right: 0.5rem;
}

.h4-serif {
  font-family: var(--font-serif);
}

.top-badge {
  display: inline-block;
  background-color: var(--primary-green);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-weight: 500;
}

.top-badge i {
  color: #7dd3fc;
  margin-right: 0.5rem;
}

.btn-cta {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-align: left;
  transition: all 0.3s;
  color: white;
  border: none;
  display: flex;
  align-items: center;
}

.btn-cta i {
  width: 24px;
  text-align: center;
  font-size: 1.25rem;
}

.btn-cta:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-cta-dark-green {
  background-color: var(--primary-green-dark);
}

.btn-cta-dark-green:hover {
  background-color: #2a4c37;
}

.btn-cta-orange {
  background-color: var(--secondary-orange);
}

.btn-cta-orange:hover {
  background-color: #d97706;
}

.btn-cta-medium-green {
  background-color: #5a8c69;
}

.btn-cta-medium-green:hover {
  background-color: #4a7c59;
}

.stat-number-lg {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label-lg {
  color: var(--text-muted);
  font-size: 1rem;
}

.footer-bottom-social {
  display: flex;
  gap: 1.25rem;
}

.footer-bottom-social a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-bottom-social a:hover {
  color: white;
}

@media (max-width: 768px) {
  .profile-stats {
    flex-direction: column;
    gap: 1rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .challenges-grid {
    grid-template-columns: 1fr;
  }
  .offer-card {
    flex-direction: column;
    text-align: center;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .challenge-actions {
    flex-direction: column;
  }
  .modal-dialog {
    width: 95%;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .stat-number {
    font-size: 2rem;
  }
  .challenge-info {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .filter-tabs {
    justify-content: flex-start;
  }
  
  /* Mobile ACL Navigation Enhancements */
  .navbar-nav .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  
  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }
  
  .navbar-nav .nav-link {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
  }
  
  .navbar-nav .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
  }
  
  .nav-text {
    flex: 1;
    margin-left: 0.75rem;
    text-align: left;
  }
  
  /* Mobile Priority System */
  .mobile-priority-high {
    order: 1;
  }
  
  .mobile-priority-medium {
    order: 2;
  }
  
  .mobile-priority-low {
    order: 3;
  }
  
  .mobile-more-menu {
    order: 4;
  }
  
  /* Mobile Collapsible Dropdowns */
  .mobile-collapsible {
    position: relative;
  }
  
  .dropdown-indicator {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
  }
  
  .dropdown[aria-expanded="true"] .dropdown-indicator {
    transform: rotate(180deg);
  }
  
  .mobile-dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin-top: 0;
    background-color: var(--bg-light);
    border: none;
    border-radius: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-dropdown-menu .dropdown-item {
    padding: 0.75rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
  }
  
  .mobile-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
  }
  
  .mobile-dropdown-menu .dropdown-item:hover {
    background-color: rgba(74, 124, 89, 0.1);
    color: var(--primary-green);
  }
  
  /* Mobile Navigation State Management */
  .navbar-collapse.show .navbar-nav {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) var(--bg-light);
  }
  
  .navbar-collapse.show .navbar-nav::-webkit-scrollbar {
    width: 4px;
  }
  
  .navbar-collapse.show .navbar-nav::-webkit-scrollbar-track {
    background: var(--bg-light);
  }
  
  .navbar-collapse.show .navbar-nav::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 2px;
  }
  
  /* Mobile ACL Permission Indicators */
  .nav-item.mobile-priority-high::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-green);
  }
  
  .nav-item.mobile-priority-medium::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--secondary-orange);
  }
  
  /* Mobile User Actions */
  .navbar-nav.ms-auto {
    border-top: 2px solid var(--border-color);
    margin-top: 1rem;
    padding-top: 1rem;
  }
  
  .navbar-nav.ms-auto .nav-item {
    border-bottom: none;
  }
  
  .navbar-text {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--primary-green);
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 576px) {
  .navbar-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  .profile-info {
    flex-direction: column;
    text-align: center;
  }
  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section {
    padding: 3rem 0;
  }
  .feature-card,
  .stat-card {
    padding: 1.5rem;
  }
  
  /* Extra Small Mobile ACL Navigation */
  .navbar-nav .nav-link {
    padding: 0.875rem;
    font-size: 0.95rem;
  }
  
  .nav-text {
    margin-left: 0.5rem;
  }
  
  .mobile-dropdown-menu .dropdown-item {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }
  
  /* Compact mobile navigation */
  .navbar-collapse.show .navbar-nav {
    max-height: 60vh;
  }
  
  .navbar-toggler {
    padding: 0.5rem;
    font-size: 1.125rem;
  }
}

/* Language Switcher Styles */
.language-switcher {
  position: relative;
}

.language-switcher .form-select {
  min-width: 140px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  font-size: 0.875rem;
  background-color: var(--bg-white);
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-switcher .form-select:hover {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(74, 124, 89, 0.1);
}

.language-switcher .form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(74, 124, 89, 0.25);
  outline: none;
}

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

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .navbar-nav {
  flex-direction: row-reverse;
}

/* Removed: html[dir="rtl"] .d-flex - too broad, breaks layout */

html[dir="rtl"] .form-label {
  text-align: right;
}

html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
  text-align: right;
}

html[dir="rtl"] .btn {
  text-align: center;
}

html[dir="rtl"] .auth-card {
  direction: rtl;
}

html[dir="rtl"] .auth-header h2,
html[dir="rtl"] .auth-header p {
  text-align: center;
}

html[dir="rtl"] .social-login {
  flex-direction: row-reverse;
}

/* Responsive Language Switcher */
@media (max-width: 991px) {
  .language-switcher {
    margin-bottom: 1rem;
  }
  
  .language-switcher .form-select {
    width: 100%;
  }
}


/* Landing Page RTL Support */
html[dir="rtl"] .hero-list {
  text-align: right;
  padding-right: 0;
  padding-left: 1.5rem;
}

html[dir="rtl"] .hero-list li::before {
  right: auto;
  left: -1.5rem;
}

html[dir="rtl"] .btn i {
  margin-right: 0;
  margin-left: 0.5rem;
}

html[dir="rtl"] .feature-card,
html[dir="rtl"] .actor-card,
html[dir="rtl"] .solution-card {
  text-align: right;
}

html[dir="rtl"] .solution-card {
  flex-direction: row-reverse;
}

html[dir="rtl"] .solution-icon {
  margin-right: 0;
  margin-left: 1rem;
}

html[dir="rtl"] .actor-benefits {
  text-align: right;
  padding-right: 0;
  padding-left: 1.5rem;
}

html[dir="rtl"] .actor-benefits li i {
  margin-right: 0;
  margin-left: 0.5rem;
}

html[dir="rtl"] .testimonial-author {
  flex-direction: row-reverse;
}

html[dir="rtl"] .testimonial-avatar {
  margin-right: 0;
  margin-left: 1rem;
}

html[dir="rtl"] .evaluator-item,
html[dir="rtl"] .winner-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .evaluator-avatar {
  margin-right: 0;
  margin-left: 1rem;
}

html[dir="rtl"] .winner-badge {
  margin-right: 0;
  margin-left: 1rem;
}

/* Fix: Don't reverse all d-flex, only specific ones */
html[dir="rtl"] .d-flex.gap-3,
html[dir="rtl"] .d-flex.flex-wrap {
  flex-direction: row-reverse;
}

/* Keep rows normal in RTL */
html[dir="rtl"] .row {
  flex-direction: row;
}

/* Center-aligned elements should stay centered */
html[dir="rtl"] .text-center {
  text-align: center !important;
}

html[dir="rtl"] .mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}


/* Floating Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  text-decoration: none;
}

.back-to-top:hover {
  background: var(--secondary-orange);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* RTL Support for Back to Top Button */
html[dir="rtl"] .back-to-top {
  right: auto;
  left: 30px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
  }
  
  html[dir="rtl"] .back-to-top {
    right: auto;
    left: 20px;
  }
}


/* ── Public nav right-side controls ── */

.lang-pill.dropdown-toggle::after {
  display: none;
}

/* Language pill */
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  text-decoration: none;
  letter-spacing: .02em;
}

.lang-pill:hover,
.lang-pill.show {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(74,124,89,.1);
  color: var(--primary-green);
}

.lang-pill .fi {
  font-size: .95rem;
  line-height: 1;
}

/* Login button */
.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1.5px solid var(--primary-green);
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary-green);
  background: transparent;
  text-decoration: none;
  transition: background .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}

.btn-nav-login:hover {
  background: var(--primary-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(74,124,89,.25);
}

/* Join CTA button */
.btn-nav-join {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary-green);
  border: none;
  text-decoration: none;
  transition: background .2s, box-shadow .2s, transform .15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(74,124,89,.3);
}

.btn-nav-join:hover {
  background: var(--primary-green-dark, #2d6a4f);
  box-shadow: 0 6px 18px rgba(74,124,89,.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-nav-join:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(74,124,89,.3);
}
  min-width: 60px;
  width: 60px;
  margin-top: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dark);
  font-size: 1.1rem;
  padding: 0.375rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-select-nav:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(74, 124, 89, 0.25);
  outline: none;
}

.language-select-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-green);
}

/* Style the options to show flags clearly */
.language-select-nav option {
  font-size: 1.1rem;
  padding: 0.5rem;
  background: white;
  color: var(--text-dark);
}

.navbar-nav .nav-item .btn-sm {
  margin-top: 0.25rem;
  margin-left: 0.5rem;
}

/* Adjust spacing for nav items with buttons */
.navbar-nav.ms-auto .nav-item {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 991px) {
  .language-select-nav {
    width: 80px;
    min-width: 80px;
    margin-bottom: 0.5rem;
  }
  
  .navbar-nav .nav-item .btn-sm {
    width: 100%;
    margin-left: 0;
    margin-bottom: 0.5rem;
  }
  
  .navbar-nav.ms-auto .nav-item {
    margin-left: 0;
  }
}

/* RTL Support for Language Selector */
html[dir="rtl"] .navbar-nav .nav-item .btn-sm {
  margin-left: 0;
  margin-right: 0.5rem;
}

html[dir="rtl"] .navbar-nav.ms-auto .nav-item {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Enhanced Language Switcher with Flags */
.language-switcher-btn {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 1.2rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-width: 50px;
  justify-content: center;
}

.language-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-green);
}

.language-dropdown {
  min-width: 160px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0;
}

.language-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.language-dropdown .dropdown-item:hover {
  background: var(--primary-green);
  color: white;
}

.language-dropdown .dropdown-item.active {
  background: var(--primary-green);
  color: white;
  font-weight: 600;
}

.language-dropdown .flag-icon {
  font-size: 1.1rem;
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

/* User Menu Styles */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-green);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  overflow: hidden;
}

.user-avatar-medium {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar-small .avatar-img,
.user-avatar-medium .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  color: var(--text-dark);
}

.user-dropdown {
  min-width: 320px;
  max-width: 400px;
  border: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.user-info-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  color: white;
  margin: 0;
}

.user-details {
  flex: 1;
}

.user-details .user-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.25rem;
}

.user-details .user-email {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.user-details .user-level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
}

.xp-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.user-dropdown .dropdown-header {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem 0.5rem;
  margin: 0;
  background: none;
  border: none;
}

.user-dropdown .dropdown-submenu .dropdown-header {
  display: flex;
  align-items: center;
  color: var(--primary-green);
  font-weight: 600;
}

.user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  background: none;
}

.user-dropdown .dropdown-item:hover {
  background: var(--bg-light);
  color: var(--primary-green);
  padding-left: 1.25rem;
}

.user-dropdown .dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}

.user-dropdown .dropdown-item:hover i {
  color: var(--primary-green);
}

.user-dropdown .dropdown-item.text-danger:hover {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-red);
}

.user-dropdown .dropdown-item.text-danger:hover i {
  color: var(--danger-red);
}

.user-dropdown .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
}

.user-dropdown .dropdown-divider {
  margin: 0.5rem 0;
  border-color: var(--border-color);
}

/* Mobile Responsive */
@media (max-width: 991px) {
  .user-dropdown {
    min-width: 280px;
  }
  
  .user-info-header {
    padding: 1rem;
  }
  
  .user-name.d-none.d-md-inline {
    display: none !important;
  }
  
  .language-dropdown,
  .user-dropdown {
    position: fixed !important;
    top: auto !important;
    left: 1rem !important;
    right: 1rem !important;
    transform: none !important;
    max-height: 70vh;
    overflow-y: auto;
  }
}

@media (max-width: 576px) {
  .user-dropdown {
    min-width: calc(100vw - 2rem);
  }
  
  .user-info-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .user-details .user-level {
    justify-content: center;
  }
}


/* ── Enhanced Flash / Alert Messages ─────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    border: none;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

/* Remove Bootstrap's default ul/li styling inside alerts */
.alert ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}
.alert ul li + li { margin-top: 4px; }

/* Close button positioning */
.alert .btn-close {
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.5;
    padding: 0;
    width: 20px;
    height: 20px;
}
.alert .btn-close:hover { opacity: 1; }

/* Icon before each alert type */
.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Success */
.alert-success {
    background: #f0faf4;
    border-left-color: #28a745;
    color: #1a5c30;
}
.alert-success::before {
    content: "\f058"; /* fa-circle-check */
    color: #28a745;
}

/* Danger / Error */
.alert-danger {
    background: #fff5f5;
    border-left-color: #dc3545;
    color: #7b1d1d;
}
.alert-danger::before {
    content: "\f057"; /* fa-circle-xmark */
    color: #dc3545;
}

/* Warning */
.alert-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #78450a;
}
.alert-warning::before {
    content: "\f071"; /* fa-triangle-exclamation */
    color: #f59e0b;
}

/* Info */
.alert-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e3a5f;
}
.alert-info::before {
    content: "\f05a"; /* fa-circle-info */
    color: #3b82f6;
}

/* Fade-in animation */
.alert.show {
    animation: alertSlideIn 0.25s ease-out;
}
@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
