/* === Gallery Layout === */

.timed-gallery-simple {
  display: flex;
  flex-direction: row-reverse;
  gap: 20px;
}

.timed-gallery-simple .timed-gallery-stack {
  flex: 2;
  /* display: flex; */
  flex-direction: column;
  /* gap: 15px; */
}

.timed-gallery-simple .timed-gallery-main-post {
  flex: 3;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  height: 410px;
}

.timed-gallery-simple .timed-gallery-simple-title span.td-pulldown-size {
  background: #404040;
}

.timed-gallery-simple .timed-gallery-simple-title .block-title {
  border-bottom: 2px solid #404040;
}

.timed-gallery-simple .timed-gallery-simple .cfp-posts-button-ctr span.tdm-btn-icon.tdm-btn-icon-svg svg {
  width: 19px;
  height: 10px;
}

.timed-gallery-simple .timed-gallery-simple a.timed-btn.cfp-load-more {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* === Main Post Image & Animation === */

.timed-gallery-simple .timed-gallery-main-post > .featured-post > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.timed-gallery-simple .timed-gallery-main-post > .featured-post > img.active {
  opacity: 1;
}

/* === Overlay & Category Label === */

.timed-gallery-simple .timed-gallery-main-post .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.timed-gallery-simple .timed-gallery-main-post .category {
  display: inline-block;
  background: #000000a3;
  padding: 0.3rem 0.6rem;
  font-size: var(--smaller-para);
}

/* === Main Post Titles & Text === */

.timed-gallery-simple .timed-gallery-main-post h3 {
  font-size: var(--title-h3);
  color: white;
  line-height: var(--title-h3-lh);
  margin: 0;
  padding-bottom: 20px;
}
.timed-gallery-simple .timed-gallery-main-post p {
  margin: 0 16px 12px;
  color: var(--lg-grey);
}

/* === Progress Bars === */

.timed-gallery-simple .progress-bar-wrapper {
  display: flex;
  gap: 10px;
  width: 100%;
  height: 4px;
}

.timed-gallery-simple .progress-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.timed-gallery-simple .progress-fill {
  background: #fff;
  height: 100%;
  width: 0%;
  transition: none;
}

.timed-gallery-simple .progress-fill.active {
  animation: fillBar 5s linear forwards;
}

/* === Arrows === */
.timed-gallery-simple .timed-gallery-main-post .arrows{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.timed-gallery-simple .timed-gallery-main-post .arrows img{
    width: 40px;
    cursor: pointer;
}

@keyframes fillBar {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* === Stack Thumbnails with Text === */

.timed-gallery-simple .timed-gallery-thumb-with-text {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  /* box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); */
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--lg-grey);
}


.timed-gallery-simple .timed-gallery-thumb-with-text:hover {
    background-color: transparent !important;
}


.timed-gallery-simple .timed-gallery-thumb-with-text:hover h3 {
  color: var(--red) !important;
}

.timed-gallery-simple .timed-gallery-thumb-with-text img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  flex-shrink: 0;
}

.timed-gallery-simple .timed-gallery-thumb-text h3 {
  margin: 0 0 4px;
  font-size: var(--title-h4);
  line-height: 1.2;
  font-weight: 500;
}
/* .timed-gallery-simple-title h4.block-title.td-block-title {
  display: none;
} */

.timed-gallery-simple .timed-gallery-thumb-text p {
  margin: 0;
  font-size: var(--small-para);
  color: var(--lg-grey);
  font-family: "Roboto";
  font-weight: 400;
}

.timed-gallery-simple .timed-gallery-stack .cfp-posts-button-ctr {
  padding-top: 10px;
}

.timed-gallery-simple .timed-gallery-stack .cfp-posts-button-ctr .timed-btn{
    width: 100%;
}

/* === Optional: Individual Thumbnails === */

.timed-gallery-simple .timed-gallery-thumb {
  display: block;
  overflow: hidden;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  height: 90px;
  cursor: pointer;
}

.timed-gallery-simple .timed-gallery-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}

/* === Mobile Styles === */

@media (max-width: 1020px) {
  .timed-gallery-simple {
    flex-direction: column-reverse;
  }

  .timed-gallery-simple .timed-gallery-thumb-with-text img {
    display: none;
  }

  .timed-gallery-simple .timed-gallery-simple-title h4.block-title.td-block-title {
    display: none;
  }

  .timed-gallery-simple .timed-gallery-thumb-with-text:nth-of-type(2),
  .timed-gallery-simple .timed-gallery-thumb-with-text:nth-of-type(3) {
    display: none;
  }

  .timed-gallery-simple .timed-gallery-main-post {
    flex: 300px;
  }
}
