.events-block, .my-events {
    margin-top: 30px;
}

.my-events {
    display: none;
}

/* .eventsContainer,.myEventsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
    margin: 0 auto;
    margin-bottom: 100px;
} */
.event-card.modern-card {
    background-color: #e9f2ff;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    /* max-width: 400px; */
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* margin: 0 auto; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}



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

.event-card img {
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    width: 100%;
    height: 180px;
}





.event-card.modern-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.event-card.modern-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.event-details {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.event-meta {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.event-description {
    font-size: 15px;
    margin: 0 0 8px;
    line-height: 1.4;
    color: #333;
    flex-grow: 1;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.event-location,
.event-organizer {
    font-size: 14px;
    color: #333;
    margin: 2px 0;
}

.event-item.no-events-message h4 {
    text-align: center;
    margin-top: 20px;
}

.event-btn {
  margin-top: 10px;
  padding: 10px 16px;
  background-color: #2a78ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 14px;
  width: 100%;
}

.event-btn:hover {
  background-color: #1a5edb;
}

.event-create-btn {
    width: 200px;
    margin-bottom: 50px;
}

.hidden {
    display: none !important;
}

/* #editEventModal.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
} */

#editEventModal.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  color: #000;
}

#editEventModal .modal-content {
  background: white;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: row;
  padding: 20px;
  box-sizing: border-box;
  color: #000;
}

.left-section, .right-section {
  flex: 1;
}
.right-section {
  margin-left: 50px;
}

#editEventModal .modal-content h2 {
  margin-top: 0;
  color: #000;
  font-size: 20px;
  margin-bottom: 20px;
}

#editEventModal label {
  font-size: 14px;
  color: #aaa;
  display: block;
  margin: 15px 0 5px;
}

#editEventModal input[type="text"],
#editEventModal input[type="date"],
#editEventModal input[type="time"],
#editEventModal select,
#editEventModal textarea {
  width: 100%;
  background-color: #121212;
  border: 1px solid #444;
  color: white;
  padding: 10px;
  font-size: 14px;
  border-radius: 4px;
}
#editEventModal textarea {
  resize: vertical;
}

#editEventModal .file-upload {
  margin-top: 0;
}

#editEventModal .upload-wrapper {
  background-color: #000;
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
  border-radius: 4px;
}

#editEventModal .upload-button {
  margin-top: 15px;
  display: inline-block;
  background-color: #3ea6ff;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
}

#editEventModal .hidden-input {
  display: none;
}

#editEventModal .preview img {
  margin-top: 10px;
  max-width: 100%;
  height: auto;
  border: 1px solid #333;
  border-radius: 4px;
}

#editEventModal .close-button {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 22px;
  color: #999;
  cursor: pointer;
}

#editEventModal button[type="submit"] {
  margin-top: 20px;
  width: 100%;
  background-color: #3ea6ff;
  border: none;
  padding: 12px;
  font-size: 16px;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

#editEventModal .video-info {
  margin-top: 15px;
  font-size: 13px;
  color: #888;
}

#editEventModal .video-link {
  color: #3ea6ff;
  text-decoration: none;
}


/* #editEventModal .modal-content {
  background-color: #e9f2ff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 24px 32px;
  width: 90%;
  max-width: 500px;
  color: #333;
  position: relative;
  height: 600px;
  overflow-x: scroll;
} */

.image-upload-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 300px;
}

.upload-button-label {
  display: inline-block;
  background-color: #2f80ed;
  color: white;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
  font-size: 16px;
}

.upload-button-label span {
  color: #ffffff;
}

.upload-button-label:hover {
  background-color: #1c60c8;
}

.image-preview {
  max-height: 250px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.file-info {
  font-size: 14px;
  color: #ccc;
}

#editEventModal .close-button {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  color: #555;
  cursor: pointer;
}

#editEventModal h2 {
  margin-top: 0;
  font-size: 22px;
  margin-bottom: 20px;
}

#editEventModal label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 500;
  font-size: 14px;
}

#editEventModal input[type="text"],
#editEventModal input[type="date"],
#editEventModal input[type="time"],
#editEventModal select,
#editEventModal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background-color: #fff;
  color: #333;
}

#editEventModal button#saveEventBtn {
  margin-top: 20px;
  background-color: #2a78ff;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 15px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#editEventModal button#addMarkerEventBtn {
  margin: 20px 0px;
  background-color: #2a78ff;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#editEventModal .map-container div {
  margin: 20px 0px;
  background-color: #a2a2a2;
  color: #fff;
  padding: 8px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 15px;
  width: fit-content;
  transition: background-color 0.3s ease;
}

#editEventModal button#saveEventBtn:hover {
  background-color: #1a5edb;
}

#editEventModal .file-upload {
  margin-top: 15px;
}

#editEventModal .upload-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

#editEventModal .upload-button {
  background-color: #2a78ff;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
}

#editEventModal .hidden-input {
  display: none;
}

#editEventModal .preview img {
  margin-top: 10px;
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

.event-item.no-events-message h4 {
    text-align: center;
    margin-top: 20px;
}

.no-events-message {
    text-align: center;
    padding: 50px;
    color: #abb2bf;
    font-size: 1.2em;
}

.no-events-message p {
    margin-bottom: 20px;
}

.no-events-message {
  grid-column: 1 / -1;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  text-align: center;
  color: #aaa;
  font-size: 1.2em;
}

.no-events,
.no-events-message {
  text-align: center;
}

.event-create-btn {
    background-color: #3a7afe;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 1em;
    cursor: pointer;
    width: auto;
    transition: background-color 0.3s ease;
}

.event-create-btn:hover {
    background-color: #2e6bc1;
}

.interaction-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: max-content;
}

.event-interaction-ponel-btn {
  margin: 10px 10px 10px 0px;
  transition: background-color 0.3s ease;
  background: #888;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  width: 65px;
  height: 30px;
}

.liked {
  background-color: #2a78ff;
  color: #fff;
}

.eventsContainer:has(.event-card.modern-card:nth-child(1):last-child),
.myEventsContainer:has(.event-card.modern-card:nth-child(1):last-child) {
    justify-content: center;
}

.eventsContainer:has(.event-card.modern-card:nth-child(1):last-child) .event-card.modern-card,
.myEventsContainer:has(.event-card.modern-card:nth-child(1):last-child) .event-card.modern-card {
    max-width: 400px;
}

@media (max-width: 920px) {
  #editEventModal .modal-content {
    max-width: 800px;
  }
}

@media (max-width: 820px) {
  #editEventModal .modal-content {
    max-width: 700px;
  }
}

@media (max-width: 720px) {
  #editEventModal .modal-content {
    max-width: 600px;
  }
}

@media (max-width: 600px) {
  #editEventModal .modal-content {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  #editEventModal .right-section {
    margin-left: 0px;
  }

  #editEventModal {
    padding: 0;
  }

  #editEventForm button[type="submit"] {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 350px) {
    .event-card.modern-card {
        min-width: -webkit-fill-available;
    }
}