/* Base Styles */
:root {
  --primary: #0088cc;
  --primary-dark: #0077b5;
  --primary-light: #e6f3fa;
  --primary-gradient: linear-gradient(135deg, #0088cc, #00a1f2);
  --dark: #333333;
  --light: #ffffff;
  --gray: #f8f9fa;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --text: #333333;
  --text-muted: #6c757d;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Vazirmatn", sans-serif;
  color: var(--text);
  background-color: #f8f9fa;
  line-height: 1.6;
}

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

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1200px;
}

/* Header */
.header {
  background-color: var(--light);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-circle {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-left: 10px;
  box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 1.4rem;
  font-weight: 700;
}

.logo-tag {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-dark);
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.logo:hover {
  transform: translateY(-2px);
}

.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  padding: 12px 45px 12px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  background-color: var(--gray-100);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-box input:focus {
  box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.15);
  border-color: var(--primary);
  background-color: white;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-600);
  pointer-events: none;
}

.btn-add {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
  transition: all 0.3s ease;
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 136, 204, 0.4);
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.menu-toggle:hover {
  background-color: var(--primary-light);
}

/* Categories */
.categories {
  background-color: var(--light);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}

.categories-wrapper {
  position: relative;
  padding: 0 40px; /* Space for scroll buttons */
}

.category-list {
  display: flex;
  overflow-x: auto;
  padding: 0.5rem 0;
  gap: 1rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
}

.category-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  text-align: center;
  color: var(--text);
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.category-icon {
  width: 50px;
  height: 50px;
  background-color: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: var(--transition);
}

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

.category-item span {
  font-size: 0.85rem;
  font-weight: 500;
}

.category-item:hover .category-icon,
.category-item.active .category-icon {
  background-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 136, 204, 0.3);
}

.category-item:hover i,
.category-item.active i {
  color: white;
}

.category-item:hover,
.category-item.active {
  color: var(--primary);
}

/* Scroll Buttons */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--light);
  border: 1px solid var(--gray-300);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.scroll-btn:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.scroll-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.scroll-right {
  right: 5px;
}

.scroll-left {
  left: 5px;
}

/* Scroll Indicator */
.scroll-indicator-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--gray-200);
  border-radius: 3px;
}

.scroll-indicator {
  position: absolute;
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease, right 0.3s ease;
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  padding-right: 15px;
}

.section-header h2::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 25px;
  background: var(--primary-gradient);
  border-radius: 3px;
}

.view-all {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.view-all i {
  margin-right: 5px;
  transition: var(--transition);
}

.view-all:hover {
  color: var(--primary-dark);
}

.view-all:hover i {
  transform: translateX(-3px);
}

/* Group Card */
.group-card {
  background-color: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  position: relative;
  border: 1px solid var(--gray-200);
}

.group-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary-gradient);
  color: var(--light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: var(--light);
}

.members {
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  border-radius: 20px;
}

.members i {
  margin-left: 5px;
}

.card-body {
  padding: 20px;
}

.card-category {
  margin-bottom: 12px;
}

.card-category span {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  background-color: var(--primary-light);
  padding: 5px 12px;
  border-radius: 20px;
}

.card-category i {
  margin-left: 5px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  white-space: pre-line; /* Add this line to preserve line breaks */
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.location {
  display: flex;
  align-items: center;
}

.location i {
  margin-left: 5px;
  font-size: 0.9rem;
}

.card-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-join {
  width: 100%;
  border-radius: 30px;
  padding: 8px 15px;
  font-weight: 500;
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 136, 204, 0.2);
  transition: all 0.3s ease;
}

.btn-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 136, 204, 0.3);
}

/* CTA Section */
.cta-section {
  margin-bottom: 3rem;
}

.cta-box {
  background: var(--primary-gradient);
  color: var(--light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.cta-box::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-30%, 30%);
}

.cta-box h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.btn-cta {
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-cta i {
  transition: var(--transition);
}

.btn-cta:hover i {
  transform: translateX(-5px);
}

/* Footer */
.footer {
  background-color: var(--gray-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 1.5rem;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--primary-gradient);
}

.footer-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 1.5rem;
}

.footer-about p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.footer h4 {
  color: var(--light);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

.footer h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-block;
}

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

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* Responsive */
@media (max-width: 767.98px) {
  .section-header h2 {
    font-size: 1.25rem;
  }

  .cta-box {
    padding: 1.5rem;
    text-align: center;
  }

  .cta-box h2 {
    font-size: 1.35rem;
  }

  .cta-box p {
    font-size: 1rem;
  }

  /* تغییرات جدید برای فوتر در موبایل */
  .footer {
    text-align: center;
    padding: 2rem 0 1rem; /* کاهش پدینگ */
  }

  .footer h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 5px;
  }

  .footer h4::after {
    right: 50%;
    transform: translateX(50%);
    width: 30px; /* کاهش عرض خط زیر عنوان */
  }

  .footer-about p {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .social-links {
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .footer-links {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-links li {
    margin-bottom: 5px;
    margin-left: 10px;
    margin-right: 10px;
    display: inline-block;
  }

  .footer-links a {
    font-size: 0.85rem;
  }

  .footer-bottom {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .footer-bottom p {
    font-size: 0.8rem;
  }

  /* کاهش فاصله بین ستون‌های فوتر */
  .footer .row.g-4 {
    row-gap: 1rem !important;
  }
}
