body {
  overflow-x: hidden; /* Prevent horizontal scrolling */
  background-color: #f9f9f9;
  font-family: "MedievalSharp", serif;
  background-image: url('https://bladezstorage.blob.core.windows.net/bladez-op-images/BackgroundParchment.jpg'); /* Corrected URL */
  margin: 0;
  padding: 0;
}

.event {
  font-family: "MedievalSharp", serif;
  background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white background for readability */
  border-radius: 8px;  
  box-shadow: 0 0 40px 5px rgb(30, 0, 0);
  margin: 20px auto;
  padding: 5px;
  max-width: 1000px; /* Limit the width of the event card */
}
.event h3 {
  font-size: 2em;
  margin-bottom: 10px;
  text-align: center; /* Center-align the title */
}

#events-container {
  display: grid; /* Use grid layout for responsive design */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust columns based on screen size */
  gap: 20px; /* Add spacing between event cards */
  max-width: 100%; /* Ensure events container fits within the viewport */
  padding: 10px; /* Adjust padding for smaller screens */
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.event-card {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 0 20px rgb(0, 0, 0);
  padding: 15px;
  text-align: left; /* Align all text to the left */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease-in-out;
}

.event-card h3 {
  font-size: 1.5em;
  margin: 10px 0;
  text-align: center; /* Center-align the name field */
}

.event-card p {
  font-size: 1em;
  color: #555;
  margin: 5px 0;
}

.event-card p:first-of-type {
  text-align: center; /* Center-align the description field */
}

.event-card:hover {
  transform: translateY(-5px);
}

.event-card .event-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.event-card button {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  color: white;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.event-card button:hover {
  background-color: #0056b3;
}

.event-card a {
  word-wrap: break-word; /* Break long words to fit within the container */
  overflow-wrap: break-word; /* Ensure compatibility with different browsers */
  text-decoration: none; /* Remove underline for better readability */
  color: #007bff; /* Match the button color for consistency */
}

.event-card a:hover {
  text-decoration: underline; /* Add underline on hover for better UX */
}

.page-title {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  #events-container {
    grid-template-columns: 1fr; /* Single column for smaller screens */
  }

  .event-card {
    padding: 10px; /* Reduce padding for smaller screens */
  }

  .event-card h3 {
    font-size: 1em; /* Adjust font size for smaller screens */
  }

  .event-card p {
    font-size: 0.9em; /* Adjust font size for smaller screens */
  }

  .event-card button {
    font-size: 12px; /* Adjust button font size for smaller screens */
  }
}