/* ==========================================================================
   Global rule section
   ========================================================================== */

/* !--- Global rules ---! */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html {
  scroll-padding-top: 4.9vh;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lora", serif;
  text-align: center;
  color: #3d3d3d;
  font-size: 1.5rem;
}

*::placeholder {
  font-family: "Lora", serif;
}

/* Typography */
h1, h2, h3 {
  font-family: "Great vibes", cursive;
}

h1 {
  font-size: 8rem;
}

h2 {
  font-size: 6rem;
}

h3 {
  font-size: 4rem;
}

legend {
  margin: 0;
  padding: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}


label, legend {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 0.5rem;
}

ul {
  list-style: none;
}

.event .year {
  font-weight: bold;
  font-size: larger;
}

.event .description {
  margin-top: 10px;
  font-weight: bold;
}

/* ==========================================================================
   Layout section
   ========================================================================== */

/* !--- Basic containers ---! */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.main-block-1, .main-block-2, .home-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 2rem;
}

.home-block {
  background-color: rgba(247, 243, 227, 0.6); /* #F7F3E3 */
  margin-top: 6.5rem;
  margin-bottom: 6.5rem;
  margin-left: 0;
  margin-right: 0;
  font-weight: 500;
}

.main-block-1 {
  background-color: #F7F3E3;
  color: #3d3d3d;
}

.main-block-2 {
  background-color: #a8c3a5;
  color: #fafafa;
}

.main-block-1 p, .home-block p {
  width: 50%;
}

/* !--- Navbar ---! */
nav {
  position: -webkit-sticky; /* For Safari */
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding-top: env(safe-area-inset-top);
}

.navbar {
  height: 6vh;
  background-color: #F7F3E3;
  transition: background-color 0.3s ease;
}

.navbar-links {
  justify-content: space-around;
  align-items: stretch;
  display: flex;
  height: 100%;
}

.navbar-links a {
  flex: 1; /* Make items evenly spaced and touch each other */
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
  color: #3D3D3D;
  transition: color 0.3s ease, background-color 0.3s ease;
  background-color: #fafafa;
}

.hamburger {
  display: none;
  height: 100%;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  color: #3D3D3D;
  margin: 0;
  margin-left: auto;
}

/* !--- Home ---! */
#home {
  background-image: url("../images/nadas-pihenopark-eskuvok-galeria-11.webp");
  background-size: cover;
}

#home p {
  margin: 1rem;
}

/* !--- Timeline ---! */

#ourStory {
  margin-bottom: 0;
}

.timeline-container {
  position: relative;
  width: 65%;
  margin: 200px;
}

.timeline {
  position: relative;
  width: 100%;
  height: 6px;
  background-color: #3d3d3d;
  margin: 50px 0;
  overflow: hidden;
}

.event {
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
}

.event img {
  box-sizing: content-box;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #3d3d3d;
  position: absolute;
  top: -250px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}

.event img:hover {
  transform: translateX(-50%) scale(1.4);
}

.event .tick {
  position: absolute;
  width: 4px;
  height: 20px;
  background-color: #3d3d3d;
  top: -62.5px;
  left: 50%;
  transform: translateX(-50%);
}

/* !--- Details ---! */

.details-container {
  width: 95%;
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 5rem;
  justify-items: stretch;
  margin: 0 auto;
  justify-content: stretch;
}

/* Timetable */
.timetable {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.timetable::after {
  content: "";
  position: absolute;
  width: 6px;
  background-color: #fafafa;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

.timetable-container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */
.timetable-container::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: #fafafa;
  border: 4px solid #3d3d3d;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.tt-left {
  left: 0;
}

.tt-right {
  left: 50%;
}

/* Add arrows to the left container (pointing right) */
.tt-left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid #fafafa;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #fafafa;
}

/* Add arrows to the right container (pointing left) */
.tt-right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid #fafafa;
  border-width: 10px 10px 10px 0;
  border-color: transparent #fafafa transparent transparent;
}

/* Fix the circle for containers on the right side */
.tt-right::after {
  left: -16px;
}

.timetable-content {
  padding: 0.5rem 2rem;
  position: relative;
  border-radius: 6px;
  background-color: #fafafa;
  color: #3D3D3D;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  align-items: center;
}

.timetable-content span {
  font-size: 4rem;
}

.timetable-content * {
  margin: 0;
  padding: 0;
}

.tt-left-content-1 {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
}

.tt-left-content-2 {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
}

.tt-left-content-3 {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
}

.tt-right-content-1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.tt-right-content-2 {
  grid-column: 2 / 4;
  grid-row: 1 / 2;
}

.tt-right-content-3 {
  grid-column: 2 / 4;
  grid-row: 2 / 3;
}

.timetable-content > .ttc > img {
  height: 75px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Location */

.map-div {
  position: relative;
  overflow: hidden;
  width: 60%;
  padding-top: 33.33%;
  margin-bottom: 5rem;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

/* !--- Form ---! */
form {
  background: #A8C3A5;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 32.5vw;
  margin-bottom: 5rem;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #C8A27E;
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 1rem;
  box-sizing: border-box;
  resize: none;
  color: #3D3D3D;
}

input:focus, textarea:focus {
  border-color: #fafafa;
  outline: none;
  box-shadow: 0 0 5px rgba(168, 195, 165, 0.5);
}

input:-webkit-autofill, textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #fafafa inset;
  box-shadow: 0 0 0px 1000px #fafafa inset;
  font-size: 1rem;
  color: #3D3D3D;
  border: 1px solid #C8A27E;
}

input:-webkit-autofill-preview, textarea:-webkit-autofill-preview, input:-webkit-autofill-preview:hover, textarea:-webkit-autofill-preview:hover {
  font-family: "Lora", serif;
  font-size: 1rem;
  color: #3D3D3D;
}

input[type="radio"] {
  margin: 0;
}

fieldset {
  text-align: center;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}

.radio-group {
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: center;
}

.radio-group label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gdpr {
  text-align: left;
  font-size: 1rem;
}

#feedbackForm a {
  text-decoration: none;
  color: #556c54;
}

button {
  background: #F0D28A;
  color: #3D3D3D;
  font-size: 1.125rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: 0.3s ease;
}

button:hover {
  background-color: #E0B76A; /* Adjusted shade of #D9A84C */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* !--- FAQ ---! */

.faq-wrapper {
  font-family: 'EB Garamond', serif;
  width: 100%;
  display: flex;
  justify-content: center;
}

.faq-container {
  max-width: 800px;
  width: 100%;
  background-color: transparent;
  padding: 40px;
  border-radius: 20px;
  color: #fafafa;
}

.faq-item {
  margin-bottom: 30px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  color: #556c54;
}

.faq-icon {
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
  background-color: #fafafa;
  color: #556c54;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.faq-answer {
  display: none;
  line-height: 1.6;
  text-align: left;
  color: #556c54;
}

.faq-answer h4 {
  margin: 10px;
}

.faq-answer ul {
  list-style-type: disc;
  margin: 0;
}

.faq-answer li {
  font-size: smaller;
}

.faq-question:hover {
  text-decoration: underline;
}

hr {
  border: 1px solid #556c54;
}

/* !--- Contacts ---! */

.contacts-container {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  align-items: center;
  width: 90%;
  max-width: 768px;
  margin: 0 auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.contacts-container a {
  text-decoration: none;
  color: #3d3d3d;
  display: block;
  padding: 0.3rem;
}

.contacts-container h3 {
  margin: 0;
}

.contacts-container img {
  width: 75%;
  border-radius: 45%;
  border: 5px solid #F0D28A;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* !--- Gallery ---! */

.gallery-row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 4px;
  width: 75%;
}

.gallery-column {
  flex: 25%;
  max-width: 25%;
  padding: 0 4px;
}

.gallery-column img {
  margin-top: 8px;
  vertical-align: middle;
  width: 100%;
  transition: transform 0.3s ease;
}

.gallery-column img:hover {
  transform: scale(1.15);
  cursor: pointer;
  z-index: 2;
  position: relative;
}

.gallery-column .blurred img:hover {
  transform: none;
  cursor: pointer;
}

/* !--- Modal ---! */

body.modal-open {
  overflow: hidden;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 12;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  margin: auto;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 25px;
  color: #fafafa;
  font-size: 5rem;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: #E0B76A; /* Adjusted shade of #D9A84C */
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  color: #fafafa;
  cursor: pointer;
  user-select: none;
}

.modal-nav:hover {
  color: #E0B76A;
}


.modal-nav.prev {
  left: 2.5%;
}

.modal-nav.next {
  right: 2.5%;
}

.blurred {
  filter: blur(2px);
  position: relative;
  transition: filter 0.1s ease;
}

.image-wrapper {
  position: relative;
}

.image-counter {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  color: #fafafa;
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: transform 0.3s ease;
}

.image-counter:hover {
  color: #E0B76A; /* Adjusted shade of #D9A84C */
}

/* !--- Popup Notification ---! */
.popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1.5rem;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 300px;
  word-wrap: break-word;
  pointer-events: none;

}

.popup.hidden {
  opacity: 0;
  transform: translateY(20px); /* Adjusted for better animation */
}

.popup.success {
  background-color: #4caf50; /* Green */
  color: #fafafa; /* White text for better contrast */
}

.popup.error {
  background-color: #f44336; /* Red */
  color: #fafafa; /* White text for better contrast */
}

/* Footer */
.footer {
  background-color: #3d3d3d;
  color: #fafafa;
  padding: 1rem 0;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section {
  margin: 0.5rem;
}

.footer-section p {
  font-size: 1rem;
  margin: 0;
}

.footer-section p a {
  color: #fafafa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section p a:hover {
  color: #E0B76A;
}

.footer-bottom {
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* ==========================================================================
   Browser specific section
   ========================================================================== */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ==========================================================================
   Responsive design section
   ========================================================================== */

@media screen and (max-width: 1200px) {
  form {
    width: 40vw;
  }

  .event {
    font-size: medium;
  }
}

@media screen and (max-width: 900px) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 5rem;
  }
  
  h2 {
    font-size: 3rem;
  }
  
  h3 {
    font-size: 2rem;
  }

  label, legend {
    font-size: 1rem;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 6vh;
    right: 0;
    width: 100%;
    padding: 0;
  }

  .navbar-links a {
    padding: 1rem 0;
  }

  .navbar-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .main-block-1 p {
    width: 90%;
  }

  .timeline-container {
    width: 80%;
    margin: 150px auto;
  }

  .event img {
    width: 120px;
    height: 120px;
    top: -212.5px;
  }

  .details-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 80%;
  }

  .contacts-container {
    grid-template-columns: 1fr;
  }

  .contacts-container img {
    width: 35%;
  }

  form {
    width: 50vw;
  }

  .modal-nav {
    font-size: 3.5rem;
  }

  .image-counter {
    font-size: 2.5rem;
  }

  .timetable-content > .ttc > img {
  height: 60px;
}
  
}

@media screen and (max-width: 700px) {
  .home-block h1 {
    word-spacing: 100vw;
  }

  .home-block p {
    width: 90%;
  }

  .timeline-container {
    margin: 70px auto;
    width: 70%;
  }

  .event {
    font-size: small;
  }

  .event .year.even, .event .description.even {
    transform: translateY(-25px);
  }

  .event img {
    width: 55px;
    height: 55px;
    top: -130px;
    border-width: 3px;
  }

  .timetable::after {
    left: 31px;
  }

  .timetable-container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  /* Make sure that all arrows are pointing leftwards */
  .timetable-container::before {
    left: 60px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

  /* Make sure all circles are at the same spot */
  .tt-left::after, .tt-right::after {
    left: 15px;
  }

  /* Make all right containers behave like the left ones */
  .tt-right {
    left: 0%;
  }

  .tt-left-content-1, .tt-left-content-2, .tt-left-content-3, .tt-right-content-1, .tt-right-content-2, .tt-right-content-3 {
    font-size: 1rem;
  }

  .map-div {
    width: 90%;
    padding-top: 75%;
  }

  form {
    width: 85vw;
  }

  .gallery-column {
    flex: 50%;
    max-width: 50%;
  }

  .modal-nav {
    font-size: 3rem;
  }

  .image-counter {
    font-size: 2rem;
  }
  
}