.blogs-card {
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
.is-visible .blogs-card {
  box-shadow: 0 0px 20px rgba(182, 182, 182, 0.25) !important;
}

.blogs-card .card-text {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 15px;
}
.header-container {
  align-items: stretch;
}
.border-underline-btn {
  border: none;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: underline;
  padding: 0rem 1rem !important;
  cursor: pointer;
  border-radius: 50px;
  font-size: 0.8rem !important;
  font-weight: 300 !important;
  text-align: center;
}

.blogs-icon-calendar {
  padding-inline-end: 0.5rem;
}
.btn-custom:hover {
  background-color: #4f5b8d;
}

.btn-custom .share-icon {
  margin-inline-start: 5px;
}

.pb-6 {
  padding-bottom: 4rem;
}
.share-btn,
.close-btn {
  background: var(--secondary-color);
  position: relative;
  border: none;
  cursor: pointer;
  color: white;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50px;
  transition: all 0.5s ease;
  overflow: hidden;
}

.share-btn::before,
.close-btn::before {
  content: "";
  position: absolute;
  top: 0%;
  right: -102%;
  width: 2.6rem;
  height: 2.6rem;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translateX(0%);
  transition: right 0.5s ease;
  z-index: -1;
}

.share-btn:hover,
.close-btn:hover {
  color: white;
  transform: scale(1.2);
}

.share-btn:hover::before,
.close-btn:hover::before {
  right: -1%;
}
.share-btn img {
  width: 40%;
  object-fit: contain;
}

.btn.read-more-btn:active {
  border-color: unset;
}

.calendar-dot {
  width: 1.125rem;
}

.blog-btn {
  padding: 0.4rem 1.4rem !important;
}

.blogs-card-share i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.blogs-card-share.hidden {
  display: none;
}

/* Social share animations */
@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes floatIn {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.blogs-card-share {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  padding: 9px 20px;
  border-radius: 50px;
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991.89px) {
  .blogs-card-share {
    inset-inline-start: 18%;
  }
}

.blogs-card-share.hidden {
  opacity: 0;
  visibility: hidden;
}

.blogs-card-share a {
  opacity: 0;
  transform: scale(0);
  transition: transform 0.3s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blogs-card-share:not(.hidden) a {
  animation: popIn 0.5s forwards;
}

.blogs-card-share:not(.hidden) a:nth-child(1) {
  animation-delay: 0s;
}

.blogs-card-share:not(.hidden) a:nth-child(2) {
  animation-delay: 0.1s;
}

.blogs-card-share:not(.hidden) a:nth-child(3) {
  animation-delay: 0.2s;
}

.blogs-card-share:not(.hidden) a:nth-child(4) {
  animation-delay: 0.3s;
}

.blogs-card-share:not(.hidden) a:nth-child(5) {
  animation-delay: 0.3s;
}

.blogs-card-share a:hover {
  transform: scale(1.2);
  color: var(--secondary-color) !important;
}

.share-overlay.animate-in {
  animation: floatIn 0.5s forwards;
}

/* Animation for blog-read-more */
.blog-read-more {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateX(0);
}
.blog-read-more.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

/* Share icons hide animation */
.blogs-card-share {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateX(0);
}

.blogs-card-share.hide-anim {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px) scale(0.8);
}
.blogs-card .shareBtnContainer {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  min-height: 1rem !important;
}
.share-section-1,
.share-section-2 {
  position: absolute;
  top: -0.5rem;
  inset-inline-start: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1),
    opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1),
    scale 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.share-section-1 {
  z-index: 2;
  background: transparent;
  transform: translateX(0);
  opacity: 1;
}
.share-section-2 {
  z-index: 3;
  background: transparent;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

/* Enhanced animations using Animate.css */
.animate__animated {
  animation-duration: 0.5s;
}

.shareBtnContainer.show-share .share-section-1 {
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  animation: slideOutFadeLeft 0.3s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.shareBtnContainer.show-share .share-section-2 {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  animation: slideInFadeRight 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.shareBtnContainer.hide-share .share-section-2 {
  transform: translateX(50%);
  opacity: 0;
  pointer-events: none;
  animation: slideOutFadeRight 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.shareBtnContainer.hide-share .share-section-1 {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  animation: slideInFadeLeft 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* RTL (Arabic) specific animations - reverse directions */
html[dir="rtl"] .share-section-2 {
  transform: translateX(-100%); /* Start from left instead of right */
}

html[dir="rtl"] .shareBtnContainer.show-share .share-section-1 {
  transform: translateX(50%); /* Exit to right instead of left */
  opacity: 0;
  pointer-events: none;
  animation: slideOutFadeRight 0.3s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

html[dir="rtl"] .shareBtnContainer.show-share .share-section-2 {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  animation: slideInFadeLeft 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

html[dir="rtl"] .shareBtnContainer.hide-share .share-section-2 {
  transform: translateX(-50%); /* Exit to left instead of right */
  opacity: 0;
  pointer-events: none;
  animation: slideOutFadeLeft 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

html[dir="rtl"] .shareBtnContainer.hide-share .share-section-1 {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  animation: slideInFadeRight 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* Custom fade animations */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutScale {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Smooth mixed animations for share button transitions */
@keyframes slideInFadeRight {
  0% {
    opacity: 0;
    transform: translateX(50%) scale(0.95);
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutFadeLeft {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  70% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
}

@keyframes slideInFadeLeft {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutFadeRight {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  70% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(50%) scale(0.95);
  }
}

/* RTL-specific keyframes for Arabic pages */
@keyframes slideInFadeRightRTL {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutFadeLeftRTL {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  70% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(50%) scale(0.95);
  }
}

@keyframes slideInFadeLeftRTL {
  0% {
    opacity: 0;
    transform: translateX(50%) scale(0.95);
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutFadeRightRTL {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  70% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
}

/* Apply RTL-specific animations */
html[dir="rtl"] .shareBtnContainer.show-share .share-section-1 {
  animation: slideOutFadeRightRTL 0.3s cubic-bezier(0.215, 0.61, 0.355, 1)
    forwards;
}

html[dir="rtl"] .shareBtnContainer.show-share .share-section-2 {
  animation: slideInFadeLeftRTL 0.4s cubic-bezier(0.215, 0.61, 0.355, 1)
    forwards;
}

html[dir="rtl"] .shareBtnContainer.hide-share .share-section-2 {
  animation: slideOutFadeLeftRTL 0.5s cubic-bezier(0.215, 0.61, 0.355, 1)
    forwards;
}

html[dir="rtl"] .shareBtnContainer.hide-share .share-section-1 {
  animation: slideInFadeRightRTL 0.6s cubic-bezier(0.215, 0.61, 0.355, 1)
    forwards;
}

.share-section-1 > *,
.share-section-2 > * {
  /* opacity: 0; */
  transform: translateY(10px);
  will-change: opacity, transform;
}

/* First child (typically button) appears immediately */
.shareBtnContainer.show-share .share-section-2 > *:nth-child(1) {
  animation: elementFadeIn 0.3s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* Second child (typically share icons container) appears with delay */
.shareBtnContainer.show-share .share-section-2 > *:nth-child(2) {
  animation: elementFadeIn 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
  animation-delay: 0.3s; /* 0.4s delay for second element */
}

/* When closing, animate elements in reverse order with different timing */
.shareBtnContainer.hide-share .share-section-1 > *:nth-child(1) {
  animation: elementFadeIn 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.shareBtnContainer.hide-share .share-section-1 > *:nth-child(2) {
  animation: elementFadeIn 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
  animation-delay: 0.2s; /* 0.4s delay for second element */
}

/* Any additional elements (if present) */
.shareBtnContainer.show-share .share-section-2 > *:nth-child(n + 3),
.shareBtnContainer.hide-share .share-section-1 > *:nth-child(n + 3) {
  animation: elementFadeIn 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
  animation-delay: 0.4s; /* 0.6s delay for third and subsequent elements */
}

@keyframes elementFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.main-image img {
    border-radius: var(--bs-border-radius);
}
