:root {
  --bg: #efefef;
  --ink: #1f2a2e;
  --brand: #2f6f63;
  --brand-dark: #2367b1;
  --menu-contact: #8f5426;
  --sand: #e7dfcf;
  --danger: #a63a3a;
  --card: #ffffff;
  --line: #d8d0c2;
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}

a {
  color: #6a4a32;
}

a:hover {
  color: #5a3f2c;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.narrow {
  width: min(680px, 92vw);
}

.site-header {
  border-bottom: 1px solid #e4e4e4;
  background: #f5f3f0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 170px;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.nav a {
  color: #6a4a32;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav a.is-active {
  color: #111;
}

.nav .nav-kontakt {
  background: var(--menu-contact);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 4px;
}

.hero {
  padding: 0;
}

.hero-home {
  min-height: 72vh;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  max-width: 760px;
  padding-top: 4rem;
}

.hero h1 {
  margin-top: 0;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.hero-illustration {
  width: 100%;
  display: block;
  margin-top: 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem auto;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card,
.event-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.btn {
  display: inline-block;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--brand-dark);
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
}

label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

input,
button,
textarea {
  font: inherit;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='file'] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.home-link-row {
  margin-top: 0.8rem;
}

.flash {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.flash-success {
  background: #e9f5ea;
  border-color: #b6d4b9;
}

.flash-error {
  background: #fdecea;
  border-color: #f0b5ae;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem;
  vertical-align: top;
}

.inline-form,
.inline-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #f0e8d7;
}

.footer-grid {
  padding: 1.2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-section {
  padding: 2.2rem 0;
}

.contact-card p {
  margin: 0.45rem 0;
}

.contact-note {
  margin-top: 1rem;
}

@media (max-width: 680px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-row {
    flex-direction: column;
  }

  .brand img {
    width: 140px;
  }

  .nav {
    gap: 1rem;
    flex-wrap: wrap;
    align-self: flex-end;
    justify-content: flex-end;
    width: 100%;
  }
}
