/* CSS Design System & Stylesheet for حراج المدينة */

:root {
  --primary-color: #00874d;
  --primary-hover: #006f3e;
  --accent-color: #ffcb2d;
  --bg-color: #f4f7f6;
  --card-bg: #ffffff;
  --card-bg-alt: #f7fbfa;
  --text-main: #333333;
  --text-muted: #777777;
  --border-color: #e5e9e8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

:root[data-theme="dark"] {
  --bg-color: #121317;
  --card-bg: #121317;
  --card-bg-alt: #1a1b20;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: #2d2b3d;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Cairo", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 0;
  transition: var(--transition);
}

/* Header & Navigation Bar */
header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 60px;
  max-height: 100%;
  object-fit: contain;
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background-color: var(--border-color);
  transform: scale(1.05);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Theme Icon Toggle Display */
.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

:root[data-theme="dark"] .sun-icon {
  display: block;
}

:root[data-theme="dark"] .moon-icon {
  display: none;
}

/* Main Layout Container */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px;
}

/* Search and Filters */
.search-filter-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.input-group {
  flex: 1 1 200px;
  position: relative;
}

.input-group input,
.input-group select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  background-color: var(--card-bg);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 123, 118, 0.1);
}

.submit-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.categories-carousel {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 15px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.categories-carousel.active-drag {
  cursor: grabbing;
}

.categories-carousel::-webkit-scrollbar {
  display: none; /* Hide scrollbar Webkit */
}

/* Thin horizontal scrollbar for desktop on hover */
@media (min-width: 1024px) {
  .categories-carousel:hover {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
  }
  .categories-carousel:hover::-webkit-scrollbar {
    display: block;
    height: 6px;
  }
  .categories-carousel::-webkit-scrollbar-track {
    background: transparent;
  }
  .categories-carousel::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
  }
  .categories-carousel::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
  }
}

.category-tab {
  white-space: nowrap;
  padding: 8px 16px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.category-tab:hover,
.category-tab.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.categories-carousel.level-2 .category-tab:hover,
.categories-carousel.level-2 .category-tab.active {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Ad Listing */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.post-item:nth-child(odd) {
  background-color: var(--card-bg-alt);
}

.post-item:nth-child(even) {
  background-color: var(--card-bg);
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.post-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.user-link-span {
  cursor: pointer;
  transition: var(--transition);
}

.user-link-span:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.post-thumbnail-container {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #eaeeed;
  flex-shrink: 0;
  position: relative;
}

.post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--accent-color);
  color: #1e293b;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  z-index: 1;
}

/* Shimmer Loading Animation */
@keyframes shimmerAnimation {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

.shimmer-container {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.shimmer-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 126px;
}

.shimmer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shimmer-line {
  height: 14px;
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    var(--bg-color) 50%,
    var(--border-color) 75%
  );
  background-size: 200px 100%;
  animation: shimmerAnimation 1.5s infinite linear;
  border-radius: 4px;
}

.title-line {
  width: 60%;
  height: 18px;
}

.meta-line {
  width: 40%;
}

.shimmer-thumbnail {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    var(--bg-color) 50%,
    var(--border-color) 75%
  );
  background-size: 200px 100%;
  animation: shimmerAnimation 1.5s infinite linear;
  flex-shrink: 0;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 20px;
}

.load-more-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.load-more-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* No Results Block */
.no-results {
  display: none;
  text-align: center;
  padding: 40px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.no-results h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Details Page (details.php) specific styles */
.post-details-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 25px;
}

.post-details-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

/* Image Gallery (Stacked Vertically) */
.stacked-images-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.stacked-image-wrapper {
  position: relative;
  width: 100%;
  max-height: 550px;
  background-color: var(--card-bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gallery-image {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: contain;
  transition: var(--transition);
}

.gallery-image:hover {
  transform: scale(1.008);
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  padding: 20px 0;
}

.lightbox-header {
  position: absolute;
  top: 20px;
  right: 25px;
  left: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 101;
  direction: ltr; /* Keeps buttons in correct positions left/right */
}

.lightbox-zoom-btn {
  color: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-zoom-controls {
  display: flex;
  gap: 15px;
}

.lightbox-zoom-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.lightbox-zoom-btn:hover {
  color: #cccccc;
  transform: scale(1.1);
}

.lightbox-close {
  color: #ffffff;
  font-size: 44px;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  color: #cccccc;
  transform: scale(1.1);
}

.lightbox-main-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0; /* Allow container to shrink */
  overflow: hidden; /* Hide scrollbars, we use drag to pan */
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: var(--radius-md);
  animation: zoomIn 0.25s ease-out;
  cursor: grab;
  transition: transform 0.15s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes zoomIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 45px;
  font-weight: bold;
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  z-index: 100;
}

.lightbox-prev {
  left: 25px;
}
.lightbox-next {
  right: 25px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #cccccc;
  transform: translateY(-50%) scale(1.1);
}

/* Lightbox Thumbnails */
.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  padding: 10px 20px;
  overflow-x: auto;
  max-width: 90%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  z-index: 100;
}

.lightbox-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.lightbox-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.5;
  transition: var(--transition);
  flex-shrink: 0;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.post-body {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.8;
  white-space: pre-line;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* Publisher Card */
.publisher-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 25px;
}

.publisher-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pub-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.pub-name {
  font-size: 15px;
  font-weight: 700;
}

/* Download App Banner */
.download-app-banner {
  background: linear-gradient(135deg, #027b76 0%, #013f3c 60%, #161520 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 12px 40px rgba(2, 123, 118, 0.35);
  position: relative;
  overflow: hidden;
}

/* Decorative glow circles */
.download-app-banner::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.download-app-banner::after {
  content: "";
  position: absolute;
  bottom: -50px;
  right: -30px;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle,
    rgba(2, 200, 190, 0.12) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.banner-app-icon {
  margin-bottom: 14px;
  display: inline-block;
  animation: bannerIconBounce 2.5s ease-in-out infinite;
}

@keyframes bannerIconBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-content h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.banner-content > p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 20px;
}

/* Features grid */
.banner-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px auto;
  max-width: 420px;
  text-align: right;
}

.banner-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: var(--transition);
}

.banner-feature-item:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.banner-feature-item svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

/* Equal-size store badges inside the download banner */
.download-app-banner .store-badge-link img {
  width: 120px;
  height: 40px;
  object-fit: fill;
  border-radius: 8px;
  transition: var(--transition);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.download-app-banner .store-badge-link img:hover {
  transform: translateY(-3px) scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

/* Related Suggestions */
.related-section {
  margin-top: 40px;
}

.related-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  position: relative;
  padding-right: 12px;
}

.related-title::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Comments Design */
.comments-section {
  margin-top: 40px;
}

.comments-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* Comments App-Only Notice Banner */
.comments-app-notice {
  background: linear-gradient(
    135deg,
    rgba(2, 123, 118, 0.07) 0%,
    rgba(2, 123, 118, 0.02) 100%
  );
  border: 1px solid rgba(2, 123, 118, 0.22);
  border-right: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.comments-notice-icon {
  background-color: var(--primary-color);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comments-notice-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.comments-notice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comments-notice-text strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-color);
}

.comments-notice-text span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Features checklist */
.comments-notice-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.comments-notice-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.comments-notice-features li svg {
  width: 16px;
  height: 16px;
  fill: var(--primary-color);
  flex-shrink: 0;
}

/* Store badges row inside notice */
.comments-notice-stores {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}

.comments-store-badge img {
  width: 120px;
  height: 40px;
  object-fit: fill;
  border-radius: 8px;
  transition: var(--transition);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.comments-store-badge img:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

@media (max-width: 480px) {
  .comments-notice-features {
    grid-template-columns: 1fr;
  }
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-user-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

/* Default avatar when no profile picture */
.comment-default-avatar {
  background: linear-gradient(135deg, var(--primary-color), #015e5a);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.comment-default-avatar svg {
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.9);
}

.comment-details {
  flex: 1;
  background-color: var(--card-bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  position: relative;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-color);
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
}

.comment-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-line;
}

/* Profile Card specific styles (user.php) */
.profile-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.profile-cover {
  height: 140px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

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

.cover-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #161520 100%);
  position: relative;
}

.cover-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(2, 123, 118, 0.3) 0%,
      transparent 60%
    );
  opacity: 0.9;
}

.profile-info-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 24px 24px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.avatar-wrapper {
  margin-bottom: 4px; /* SNUG margin to bring username closer to avatar */
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card-bg);
  box-shadow: var(--shadow-md);
  background-color: var(--card-bg);
}

.profile-header-details {
  width: 100%;
}

.profile-header-details h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.profile-description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.profile-meta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-meta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

/* Privacy & Terms Page Specific Styles */
.content-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.content-card h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.content-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 25px 0 12px 0;
}

.content-card p {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 15px;
}

.content-card ul {
  margin-right: 25px;
  margin-bottom: 20px;
}

.content-card li {
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Footer Section */
footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 20px 20px 20px;
  margin-top: 50px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  text-align: right;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.footer-links-list {
  list-style: none;
}

.footer-links-list li {
  margin-bottom: 10px;
}

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.footer-links-list a:hover {
  color: var(--primary-color);
  padding-right: 5px;
}

.store-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-badge-link {
  display: inline-block;
}

.store-badge-link img {
  height: 40px;
  width: 120px;
  object-fit: fill;
  border-radius: 6px;
  transition: var(--transition);
}

.store-badge-link img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.social-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-color);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-decoration: none;
}

.social-badge:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.social-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  max-width: 1000px;
  margin: 30px auto 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .social-row {
    justify-content: center;
  }

  .store-badges {
    flex-direction: row;
    justify-content: center;
  }

  .main-image-wrapper {
    height: 250px;
  }

  .profile-info-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -60px;
    padding: 0 16px 20px 16px;
  }

  .profile-avatar {
    width: 110px;
    height: 110px;
  }

  .profile-meta {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.select2-container--default .select2-selection--single {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  height: 48px !important;
  padding: 0 16px !important;
  transition: var(--transition) !important;
  display: flex !important;
  align-items: center !important;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--text-main) !important;
  font-size: 14px !important;
  line-height: 48px !important;
  padding-right: 0 !important;
  text-align: right !important;
  width: 100% !important;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 46px !important;
  left: 10px !important;
  right: auto !important;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: var(--text-muted) transparent transparent transparent !important;
}
.select2-container--default.select2-container--open
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: transparent transparent var(--text-muted) transparent !important;
}
.select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(2, 123, 118, 0.1) !important;
}
.select2-dropdown {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  z-index: 9999 !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  background-color: var(--bg-color) !important;
  color: var(--text-main) !important;
  outline: none !important;
  padding: 8px 12px !important;
  text-align: right !important;
  direction: rtl !important;
}
.select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-color) !important;
  color: white !important;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: var(--card-bg-alt) !important;
  color: var(--primary-color) !important;
}
.select2-container--default .select2-results__option {
  color: var(--text-main) !important;
  padding: 8px 16px !important;
  text-align: right !important;
}
.select2-results__options {
  direction: rtl !important;
}
