/* Általános stílusok */
:root {
  --primary-color: #2e8b57;
  --secondary-color: #3aa76d;
  --dark-green: #1a4d32;
  --light-bg: #f0f8f5;
  --text-color: #333;
  --white: #ffffff;
  --gray: #e0e0e0;
  --unvisited-link: #380047;
  --visited-link: #551a8b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  background-image: url('hatter.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

/* Ugrás a tartalomra link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  background: var(--primary-color);
  color: white;
  text-align: center;
}

/* Fejléc */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.logo {
  height: 60px;
  width: auto;
  transition: transform 0.3s;
}
.logo:hover {
  transform: scale(1.05);
}

/* Navigáció */
.main-nav {
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-decoration: underline;
}
.main-nav a:hover {
  background-color: rgba(255,255,255,0.2);
  text-decoration: none;
}
.main-nav a[aria-current="page"] {
  background-color: rgba(255,255,255,0.3);
  text-decoration: none;
}

/* Linkek */
a:visited {
  color: var(--visited-link-color);
}
a:hover {
  text-decoration: none;
}

/* Fő tartalom */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: rgba(255,255,255,0.9);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}
h2 {
  font-size: 2rem;
  color: var(--dark-green);
  margin: 1.5rem 0 1rem;
}
h3 {
  font-size: 1.5rem;
  margin: 1.2rem 0 0.8rem;
}

/* Hírek szekció */
.news-section {
  margin-top: 2rem;
}
.news-article {
  background-color: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.news-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Videó konténer */
.video-section {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.video-section video {
  width: 100%;
  display: block;
}


/* Táblázat stílusok */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  background-color: var(--white);
}
th, td {
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--gray);
}
th {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 500;
}
tr:nth-child(even) {
  background-color: #f8f8f8;
}

/* Details/summary */
details {
  margin: 1rem 0;
  padding: 0.5rem;
  background-color: var(--white);
  border-radius: 4px;
}
summary {
  font-weight: bold;
  cursor: pointer;
  padding: 0.5rem;
}
summary:hover {
  color: var(--primary-color);
}

/* Űrlap stílusok */
.join-section {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
#join-form {
  margin-top: 1rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
input[type="text"],
input[type="number"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--gray);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
.role-fieldset {
  border: 1px solid var(--gray);
  padding: 1rem;
  border-radius: 4px;
  margin: 1.5rem 0;
}
.role-fieldset legend {
  padding: 0 0.5rem;
  font-weight: 500;
}
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.checkbox-group {
  margin: 1.5rem 0;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.form-buttons {
  display: flex;
  gap: 1rem;
}
.btn-submit, .btn-reset {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-submit {
  background-color: var(--primary-color);
  color: var(--white);
}
.btn-submit:hover {
  background-color: var(--dark-green);
}
.btn-reset {
  background-color: var(--gray);
  color: var(--text-color);
}
.btn-reset:hover {
  background-color: #d0d0d0;
}
.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: #666;
}

/* Galéria stílusok */
.gallery-container {
  margin-top: 2rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.gallery-item:hover {
  transform: translateY(-5px);
}
.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}
.image-caption {
  padding: 0.8rem;
  background-color: rgba(0,0,0,0.7);
  color: var(--white);
  text-align: center;
}

/* Külső linkek */
.external-links {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}
.external-links ul {
  list-style-type: none;
}
.external-links li {
  margin-bottom: 0.5rem;
}

/* Lábléc */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}
footer a {
  color: var(--white);
  text-decoration: underline;
}
footer a:hover {
  text-decoration: none;
}

/* Reszponzív tervezés */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .main-nav {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .main-nav a {
    display: block;
    text-align: center;
  }
  main {
    padding: 1rem;
  }
  .radio-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  .form-buttons {
    flex-direction: column;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .news-article, .join-section {
    padding: 1rem;
  }
}

/* Nagy kontraszt mód */
body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast main {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff;
}

/* Fejléc és navigáció */
body.high-contrast header {
  background: #000 !important;
  border-bottom: 3px solid #fff;
}

body.high-contrast .main-nav a {
  color: #f0f !important; /* Cián */
  text-decoration: underline !important;
}

/* Címsorok */
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3 {
  color: #0f0 !important; /* Világos zöld */
  border-color: #0f0 !important;
}

/* Táblázatok */
body.high-contrast table {
  border: 2px solid #0f0 !important;
}

body.high-contrast th {
  background: #000 !important;
  color: #0f0 !important;
  border: 2px solid #fff !important;
}

body.high-contrast td {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #0f0 !important;
}

/* Videó leírás */
body.high-contrast details {
  border: 2px solid #0f0 !important;
}

body.high-contrast summary {
  color: #f0f !important;
}

body.high-contrast details p {
  color: #fff !important;
}

/* Űrlapok */
body.high-contrast input,
body.high-contrast textarea {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #0f0 !important;
}

body.high-contrast label {
  color: #f0f !important;
}

body.high-contrast .btn-submit,body.high-contrast .btn-reset {
  background: #000 !important;
  color: #0f0 !important;
  border: 2px solid #0f0 !important;
}

/* Hírek */
body.high-contrast .news-article {
  border: 2px solid #0f0 !important;
}

body.high-contrast .news-article p {
  color: #f0f !important;
}

body.high-contrast .news-article ul {
  color: #f0f !important;
}

body.high-contrast .news-article strong {
  color: #f0f !important;
}

/* Linkek */
body.high-contrast a:visited {
  color: #f0f !important; 
}

/* Képcímek */
body.high-contrast .image-caption {
  background: #000 !important;
  color: #0f0 !important;
  border: 1px solid #0f0;
}

/* Háttérkép */
body {
  background-image: url('hatter.png');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

