.community-section {
  margin-bottom: 48px;
}

.community-section:last-child {
  margin-bottom: 0;
}

.community-posts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
  width: 100%;
  box-sizing: border-box;
}

.events-list {
  margin-top: 24px;
}

.community-page-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
}

.empty-state p {
  font-size: 18px;
  color: #000000; /* Text always stays black */
  margin-bottom: 20px;
  line-height: 1.6;
}

.empty-state .button {
  margin-top: 8px;
}

.upload-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.upload-form-modal {
  background-color: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.upload-form-modal h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: #000000; /* Text always stays black */
}

/* Tab navigation styles */
.community-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--accent-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.community-tab {
  flex: 1;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  border: 2px solid var(--accent-color);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-family: 'Playfair Display', 'Libre Baskerville', 'Georgia', 'Times New Roman', 'Times', serif;
  min-width: 120px;
  white-space: nowrap;
  min-height: 44px;
  background-color: #ffffff;
  color: #000000; /* Text always stays black */
  transition: all 0.2s ease;
}

.community-tab:hover {
  background-color: #f5f5f5;
}

.community-tab.active {
  background-color: #000000;
  color: #ffffff;
}

/* Side-by-side layout for events and posts */
.community-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 24px;
}

.events-column {
  flex: 1;
  min-width: 0;
}

.posts-column {
  flex: 1;
  min-width: 0;
}

.posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.posts-description {
  flex: 1;
  min-width: 0;
}

.posts-description p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
}

.posts-header .post-button {
  width: auto;
  flex-shrink: 0;
}

.community-layout h2 {
  font-size: 24px;
  font-weight: 700;
  color: #000000; /* Text always stays black */
  margin-bottom: 24px;
}

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

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

/* Post card styling - more colorful and interesting */
.post-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.post-content {
  padding: 20px 24px;
}

.post-text {
  font-size: 18px;
  line-height: 1.7;
  color: #000000; /* Text always stays black */
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
  border-top: 2px solid #e8e8e8;
}

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

.post-author-name {
  font-size: 16px;
  font-weight: 700;
  color: #000000; /* Text always stays black */
}

.post-event-badge {
  font-size: 14px;
  color: #666666;
  font-weight: 400;
}

.post-event-badge.cancelled {
  color: #dc3545;
  font-weight: 600;
}

/* Like button - white background */
.post-like-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', 'Libre Baskerville', 'Georgia', 'Times New Roman', 'Times', serif;
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 2px solid var(--accent-color) !important;
  border-radius: 24px;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.post-like-button:hover:not(:disabled) {
  background-color: #f5f5f5 !important;
  transform: scale(1.05);
}

.post-like-button.liked {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
  animation: heartBeat 0.5s ease;
}

.post-like-button.liked:hover:not(:disabled) {
  background-color: #f5f5f5 !important;
  transform: scale(1.05);
}

.like-icon {
  font-size: 20px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.post-like-button:hover .like-icon {
  transform: scale(1.2);
}

.post-like-button.liked .like-icon {
  animation: pulse 0.5s ease;
}

.like-count {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.05);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

/* Community header with responsive button */
.community-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.community-header h1 {
  margin: 0;
}

.add-post-button {
  padding: 12px 24px;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', 'Libre Baskerville', 'Georgia', 'Times New Roman', 'Times', serif;
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
  border: 2px solid var(--accent-color) !important;
  border-radius: 4px;
  cursor: pointer;
  min-height: 44px;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease;
}

.add-post-button:hover:not(:disabled) {
  background-color: #333333 !important;
}

/* Mobile responsive styles */
@media (min-width: 769px) {
  .community-header {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }

  .add-post-button {
    width: auto;
  }
}

@media (max-width: 768px) {
  .community-page-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .community-layout {
    flex-direction: column;
    gap: 32px;
  }

  .events-column,
  .posts-column {
    width: 100%;
  }

  .community-header {
    width: 100%;
    box-sizing: border-box;
  }

  .community-posts-list {
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .upload-form-modal {
    padding: 20px;
    max-height: 95vh;
    max-width: calc(100% - 40px);
  }

  .upload-form-modal h2 {
    font-size: 20px;
  }

  .empty-state {
    padding: 40px 16px;
  }
}

/* Post Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: #ffffff;
  padding: 32px;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #000000; /* Text always stays black */
  margin-bottom: 20px;
}

.modal .close {
  color: #000000; /* Text always stays black */
  float: right;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal .close:hover {
  color: #666666;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #000000; /* Text always stays black */
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  font-family: 'Playfair Display', 'Libre Baskerville', 'Georgia', 'Times New Roman', 'Times', serif;
  border: 2px solid var(--accent-color);
  border-radius: 4px;
  box-sizing: border-box;
  min-height: 44px;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-input textarea {
  min-height: 120px;
  resize: vertical;
}

