/* Gallery Hero Section Styles */
.gallery-hero-content {
  position: relative;
  padding: 1rem;
}

.gallery-text {
  background: linear-gradient(to bottom, #f35629 56%, #f28f27);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 60px;
  line-height: 1;
  margin-top: -36px;
  margin-left: 52px;
  text-align: center;
}

.gallery-heart-container {
  position: relative;
  display: inline-block;
  margin: 1rem 0;
  top: 10px;
  left: -100px;
  padding-left: 5px;
  padding-right: 5px;
}

.gallery-heart-icon {
  width: 100px;
  height: 100px;
  filter: brightness(0) saturate(100%) invert(47%) sepia(96%) saturate(1421%)
    hue-rotate(360deg) brightness(103%) contrast(101%);
}

.gallery-css-heart {
  position: absolute;
  width: 80px;
  height: 80px;
  transform: rotate(-45deg);
  margin: 1rem auto;
}

.gallery-css-heart:before,
.gallery-css-heart:after {
  content: "";
  width: 40px;
  height: 64px;
  position: absolute;
  background: #f35629;
  border-radius: 32px 32px 0 0;
}

.gallery-css-heart:before {
  left: 30px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.gallery-css-heart:after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

/* Responsive Styles */
@media (max-width: 1275px) {
  .gallery-text {
    font-size: 50px;
    margin-left: 70px;
  }

  .gallery-heart-container {
    left: -76px;
  }
}

@media (min-width: 768px) and (max-width: 1169px) {
  .gallery-text {
    font-size: 42px;
    margin-left: 86px;
  }

  .gallery-heart-container {
    left: -56px;
  }
}

@media (max-width: 768px) {
  #gallery-page {
    min-height: 60vh !important;
    background-size: cover !important;
    background-position: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .gallery-text {
    font-size: 38px;
    margin-left: 50px;
    margin-top: -22px;
  }

  .gallery-heart-container {
    left: -60px;
    margin: 0.5rem 0;
  }

  .gallery-heart-icon {
    width: 70px;
    height: 70px;
  }

  .gallery-hero-content {
    padding: 0.5rem;
  }
}

@media (max-width: 479px) {
  #gallery-page {
    min-height: 50vh !important;
    padding: 0 0.3rem; /* Added consistent padding */
  }

  .gallery-text {
    font-size: 32px;
    text-align: center;
    margin-left: 40px;
    padding: 10px;
    display: inline-block;
  }

  .gallery-heart-container {
    position: relative;
    left: 0;
    margin-left: -100px;
    top: 10px;
    display: inline-block;
  }

  .gallery-heart-icon {
    width: 60px;
    height: 60px;
  }

  .gallery-hero-content {
    padding: 0.9rem;
    max-width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Gallery Styles */
.our-gallery-part div h2 {
  font-size: 40px;
}

.our-gallery-part div h2 span {
  font-size: 40px;
}

/* Base gallery styles */
#gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-content {
  font-size: 17px;
  margin-top: 40px !important;
}

.gallery-category.hidden {
  display: none;
}

.gallery-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
}
.gallery-item {
  transition: all 0.4s ease-in-out;
}

/* Hover effects */
@keyframes bounce-img {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px);
  }
  60% {
    transform: translateY(-6px);
  }
}

.gallery-item img:hover {
  animation: bounce-img 1s;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* AOS Animation Enhancements */
.gallery-item[data-aos="zoom-in"] {
  transform: scale(0.8);
  opacity: 0;
}

.gallery-item[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
  opacity: 1;
}

/* Large Desktop */
@media (min-width: 1441px) {
  #gallery img {
    height: 280px;
  }
}

/* Desktop */
@media (max-width: 1440px) {
  #gallery img {
    height: 260px;
  }
}

/* Large Tablet */
@media (max-width: 1024px) {
  #gallery img {
    height: 240px;
  }

  .our-gallery-part div h2 {
    font-size: 36px;
  }

  .our-gallery-part div h2 span {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  /* Override the grid to use single column layout on mobile */
  .gallery-category .grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    place-items: center;
  }

  .elders-title {
    text-align: center;
    font-size: 16px !important;
  }

  .gallery-item {
    width: 80%;
    max-width: 400px;
  }

  #gallery img {
    height: 220px;
    width: 100%;
  }

  .gallery-content {
    font-size: 15px !important;
    padding: 0 1rem;
  }

  #viewMoreBtn {
    font-size: 15px;
    padding: 0.5rem 1.5rem;
  }

  .our-gallery-part div h2 {
    font-size: 32px;
  }

  .our-gallery-part div h2 span {
    font-size: 32px;
  }
}

/* Small Tablet */
@media (max-width: 640px) {
  .gallery-item {
    width: 85%;
    max-width: 350px;
  }

  #gallery img {
    height: 200px;
  }
}

/* Large Mobile */
@media (max-width: 540px) {
  .gallery-item {
    width: 90%;
    max-width: 320px;
  }

  #gallery img {
    height: 190px;
  }

  .our-gallery-part div h2 {
    font-size: 28px;
  }

  .our-gallery-part div h2 span {
    font-size: 28px;
  }

  .elders-title {
    text-align: center;
    font-size: 15px !important;
  }
}

/* Mobile */
@media (max-width: 479px) {
  .gallery-item {
    width: 95%;
    max-width: 300px;
    padding: 0 0.3rem;
  }

  #gallery img {
    height: 200px;
  }

  .gallery-content {
    font-size: 14px !important;
    padding: 0 0.8rem !important;
  }

  .view-more-box {
    padding-bottom: 50px !important;
  }

  #viewMoreBtn {
    font-size: 14px;
    padding: 0.4rem 1.2rem;
  }

  .our-gallery-part div h2 {
    font-size: 25px;
  }

  .our-gallery-part div h2 span {
    font-size: 25px;
  }

  .our-gallery-part {
    padding: 1rem 0.5rem !important;
  }
}

/* Small Mobile */
@media (max-width: 375px) {
  .gallery-item {
    width: 100%;
    max-width: 280px;
  }

  .elders-title {
    text-align: center;
    font-size: 14px !important;
    padding: 0 0.7rem;
  }

  #gallery img {
    height: 180px;
  }

  .our-gallery-part div h2 {
    font-size: 22px;
  }

  .our-gallery-part div h2 span {
    font-size: 22px;
  }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
  .gallery-item {
    width: 100%;
    max-width: 260px;
  }

  #gallery img {
    height: 170px;
  }

  .our-gallery-part {
    padding: 1rem 0.25rem !important;
  }

  .gallery-content {
    font-size: 13px !important;
    padding: 0 0.25rem !important;
  }

  #viewMoreBtn {
    font-size: 13px;
    padding: 0.3rem 1rem;
  }
}
