@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;700&family=Lato:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Lato', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(#222c31, #111d32);
  color: #d9e2f1;
  min-height: 100vh;
}

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

#main-header {
  margin: 0;
  padding: 2rem 15%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#main-header-loading {
  height: 2rem;
  margin-bottom: -2rem;
  text-align: center;
  accent-color: #e30d7c;
}

#header-title {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#header-title img {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.26));
}

#header-title h1 {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
}

#main-header nav {
  display: flex;
  gap: 1rem;
}

#overview-section {
  margin: -8rem 0 3rem 0;
  padding: 8rem 15%;
  color: #222c31;
  text-align: center;
}

#overview-section h2 {
  font-size: 2.5rem;
  margin: 2rem auto;
  color: #1d161a;
}

#overview-section h2 strong {
  color: #e30d7c;
}

#overview-section p {
  font-size: 1.25rem;
  line-height: 1.5;
  font-family: 'Quicksand', sans-serif;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.26);
}

.content-section {
  margin: 3rem 0 6rem 0;
  padding: 0 15%;
}

.content-section h2 {
  font-size: 2rem;
  font-family: 'Quicksand', sans-serif;
  margin: 2rem auto;
  color: #b6cad5;
}

.events-list {
  max-width: 60rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 3rem;
}

.event-item {
  height: 100%;
  margin: 2rem 0;
  padding: 0;
  border-radius: 4px;
  background-color: #3c4249;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  gap: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 20rem;
}

.event-item img {
  width: 100%;
  object-fit: cover;
}

.event-item-content {
  height: 100%;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-item h2 {
  font-size: 1.15rem;
  font-family: 'Lato', sans-serif;
  margin: 0;
  color: #d7bfcb;
}

.event-item .event-item-date {
  margin: 0.5rem;
  font-size: 0.85rem;
  font-family: 'Quicksand', sans-serif;
}

.event-item .event-item-location {
  margin: 0.5rem;
  font-size: 1rem;
  font-family: 'Quicksand', sans-serif;
}

#search-form input {
  font: inherit;
  padding: 0.5rem 1rem;
  border-radius: 4px 0 0 4px;
  border: none;
  background: #fff;
}

#search-form button {
  font: inherit;
  padding: 0.5rem 1rem;
  border-radius: 0 4px 4px 0;
  border: none;
  background: #b6cad5;
  color: #1d161a;
  font-weight: bold;
  cursor: pointer;
}

#event-form label {
  display: block;
  font-weight: bold;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #3c4249;
  text-transform: uppercase;
}

#event-form input,
#event-form textarea {
  font: inherit;
  font-size: 1.1rem;
  padding: 0.25rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
}

.controls-row {
  display: flex;
  gap: 2rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2rem;
}

#image-picker p {
  font-weight: bold;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #3c4249;
  text-transform: uppercase;
}

#image-picker ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  overflow-y: auto;
  gap: 0.5rem;
}

#image-picker li {
  width: 4rem;
  height: 3rem;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
}

#image-picker li.selected {
  border-color: #e30d7c;
}

#image-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#event-details header {
  width: 40rem;
  margin: 2rem auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#event-details header nav {
  display: flex;
  gap: 1rem;
}

#event-details header button,
#event-details header a {
  font: inherit;
  cursor: pointer;
  border: none;
  background-color: transparent;
  color: #b6cad5;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  padding: 0.25rem;
}

#event-details-content {
  width: 40rem;
  margin: 2rem auto;
  background-color: #343b3f;
  border-radius: 8px;
  overflow: hidden;
}

#event-details-content img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  margin-bottom: 2rem;
}

#event-details-info {
  padding: 0 3rem 3rem 3rem;
}

#event-details time {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

#event-details-location {
  font-size: 1.15rem;
  color: #b6cad5;
  font-weight: bold;
  margin: 0;
}

#event-details-description {
  font-size: 1.25rem;
  line-height: 2rem;
  color: #b6cad5;
}

.modal {
  margin: 0;
  padding: 2rem;
  position: fixed;
  top: 10vh;
  left: calc(50% - 15rem);
  width: 30rem;
  max-height: 80vh;
  background: #e2e5eb;
  border: none;
  border-radius: 6px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: slide-down-fade-in 300ms ease-out forwards;
}

.modal::backdrop {
  height: 100vh;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
}

.nav-item {
  text-decoration: none;
  color: #b6cad5;
}

.button {
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 1.5rem;
  border: none;
  background-color: #e30d7c;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.26);
  font-weight: bold;
  text-decoration: none;
}

.button:hover {
  background-color: #e30d5b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
}

.button-text {
  font: inherit;
  cursor: pointer;
  border: none;
  background-color: transparent;
  border: none;
  color: #3f0c26;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
}

.button-text:hover {
  color: #7c184c;
}

.error-block {
  background-color: #f0d9e5;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 4px;
  color: #890b35;
  display: flex;
  gap: 2rem;
  align-items: center;
  text-align: left;
}

.error-block-icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  color: #fff;
  background-color: #890b35;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.error-block h2 {
  color: inherit;
  font-size: 1.25rem;
  margin: 0;
}

.error-block p {
  margin: 0;
}

.center {
  text-align: center;
}

.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  margin: 1rem 0;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #e30d5b;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #e30d5b transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes slide-down-fade-in {
  from {
    opacity: 0;
    transform: translateY(-3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
