:root {
  --green-950: #032b1b;
  --green-900: #06452b;
  --green-800: #086137;
  --green-700: #0a7a45;
  --green-100: #e9f7ee;
  --green-50: #f4fbf6;
  --white: #ffffff;
  --ink: #122119;
  --muted: #607069;
  --line: #d9e7df;
  --paper: #ffffff;
  --soft: #f3f8f5;
  --shadow: 0 18px 42px rgba(3, 43, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(6, 69, 43, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(6, 69, 43, 0.035) 1px, transparent 1px),
    var(--soft);
  background-size: 42px 42px;
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softScaleIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  animation: fadeUp 0.45s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-900);
  font-weight: 800;
  white-space: nowrap;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 2px solid var(--green-100);
  border-radius: 50%;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--green-900);
  background: var(--green-100);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(680px, calc(100vh - 71px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(42px, 7vw, 88px) clamp(18px, 5vw, 72px);
  color: #fff;
  background:
    radial-gradient(circle at 78% 50%, rgba(255, 255, 255, 0.18) 0 86px, transparent 88px),
    linear-gradient(90deg, rgba(3, 43, 27, 0.94), rgba(6, 69, 43, 0.72)),
    url("../img/tiszaszalka-se-logo.jpg") center / cover;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  inset: 24px;
  z-index: -1;
  content: "";
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.hero::after {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 50%;
  z-index: -1;
  width: 2px;
  content: "";
  background: rgba(255, 255, 255, 0.24);
}

.hero-content {
  max-width: 700px;
  animation: fadeUp 0.65s ease 0.12s both;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d9ffe5;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 8vw, 6.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--green-900);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  line-height: 1.25;
}

.lead {
  max-width: 560px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--green-950);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.button.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
}

.button.secondary.dark {
  color: var(--green-900);
  border: 1px solid var(--line);
  background: #fff;
}

.hero-logo {
  margin: 0;
  justify-self: end;
  width: min(100%, 410px);
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: softScaleIn 0.65s ease 0.22s both;
  transition: transform 0.25s ease;
}

.hero-logo:hover {
  transform: translateY(-3px);
}

.hero-logo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
}

.quick-info,
.section {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: -34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
  animation: fadeUp 0.55s ease 0.28s both;
}

.quick-info > div,
.contact-grid > div {
  position: relative;
  padding: 20px;
  background: var(--paper);
}

.quick-info > div::before,
.contact-grid > div::before {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 10px;
  content: "";
  background: var(--green-700);
  border-radius: 999px;
}

.label,
.date {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.section {
  padding: clamp(46px, 7vw, 76px) 0 0;
  animation: fadeUp 0.55s ease both;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.news-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card,
.match-panel,
.table-wrap,
.photo-placeholder,
.gallery-photo,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(3, 43, 27, 0.07);
}

.card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-top: 4px solid var(--green-700);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.document-card:hover,
.carousel-slide:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(3, 43, 27, 0.12);
}

.card.selected-news {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(10, 122, 69, 0.16), 0 12px 28px rgba(3, 43, 27, 0.07);
}

.card h3 {
  color: var(--green-900);
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.share-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  margin-top: 18px;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: #1877f2;
  font-family: Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease;
}

.share-button:hover {
  background: #0f5fc4;
  transform: translateY(-2px);
}

.match-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border-top: 4px solid var(--green-700);
  animation: fadeUp 0.55s ease both;
}

.next-match {
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    var(--green-800);
}

.next-match .label {
  color: var(--green-100);
}

.next-match p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.table-wrap,
.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--paper);
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--green-900);
  background: var(--green-100);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: var(--green-50);
}

.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.document-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(3, 43, 27, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.document-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--green-800);
  font-size: 0.8rem;
  font-weight: 800;
}

.document-card h3 {
  margin-bottom: 3px;
  color: var(--green-900);
}

.document-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.gallery-carousel {
  position: relative;
}

.carousel-track {
  display: grid;
  grid-auto-columns: minmax(260px, 34%);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.carousel-slide {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(3, 43, 27, 0.07);
  cursor: pointer;
  font: inherit;
  text-align: left;
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.carousel-slide:hover img {
  transform: scale(1.035);
}

.carousel-slide span {
  display: block;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.carousel-btn,
.modal-close,
.modal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green-900);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.carousel-btn.prev {
  left: -12px;
}

.carousel-btn.next {
  right: -12px;
}

.photo-placeholder {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--green-800);
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(8, 97, 55, 0.14), rgba(255, 255, 255, 0.72)),
    var(--paper);
}

.gallery-photo {
  margin: 0;
  overflow: hidden;
}

.gallery-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-photo:hover img {
  transform: scale(1.035);
}

.gallery-photo figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
  background: rgba(3, 20, 13, 0.88);
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal figure {
  width: min(100%, 980px);
  margin: 0;
}

.gallery-modal img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

.gallery-modal figcaption {
  margin-top: 10px;
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green-900);
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  color: #fff;
  background: rgba(6, 69, 43, 0.88);
  border-radius: 999px;
  font-size: 2.4rem;
  line-height: 1;
  transform: translateY(-50%);
}

.modal-prev {
  left: 16px;
}

.modal-next {
  right: 16px;
}

.contact {
  padding-bottom: clamp(46px, 7vw, 76px);
}

.footer_section {
  margin: 0;
  padding: 5px 0;
  border: 0;
  background: transparent;
}

.text-center {
  text-align: center;
}

.matrix-link {
  display: inline;
  padding: 2px 6px;
  color: #00ff66;
  background: #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 5px #00ff66;
}

.matrix-link:hover {
  color: #fff;
  text-shadow: 0 0 10px #00ff66, 0 0 20px #00ff66;
}

.admin-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) 0;
}

.admin-login {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 430px);
}

.admin-hero {
  margin-bottom: 24px;
}

.admin-hero h1,
.login-card h1 {
  margin-bottom: 12px;
  color: var(--green-900);
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.admin-hero p {
  max-width: 720px;
  color: var(--muted);
}

.notice {
  display: inline-flex;
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid #b9dca7;
  border-radius: 6px;
  color: var(--green-900);
  background: var(--green-100);
  font-weight: 800;
}

.notice.error {
  color: #7a1f1f;
  border-color: #efc0c0;
  background: #fff0f0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-card,
.admin-edit-card {
  padding: 22px;
}

.admin-card h2 {
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.admin-card label,
.admin-edit-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--green-900);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-card input,
.admin-card textarea,
.admin-edit-card input,
.admin-edit-card textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.admin-card textarea,
.admin-edit-card textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 12px;
}

.form-row.six {
  grid-template-columns: repeat(5, 1fr);
}

.clear-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-list-section {
  padding-top: clamp(38px, 6vw, 64px);
}

.admin-list,
.admin-gallery-list {
  display: grid;
  gap: 14px;
}

.admin-edit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(3, 43, 27, 0.07);
}

.admin-edit-card.compact {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.6fr auto;
  align-items: end;
  gap: 12px;
}

.standing-edit {
  display: grid;
  grid-template-columns: 0.45fr minmax(160px, 1.4fr) repeat(5, 0.55fr) auto;
  align-items: end;
  gap: 12px;
}

.admin-gallery-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-edit img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 14px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button.danger {
  color: #fff;
  background: #b42318;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero::after {
    display: none;
  }

  .hero-logo {
    justify-self: stretch;
    width: 100%;
  }

  .quick-info,
  .news-grid,
  .contact-grid,
  .document-grid,
  .match-panel,
  .admin-grid,
  .admin-edit-card.compact,
  .standing-edit,
  .admin-gallery-list {
    grid-template-columns: 1fr;
  }

  .carousel-track {
    grid-auto-columns: minmax(240px, 58%);
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }

  .brand span {
    font-size: 0.95rem;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
    font-size: 0.88rem;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--green-50);
    text-align: center;
  }

  .hero {
    gap: 22px;
    padding: 26px 16px 30px;
  }

  .hero::before {
    inset: 20px 16px;
  }

  .hero-content,
  .hero-logo {
    width: 100%;
    max-width: none;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-logo {
    padding: 8px;
  }

  .hero-logo img {
    aspect-ratio: 16 / 10;
  }

  .quick-info {
    margin-top: 0;
    width: 100%;
    border-radius: 0;
    border-inline: 0;
  }

  .carousel-track {
    grid-auto-columns: 86%;
  }

  .document-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .document-card .button {
    grid-column: 1 / -1;
  }

  .carousel-btn {
    display: none;
  }

  .modal-nav {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .modal-prev {
    left: 18px;
  }

  .modal-next {
    right: 18px;
  }

  .form-row,
  .form-row.six {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
