/* --- Variables --- */
:root {
  --primary-color: #4f772d;
  --secondary-color: #90a955;
  --background-color: #90a955;
  --text-color: #ecf39e;
  --font-family: 'Arial', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* --- Header and Navigation --- */
header {
  background: #31572CE6;
  color: #90a955;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  /*border: 5px solid #ecf39e;*/
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  margin-right: 1rem;
}

.event-dates {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  flex-grow: 1; /* Allow the dates to take up available space */
  text-align: center; /* Center the text horizontally */
}

nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  color: #ecf39e;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

/* Hamburger Menu */
#hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

#hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #90a955;
  margin: 5px 0;
  transition: 0.4s;
}

/* --- Sections --- */
.container {
  max-width: 100%;
  margin: 0 100px 0 100px;
  padding: 0 20px;
}

section {
  padding: 4rem 0;
  background-color: #90a955;
  position: relative;
  min-height: 100px;
  /*border: 5px double #ecf39e;*/
}

/* --- Parallax Container Styles --- */
.parallax-container {
  height: 50vh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.parallax-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 100%;
  width: 100%;
  background-attachment: fixed;
  background-color: #90a955;
  opacity: 0.7;
}

/* --- Welcome Banner --- */
#welcome-banner {
  text-align: center;
  padding: 6rem 0;
  background-color: #90a955;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#welcome-banner img {
  max-width: 65%;
  height: auto;
  display: block;
  margin: 0 auto;
  z-index: 1;
}

.moving-text-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Place the text container behind the image */
}

.moving-text {
    position: absolute;
    white-space: nowrap;
    font-weight: bolder;
    color: #ecf39e;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; /* Or use a font closer to the image */
}

.line1 {
    font-size: 250px;
    top: 1%; /* Adjust position as needed */
    right: 0;
    animation: moveRightToLeft 68s linear infinite;
}

.line2 {
    font-size: 260px;
    top: 63%; /* Adjust position as needed */
    right: 0;
    animation: moveRightToLeft 77s linear infinite;
}

.line3 {
    font-size: 325px;
    top: 25%; /* Adjust position as needed */
    left: 0;
    animation: moveLeftToRight 68s linear infinite;
}

@keyframes moveLeftToRight {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes moveRightToLeft {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 800px; /* Limit the width of the map */
  height: 0;
  padding-bottom: 50%; /* Adjust aspect ratio for a smaller map */
  overflow: hidden;
  border: 2px solid #3B5F30; /* Add a border with the specified color */
  border-radius: 8px; /* Add rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.email-address {
  color: #31572c;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

/* --- Program Table --- */
.program-tables-container {
  display: flex;
  justify-content: space-between;
  width: 95%;
  margin: 20px auto;
}

.program-table {
  width: 30%;
  border-collapse: collapse;
  background-color: #EBEB9F;
}

.program-table th, .program-table td {
  padding: 12px; /* Slightly increased padding for better readability */
  text-align: center;
  border: 1px solid var(--primary-color);
  font-size: 1.2rem; /* Increase the font size */
  font-weight: bold; /* Make text bold */
}

.program-table th {
  background-color: var(--primary-color);
  color: var(--text-color);
  font-size: 1.4rem; /* Slightly larger font for table headers */
}

.program-table td {
  background-color: #EBEB9F;
  color: #31572c;
}

.program-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.program-table a {
  color: var(--primary-color);
  text-decoration: none;
}

.program-table a:hover {
  text-decoration: underline;
}

/* --- Artist Section --- */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.artists-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background-color: #8FAA55;

  /* Center content using Flexbox */
  display: flex;
  align-items: center;       /* Vertically center */
  justify-content: center;   /* Horizontally center */
  min-height: 300px;         /* Optional: set box height */
}

.artists-grid-item img {
  max-width: 90%; /* Ensure the image does not exceed the grid width */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensure the image fits within the grid */
  display: block; /* Ensure the image behaves like a block element */
  margin: auto; /* Center the image horizontally and vertically */
  transition: transform 0.3s ease;
}

.artists-grid-item:hover img {
  transform: scale(1.1);
}
/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 20px;
  border-radius: 5px;
  max-width: 80%;
  width: 80%;
  height: auto; /* Allow the modal height to adjust based on its content */
  max-height: 90vh; /* Ensure it doesn't exceed the viewport height */
  overflow-y: auto; /* Add scroll if content exceeds the viewport height */
}

.modal-header img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.modal-body {
  max-height: 50vh;
  overflow-y: auto;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
  background-color: var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  transition: background-color 0.2s;
}

/* --- Social Links --- */
.social-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-links a {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--secondary-color);
}

/* --- Footer --- */
footer {
  background-color: var(--background-color); /* Use the same background color as the main content */
  color: var(--text-color); /* Ensure text color is consistent */
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
  position: relative;
  width: 100%;
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}

.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.footer-logo img {
  max-height: 60px;
  height: auto;
  width: auto;
}

.sparkasse-banner {
  max-height: 60px;
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .footer-logo {
    flex-direction: column;
    gap: 0.5rem;
  }
  .footer-logo a:nth-child(2) {
    order: 3;
  }
  .sparkasse-banner {
    margin-left: 0;
    margin-top: 0.5rem;
    max-width: 90vw;
    max-height: 80px;
    height: auto;
  }
}

/* --- Contact Section --- */
#contact {
  padding: 4rem 0;
  background-color: #90a955;
  color: var(--text-color);
}

#contact .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact-image {
  max-width: 80%;
  height: auto;
  margin-bottom: 2rem;
}

.content-wrapper {
  background-color: rgba(236, 243, 158, 0.7);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 800px;
}

.contact-section {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
}

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

.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.form-section h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
}

/* Form Styling */
form {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

input[type="text"],
input[type="email"],
textarea {
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  font-family: var(--font-family);
}

textarea {
  resize: vertical;
}
.gallery-container {
        max-width: 1200px;
        margin-top: 30px;
        margin: 0 auto;
        padding: 20px;
        background-color: #ebeb9f;  /* Changed from white/default */
    }

    .gallery-section {
        margin-bottom: 20px;
        border: 1px solid #3B5F30;
        border-radius: 8px;
        background-color: #ebeb9f;  /* Changed from white/default */
    }

    .folder-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background-color: #ebeb9f;  /* Changed from #f8f8f8 */
        border-radius: 8px 8px 0 0;
        cursor: pointer;
    }

    .folder-header h2 {
        margin: 0;
        font-size: 1.2rem;
    }
    .folder-content {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}
.collapsed {
    max-height: 0;
}

    .toggle-btn {
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 5px;
        color: #666;
        transition: transform 0.3s ease;
    }

    .toggle-btn[aria-expanded="true"] .icon {
        transform: rotate(180deg);
        display: inline-block;
    }

    .image-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px;
        transition: max-height 0.3s ease-out;
        overflow: hidden;
        background-color: #ebeb9f;  /* Changed from white/default */
    }

    .image-grid.collapsed {
        max-height: 0;
        padding: 0 20px;
    }

    .image-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #ebeb9f;
    cursor: pointer; /* Add this line */
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer; /* Add this line */
}

    .image-item:hover img {
        transform: scale(1.05);
    }

    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    overflow: hidden;
}

.gallery-modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
    color: var(--text-color);
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #31572c;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background-color: #ecf39e;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.gallery-close-button:hover {
    color: #ecf39e;
    background-color: #31572c;
    transform: scale(1.1);
}
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ecf39e;
    color: #31572c;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-nav-btn:hover {
    background-color: #31572c;
    color: #ecf39e;
    transform: translateY(-50%) scale(1.1);
}
.text-container {
     margin-bottom: 30px; /* Adjust the spacing as needed */
 }

/* --- Mobile Styles --- */
@media (max-width: 768px) {
.line1 {
        font-size: 45px;
        top: 17%; /* Adjust position as needed */
        left: 0;
        animation: moveLeftToRight 70s linear infinite;
    }

    .line2 {
        font-size: 80px;
        top: 60%; /* Adjust position as needed */
        right: 0;
        animation: moveRightToLeft 70s linear infinite;
    }

    .line3 {
        font-size: 50px;
        top: 82%; /* Adjust position as needed */
        left: 0;
        animation: moveLeftToRight 70s linear infinite;
    }

.gallery-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

.image-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); /* Adjusted to ensure proper centering */
        gap: 10px;
        justify-content: center; /* Ensures the grid is centered */
    }

    .image-item {
        aspect-ratio: 1;
        width: 100%;
        margin: 0 auto; /* Centers the image inside the container */
    }

    .gallery-container {
        padding: 10px;
    }

    .gallery-section {
        margin-bottom: 10px;
    }
.gallery-modal-content {
        width: 95%;
    }

    .gallery-modal-image {
        max-width: 100%;
        max-height: 80vh;
    }
  /* Welcome banner styles */
  #welcome-banner img {
    min-width: 95%;
  }

  .parallax-background {
    background-size: cover;
    background-position: center top;
  }

  .parallax-container {
    height: auto;
    min-height: 50vh;
  }

  /* Program table styles */
  .program-tables-container {
    flex-direction: column;
    width: 95%;
    margin: 20px auto;
  }

  .program-table {
    width: 100%;
    margin-bottom: 20px;
  }
  .program-table th, .program-table td {
    font-size: 1.4rem; /* Increase text size on mobile */
    font-weight: bold; /* Make text bold */
    padding: 14px; /* More padding for better touch accessibility */
  }

  .program-table th {
    font-size: 1.6rem; /* Even bigger header text for better readability */
  }

  /* Navigation and general styles */
  .modal-content {
    width: 95%;
    max-width: 95%;
    max-height: 90vh;
  }

  #nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #31572CE6;
  }

  #nav-links li {
    margin-left: 0;
  }

  #nav-links.show {
    display: flex;
  }

  #hamburger-menu {
    display: block;
  }

  #hamburger-menu.open span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  #hamburger-menu.open span:nth-child(2) {
    opacity: 0;
  }

  #hamburger-menu.open span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  nav li {
    padding: 1rem;
    border-top: 1px solid rgba(236, 243, 158, 0.1);
  }

  .container {
    padding: 0 15px;
    margin: 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  section {
    min-height: 50vh;
  }

  /* Contact section styles */
  .contact-section {
    margin-bottom: 10px;
  }

  .contact-info h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .contact-info .email-address {
    font-size: 0.9rem;
  }

  .form-section {
    margin-top: 10px;
  }

  .form-section h2 {
    font-size: 1.3rem;
  }

  #contact form {
    font-size: 0.9rem;
  }

  #contact form input[type="submit"] {
    font-size: 1rem;
  }

  .artists-grid-item img {
    max-width: 90%; /* Ensure the image does not exceed the grid width */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the image fits within the grid */
    display: block; /* Ensure the image behaves like a block element */
    margin: auto; /* Center the image horizontally and vertically */
  }

  /* Hide dummy artists on mobile */
  .dummy-artist {
    display: none !important;
  }
}

/* --- Tharalala Summary --- */
.tharalala-summary {
    background-color: rgba(236, 243, 158, 0.7); /* Match the content wrapper background */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    margin: 2rem auto; /* Add spacing around the section */
    max-width: 85%; /* Limit the width for better readability */
    line-height: 1.8; /* Improve text readability */
    color: var(--primary-color); /* Use primary color for text */
}

.tharalala-summary h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center; /* Center the heading */
    color: var(--primary-color);
}

.tharalala-summary p {
    margin-bottom: 1rem;
    text-align: justify; /* Justify text for a clean look */
}

.tharalala-summary ul {
    list-style-type: disc;
    margin-left: 2rem; /* Add indentation for the list */
    margin-bottom: 1rem;
}

.tharalala-summary li {
    margin-bottom: 0.5rem;
    line-height: 1.6; /* Improve readability for list items */
}

.content-section {
    background-color: rgba(236, 243, 158, 0.7); /* Match the content wrapper background */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    margin: 2rem auto; /* Add spacing around the section */
    max-width: 85%; /* Limit the width for better readability */
    line-height: 1.8; /* Improve text readability */
    color: var(--primary-color); /* Use primary color for text */
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center; /* Center the heading */
    color: var(--primary-color);
}

.content-section p {
    margin-bottom: 1rem;
    text-align: justify; /* Justify text for a clean look */
}
