/* style/community.css */

:root {
  --primary-color: #004882;
  --secondary-color: #E21C21;
  --text-color: #333;
  --background-color: #f9f9f9;
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
}

header {
  background-color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

nav a.active {
  color: var(--secondary-color);
  font-weight: bold;
}

.logo img {
  height: 40px;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.hero {
  background-color: #fff;
  padding: 3rem;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #c41616;
}

.featured-posts {
  margin-top: 3rem;
}

.featured-posts h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.post-item {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.post-item img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.post-item h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.post-item p {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.post-item a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

.events {
  margin-top: 3rem;
}

.events h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.event-item h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.event-item p {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.event-item a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

.community-rules {
  margin-top: 3rem;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.community-rules h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.community-rules ul {
  list-style: disc;
  padding-left: 2rem;
}

.community-rules li {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 1rem 0;
  background-color: #eee;
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    margin-top: 1rem;
    flex-direction: column;
  }

  nav li {
    margin-left: 0;
    margin-bottom: 0.5rem;
  }

  .hero {
    padding: 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }
}