/* === KONTAKTI (kontakti.html) ===
   Sānjosla, virsraksts, pogas, .img-slot — style.css */

/* ── SADAĻA ──────────────────────────────────────────── */
.kon-section {
  scroll-margin-top: 105px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.kon-section:first-of-type { border-top: none; padding-top: 0; }

.kon-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.kon-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eef2fa;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kon-section-title { font-size: 21px; font-weight: 600; color: #111; }

.kon-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .3px;
  margin: 22px 0 10px;
}

/* ── GALVENĀ INFO ────────────────────────────────────── */
.kon-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.kon-quick-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}

a.kon-quick-card:hover { border-color: #c0d0e8; box-shadow: 0 4px 14px rgba(0, 0, 0, .07); }

.kon-quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kon-quick-card label {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.kon-quick-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
}

.kon-quick-card small {
  display: block;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  margin-top: 4px;
}

/* darba laiks + karte */
.kon-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
  align-items: stretch;
}

.kon-hours {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  background: #fff;
}

.kon-hours-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.kon-hours-head h3 { font-size: 15px; font-weight: 600; color: #111; }

.kon-open {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f2f5;
  color: var(--muted);
}

.kon-open::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.kon-open.is-open { background: #e8f5e9; color: var(--tag); }
.kon-open.is-closed { background: #fdecee; color: var(--red); }

.kon-hours table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kon-hours td { padding: 7px 8px; border-top: 1px solid #eef0f4; }
.kon-hours tr:first-child td { border-top: none; }
.kon-hours td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kon-hours tr.closed td:last-child { color: var(--muted); font-weight: 400; }

.kon-hours tr.today td {
  background: #eef2fa;
  color: var(--blue);
  font-weight: 600;
}

.kon-hours tr.today td:first-child { border-radius: 6px 0 0 6px; }
.kon-hours tr.today td:last-child { border-radius: 0 6px 6px 0; }

.kon-map {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  min-height: 300px;
  background: var(--light-bg);
}

.kon-map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; }

/* rekvizīti */
.kon-req {
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--light-bg);
}

.kon-req h3 { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 4px; }
.kon-req .kon-req-name { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

.kon-req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kon-req-item {
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kon-req-item label { display: block; font-size: 11px; color: var(--muted); }
.kon-req-item span { font-size: 13px; font-weight: 600; color: var(--text); word-break: break-all; }

.kon-copy {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}

.kon-copy:hover { color: var(--blue); background: #eef2fa; }
.kon-copy.done { color: var(--tag); }

/* ── DARBINIEKI ──────────────────────────────────────── */
.kon-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.kon-person {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}

/* foto: media/darbinieki/<fails>.jpg — ja nav, rāda iniciāļus */
.kon-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eef2fa;
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.kon-photo img { width: 100%; height: 100%; object-fit: cover; }
.kon-photo:has(img) .kon-initials { display: none; }

.kon-person-body { min-width: 0; flex: 1; }

.kon-role {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tag);
  margin-bottom: 3px;
}

.kon-name { font-size: 16px; font-weight: 600; color: #111; margin-bottom: 10px; }

.kon-links { display: flex; flex-direction: column; gap: 6px; }

.kon-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text);
  width: fit-content;
  max-width: 100%;
  transition: color .15s;
}

.kon-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kon-links a:hover { color: var(--blue); }
.kon-links svg { color: var(--blue); flex-shrink: 0; }

/* ── FORMA ───────────────────────────────────────────── */
.kon-form {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  background: #fff;
}

.kon-form-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

.kon-types { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

.kon-types input { position: absolute; opacity: 0; pointer-events: none; }

.kon-types label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all .15s;
}

.kon-types label:hover { border-color: var(--blue); color: var(--blue); }
.kon-types input:checked + label { background: var(--blue); border-color: var(--blue); color: #fff; }
.kon-types input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }

.kon-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kon-field { display: flex; flex-direction: column; gap: 5px; }
.kon-field.wide { grid-column: 1 / -1; }

.kon-field label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.kon-field label em { color: var(--red); font-style: normal; }

.kon-field input,
.kon-field textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.kon-field textarea { min-height: 130px; resize: vertical; }

.kon-field input:focus,
.kon-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 92, 176, .12);
}

.kon-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.kon-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.5;
}

.kon-consent input { margin-top: 3px; accent-color: var(--blue); }
.kon-consent a { color: var(--blue); text-decoration: underline; }

.kon-sent {
  display: none;
  margin-top: 16px;
  background: #e8f5e9;
  color: var(--tag);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
}

.kon-sent.show { display: block; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .kon-quick { grid-template-columns: minmax(0, 1fr); }
  .kon-row { grid-template-columns: minmax(0, 1fr); }
  .kon-req-grid { grid-template-columns: minmax(0, 1fr); }
  .kon-people { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .kon-section { scroll-margin-top: 150px; }
}

@media (max-width: 600px) {
  .kon-fields { grid-template-columns: 1fr; }
  .kon-form { padding: 18px; }
}

/* ── PHP versijas papildinājumi ─────────────────────── */
.kon-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kon-err {
  display: none; margin-top: 16px; background: #fdecee; color: #a3122a;
  border-radius: 8px; padding: 12px 16px; font-size: 13.5px; font-weight: 600;
}
.kon-err.show { display: block; }
#konBtn:disabled { opacity: .6; cursor: wait; }

.kon-sub { font-size: 17px; margin: 22px 0 10px; }
.kon-ievads { color: var(--muted, #5b6478); margin: 0 0 14px; }
.kon-text { margin: 10px 0 18px; line-height: 1.6; }