/* Block_2 */
.block_projects {
  display: inline;
  margin: 0 auto;
  padding: 0 20px;
  }

  .block_projects_container_title {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-style: normal;
  text-align: center;
  font-size: 30px;
  color: rgb(0, 64, 133);
  margin-top: 35px;
  margin-bottom: 20px;
  margin-right: 1030px;
  line-height: 54px;
  white-space: nowrap;
  }

  .underline {
    display: inline-block;
    border-bottom: 3px solid rgb(0, 64, 133);
    padding-bottom: 4px;
  }

  .projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 30px;
    max-width: 1160px;
    margin: 0 auto;
    margin-bottom: 80px;
  }

  .projects_block {
    flex: 0 1 calc(33.33% - 20px);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    margin-bottom: 5px;
    box-shadow: 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .projects_block_text {
    font-family: Roboto, sans-serif;
    font-size: 15px;
    text-align: justify;
    color: rgb(85, 85, 85);
    line-height: 23px;
    margin-top: 7px;
  }

  .projects_block:hover {
    transform: scale(1.04);
    box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.5);
  }

  .projects_block_img {
    width: 100%;
    max-width: 360px;
    height: 240px;
    margin-top: 20px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .projects_block_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    display: block;
  }

  .projects_block_title h4 {
    font-family: "Roboto Condensed", sans-serif;
    text-align: center;
    margin: 15px 0;
    color: white;
    background-color: rgb(22, 105, 160);
    border-radius: 10px;
    padding: 3px 5px;
    font-size: 21px;
    font-weight: 700;
    line-height: 33px;
    cursor: pointer;
  }

  .projects_block_title h4:hover {
    color: #f5f1f1;
  }

  .title_photo {
    font-weight: 700;
    background-color: rgba(128, 128, 128, 0.4);
    border-radius: 5px;
    padding: 2px 7px;
    display: inline-block;
    width: fit-content;
    justify-content:end;
    order: 2;
    margin-bottom: 3px;
  }

  .title_photo:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
  }

  .custom a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
  }

  .custom a:visited {
    color: inherit;
  }

  .custom a:active {
    color: inherit;
  }

  .custom a:hover {
    color: rgb(51, 51, 51);
    text-decoration: none;
  }


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

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  margin: 10% auto;
  width: 90%;
  max-width: 800px;
  text-align: center;
  flex-direction: column;
}

.modal-content img {
  width: 100%;
  height: auto;
  max-width: 80vw;
  max-height: 90vh;
  border-radius: 10px;
  box-sizing: border-box;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.navigation {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-50%);
}

.nav-button {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 30px;
  border-radius: 50%;
}

.nav-button:hover {
  color: #007bff;
}

.prevBtn {
  left: 10px;
  width: 40px;
  height: 100px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 24px;
  border: none;
  transition: opacity 0.3s ease-in-out;
  border-radius: 0;
}

.nextBtn {
  right: 10px;
  width: 40px;
  height: 100px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 24px;
  border: none;
  transition: opacity 0.3s ease-in-out;
  border-radius: 0;
}

.close:hover {
  transform: scale(1.2);
}

.projects_block_img img:first-of-type {
  display: block;
}

.projects_block_img.active img {
  display: block;
}

.open-gallery-btn {
  cursor: pointer;
  color: black;
  font-size: 16px;
}

.indicator-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.indicator {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: #007bff;
}

.right-align {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.arrow {
  font-size: 20px;
  background-color: #2e75c0;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 3px 25px;
  cursor: pointer;
  justify-content:left;
  display: inline-flex;
  transition: all 0.3s ease;
  box-shadow: rgb(51, 50, 50) 0 4px 0 0;
  margin-bottom: 10px;
}

.arrow:hover {
  background-color: rgb(22, 105, 160);
  transform: scale(1.05);
}



/* Block_2 */
@media screen and (max-width: 767px) {
  .projects {
    flex-direction: column;
    gap: 1px;
    max-width: 87%;
    margin-bottom: 30px;
  }

  .projects_block {
    flex: 1 1 100%;
    padding: 10px;
  }

  .projects_block:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 8px -4px rgba(0, 0, 0, 0.3);
  }

  .block_projects_container_title {
    font-size: 24px;
    margin-top: -95px;
    margin-bottom: 7px;
    margin-left: 35px;
  }


  .projects_block_text {
   padding: 0 10px;
  }

  .modal-content img {
    width: 100%;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    box-sizing: border-box;
  }

  .modal-content {
    position: relative;
    margin: 0 auto;
    width: 85%;
    max-width: 800px;
    text-align: center;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .close {
    position: absolute;
    top: 5px;
    right: 15px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
  }

  .navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-50%);
  }

  .nav-button {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
  }

  .nav-button:hover {
    color: #007bff;
  }

  .prevBtn {
    left: 10px;
    width: 32px;
    height: 50px;
    padding: 4px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    border: none;
    transition: opacity 0.3s ease-in-out;
    border-radius: 0;
  }

  .nextBtn {
    right: 10px;
    width: 32px;
    height: 50px;
    padding: 4px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    border: none;
    transition: opacity 0.3s ease-in-out;
    border-radius: 0;
  }

  .close:hover {
    transform: scale(1.2);
  }
}


@media (min-width: 768px) and (max-width: 1024px) {

  .projects {
    max-width: 83%;
    margin-bottom: 40px;
  }

  .block_projects_container_title {
    font-size: 24px;
    margin-top: 10px;
    margin-left: 75px;
  }

  .projects_block:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 10px -4px rgba(0, 0, 0, 0.4);
  }

  .projects_block_title h4 {
    font-size: 10px;
    padding: 0 5px;
    line-height: 20px;
    margin: 10px 0;
  }

  .arrow {
    font-size: 12px;
    padding: 1px 15px;
  }

  .title_photo {
    padding: 2px 4px;
    font-size: 10px;
    margin-bottom: 5px;
  }

  .projects_block_text {
    font-size: 10px;
    line-height: 15px;
  }

  .projects_block_img {
    margin: 0;
    max-height: 150px;
  }

  .projects_block_img img {
    max-height: 130px;
  }

  .modal-content img {
    width: 100%;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    box-sizing: border-box;
  }

  .close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 25px;
    cursor: pointer;
    z-index: 10;
  }

  .modal-content {
    position: relative;
    margin: 0 auto;
    width: 85%;
    max-width: 800px;
    text-align: center;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-50%);
  }

  .nav-button {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
  }

  .nav-button:hover {
    color: #007bff;
  }

  .prevBtn {
    left: 10px;
    width: 30px;
    height: 80px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    border: none;
    transition: opacity 0.3s ease-in-out;
    border-radius: 0;
  }

  .nextBtn {
    right: 10px;
    width: 30px;
    height: 80px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 24px;
    border: none;
    transition: opacity 0.3s ease-in-out;
    border-radius: 0;
  }

  .close:hover {
    transform: scale(1.2);
  }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  .block_projects_container_title {
    font-size: 24px;
    margin-top: -1px;
    margin-left: 95px;
  }
}
