:root {
  --primary: #009999;   /* Siemens teal */
  --dark: #1a1a2e;
  --light: #f4f6f8;
  --text: #222;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.5;
}
/* ---------- Hero banner ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
  padding: 1.5rem 1rem;
}
/* Animated background canvas fills the hero */
.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Content above the canvas (lang-switch is excluded because it is already absolute) */
.hero > :not(.bg-canvas):not(.lang-switch) {
  position: relative;
  z-index: 1;
}
/* Photo on the left, text on the right */
.hero-profile {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 1.25rem;
  align-items: center;
  justify-content: center;
  text-align: left;
  margin: 0 auto;
  max-width: 800px;
  padding-top: .5rem;
}
.photo {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4), 0 0 15px rgba(0, 153, 153, .5);
  background: var(--dark);
}
.hero-profile h1 {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 1.5rem;
  line-height: 1.1;
  color: #fff;
}
.subtitle {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
  margin-top: .15rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.contacts {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8rem;
  margin-top: .4rem;
}
.contacts a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
}
/* Language switcher */
.lang-switch {
  position: absolute;
  top: .5rem;
  right: .75rem;
  display: flex;
  gap: .3rem;
  z-index: 3;
}
.lang-btn {
  background: transparent;
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 6px;
  padding: .15rem .45rem;
  cursor: pointer;
  font-size: .75rem;
}
.lang-btn.active { background: var(--primary); }
/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  background: #fff;
  padding: .4rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}
.tab {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  padding: .25rem .75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: .85rem;
  transition: all .2s;
}
.tab:hover { background: rgba(0, 153, 153, .1); }
.tab.active { background: var(--primary); color: #fff; }
/* ---------- Content ---------- */
main {
  max-width: 800px;
  margin: 1.2rem auto;
  padding: 0 1rem;
}
.panel { display: none; animation: fade .3s ease; }
.panel.active { display: block; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
h2 {
  color: var(--dark);
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  padding-left: .6rem;
}
h3 { margin: 1rem 0 .5rem; }
.card, .testimonial, .cert-list {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.card header { display: flex; flex-direction: column; margin-bottom: .5rem; }
.card h3 { margin: 0; }
.meta { color: #666; font-size: .9rem; }
.card ul { padding-left: 1.2rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li {
  background: rgba(0, 153, 153, .12);
  color: var(--dark);
  padding: .3rem .7rem;
  border-radius: 6px;
  font-size: .9rem;
}
.cert-list { list-style: none; }
.cert-list li {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid #eee;
}
.cert-list li:last-child { border-bottom: none; }
.cert-list a { color: var(--primary); }
.testimonial { border-left: 4px solid var(--primary); font-style: italic; }
.testimonial footer { margin-top: .5rem; font-style: normal; color: #666; font-size: .9rem; }
.site-footer {
  text-align: center;
  padding: 1.2rem 1rem;
  color: #777;
  font-size: .85rem;
}
/* ---------- Testimonial form ---------- */
.testimonial-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.testimonial-form h3 { margin: 0; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.testimonial-form label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .9rem;
  color: #444;
}
.testimonial-form input,
.testimonial-form textarea {
  font: inherit;
  padding: .5rem .6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
}
.testimonial-form input:focus,
.testimonial-form textarea:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}
.form-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.form-status {
  color: var(--primary);
  font-size: .9rem;
  min-height: 1.2em;
}
.form-note { color: #777; font-size: .8rem; }
.remove-btn {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: .8rem;
  margin-top: .5rem;
  padding: 0;
}
/* ---------- Mobile ---------- */
@media (max-width: 500px) {
  .hero-profile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .photo {
    grid-column: 1;
    grid-row: auto;
    margin-bottom: .4rem;
  }
  .hero-profile h1,
  .subtitle,
  .contacts {
    grid-column: 1;
    grid-row: auto;
  }
  .contacts { justify-content: center; }
  .tab { font-size: .8rem; padding: .25rem .6rem; }
  .form-row { grid-template-columns: 1fr; }
}
/* ---------- Admin & moderation ---------- */
[hidden] { display: none !important; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.admin-panel { margin-top: 1.5rem; }
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.admin-head h3 { margin: 0; }
.admin-item {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: .9rem;
  margin-top: .75rem;
}
.admin-item p { font-size: .9rem; margin-top: .3rem; }
.admin-actions {
  display: flex;
  gap: .5rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}
.btn-danger { background: #c0392b; }
.badge {
  display: inline-block;
  font-size: .75rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a6d00;
}
.badge.approved {
  background: rgba(0, 153, 153, .15);
  color: var(--primary);
}
.admin-link {
  text-align: center;
  margin-top: .5rem;
  font-size: .8rem;
}
[data-i18n="aboutText"] {
  white-space: pre-line;
}
.admin-link a { color: #777; }