* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: white;
  color: #333;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

.header {
  background-color: #0c2036;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-img {
  width: 70px;
  object-fit: contain;
}

.logo-text {
  text-transform: uppercase;
  color: white;
  font-size: 1rem;
  margin-left: 1rem;
}

.nav {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-item {
  color: white;
  font-size: 1rem;
  white-space: nowrap;
  margin-right: 20px;
}

.banner {
  position: relative;
  width: 100%;
  aspect-ratio: 3/1;
}

.banner-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main {
  padding: 3.5rem 2rem;
}

.section {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.form {
  display: flex;
  gap: 1rem;
  padding-bottom: 36px;
  border-radius: 18px;
}

.search-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cccccc;
  border-radius: 10px;
  padding: 0.5rem;
  font-size: 1rem;
}

.search-button {
  min-height: 40px;
  min-width: 150px;
  background-color: #0c2036;
  color: white;
  font-size: 1rem;
  border-radius: 10px;
  padding: 0.5rem;
  transition: background-color 0.3s;
}

.search-button:hover {
  background-color: #4a90e2;
}

.images {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.image {
  width: 100%;
  max-width: 800px;
  object-fit: contain;
  cursor: pointer;
}

.footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #9a9a9a;
  text-align: center;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-logo {
  height: 40px;
  max-width: 135px;
  object-fit: contain;
}

.footer-text {
  font-size: 0.875rem;
  font-weight: 600;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  width: 100%;
  height: 100%;
  overflow-y: hidden;
}

.popup-content {
  background-color: white;
  padding: 1.5rem;
  max-width: 755px;
  width: 99%;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2; 
  position: relative;
  height: 100%;
}

.popup-background {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.popup-background::before {
  content: "";
  border-radius: 50px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../database/photos/11.jpg'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 1; 
}

.popup-header, .popup-text, .popup-footer {
  z-index: 2;
}

.popup-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.popup-content {
  scrollbar-width: none;
}

.popup-content::-webkit-scrollbar-track {
  background: transparent;
}

.popup-content::-webkit-scrollbar-thumb {
  background: transparent;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #ccc;
  background: none;
  border: none;
  cursor: pointer;
}

.popup-close:hover {
  color: #4a90e2;
}

.popup-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.popup-info {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  z-index: 6;
}

.popup-photo {
  width: 150px;
  height: 150px;
  overflow: hidden;
  margin-bottom: 20px;
}

.popup-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 130px;
  margin-top: 20px;
  font-weight: 600;
}

.popup-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.popup-text {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  text-align: left;
  z-index: 9999;
}

.centered-text {
  text-align: center;
  margin-bottom: 20px;
}

.popup-info p,
.popup-text p {
  margin: 10px 0;
}

.hidden {
  display: none;
}

.flex {
  display: flex;
}

.coat-of-arms {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.footer-info {
  font-size: 14px;
  color: #333;
}

.footer-info a {
  color: #0c2036;
  text-decoration: none;
}

.footer-info a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 2s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loader-container {
  display: flex;
  visibility: hidden;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.footer-info p {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

.popup-content::-webkit-scrollbar {
  width: 8px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: #4a90e2;
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

@media (max-width: 768px) {
  .logo-text {
    display: none;
  }

  .popup-content::before {
    background-size: cover;
    opacity: 0.3;  
  }

  .nav-item {
    font-size: 1.125rem;
  }

  .search-input {
    font-size: 1.125rem;
  }

  .search-button {
    font-size: 1rem;
  }

  .popup-header {
    flex-direction: column;
    align-items: center;
  }

  .popup-photo {
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  .header {
    background-color: #0c2036;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    flex-direction: row;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .nav {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }

  .nav-item {
    color: white;
    font-size: 14px;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
  }

  .main {
    padding: 2rem 1rem;
  }

  .section {
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .form {
    flex-direction: column;
    gap: 12px;
  }

  .search-input {
    font-size: 1rem;
    padding: 0.5rem;
  }

  .search-button {
    width: 100%;
    font-size: 1rem;
  }

  .images {
    gap: 1.5rem;
  }

  .popup-content {
    padding: 1rem;
  }

  .footer-logos {
    flex-direction: column;
    gap: 1rem;
  }

  .download-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }
}
