/* ============ Fix CSS ============ */
.slideshow-list-inner {
	padding-left: 5px !important;
}

.slideshow-list-inner2 {
	width: 100%;
	position: relative;
	overflow: hidden;
}
.slideshow-no-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 7px;
	font-size: 1.1em;
}

/* ============ Slideshow container ============ */
.slideshow-container-block {
  width: 100%;
}
.slideshow-container {
	position: relative;
	overflow: hidden;
    border-radius: 8px 8px 0 0;
    display: grid;
    grid-auto-flow:column;
}
@media not all and (min-width: 768px) {
  .slideshow-container-block {
    margin-right: 0;
  }
}
/* ============ Slides ============ */
.slideshow-slides {
    opacity: 0;
    display: block;
	height: 100%;
	transition: all 1s ease;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
}

.slideshow-slides-text {
	text-align: center;
	padding: 10px 50px 10px 50px;
	background-color: rgb(243, 244, 246, 0.7);
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}
.dark .slideshow-slides-text {
	background-color: rgb(27, 35, 53, 0.7);
}

/* ============ Image navigator container ============ */
.slideshow-image-navigator-container {
  position: absolute;
  top: 8px;
  right: -20px;
  bottom: 8px;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-behavior: smooth;
  padding-right: 10px;
}
.slideshow-list-inner2 .slideshow-image-navigator-container {
  position: absolute;
  top: 0;
  right: -15px;
  bottom: 8px;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-behavior: smooth;
  padding-right: 8px;
}

.custom_scrollbar .slideshow-image-navigator-container {
  right: -16px;
}
.slideshow-image-navigator-container img {
	border: 1px solid #000000;
	cursor: pointer;
	opacity: 0.5;
	border-radius: 8px;
}
img.slideshow-active, .slideshow-image-navigator-container img:hover {
	opacity: 1;
}

/* Dot navigator container */
.slideshow-dot-navigator-container {
	text-align: center;
	padding: 10px;
	background: #e0e1e3;
  border-radius: 0 0 8px 8px;
}
.dark .slideshow-dot-navigator-container {
	background-color: rgb(27, 35, 53);
}

.slideshow-dot-navigator {
	cursor: pointer;
	height: 1.5rem;
	width: 1.5rem;
	padding: 3px;
	margin: 0 2px;
	border-radius: 50%;
	display: inline-block;
	transition: 0.5s all;

}

.dark .forumtitle:hover{
	color: #cccccc !important;
}

.dark .forumtitle{
	color: #e0e0e0 !important;
	transition: color 0.3s ease-in-out;
}

.slideshow-active, .slideshow-dot-navigator:hover {
	background-color: rgba(var(--color-primary),.95);
	color: #ffffff;
}
.dark .slideshow-active, .dark .slideshow-dot-navigator:hover {
	background-color: rgba(var(--color-primary-dark),.95);
	color: #ffffff;
}

/* ============ Next & previous buttons ============ */
.slideshow-prev, .slideshow-next {
	cursor: pointer;
	position: absolute;
	width: auto;
	margin-top: -35px;
	padding: 5px 30px;
    color: #2d3538;
	font-weight: bold;
	font-size: 20px;
	user-select: none;
    z-index: 2;
}

/* Default light mode image */
.slideshow-container {
    /*background-image: url('https://metin2.forum/images/forum/image-header.webp') !important;*/
	background-image: url('https://metin2.forum/images/forum/header-m2f.webp') !important;
}

/* Dark mode override */
.dark .slideshow-container {
    /*background-image: url('https://metin2.forum/images/forum/image-header2-dark.webp') !important;*/
	background-image: url('https://metin2.forum/images/forum/header-m2f.webp') !important;
}

.dark .slideshow-prev, .dark .slideshow-next {
	cursor: pointer;
	position: absolute;
	width: auto;
	margin-top: -35px;
	padding: 5px 30px;
    color: #fff;
	font-weight: bold;
	font-size: 20px;
	user-select: none;
    z-index: 2;
}

.slideshow-prev:hover, .slideshow-next:hover {
	background-color: rgba(0,0,0,0.8);
	color: white !important;
	text-decoration: none;
}

.slideshow-prev {
	left: 0;
	border-radius: 0 3px 3px 0;
}
.slideshow-next {
	right: 0;
	border-radius: 3px 0 0 3px;
}

.slideshow-buttons {
    top: 45px;
}

.slideshow-link {
    width: 110px;
    height: 110px;
    background: rgba(var(--color-primary));
    padding: 10px;
    box-shadow: 0 5px 6px -1px rgb(0 0 0 / 0.5);
    border-radius: 12px; /* Adjust this value for rounder edges */
}

.dark .slideshow-link {
    background: rgba(var(--color-primary-dark));
}

.dark .header-txt {
	color: white;
}

.slideshow-link:hover {
    color: white !important;
    background: #3731a0;
}

.slideshow-link svg {
    margin: auto;
}

/* Update forumtitle rules */
.forumtitle {
    display: inline-flex !important; /* Force maintain flex layout */
    align-items: center;
    justify-content: center; /* Add this for horizontal centering */
    max-width: 100%;
    min-width: 0;
    width: 100%; /* Take full available width */
}

/* Keep existing truncation rules */
.desktop-title, 
.mobile-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1; /* Add this */
}

/* Ensure icon doesn't shrink */
.forumtitle .iconify {
    flex-shrink: 0;
}

@media (min-width: 769px) {
  .slideshow-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .slideshow-link svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .header-txt {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    pointer-events: none;
  }

  .slideshow-link:hover {
    padding-bottom: 25px; /* Make space for text */
  }

  .slideshow-link:hover svg {
    transform: translateY(-10px); /* Move icon up */
  }

  .slideshow-link:hover .header-txt {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* Center icon by default */
  .slideshow-link {
    justify-content: center;
  }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
	.slideshow-list-inner {
		margin-right: 0 !important;
	}
	.slideshow-no-wrap {
		margin-right: 0 !important;
	}
    .slideshow-buttons {
        top: 50px;
    }
    .slideshow-link {
        height: 100px;
        width: 100px;
    }
    .slideshow-link svg {
        height: 32px;
        width: 32px;
    }
	
	  /* Add text truncation to button labels */
	  .slideshow-link .header-txt {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		width: 100%;
		display: block;
	  }

	  /* Ensure button content stays in single line */
	  .slideshow-link {
		min-width: 0; /* Allows text truncation in flex children */
	  }
	
}

@media (max-width: 768px) {
  /* Button container grid layout */
  .slideshow-buttons .flex-wrap {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    padding: 0px 10px;
  }

  /* Button styling */
  .slideshow-link {
    width: 100% !important;
    max-width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    padding: 12px;
    text-align: center;
    font-size: 0.875rem;
	height: auto; /* Ensure height is adjusted to content */
    border-radius: 12px; /* Adjust this value for rounder edges */
  }

  /* Icon sizing */
  .slideshow-link svg {
    height: 26px;
    width: 26px;
  }

  /* Remove horizontal flex layout */
  .slideshow-link {
    flex-direction: column !important;
  }
  
  /* Move buttons 20px up */
  .slideshow-buttons {
    top: 20px !important; /* Move the buttons up by 20px */
  }
  



  /* Add these changes to your existing CSS */
@media (max-width: 768px) {
  .slideshow-container {
    height: auto !important; /* Let height adjust to content */
    padding-top: 100px; /* Space for buttons at top */
    position: relative;
  }

  .slideshow-buttons {
    top: 10px !important;
    position: absolute;
    width: 100%;
    height: auto;
    transform: none;
  }

  .slideshow-slides {
    height: auto !important;
  }

  .slideshow-slides-text {
    position: relative;
    margin-top: auto; /* Push text to bottom */
  }

  .slideshow-link {
    height: 80px;
    width: 80px;
  }

  .slideshow-link svg {
    height: 24px;
    width: 24px;
  }
}

@media (max-width: 768px) {
  .slideshow-container {
    padding-top: 90px; /* Less space for smaller buttons */
  }
  
  .slideshow-link {
    height: 70px;
    padding: 8px;
    font-size: 0.75rem;
  }
  
  .slideshow-link svg {
    height: 20px;
    width: 20px;
  }
}
  
}