* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f3f5f8, #dbe9ff);
  color: #1f2937;
}

.container {
  min-height: 100vh;
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.hero-card {
  width: min(1080px, 100%);
  margin-bottom: 20px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.1);
  padding: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  margin: 0;
  color: #b45309;
  font-weight: 700;
  font-size: 14px;
}

.hero-title {
  margin: 6px 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}

.hero-desc {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.hero-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #0f172a;
  line-height: 1.7;
}

.hero-image-wrap {
  margin: 0;
  background: #f8fafc;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.hero-image {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #f8fafc;
}

.topbar {
  width: min(1080px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.lang-btn {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 10px;
  height: 38px;
  min-width: 54px;
  cursor: pointer;
  font-weight: 700;
}

.all-list-btn {
  text-decoration: none;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  border-radius: 10px;
  height: 38px;
  min-width: 92px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.search-card {
  width: min(1080px, 100%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  height: 44px;
  padding: 0 12px;
  font-size: 16px;
}

button#search-btn {
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 10px;
  height: 44px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.helper-text {
  margin: 12px 0 0;
  color: #6b7280;
}

.results {
  width: min(1080px, 100%);
  margin-top: 16px;
}

.page-footer {
  width: min(1080px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
}

.footer-logo {
  width: min(160px, 50%);
  height: auto;
  display: block;
}

.footer-credit {
  margin: 12px 0 0;
  font-size: 14px;
  color: #475569;
  text-align: center;
}

.result-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.result-grid p {
  margin: 0;
}

.cert-link {
  display: inline-block;
  text-decoration: none;
  border: none;
  background: #059669;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.not-found {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.is-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-image {
  width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  border-radius: 10px;
  background: #f3f4f6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-download {
  display: inline-block;
  text-decoration: none;
  border: none;
  background: #2563eb;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-image {
    max-height: 480px;
    object-fit: contain;
    background: #f8fafc;
  }

  .footer-logo {
    width: min(220px, 78%);
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}
