:root {
  --hana-background-color: #ffffff;
  --hana-highlight-color: #000000;
}

/* :root {
  --hana-background-color: #000000;
  --hana-highlight-color: #ffffff;
} */

@font-face {
  font-family: "LoR-Numbers";
  src: url("/LoR-Numbers.otf") format("opentype");
}

@font-face {
  font-family: "Arita";
  src: url("/AritaBuriKR-Medium.ttf") format("truetype");
}

body {
  background-color: var(--hana-background-color);
  color: var(--hana-highlight-color);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-wrap: nowrap;
}

body * {
  font-family: "Arita", Arial, sans-serif;
}

.header,
.footer {
  display: flex;
  position: sticky;
  top: 0;
  height: 50px;
  box-shadow: var(--hana-highlight-color) 0px 2px 4px;
  padding: 5px;
  z-index: 10;
  background-color: var(--hana-background-color);
}

.footer {
  box-shadow: var(--hana-highlight-color) 0px -3px 3px;
  margin-top: 50px;
  top: unset;
}

.footer-middle img {
  display: inline;
  height: 40px;
}

.footer-middle p {
  font-size: xx-large;
}

.header > *,
.footer > * {
  width: 33%;
}

.header-left,
.footer-left {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: flex-start;
  align-items: center;
}

.header-middle,
.footer-middle {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.header-right,
.footer-right {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: flex-end;
  align-items: center;
}

.header-right img {
  border-radius: 30px;
}

.header a {
  color: var(--hana-highlight-color);
  text-decoration: none;
  margin: 10px;
}

.header a:hover {
  font-weight: bold;
}

.header-middle span {
  font-family: "LoR-Numbers", Arial, sans-serif;
  font-size: 1.2em;
}

.header-middle {
  z-index: -1;
}

.header span:hover {
  font-weight: bold;
}

.header img {
  height: 55px;
}

.header-left img {
  margin-right: 10px;
}

.main > h1,
.main > h2,
.heading {
  text-align: center;
  margin: auto;
  margin-bottom: 0;
  max-width: 75%;
}

.banner > h1,
.banner > h2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 75%;
}

.banner > h1 > span,
.banner > h2 > span {
  font-style: italic;
  font-weight: normal;
  max-width: 75%;
  margin: auto;
}

.banner > h1 > p,
.banner > h2 > p {
  text-align: center;
  font-style: italic;
  font-weight: normal;
  margin: auto;
}

.contracts {
  column-count: 2;
  align-content: center;
  gap: 5px;
}

.contract {
  width: 100%;
  border: 7px double var(--hana-highlight-color);
  cursor: pointer;
  break-inside: avoid;
  margin-bottom: 5px;
  max-width: 600px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px);
  animation: contract-fade-in 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.contract > * {
  margin: 10px;
}

@keyframes contract-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contract > img,
#modal-img {
  display: block;
  width: 100%;
  max-width: 90%;
  max-height: 300px;
  object-fit: contain;
  margin: auto;
}

.contract-head {
  display: grid;
  grid-template: "title rank" auto / 80% 20%;
  margin-top: 0;
  margin-bottom: 0;
  align-items: center;
}

.contract-head > img {
  width: 100%;
  display: block;
  margin: auto;
}

.contract-info {
  display: grid;
  grid-template-columns: max-content auto;
  width: 70%;
  margin: auto;
  margin-bottom: 10px;
  margin-top: 10px;
  row-gap: 5px;
  justify-content: center;
}

.office-info {
  grid-template-columns: 1fr 1fr;
}

.contract-info > *:where(:nth-child(odd)) {
  font-weight: bold;
  border-right: 4px solid var(--hana-highlight-color);
  padding-right: 5px;
  text-align: right !important;
}

.contract-info > *:where(:nth-child(even)) {
  padding-left: 1em;
  text-align: left !important;
}

.past-contracts img {
  filter: saturate(0.3) invert(0.9);
}

.past-contracts .contract-head img {
  filter: none;
}

.current-contracts {
  columns: 1;
  display: flex;
  justify-content: center;
}

.current-contracts .contract {
  max-width: 700px;
  /* margin: auto; */
}

.contracts-wrapper {
  margin: auto;
  display: block;
  width: 70%;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--hana-background-color);
  border: 7px double var(--hana-highlight-color);
  border-radius: 8px;
  /* max-width: 600px; */
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--hana-highlight-color);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  font-weight: bold;
}

.modal-header {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--hana-highlight-color);
  padding-bottom: 15px;
}

.modal-header h2 {
  margin: 0 0 10px 0;
}

.modal-date {
  margin: 0;
  font-style: italic;
  color: #666;
}

.modal-body {
  margin-top: 20px;
}

.modal-description {
  margin-top: 20px;
  line-height: 1.6;
  text-align: justify;
}

.no-contracts {
  text-align: center;
}

.no-contracts h2 {
  margin-bottom: 0px;
}

.no-contracts p {
  margin-top: 2px;
  font-style: italic;
  color: #666;
}

section * {
  text-align: center;
}

.profile-card h3,
.profile-card p {
  margin-top: 0;
  margin-bottom: 0;
}

#reminder-section h3,
#reminder-section h2 {
  margin-bottom: 0;
}

.line {
  width: 80%;
  margin: auto;
  height: 0px;
  /* background-color: var(--hana-highlight-color);
   */
  border-bottom: var(--hana-highlight-color) 5px dashed;
  margin: 20px auto;
}

.extra-info {
  text-align: center;
}

.extra-info p {
  max-width: 85%;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
}

.center-img {
  width: 50%;
  max-width: 200px;
  object-fit: cover;
  text-align: center;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 20px;
}

.grade-grid img {
  width: 100%;
  max-width: 150px;
  display: block;
  margin: auto;
}

.contract-list > h2,
section > h2 {
  margin-top: 2em;
}

@keyframes newContractAnimation {
  0% {
    /* border: 7px double var(--hana-highlight-color); */
    filter: brightness(100%);
  }
  50% {
    /* border: 12px double var(--hana-highlight-color); */
    filter: brightness(150%) saturate(200%);
  }
  100% {
    /* border: 7px double var(--hana-highlight-color); */
    filter: brightness(100%);
  }
}

.new-contract {
  animation:
    contract-fade-in 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards,
    newContractAnimation 2s ease-out infinite;
  /* transform: translateY(30px);
  transform: unset;
  opacity: 1; */
}

.highlighted-link {
  font-weight: bold;
}

@media (max-width: 1000px) {
  body {
    min-height: 90vh;
    margin-bottom: 1vh;
  }

  .center-img {
    max-width: 350px;
  }

  .main p,
  .main span,
  .header p,
  .header span,
  .footer p,
  .footer span {
    font-size: x-large;
  }

  h2 {
    font-size: xx-large;
  }

  .contracts {
    column-count: 1;
  }

  .contracts .contract {
    margin: auto;
    margin-bottom: 5px;
  }

  .header a {
    font-size: x-large;
  }
}

div:where(.swal2-icon) {
  color: var(--hana-highlight-color) !important;
  border-color: var(--hana-highlight-color) !important;
}

div:where(.swal2-icon) span {
  background-color: var(--hana-highlight-color) !important;
}

.swal2-success-ring {
  border: 0.25em solid var(--hana-highlight-color) !important;
}
