@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Redacted&display=swap");

.redacted {
  font-family: 'Redacted', sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /*colors*/
  --white: #ffffff;
  --black: #000000;

  /* font weights */
  --bold: 700;
  --medium: 600;
  --regular: 500;

  --h1-size: 55px;
  --h2-size: 34px;
  --p-size: 16px;
  --notice-size: 13px;
}

body {
  font-family: 'Montserrat', Helvetica, sans-serif;
  background: white;
  color: black;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 75px 50px 0;
}

.header-title {
  font-weight: 700;
  font-size: var(--h2-size);
  line-height: 40px;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 25px;
}

.search-icon {
  position: relative;
  width: 31px;
  height: 31px;
  cursor: pointer;
}

.search-circle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid black;
}

.search-handle {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 10px;
  height: 3px;
  background: black;
  transform: rotate(45deg);
}

.search-bar-container {
  display: none;
  justify-content: flex-end;
  padding: 10px 50px 0;
}

.search-bar-container.active {
  display: flex;
}

.search-input {
  width: 25%;
  padding: 8px 12px;
  font-size: var(--p-size);
  font-family: 'Montserrat', Helvetica, sans-serif;
  border: 1px solid black;
  outline: none;
  background: white;
}

.search-input:focus {
  border-color: #333;
}

.divider {
  margin: 10px 50px 0;
  height: 1px;
  background: black;
}

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: 585px;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  object-fit: cover;
  object-position: center top;
  opacity: 50%;
  z-index: 0;
  will-change: transform;
}

.hero-quote {
  position: relative;
  z-index: 10;
  max-width: 1060px;
  margin: 0 auto;
  padding: 117px 20px;
  font-weight: 700;
  font-size: var(--h1-size);
  text-align: center;
  line-height: 64px;
  text-transform: uppercase;
}

#lettersContainer {
  padding: 10px 50px 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 50px;
}

.letter-card {
  display: flex;
  flex-direction: row;
  height: 322px;
  border: 1px solid black;
  background: white;
  color: black;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow: hidden;
}

.letter-card:hover {
  background: black;
  color: white;
}

.letter-card:hover .card-name {
  color: white;
}

.card-image-wrapper {
  flex-shrink: 0;
  width: 193px;
  height: 244px;
  align-self: center;
  margin-left: 39px;
}

.card-image {
  width: 193px;
  height: 244px;
  object-fit: cover;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 25px;
}

.card-name {
  font-weight: 700;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.2;
  margin-bottom: 10px;
  color: black;
  transition: color 0.3s ease;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.trigger-warning {
  font-style: italic;
  color: #cc0000;
  font-size: var(--notice-size);
  margin-top: 5px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}


.footer {
  width: 100%;
  background: black;
  margin-top: 100px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 50px;
}

.footer-row1{
  width: 100%;
  background: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.footer-text {
  font-weight: 500;
  font-size: var(--p-size);
  line-height: 21px;
  color: white;
}

.notice{
  font-weight: 400;
  font-size: var(--notice-size);
  line-height: 16px;
  color: white;
}

.notice a{
  color: white;
  text-decoration: none;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-icon {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  background: none;
  max-width: 1200px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 60px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  color: black;
  font-family: 'Montserrat', Helvetica, sans-serif;
  z-index: 1;
}

.modal-close:hover {
  opacity: 0.6;
}

.modal-body {
  display: flex;
  flex-direction: row;
  gap: 40px;
}

.modal-images-container {
  flex-shrink: 0;
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.modal-image-wrapper {
  width: 100%;
}

.modal-image {
  width: 100%;
  height: auto;
  display: block;
}

.modal-text-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.modal-name {
  font-weight: 700;
  font-size: var(--h2-size);
  line-height: 40px;
  margin-bottom: 25px;
  color: black;
}

.modal-translation {
  font-weight: 400;
  font-size: var(--p-size);
  line-height: 21px;
  color: black;
}
.modal-translation p {
  margin-bottom: 16px;
}

.modal-translation p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {

  :root {
    /* font weights */
    --h1-size: 40px;
    --h2-size: 26px;
    --p-size: 16px;
    --notice-size: 13px;
  }
  
  .header {
    padding: 40px 30px 0;
  }

  .header-title {
    font-size: var(--h2-size);
    line-height: 34px;
  }

  .divider {
    margin: 10px 30px 0;
  }

  .search-bar-container {
    padding: 10px 30px 0;
  }

  .search-input {
    width: 40%;
  }

  .hero {
    min-height: 400px;
  }

  .hero-image {
    display: block;
  }

  .hero-quote {
    font-size: var(--h1-size);
    line-height: 46px;
    padding: 75px;
  }

  #lettersContainer {
    padding: 10px 30px 0;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .letter-card {
    height: auto;
    min-height: 200px;
    overflow: visible;
  }

  .card-image-wrapper {
    width: 140px;
    height: 180px;
    margin-left: 20px;
  }

  .card-image {
    width: 140px;
    height: 180px;
  }

  .card-content {
    margin: 25px;
    min-width: 0;
  }

  .card-name {
    font-size: clamp(16px, 2.5vw, 22px);
    line-height: 1.2;
  }


  .footer {
    padding: 25px;
  }

  .footer-text {
    font-size: var(--p-size);
  }

  .modal-content {
    width: 90%;
    padding: 25px;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-images-container {
    width: 100%;
  }

  .modal-name {
    font-size: var(--h2-size);
    line-height: 34px;
  }

  .modal-translation{
    font-size: var(--p-size);
    line-height: 21px;
  }
}

@media (max-width: 600px) {
  
  :root {
    /* font weights */
    --h1-size: 26px;
    --h2-size: 21px;
    --p-size: 16px;
    --notice-size: 13px;
  }
  
  .header {
    padding: 30px 20px 0;
  }

  .header-title {
    font-size: var(--h2-size);
    line-height: 26px;
  }

  .divider {
    margin: 10px 20px 0;
  }

  .search-bar-container {
    padding: 10px 20px 0;
  }

  .search-input {
    width: 60%;
  }

  .hero {
    min-height: 250px;
  }

  .hero-quote {
    font-size: var(--h1-size);
    line-height: 34px;
    padding: 40px 20px;
  }

  #lettersContainer {
    padding: 10px 20px 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .letter-card {
    flex-direction: row;
    padding: 20px;
    height: auto;
  }

  .card-image-wrapper {
    margin-left: 0;
    margin-bottom: 15px;
    width: 160px;
    height: 200px;
  }

  .card-image {
    width: 160px;
    height: 200px;
  }

  .card-content {
    margin-left: 0;
    padding-top: 0;
    text-align: center;
    align-items: center;
    margin: 10px 25px;
  }

  .card-name {
    font-size: 20px;
    line-height: 1.2;
  }


  .footer {
    flex-direction: column;
    height: auto;
    padding: 20px;
    gap: 15px;
  }

  .footer-text {
    font-size: var(--p-size);
  }

  .modal-content {
    width: 90%;
    padding: 25px;
  }

  .modal-name {
    font-size: var(--h2-size);
    line-height: 26px;
  }

  .modal-translation {
    font-size: var(--p-size);
    line-height: 21px;
  }
}
