:root {
  --green: #013220;
  --burgundy: #3b0014;
  --beige: #f0e6c2;
  --terracotta: #94412f;
  --paper: #f7f6f2;
  --line: #d9d6cc;
  --muted: #62665f;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #17241d;
  background: var(--paper);
  font: 400 1rem/1.6 Manrope, Arial, sans-serif;
}
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 4px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -6rem;
  z-index: 99;
  background: var(--beige);
  padding: .8rem 1rem;
}
.skip-link:focus { top: 1rem; }

.site-header { border-bottom: 0; background: var(--green); }
.header-inner {
  max-width: 1600px;
  min-height: 105px;
  padding: 10px 42px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { flex-shrink: 0; }
.brand img {
  display: block;
  width: 255px;
  height: 85px;
  max-width: calc(100vw - 36px);
  object-fit: contain;
}
.header-rule { height: 36px; width: 1px; background: #61816a; }
.header-label {
  color: var(--beige);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro {
  max-width: 1600px;
  margin: auto;
  padding: 30px 42px 20px;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 56px;
  align-items: end;
}
.eyebrow, .section-kicker {
  margin: 0 0 8px;
  color: var(--terracotta);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.intro h1 {
  color: var(--green);
  font: 800 clamp(2.25rem, 4.1vw, 3.8rem)/1.05 Montserrat, Arial, sans-serif;
  letter-spacing: -.055em;
  margin: 0;
}
.intro h1 span { display: block; color: var(--burgundy); }
.intro-copy p { margin: 0; max-width: 430px; font-size: 1rem; }
.intro-copy .updated { margin-top: 12px; color: var(--muted); font-size: .875rem; }

.loading-status-banner {
  max-width: 1600px;
  margin: 0 auto 20px;
  padding: 12px 42px;
  background: #e2ece4;
  color: var(--green);
  font-size: .875rem;
  font-weight: 600;
}
.loading-status-banner.error { background: #fbeae8; color: var(--terracotta); }

.opportunity-panel {
  max-width: 1000px;
  padding: 28px 42px;
  margin: auto;
  scroll-margin-top: 16px;
}
.panel-heading h2 {
  margin: 0;
  color: var(--green);
  font: 700 clamp(1.65rem, 2.5vw, 2.3rem)/1.15 Montserrat, Arial, sans-serif;
  letter-spacing: -.04em;
}

/* Форма пошуку */
.search-form { margin: 20px 0 32px; }
.search-inputs-grid { margin-bottom: 16px; }
.field-label {
  display: block;
  margin-bottom: 8px;
  color: #435343;
  font-size: .95rem;
  font-weight: 700;
}
.input-wrapper { position: relative; }
.input-wrapper svg {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  pointer-events: none;
}
.search-form input {
  width: 100%;
  height: 54px;
  border: 2px solid #babfb1;
  border-radius: 0;
  background: white;
  color: #223729;
  padding: 0 16px 0 50px;
  font-size: 1.05rem;
}
.search-form input:focus {
  border-color: var(--green);
}

.form-actions { display: flex; gap: 12px; }
.submit-button {
  height: 48px;
  padding: 0 32px;
  background: var(--green);
  color: white;
  border: 0;
  font-weight: 800;
  font-size: .95rem;
}
.submit-button:hover { background: #02472e; }

.reset-button {
  height: 48px;
  padding: 0 24px;
  background: var(--beige);
  color: var(--green);
  border: 0;
  font-weight: 800;
  font-size: .875rem;
}
.reset-button:hover { background: #e7dbaa; }

/* Картка сертифіката */
.certificates-list { display: flex; flex-direction: column; gap: 20px; }

.cert-card {
  background: white;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  padding: 28px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.cert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.cert-badge {
  background: #e2ece4;
  color: var(--green);
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.cert-number-display {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--burgundy);
}

.cert-detail-group { margin-bottom: 16px; }
.detail-label {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.detail-value { font-size: 1rem; color: #223729; }
.person-name { font-size: 1.25rem; color: var(--green); }
.cert-topic { line-height: 1.5; font-weight: 600; }
.cert-hours { font-weight: 700; color: var(--terracotta); }

.cert-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.empty-state {
  background: white;
  padding: 40px 24px;
  text-align: center;
  border-top: 4px solid var(--terracotta);
}
.empty-state p { margin: 0 0 8px; color: var(--terracotta); font: 700 1.2rem Montserrat, Arial, sans-serif; }
.empty-state span { color: var(--muted); font-size: .9rem; }

.how-to {
  max-width: 1000px;
  margin: 32px auto 44px;
  padding: 28px 30px;
  background: var(--burgundy);
  color: white;
  display: grid;
  grid-template-columns: .6fr 1.1fr 1.3fr 1.3fr;
  gap: 28px;
}
.how-to > p {
  margin: 4px 0;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--beige);
  font-size: .75rem;
  font-weight: 800;
}
.how-to h2 { margin: 0; color: var(--beige); font: 700 1.25rem/1.4 Montserrat, Arial, sans-serif; }
.how-to > div { display: flex; align-items: start; gap: 14px; }
.how-to div > span { color: #e2a28e; font-size: 1rem; font-weight: 800; }
.how-to div > p { margin: 0; font-size: .875rem; line-height: 1.7; }

footer {
  padding: 28px 42px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: var(--green);
  color: white;
  font-size: .875rem;
}
footer p { margin: 0; }

@media(max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .cert-details-grid { grid-template-columns: 1fr; gap: 12px; }
  .how-to { grid-template-columns: 1fr 1fr; }
  .how-to > p, .how-to h2 { grid-column: 1/-1; }
}
@media(max-width: 600px) {
  .header-inner { min-height: 76px; padding: 10px 18px; }
  .brand img { width: 220px; height: 50px; }
  .header-rule, .header-label { display: none; }
  .intro, .opportunity-panel { padding: 24px 18px; }
  .form-actions { flex-direction: column; }
  .submit-button, .reset-button { width: 100%; }
  .how-to { margin: 0 18px 32px; padding: 24px 20px; grid-template-columns: 1fr; }
  footer { padding: 24px 18px; flex-direction: column; gap: 14px; }
}
