/* Community Page Styles */
.community-page {
  background: linear-gradient(135deg, #0f1419 0%, #1a252f 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.community-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 153, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 153, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 153, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Hero Section */
.community-hero {
  text-align: center;
  padding: 2.5rem 0;
  margin-bottom: 2.5rem;
  position: relative;
  animation: fadeInUp 1s ease-out;
}

.community-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff9900, transparent);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #ff9900 50%, #ffffff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
  animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-content p {
  font-size: 1.1rem;
  color: #e2e8f0;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-stats .stat {
  text-align: center;
  padding: 1rem;
  background: rgba(35, 47, 62, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 153, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.hero-stats .stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ff9900, #e68900);
}

.hero-stats .stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 153, 0, 0.2);
  border-color: rgba(255, 153, 0, 0.4);
}

.hero-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff9900, #ffa500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.hero-stats .stat-label {
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filters */
.community-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  gap: 2rem;
  padding: 1.5rem;
  background: rgba(35, 47, 62, 0.3);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(255, 153, 0, 0.2);
  animation: slideInUp 1s ease-out 0.9s both;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(15, 20, 25, 0.8);
  padding: 0.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 153, 0, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: #cbd5e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.filter-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.filter-tab:hover::before {
  left: 100%;
}

.filter-tab:hover {
  background: rgba(255, 153, 0, 0.15);
  color: #ffa500;
  transform: translateY(-2px);
}

.filter-tab.active {
  background: linear-gradient(135deg, #ff9900, #e68900);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
  transform: translateY(-2px);
}

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

.county-filter select {
  padding: 0.75rem 1rem;
  background: rgba(15, 20, 25, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 153, 0, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  cursor: pointer;
}

.county-filter select:focus {
  outline: none;
  border-color: #ff9900;
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.county-filter select option {
  background: #1a252f;
  color: #ffffff;
  padding: 0.5rem;
}

.search-bar {
  position: relative;
  width: 300px;
}

.search-bar i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #ff9900;
  font-size: 1.1rem;
  z-index: 2;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: rgba(15, 20, 25, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 153, 0, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-bar input:focus {
  outline: none;
  border-color: #ff9900;
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.search-bar input::placeholder {
  color: #cbd5e0;
}

/* Communities Grid */
.communities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@keyframes fadeInStagger {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.community-card {
  background: rgba(35, 47, 62, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 153, 0, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  visibility: visible;
  opacity: 1;
  min-height: 400px;
}

.community-card.hidden {
  display: none !important;
}

.community-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 153, 0, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.community-card:hover::before {
  opacity: 1;
}

.community-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(255, 153, 0, 0.2);
  border-color: rgba(255, 153, 0, 0.4);
}

.community-image {
  position: relative;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16202b 0%, #ff9900 100%);
  overflow: hidden;
}

.community-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.community-card:hover .community-image::after {
  left: 100%;
}

.community-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.community-card:hover .community-placeholder {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.community-initials {
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.community-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #16202b;
  padding: 0.35rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 3;
  transition: all 0.3s ease;
}

.community-card:hover .community-badge {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.member-count {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 3;
  transition: all 0.3s ease;
}

.community-card:hover .member-count {
  transform: translateY(-2px);
  background: rgba(255, 153, 0, 0.9);
}

.community-card-content {
  padding: 1.5rem;
  flex: 1;
  text-align: center;
}

.community-card-content h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.2rem;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.3;
}

.community-card-content p {
  color: #e2e8f0;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.community-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.tag {
  background: rgba(255, 153, 0, 0.15);
  color: #ffa500;
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 153, 0, 0.4);
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(255, 153, 0, 0.25);
  transform: translateY(-1px);
}

.social-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.community-page .social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 153, 0, 0.15);
  color: #ff9900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.community-page .social-link:hover {
  background: rgba(255, 153, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
  border-color: rgba(255, 153, 0, 0.6);
}

.community-card-footer {
  padding: 1rem 1.5rem;
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 153, 0, 0.3);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.community-rating {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.community-rating .stars {
  display: flex !important;
  gap: 2px;
}

.community-rating .stars i {
  color: #ddd !important;
  font-size: 0.9rem;
}

.community-rating .stars i.active {
  color: #ff9900 !important;
}

.community-rating .rating-value {
  color: #cbd5e0;
  font-size: 0.75rem;
  font-weight: 600;
}

/* CTA Section */
.community-cta {
  text-align: center;
  padding: 3rem 0;
  margin-top: 3rem;
  background: rgba(35, 47, 62, 0.4);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 153, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 1.5s both;
}

.community-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff9900, transparent);
}

.cta-content h2 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #ff9900 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ff9900, #e68900);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e68900, #cc7700);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 153, 0, 0.4);
}

.btn-outline {
  background: transparent;
  color: #ff9900;
  border: 2px solid rgba(255, 153, 0, 0.3);
}

.btn-outline:hover {
  background: rgba(255, 153, 0, 0.1);
  border-color: #ff9900;
  color: #ffffff;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
  .community-filters {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .filter-controls {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  
  .county-filter select,
  .search-bar {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .filter-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .communities-grid {
    grid-template-columns: 1fr;
  }
  
  .community-card-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .card-actions {
    justify-content: center;
  }
  
  .community-rating {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .community-filters {
    padding: 1rem;
  }
  
  .hero-stats {
    gap: 1rem;
  }
  
  .hero-stats .stat {
    padding: 0.75rem;
    min-width: 100px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .community-card-content {
    padding: 1rem;
  }
}


.community-card.hidden-card {
  display: none !important;
}
