/* For background colors */
.has-background-green {
  background-color: #00843d;
}
.has-background-red {
  background-color: #ce1226;
}
.has-background-black {
  background-color: #1a1a1a;
}

/* page background color -- used for the contact page */
.contact-section {
  background-color: #f8f9fa;
}

/* For text colors */
.has-text-red {
  color: #ce1226;
}
.has-text-green {
  color: #00843d;
}
.has-text-black {
  color: #1a1a1a;
}
.has-text-white {
  color: #fff;
}

/* For button colors */
.is-red {
  background-color: #ce1226;
  color: #fff;
}
.is-green {
  background-color: #00843d;
  color: #fff;
  border: none;
}
.is-black {
  background-color: #1a1a1a;
  color: #fff;
}
.is-red-active {
  background-color: #ce1226;
  color: #fff;
  border: none;
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem 2rem 1rem;
  text-align: center;
  background-image: url("images/psc_hero.jpg");
  background-size: cover;
  background-position: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #c5050c;
  text-shadow:
    -1px -1px 0 #ce1226,
    1px -1px 0 #ce1226,
    -1px 1px 0 #ce1226,
    1px 1px 0 #ce1226,
    0px -1px 0 #ce1226,
    0px 1px 0 #ce1226,
    -1px 0px 0 #ce1226,
    1px 0px 0 #ce1226;
}
.has-text-shadow2 {
  text-shadow:
    -1px -1px 0 #ce1226,
    1px -1px 0 #ce1226,
    -1px 1px 0 #ce1226,
    1px 1px 0 #ce1226,
    0px -1px 0 #ce1226,
    0px 1px 0 #ce1226,
    -1px 0px 0 #ce1226,
    1px 0px 0 #ce1226;
}

/* Darken buttons on hover */
.button:hover {
  filter: brightness(50%);
}

/* Footer */
footer {
  border-top: 3px solid #00843d;
  margin-top: auto;
  padding: 10px 0;
}

/* Centering links in footer */
.footer .level-left,
.footer .level-right,
.footer .level-item:not(.level-left .level-item):not(.level-right .level-item) {
  flex: 1;
  justify-content: center;
}
.footer .level-left {
  justify-content: flex-start;
}
.footer .level-right {
  justify-content: flex-end;
}

/* Event card */
.event-card {
  border: 1.5px solid #48c774;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 900px;
  margin: 1rem auto;
}

/* Contact card */
a.box.contact-card:visited {
  border-color: #00843d;
  color: inherit;
}
.column .contact-card {
  border: 1.5px solid #48c774;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 100%;
  margin: 0 0 1rem 0;
}

/* Contact page image */
.contact-card figure.image {
  overflow: hidden;
  border-radius: 8px;
}
.contact-card figure.image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}
.columns.is-variable .box.event-card {
  height: 100%;
}

/* Authentication state handling */
/* !important is used to override default styles -stackoverflow.com */

/* Hide signed-in elements by default (signed-out state) */
#navUserInfo {
  display: none !important;
}

/* Show auth buttons by default */
#navAuthBtns {
  display: flex !important;
  gap: 0.75rem;
}

/* When JS adds .is-signed-in, swap visibility */
body.is-signed-in #navAuthBtns {
  display: none !important;
}
body.is-signed-in #navUserInfo {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
}

/* Comment block*/
.commentblock {
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  background-color: #fff;
}

/* Signed-out comment prompt Not working */
.signed-out-msg {
  padding: 1.5rem;
  text-align: center;
  border: 1.5px dashed #dbdbdb;
  border-radius: 8px;
  color: #888;
}
.signed-out-msg a {
  color: #00843d;
  font-weight: bold;
  cursor: pointer;
}
.signed-out-msg a:hover {
  text-decoration: underline;
}

/* Modal header text  */
.modal-card-head.has-background-black .modal-card-title {
  color: #fff;
}

/* Disable logged-out buttons  */
/* Register button greyed out when signed out */
.register-btn {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Re-enable when signed in */
body.is-signed-in .register-btn {
  opacity: 1;
  cursor: pointer;
}

/* Comment/post button greyed out when signed out */
.post-comment-btn {
  opacity: 0.45;
  cursor: not-allowed;
}

body.is-signed-in .post-comment-btn {
  opacity: 1;
  cursor: pointer;
}

/* Hide admin-only elements by default */
.admin-only {
  display: none !important;
}
/* Show when body has is-admin class */
body.is-admin .admin-only {
  display: inline-flex !important;
}

/* Stack auth buttons vertically on mobile - GenAI */
@media screen and (max-width: 1023px) {
  #navAuthBtns,
  #navUserInfo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
  }

  #navAuthBtns .button,
  #navUserInfo .button {
    width: 100%;
  }

  #navWelcome {
    display: block;
    padding-bottom: 0.25rem;
    font-weight: 600;
  }
}
