/* Alapbeállítások */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  line-height: 1.5;
  color: #333;

  /* Háttérkép beállítása */
  background-image: url('https://images.pexels.com/photos/417074/pexels-photo-417074.jpeg?cs=srgb&dl=pexels-souvenirpixels-417074.jpg&fm=jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Szövegblokkok és listák balra igazítása */
p, ul, ol, li {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
}

/* Tartalmi szakaszok */
section {
  padding: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Fejléc */
header {
  background-color: #4CAF50;
  color: white;
  padding: 1rem 2rem;
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Navigáció */
nav {
  background-color: #3e8e41;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  position: sticky;
  top: 4.2rem;
  z-index: 999;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
  color: #cce5cc;
}

/* Flexbox konténerek */
.flex {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Első oldal képek egymás mellett */
.kepek {
  flex: 1 1 65%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.image, figure {
  width: 30%;
  aspect-ratio: 1 / 1;
  background-color: #e0e0e0;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.image img,
figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

figcaption {
  text-align: center;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: #666;
  background-color: #f5f5f5;
  border-top: 1px solid #ccc;
  position: absolute;
  bottom: 0;
  width: 100%;
}

/* Dobozok */
.box, article, aside {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1rem;
  box-sizing: border-box;
}

/* Doboz specifikus méretek */
.box, article {
  flex: 1 1 30%;
  min-width: 280px;
}

aside {
  flex: 1 1 30%;
  min-width: 280px;
}

/* Edzésterv oldal speciális konténerek */
.edzesterv-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.oldal-linkek {
  flex: 1 1 20%;
  min-width: 200px;
  border: 1px solid #ccc;
  padding: 1rem;
}

.edzes-tippek {
  flex: 1 1 75%;
  min-width: 400px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.edzes-tippek > article.box {
  flex: 1 1 30%;
  border: 1px solid #ccc;
  padding: 1rem;
}

.taplalkozasi-tippek {
  flex: 1 1 45%;
  min-width: 300px;
  border: 1px solid #ccc;
  padding: 1rem;
  margin-top: 1rem;
}

/* Videó */
.video-container {
  position: relative;
  padding-top: 56.25%;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 1rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Videó részletes leírása - details elem stílus */
details {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  color: #4CAF50;
  outline: none;
  padding: 0.3rem 0;
}

summary:hover, summary:focus {
  color: #388e3c;
}

/* Képgaléria */
.kepgaleria {
  flex: 1 1 50%;
  min-width: 300px;
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: flex-end;
  align-items: flex-start;
}

.kepgaleria figure {
  flex: 1 1 48%;
  aspect-ratio: 1 / 1;
  border: 1px solid black;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f0f0f0;
  text-align: center;
}

.kepgaleria img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Táblázat */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

table th, table td {
  border: 1px solid #999;
  padding: 0.6rem;
  text-align: center;
}

table th {
  background-color: #f2f2f2;
}

/* Form elemek */
form {
  max-width: 1100px;
  margin: 2rem auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

form > div {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="text"], textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

input[type="radio"], input[type="checkbox"] {
  margin-right: 0.4rem;
}

label {
  font-weight: normal;
  font-size: 1rem;
  cursor: pointer;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  margin-right: 1rem;
}

/* Gombok */
button {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 4px;
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

button:hover, button:focus {
  background-color: #388e3c;
  outline: none;
}

/* Linkek */
.link {
  color: #007bff;
  text-decoration: underline;
  margin-top: 0.5rem;
  display: inline-block;
}

.link:hover, .link:focus {
  color: #0056b3;
  outline: none;
}

/* Form gombok konténer */
.form-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Forrás link bekezdés */
.forras-link {
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #eee;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #555;
}

/* Reszponzív */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .flex, form, .edzesterv-flex {
    flex-direction: column;
  }

  .box, article, aside, form > div {
    flex: 1 1 100%;
  }

  .image, figure, .kepgaleria figure {
    width: 100%;
    aspect-ratio: auto;
    height: auto;
  }

  iframe, video {
    height: 250px;
  }
}

/* Nyomtatási nézet */
@media print {
  /* Háttér eltávolítása */
  body {
    background: none !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.3;
    margin: 0;
  }

  /* Elrejtjük az ismétlődő elemeket */
  nav, header, footer, aside {
    display: none !important;
  }

  /* Tartalmi szakaszok egyszerűsítése */
  section, article {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Képek kisebb méretűek */
  img {
    max-width: 50%;
    height: auto;
    page-break-inside: avoid;
  }

  /* Videók elrejtése */
  video, iframe {
    display: none !important;
  }

  /* Linkek megjelenítése szövegként */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #000;
  }

  /* Oldaltörések kezelése */
  table, tr, td, th, figure {
    page-break-inside: avoid;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  /* Oldal margók */
  @page {
    margin: 1.5cm 1.5cm;
  }
}

/* Segítő osztály képernyőolvasókhoz */
.visually-hidden {
  position: absolute !important;
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
}

/* Nagy kontrasztú stílusváltozat */
.high-contrast body {
  background-color: black !important;
  color: white !important;
  font-size: 1.25rem !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
}

.high-contrast a {
  color: yellow !important;
  text-decoration: underline !important;
}

.high-contrast header,
.high-contrast nav,
.high-contrast footer,
.high-contrast .box,
.high-contrast aside,
.high-contrast section,
.high-contrast article {
  background-color: black !important;
  color: white !important;
  border: 1px solid white !important;
}

.high-contrast table th,
.high-contrast table td {
  border-color: white !important;
}

.high-contrast img {
  opacity: 0.8;
  filter: grayscale(100%) contrast(150%);
}

/* Betűméret-váltó gombok stílusa */
.font-size-controls {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.font-size-controls button {
  padding: 0.6rem 1.2rem;
  margin: 0 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.font-size-controls button:hover,
.font-size-controls button:focus {
  background-color: #388e3c;
  outline: none;
}
