/* =========================
   RESET / BASE (w3-inspired)
========================= */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  color: #222;
  background: #fff;
}

img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  border: 0;
  border-radius: 12px;
}

h1, h2, h3 {
  margin: 0 0 10px;
  font-weight: 500;
}

p {
  margin: 0 0 12px;
}

ul {
  margin: 0 0 16px;
  padding-left: 1.2rem;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   VARIABLES
========================= */

:root {
  --maxw: 1100px;
  --accent: #2b6ea3;
  --muted: #666;
  --card: #fbfbfb;

  --header-desktop: 231px;
  --header-mobile: 150px;
}

/* =========================
   LAYOUT
========================= */

.page {
  padding-top: calc(var(--header-desktop) + 20px);
}

.container {
  max-width: var(--maxw);
  margin: auto;
  padding: 0 16px 120px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
}

main {
  background: var(--card);
  padding: 16px;
  border-radius: 8px;
}

section {
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 12px;

  border: 1px solid #e5e5e5;

  box-shadow:
    0 2px 6px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

section[id] {
  scroll-margin-top: calc(var(--header-desktop) + 20px);
}

/* =========================
   HERO HEADER
========================= */

.hero {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-desktop);
  overflow: hidden;
  z-index: 50;
  border-bottom: 1px solid #eee;
  background: #111;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.8);
  border-radius: 0;
}

.hero-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(18px, 3vw, 34px);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 4px 12px rgba(0,0,0,.5);
}

/* =========================
   NAVIGATION
========================= */

.nav {
  position: fixed;
  right: 16px;
  top: calc(var(--header-desktop) + 16px);
  width: 200px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
  font-size: .95rem;
  z-index: 60;
}

.nav a {
  display: block;
  padding: 6px;
  border-radius: 6px;
}

.nav a:hover {
  background: #f3f7fb;
}

/* =========================
   TYPO / UTILITIES
========================= */

.muted {
  color: var(--muted);
  font-size: .95rem;
}

.center-img {
  max-width: 520px;
  margin: 16px auto;
}

h2 {
  color: var(--accent);
}

/* =========================
   FORM — kompakt version
========================= */

.form input,
.form textarea,
.form button {
  width: 100%;
  padding: 8px;
  margin-bottom: 6px;
  font: inherit;
}

.form textarea {
  height: 90px;
  resize: vertical;
}

.form button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
}

/* =========================
   FOOTER
========================= */

footer {
  max-width: var(--maxw);
  margin: 40px auto;
  padding: 16px;
  color: var(--muted);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 880px) {

  .hero {
    height: var(--header-mobile);
  }

  .page {
    padding-top: calc(var(--header-mobile) + 12px);
  }

  section[id] {
    scroll-margin-top: calc(var(--header-mobile) + 12px);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .nav {
    left: 12px;
    right: 12px;
    bottom: 10px;
    top: auto;
    width: auto;
    display: flex;
    justify-content: space-around;
  }

  .nav a {
    flex: 1;
    text-align: center;
    font-weight: 600;
  }
}
