/* Styling for all the pages */

:root {
  --font-size: 16px;
  --color-bg: #fff8f0;
  --color-text: #333;
  --color-accent: #6b4f4f;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-size);
  background-color: var(--color-bg);
  color: var(--color-text);
}

header {
  background-color: var(--color-accent);
  color: white;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
}

.skip-link:focus {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background-color: #fff;
  color: #000;
  border: 2px solid #000;
  font-weight: bold;
  z-index: 1000;
}

.menu-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  position: relative;
  z-index: 1000;
  transition: transform 0.3s ease;
}

#menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

#menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

#menu a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#menu a.active {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 0.25em;
}

.accessibility-tools {
  display: flex;
  gap: 0.5rem;
}

.accessibility-tools button {
  background: #eee;
  border: 2px solid #ccc;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}

.slogan {
  font-style: italic;
  margin: 0;
  font-size: 0.9rem;
}

.container {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  grid-template-areas:
    "ad video video"
    "ad gallery gallery"
    "ad products opening"
    "ad side side";
}

.adblock {
  grid-area: ad;
  background-color: #FAEFD6;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  object-fit: cover;
  display: block;
}

.video-section {
  grid-area: video;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.video-section video {
  width: 70%;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
}

.video-transcript {
  margin-top: 0;
  border: 1px solid var(--color-accent);
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  background-color: #fff;
  width: 100%; 
}

.video-transcript summary {
  padding: 0.8rem 1rem;
  background-color: var(--color-accent);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%; 
  box-sizing: border-box;
}

.video-transcript summary:hover {
  background-color: #7d5d5d;
}

.transcript-content {
  padding: 1rem;
  line-height: 1.5;
  background-color: #fdf6f0;
}

.transcript-content h3 {
  margin-top: 0;
  color: var(--color-accent);
  border-bottom: 1px solid #e6d8d0;
  padding-bottom: 0.5rem;
}

.transcript-content p {
  margin-bottom: 0.8rem;
}

.transcript-content .tags {
  font-size: 0.9rem;
  color: #816a6a;
  margin-top: 1rem;
}

.coffee-gallery {
  grid-area: gallery;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.coffee-gallery img {
  width: 30%;
  border-radius: 6px;
  object-fit: cover;
}

.products {
  grid-area: products;
}

.opening-hours {
  grid-area: opening;
}

.opening-hours table {
  width: 100%;
  border-collapse: collapse;
}

.opening-hours th,
.opening-hours td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

.sideblock {
  grid-area: side;
  background-color: #f0e5de;
  padding: 1rem;
  border-radius: 8px;
}

footer {
  text-align: center;
  padding: 1rem;
  background-image: url("footer_background.png");
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Telefon nézet - 700px-ig */
@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    position: relative;
  }

  .menu-wrapper {
    width: 100%;
  }

  #menu-toggle {
    display: block;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  #menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 85%;
    max-width: 320px;
    background-color: var(--color-accent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    align-items: flex-start;
  }

  #menu.show {
    transform: translateX(0);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  #menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.3rem;
    margin: 0;
    padding: 0.5rem 0;
    line-height: 1.8rem;
    vertical-align: middle;
    display: flex;
    align-items: center;
  }

  #menu-close {
    align-self: flex-end;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-bottom: 2rem;
    z-index: 1000;
  }

  .accessibility-tools {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
    justify-content: space-between;
  }

  .accessibility-tools button {
    flex: 1;
    padding: 0.5rem;
    line-height: 1.8rem;
    vertical-align: middle;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
  }

  .container {
    grid-template-areas:
      "video"
      "gallery"
      "products"
      "opening"
      "side"
      "ad";
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .video-section video {
    max-width: 100%;
    width: 100%;
  }

  .video-transcript {
    width: 100%;
  }

  .coffee-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .coffee-gallery img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
  }
}

/* Tablet nézet - 701px-1050px */
@media (min-width: 701px) and (max-width: 1050px) {
  header {
    flex-direction: row;
    align-items: center;
    padding: 1rem;
  }

  #menu-toggle {
    display: block;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
  }

  #menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 60%;
    max-width: 400px;
    background-color: var(--color-accent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    align-items: flex-start;
  }

  #menu.show {
    transform: translateX(0);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  #menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0;
    padding: 0.5rem 0;
    line-height: 1.8rem;
    vertical-align: middle;
    display: flex;
    align-items: center;
  }

  #menu-close {
    align-self: flex-end;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-bottom: 2rem;
    z-index: 1000;
  }

  .accessibility-tools {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
    justify-content: space-between;
  }

  .accessibility-tools button {
    flex: 1;
    padding: 0.5rem;
    line-height: 1.8rem;
    vertical-align: middle;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }

  .container {
    grid-template-areas:
      "video video"
      "gallery gallery"
      "products opening"
      "side ad";
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .video-section {
    align-items: center;
  }
  
  .video-section video {
    max-width: 80%;
    width: 80%;
  }
  
  .video-transcript {
    width: 80%;
  }

  .coffee-gallery img {
    width: 45%;
  }
}

/* Desktop nézet - 1051px-től */
@media (min-width: 1051px) {
  header {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 1rem;
  }

  #menu-toggle {
    display: none;
  }

  #menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: center;
    position: relative;
    transform: translateX(0);
    background: none;
    box-shadow: none;
    padding: 0;
    width: auto;
    height: auto;
  }

  #menu-close {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-bottom: 0;
  }

  #menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 0;
    line-height: 1.5rem;
    vertical-align: middle;
  }

  .accessibility-tools {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 0;
    width: auto;
  }

  .accessibility-tools button {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
  }

  .container {
    grid-template-areas:
      "ad video video"
      "ad gallery gallery"
      "ad products opening"
      "ad side side";
    grid-template-columns: 1fr 2fr 2fr;
    gap: 1rem;
  }

  .video-section {
    align-items: center;
  }
  
  .video-section video {
    max-width: 70%;
    width: 70%;
  }
  
  .video-transcript {
    width: 70%;
  }

  .coffee-gallery img {
    width: 30%;
  }
}

body.menu-open {
  overflow: hidden;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-row h1 {
  margin: 0;
}

#menu-close {
  display: none;
}

/* Nagy Kontraszt mód */
body.high-contrast {
  background-color: #000;
  color: #fff;
}

body.high-contrast header,
body.high-contrast nav,
body.high-contrast footer {
  background-color: #000;
  color: #fff;
  background-image: none !important;
}

body.high-contrast nav a,
body.high-contrast button {
  color: #0ff;
  background-color: #000;
  border: 2px solid #0ff;
}

body.high-contrast .adblock,
body.high-contrast .sideblock,
body.high-contrast .products,
body.high-contrast .opening-hours,
body.high-contrast .coffee-gallery {
  background-color: #222;
  color: #fff;
  border: 1px solid #0ff;
}

body.high-contrast #menu {
  background-color: #000;
  border-right: 2px solid #0ff;
}

body.high-contrast #menu a {
  color: #0ff;
}

body.high-contrast #menu-close {
  color: #0ff;
}

body.high-contrast .transcript-content {
  padding: 1rem;
  line-height: 1.5;
  background-color: #222;
  color: #fff
}

body.high-contrast .video-transcript summary {
  padding: 0.8rem 1rem;
  background-color: var(--color-accent);
  color: #fff;
  background-color: #222;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  border-color: #0ff;
  border-bottom: 1px solid #0ff;
}

body.high-contrast .video-transcript summary:hover {
  background-color: #313131;
}

body.high-contrast .transcript-content .tags {
  color: #fff;
}

body.high-contrast .transcript-content h3 {
  color: #fff;
}

body.high-contrast .video-transcript {
  border-color: #0ff;
}
