.container_home {
  width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container-us {
  background: transparent !important;
}

#lottie-contact,
.title_subtitle {
  display: none !important;
}

.container_top {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  padding-top: 0;
}

.slider-container {
  position: relative;
  width: 95%;
  overflow: hidden;
  margin: 0 auto;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: 550px;
  object-fit: cover;
  display: block;
}

.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.4),
    transparent
  );
  color: white;
  padding: 25px 20px 20px;
  text-align: right;
  direction: rtl;
}

.caption .category-link {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.caption h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.4;
}

.caption h3 a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.caption h3 a:hover {
  color: #de8f4b;
}

.post-date {
  display: flex;
  align-items: baseline;
  justify-self: end;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  flex-direction: row-reverse;
}

.post-date i {
  font-size: 10px;
}

/* Dark mode support for slider */
.dark-mode .caption h3 a:hover {
  color: #e67e22;
}

/* الشرطات */
.slider-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-indicators .dot {
  display: block;
  width: 20px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.slider-indicators .dot::after {
  content: "";
  position: absolute;
  width: 20%;
  height: 100%;
  padding: 5px;
  background: transparent;
  margin-top: -1px;
}

.slider-indicators .dot.active {
  background-color: white;
}

.slider-container {
  cursor: grab;
}

.slider-container:active {
  cursor: grabbing;
}

.ads {
  background: #d9d9d9;
  padding: 35px 320px;
  display: grid;
  margin: 15px auto 25px auto;
  width: fit-content;
}

.dark-mode .ads {
  background: #2d274f;
  color: #bec7ff;
}

.ads p {
  font-size: 3rem !important;
}

.posts {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* gap: 35px; */
}

.posts .post {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  width: 95%;
  gap: 20px;
  height: 210px;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

.post img {
  width: 250px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.post img:hover {
  border: 2px solid #de8f4b;
  box-shadow: 0 4px 15px rgba(222, 143, 75, 0.3);
}

.post img::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  transition: height 0.4s ease;
  border-radius: 6px;
}

.post img:hover::after {
  height: 100%;
}

.contents {
  width: 100%;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 180px;
  overflow: hidden;
  justify-content: space-between;
}

.contents h2 {
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
  color: #333;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-clamp: 1;
  text-align: right;
  direction: rtl;

  &:hover {
    color: #de8f4b;
    cursor: pointer;
    transition: color 0.3s ease;
  }
}

.contents p {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  color: #666;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  text-align: right;
  direction: rtl;
  /* flex: 1; */
}

/* تنسيق الـ divider في البوستات */
.contents .divaider {
  border: 0.5px solid #e1e1e1;
  width: 100%;
  margin: 3px 0;
}

/* فاصل بين المقالات */
.post-divider {
  border: 0.5px solid #e1e1e1;
  width: 100%;
  background: transparent;
}

.details {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  flex-shrink: 0;
}

.details a {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0;
  padding: 8px 12px;
  background: #de8f4b;
  color: #fff;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  text-decoration: none;
}

/* الايقونة مخفية في الطبيعي */
.details a .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  width: 0;
  margin-left: 0;
  transition: all 0.3s ease;
  transform: translateX(8px);
}

/* عند الـhover توسع وتظهر الأيقونة */
.details a:hover {
  gap: 6px;
  padding: 8px 16px 8px 12px;
}

.details a:hover .icon {
  opacity: 1;
  width: 14px;
  margin-left: 6px;
  transform: translateX(0);
}

.details a:hover .icon i {
  animation: arrow-slide 0.4s ease-out;
}

@keyframes arrow-slide {
  0% {
    transform: translateX(8px);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Dark mode support for read-more button */
.dark-mode .details a {
  background: #e67e22;
  color: #fff;
}

/* Dark mode support for content */
.dark-mode .contents h2 {
  color: #fff;

  &:hover {
    color: #de8f4b;
    cursor: pointer;
    transition: color 0.3s ease;
  }
}

.dark-mode .contents p {
  color: #bbb;
}

/* Dark mode support for divider */
.dark-mode .contents .divaider {
  border-color: #1d1a33;
}

/* Dark mode support for post divider */
.dark-mode .post-divider {
  border-color: #1d1a33;
}

/* Dark mode support for image effects */
.dark-mode .post img:hover {
  border: 2px solid #e67e22;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.dark-mode .post img::after {
  background: linear-gradient(
    to top,
    rgba(230, 126, 34, 0.9),
    rgba(230, 126, 34, 0.5),
    transparent
  );
}

.category {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.category span {
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: 4px;
  color: #fff;
  &:hover {
    cursor: pointer;
  }
}

.category p {
  font-size: 0.75rem;
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.category p i {
  font-size: 0.75rem;
  line-height: 1;
  vertical-align: baseline;
}

.loading_more {
  margin-top: 20px;
  padding: 12px 24px;
  background: #de8f4b;
  color: #fff;
  border-radius: 20px;
  margin-right: 200px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.blue {
  background: #2e49ff;
}

.cyan {
  background: #437cd3;
}

.red {
  background: #f93d3d;
}

.green {
  background: #43ac24;
}

@media (max-width: 430px) {
  .container_home {
    width: 435px;
  }

  .slider-container {
    width: 95%;
    margin-left: -3px;
  }

  .ads {
    padding: 25px 0;
    margin: 15px auto 25px auto;
    width: 100%;
    justify-content: center;
  }

  .posts .post {
    flex-direction: column;
    width: 100%;
    height: auto;
    align-items: center;
    padding: 15px;
  }

  .post img {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    width: 91% !important;
  }

  /* تأثير مُبسط للشاشات الصغيرة */
  .post img:hover {
    border: 2px solid #de8f4b;
    box-shadow: 0 2px 10px rgba(222, 143, 75, 0.3);
  }

  .post img::after {
    transition: height 0.3s ease;
  }

  .contents {
    width: 90%;
    padding-right: 0;
    text-align: right;
  }

  .contents h2 {
    font-size: 16px;
    text-align: right;
    direction: rtl;
    display: flex;
    margin: auto;margin-right: 45px;
  }

  .contents p {
    display: none;
    overflow: hidden;
    -webkit-box-orient: vertical;
    font-size: 13px;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    text-align: right;
    direction: rtl;
  }

  .slide img {
    height: 350px;
  }

  .caption {
    margin-right: 35px;
  }

  /* تنسيق الـ divider للشاشات الصغيرة */
  .contents .divaider {
    margin: 10px 0;
  }

  .details {
    justify-content: center;
    flex-direction: column;
    gap: 15px;
  }

  .details a {
    font-size: 12px;
  }

  .category {
    justify-content: center;
  }

  .loading_more {
    margin-right: 15px;
  }
}
