/* Home Page Styles */

/* Navigation */
.navbar {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand img {
  transition: all 0.3s ease;
  width: auto;
  object-fit: contain;
}

.navbar-brand img:first-child {
  max-height: 35px;
}

.navbar-brand .logo-text {
  max-height: 25px;
  margin-left: 0.5rem;
}

.navbar-brand:hover img:first-child {
  transform: scale(1.1) rotate(5deg);
}

.navbar-brand:hover .logo-text {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--gray-700) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(0, 123, 255, 0.15);
  font-weight: 600;
}

.navbar-nav .nav-link i {
  font-size: 0.9rem;
  opacity: 0.8;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* User Dropdown */
.navbar-nav .dropdown-toggle {
  color: var(--gray-600) !important;
  font-weight: 500;
}

.navbar-nav .dropdown-toggle:hover {
  color: var(--primary-color) !important;
}

.navbar-nav .dropdown-menu {
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.3s ease;
}

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

.navbar-nav .dropdown-item i {
  width: 20px;
  text-align: center;
  margin-right: 0.75rem;
}

/* Responsive Navigation */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .navbar-brand img:first-child {
    max-height: 30px;
  }
  
  .navbar-brand .logo-text {
    max-height: 20px;
  }
  
  .navbar-nav {
    margin-top: 1rem;
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
    padding: 0.75rem 1rem !important;
  }
  
  .navbar-nav .dropdown-menu {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .navbar-brand img:first-child {
    max-height: 25px;
    margin-bottom: 0.25rem;
  }
  
  .navbar-brand .logo-text {
    max-height: 18px;
    margin-left: 0;
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  opacity: 0.9;
}

.hero-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.7) 0%, rgba(0, 86, 179, 0.7) 100%);
  backdrop-filter: blur(1px);
}


.hero-stats {
  margin-top: var(--spacing-xl);
}

.hero-section h1 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-item {
  padding: var(--spacing-md);
}

.stat-item h3 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--white);
}

.stat-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

/* Search Section */
.search-section {
  background-color: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.search-box {
  position: relative;
}

.search-box .input-group {
  box-shadow: var(--shadow);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.search-box .input-group-text {
  background-color: var(--white);
  border: none;
  color: var(--gray-500);
  padding: var(--spacing-md);
}

.search-box .form-control {
  border: none;
  padding: var(--spacing-md);
  font-size: var(--font-size-lg);
}

.search-box .form-control:focus {
  box-shadow: none;
}

.search-box .btn {
  padding: var(--spacing-md) var(--spacing-xl);
  font-weight: 500;
}

.filter-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.filter-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-right: var(--spacing-sm);
}

.filter-tags .btn {
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
}

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

/* Section Styles */
.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-lg);
}

.section-title i {
  color: var(--primary-color);
}

/* Communities Section */
.communities-section {
  background-color: var(--white);
}

/* Events Section */
.events-section {
  background-color: var(--gray-100);
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  height: 300px;
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-lg);
}

.skeleton-text {
  height: 20px;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--spacing-3xl) var(--spacing-lg);
  color: var(--gray-500);
}

.empty-state i {
  font-size: 4rem;
  color: var(--gray-300);
  margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
  color: var(--gray-600);
  margin-bottom: var(--spacing-md);
}

.empty-state p {
  color: var(--gray-500);
  margin-bottom: var(--spacing-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: var(--spacing-2xl) 0;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    margin-top: var(--spacing-lg);
  }
  
  .stat-item h3 {
    font-size: 2rem;
  }
  
  .search-box .form-control {
    font-size: var(--font-size-base);
  }
  
  .filter-tags {
    justify-content: center;
  }
  
  .filter-tags .btn {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .section-title {
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: var(--font-size-base);
  }
  
  .stat-item h3 {
    font-size: 1.5rem;
  }
  
  .search-box .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }
  
  .filter-tags {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .filter-label {
    margin-bottom: var(--spacing-sm);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

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

.slide-in-left {
  animation: slideInLeft 0.6s ease-in-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-in-out;
}

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

/* Utility Classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Focus States */
.btn:focus,
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(32, 201, 151, 0.25);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Filter Buttons */
#communityFilters .btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

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

/* Hero Logo */
.hero-logo {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.hero-logo-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
