/* Start Text over images */
/* how to use
	<div class="gallery-image-overlay-container">
	   <div class="image-overlay-text">
          <span style="font-family: 'Great Vibes', cursive;'; overflow-wrap: break-word; white-space: pre-wrap;">Text goes here</span>
          <p>Experiment place text over gallery needed for weddings page</p>
       </div>
    </div>
*/

.gallery-image-overlay-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Colored overlay */
.gallery-image-overlay-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(96, 5, 5, 0.5); /* 50% opacity */
  z-index: 2;  /* overlay sits above image but below text */
  border-radius: 15px;     /* Rounded corners here */
  overflow: hidden;        /* Ensure background and overlay respect rounding */
}

/* Centered text */
.gallery-image-overlay-text-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 3em;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 2;  /* sits above overlay */
}

/* Top-left caption text */
.gallery-image-overlay-text {
  position: absolute;
  top: 20px;
  left: 20px;                    /* minimal distance from left */
  margin-right: 20px;            /* ensures spacing from right edge if it grows */
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 1.2em;
  display: inline-block;          /* ✅ shrink-wrap to text */
  max-width: calc(100% - 40px);   /* ✅ prevents overflow near right edge */
  box-sizing: border-box;
  z-index: 2;  /* sits above overlay */
}
/* End Text over images */




.overlay-container {
  position: relative;
  width: 100%;
  min-height: 300px;       /* Adjust height or use relative units */
  padding: 40px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /*color: red;*/
  font-family: Arial, sans-serif;
  overflow: hidden;        /* Ensures overlay does not spill */
  border-radius: 15px;     /* Rounded corners here */
  overflow: hidden;        /* Ensure background and overlay respect rounding */
}

/* Responsive background overlay */
.overlay-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/images/hochzeiten/p1130511_ausschnit_kl1.jpg') no-repeat center center;
  background-size: cover;
  opacity: 0.4;            /* Controls transparency */
  z-index: 0;
}

/* Keep text above the overlay */
.overlay-container > * {
  position: relative;
  z-index: 1;
}

/* Optional: responsive text scaling */
@media (max-width: 768px) {
  .overlay-container h1 {
    font-size: 1.8rem;
  }
  .overlay-container p {
    font-size: 1rem;
  }
}

h2 {
  font-size: clamp(1.2rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Mobile Specific Tweaks */
@media (max-width: 400px) {
  /* Centered text */
  .gallery-image-overlay-text-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.5em;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    z-index: 2;  /* sits above overlay */
  }
}