/* GENERAL */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #000;
  color: #fff;
}

.header {
  text-align: center;
  padding: 1.5rem;
  background: #ff4d6d;
  color: white;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

/* MASONRY LAYOUT */
.masonry {
  column-count: 3;
  column-gap: 20px;
  padding: 20px;
}

.box {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 14px;
  padding: 18px;
  color: white;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* Energetic colors and a bit more formatting for the about-box */
.about-box {
  background: #ff6b6b;      /* keep your original color */
  display: flex;            /* enable flexbox layout */
  flex-direction: column;   /* stack text + photo vertically */
  justify-content: center;  /* center vertically */
  align-items: center;      /* center horizontally */
  text-align: center;       /* center text */
  gap: 15px;                /* spacing between text and photo */
  padding: 20px;            /* optional: adds breathing room */
}
.carousel-box { background: #4dabf7; }
.lucky-box { background: #ffd43b; color: #000; }
.contact-box { background: #845ef7; }

/* ABOUT BOX */
.about-photo {
  width: 100%;
  border-radius: 12px;
  margin-top: 12px;
}

/* CAROUSEL */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

/* Let images define their own height */
.carousel-img {
  width: 100%;
  height: auto;
  object-fit: contain;   /* show whole image */
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s;
}

.carousel-img.active {
  opacity: 1;
  position: relative;    /* active image takes up space */
}

.carousel-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border: none;
  background: #1c7ed6;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}



/* LUCKY DRAW */
.draw-btn {
  padding: 10px 16px;
  background: #ff4d6d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.result {
  font-size: 2rem;
  margin-top: 10px;
  color: #000;
}

/* IMAGE + TEXT BOXES */
/* IMAGE + TEXT BOXES (Dynamic, Masonry-Safe, Rounded Corners) */
.image-text-box {
  position: relative;
  width: 100%;
  max-width: 100%;          /* prevents overflow */
  border-radius: 14px;
  overflow: hidden;         /* keeps rounded corners */
  --w: 1;                   /* default aspect ratio */
  --h: 1;
}

/* Dynamic background image container */
.image-text-box::before {
  content: "";
  display: block;
  width: 100%;
  max-width: 100%;          /* prevents pushing outside column */
  padding-top: calc(var(--h) / var(--w) * 100%); /* dynamic aspect ratio */
  background-image: var(--img);
  background-size: contain; /* show whole image */
  background-repeat: no-repeat;
  background-position: center;
  border-radius: inherit;   /* keeps rounded corners */
}

/* Prevent extremely tall portrait images from breaking masonry */
.image-text-box.dynamic::before {
  max-height: 350px;        /* adjust as needed */
}



.overlay-text {
  position: absolute;
  top: 50%;                     /* move to vertical middle */
  left: 50%;                    /* move to horizontal middle */
  transform: translate(-50%, -50%);  /* perfect centering */
  width: 80%;
  padding: 8px;
  background: rgba(0,0,0,0.6);
  color: white;
  text-align: center;
  border-radius: 8px;
  font-size: 1.1rem;
}



/* RESPONSIVE */
@media (max-width: 900px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .masonry {
    column-count: 1;
  }
}

/* Make photo and creative boxes 1:1 */
/*.square-photo,
/*.square-box {
/*  aspect-ratio: 1 / 1;*/
/*  background-size: cover;*/
/*  background-position: center;*/
/*  border-radius: 12px;*/
/*}*/

/* Video box styling */
.video-box {
  padding: 20px;
  text-align: center;
}

.video-player {
  width: 100%;
  border-radius: 12px;
}

/* Bible verse box */
.bible-box {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  color: #ffffff;
}

.bible-text {
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 15px;
  line-height: 1.4;
}


.square-carousel {
  aspect-ratio: 1 / 1;
  position: relative;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Default: landscape 4:3 */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 aspect ratio */
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Portrait mode for YouTube Shorts */
.video-wrapper.portrait {
  padding-top: 177.78%; /* 9:16 aspect ratio */
}

.about-photo {
  width: 220px;        /* Adjust between 200–250px */
  height: auto;        /* Keeps proportions correct */
  border-radius: 12px; /* Rounded corners; optional */
  object-fit: cover;   /* Ensures clean cropping if needed */
  display: block;
  margin-top: 10px;
}



