body {
    background-color: #2B2B2B; /* Dark gray, not pitch black, provides good contrast */
    color: #050505; /* bright text because we write on light cards */
    overflow-x: hidden; /* Prevent horizontal overflow */
    margin: 0; /* Ensure no default margin on body */
    padding: 0; /* Ensure no default padding on body */
}

h3 {
    margin-bottom: -20px;
}

.app {
  display: grid;
  grid-column-gap: 20px; /* Space between columns */
  grid-row-gap: 30px; /* Space between rows */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Creates as many 250px columns as can fit */
  justify-content: center;
  margin-left: 5%;
  margin-right: 5%;
  max-width: 100%; /* Ensure it doesn't exceed screen width */
  box-sizing: border-box; /* Include padding in width/height calculations */
}

.card {
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  border-radius: 10px; /* 5px rounded corners */
  width: 100%;
  max-width: 100%; /* Ensure it doesn't exceed screen width */
  height: auto;
  overflow-y: hidden; /* Hide text that overflows in the Y direction */
  position: relative; /* Needed for absolute positioning of child elements */
  cursor: pointer; /* Changes cursor to a pointer on hover */
  font-size: 14px; /* Smaller font size for the text */
  box-sizing: border-box; /* Include padding in width/height calculations */
}

.card-link {
    display: block;
    height: 100%;
    color: currentColor; /* Inherits the text color from parent */
    text-decoration: none; /* Removes underline from links */
    width: 100%; /* Ensures the link covers the entire card area */
    box-sizing: border-box; /* Include padding in width/height calculations */
}

/* Add rounded corners to the top left and the top right corner of the image */
.card img {
  border-radius: 5px 5px 0 0;
  width: 100%;
  height: 200px;
  object-fit: cover; /* Ensures images fill the container, cropping if necessary */
  max-height: 200px; /* Ensure a consistent height for all images */
  box-sizing: border-box; /* Ensure padding is included in width/height calculations */
}



.container {
  padding: 2px 16px;
  box-sizing: border-box; /* Include padding in width/height calculations */
}

.container h3 {
  margin-bottom: 5px; /* Ensure there's space between title and subtitle */
}

.container h5 {
  margin-top: 3px; /* Add space between the title and subtitle */
}

@media (max-width: 768px) {
  .container h5 {
    margin-top: 8px; /* Increase space between title and subtitle for tablets */
  }
}

@media (max-width: 480px) {
  .container h5 {
    margin-top: 10px; /* Further increase space for mobile devices */
  }
}

.ribbon {
  position: absolute;
  top: 180px; right: 0px; /* Position at the top right corner */
  background-color: teal;
  color: #faffff;
  padding: 5px 15px;
  transform: rotate(45deg); /* Diagonal rotation */
  text-transform: uppercase; /* Optional: Makes text uppercase */
  font-size: 14px;
  white-space: nowrap; /* Keeps the text in one line */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  color: #faffff;
  margin-left: 0;
  margin-right: 0;
  max-width: 100%; /* Ensure it doesn't exceed the container's width */
}

.logo img {
  width: 100%;
  max-width: 350px; /* Set a maximum width so the logo is not too big on larger screens */
  height: auto; /* Maintain aspect ratio */
  filter: sepia(1) hue-rotate(90deg) saturate(2);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .logo img {
    max-width: 250px; /* Slightly smaller for tablet devices */
  }
}

@media (max-width: 480px) {
  .logo img {
    max-width: 150px; /* Smaller for mobile devices */
  }
}

footer.legal-imprint {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    background-color: #303535;
    color: #faffff;
    font-size: 0.8rem;
    border-radius: 10px;
}

footer.legal-imprint a {
    color: currentColor; /* Inherits the text color from parent */
}

footer.legal-imprint p {
    margin: 5px 0;
}

.intro-text-container {
    margin: 0 auto; /* This centers the container horizontally */
    margin-top: 1rem;
    margin-bottom: 2rem;
    color: #faffff;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    border-radius: 10px;
    width: 90%;
    max-width: 100%; /* Use percentage for flexible width */
    background-color: #303535;
    padding: 1rem;
    font-size: 1rem;
    text-align: center; /* Center the inline content */
    box-sizing: border-box; /* Include padding in width/height calculations */
 }

 .intro-text-container a {
    color: #faffff; /* Set the link color to the same as the normal text color */
    text-decoration: underline; /* Optional: removes the underline from the link */
}

.accounts {
    font-size: 1.2rem;
    background-color: #9c7c7c;
    box-sizing: border-box; /* Include padding in width/height calculations */
}

/* Media Queries for smaller screens */
@media (max-width: 768px) {
    .app {
        margin-left: 2%;
        margin-right: 2%;
        grid-column-gap: 10px;
        grid-row-gap: 15px;
    }

    .card {
        font-size: 12px;
    }

    .card img {
        max-height: 150px;
    }

    .ribbon {
        top: 140px; /* Adjust position for smaller card images */
        font-size: 12px;
        padding: 3px 10px;
    }

    .intro-text-container {
        width: 95%;
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .app {
        margin-left: 1%;
        margin-right: 1%;
        grid-row-gap: 10px;
    }

    .card {
        font-size: 10px;
    }

    .card img {
        max-height: 120px;
    }

    .ribbon {
        top: 120px;
        font-size: 10px;
    }

    footer.legal-imprint {
        font-size: 0.7rem;
        padding: 1rem 0.5rem;
    }

    .intro-text-container {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}
