/* ============================================= */
/* Base Container Styles */
/* ============================================= */

.cat-slider {
    width: 100%;
    min-height: 152px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.cat-header {
    width: 100%;
    height: 60px;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.cattitle {
    font-size: 1.5rem;
    font-weight: 700;
    padding-right: 10px;
    position: relative;
    padding-bottom: 3px;
}

.view-all {
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.view-all:hover {
  text-decoration: underline;
}

/* ============================================= */
/* Slider Container (Layout-Shift Free) */
/* ============================================= */
.container {
    display: flex;
    flex-wrap: wrap;
}
.cat-slider-container {
    position: relative;
    overflow: hidden;
    display: flex;
    margin: 0;
    padding: 0;
}

.cat-game-slider {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
  width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cat-game-slider::-webkit-scrollbar {
  display: none;
}

/* ============================================= */
/* Post Card (Fixed Dimensions) */
/* ============================================= */

.game-tile {
    scroll-snap-align: start;
    flex: 0 0 auto;
    height: 100%;
    min-width: 0;
    transition-duration: .3s;
    width: calc((100vw - 20px) / 1);
}

/* ============================================= */
/* Thumbnail (Aspect Ratio with Placeholder) */
/* ============================================= */

.post-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: calc(100% / calc(16 / 9)); /* Aspect ratio */
  overflow: hidden;
}

.post-thumbnail img {
  position: absolute;
}

/* ============================================= */
/* Content Area (Fixed Height) */
/* ============================================= */

.post-content {
  padding: 1.25rem;
  height: var(--content-height);
  display: flex;
  flex-direction: column;
  contain: content;
}

.post-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
}

.post-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.post-excerpt {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* ============================================= */
/* Navigation Buttons (Positioned Without Shifts) */
/* ============================================= */


.slider-nav {
    display: block;
    height: 100%;
    top: 0;
    margin: 0;
    background-position: 50%;
    background-repeat: no-repeat;
    width: 50px;
    color: #0000;
    border: 0;
    position: absolute;
    z-index: 1;
    outline-color: initial;
    outline-style: none;
    outline-width: 0;
    opacity: 0;
    border-radius: 0;
    cursor: pointer;
    transition: opacity .25s ease, background-color .25s ease;
    background-color: #fffffff2;
}

.cat-slider-container:hover .slider-nav {
  opacity: 1;
  visibility: visible;
}

.slider-nav:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.slider-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.slider-nav::after {
    display: block;
  content: '';
  width: 16px;
  height: 16px;
  border-top: 3px solid #333;
  border-right: 3px solid #333;
  transform: rotate(45deg);
}

.slider-nav.prev {
  left: 0;
}

.slider-nav.prev::after {
  transform: rotate(-135deg);
}

.slider-nav.next {
  right: 0;
}


.slider-nav.disabled {
  opacity: 0 !important;
  pointer-events: none;
}

/* ============================================= */
/* Responsive Adjustments */
/* ============================================= */

@media (min-width: 251px) {
  .game-tile {
      width: calc((100vw - 30px) / 2);
}
}

@media (min-width: 451px) {
  .game-tile {
      width: calc((100vw - 20px) / 3);
}
}
@media (min-width: 721px) {
  .game-tile {
      width: calc((100vw - 50px) / 4);
}
}
@media (min-width: 969px) {
  .game-tile {
      width: calc((100vw - 80px) / 5);
}

}
@media (min-width: 1201px) {
  .game-tile {
      width: calc((100vw - 90px) / 6);
}

}
@media (min-width: 1501px) {
  .game-tile {
      width: calc((100vw - 100px) / 7);
}
}

@media (min-width: 1751px) {
    .game-tile {
      width: calc((100vw - 110px) / 8);
}
}
@media (min-width: 1921px) {
    .game-tile {
      width: calc((100vw - 120px) / 9);
}
}

@media (min-width: 2251px) {
     .game-tile {
      width: calc((100vw - 130px) / 10);
}
  
}

/* ============================================= */
/* Animation Keyframes (Safe, Non-Layout-Shifting) */
/* ============================================= */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.category-slider-section {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ============================================= */
/* Utility Classes */
/* ============================================= */

.no-posts, .no-categories {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  contain: strict;
}

/* ============================================= */
/* Print Styles (Optional) */
/* ============================================= */

@media print {
  .cat-game-slider {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    overflow-x: visible;
    height: auto;
  }
  
  .game-tile {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}/* Container for all tags */
.tag-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    /* Use a simple list layout for the tiles instead of a grid */
}

/* Individual Tag Tile Styling */
.tag-tile {
     /* Space between tiles */
     height: 63px;
     border-radius: 10px;
     background-color: #175e9b;
}

.tag-tile a {
    
    
     /* Dark text for better contrast */
    transition: background-color 0.2s;
    overflow: hidden; /* Contains the children */
}

.tag-tile a:hover {
    background-color: #f7f7f7;
    border-color: #ccc;
}

/* --- FLEX LAYOUT FOR LEFT/RIGHT CONTENT --- */
.tag-tile-content-wrapper {
    display: flex; /* Enables flex layout */
    align-items: center; /* Vertically centers content */
     /* Set a minimum height for the tile */
    justify-content: center;
}

/* LEFT SIDE: Image Styling */
.tag-image-left {
    /* Image takes a fixed width on the left */
    width: 112px;
    height: 63px;
     /* Prevents shrinking */
    background-size: cover;
    border-radius: 10px 0 0 10px; /* Match container border radius */
    align-items: center;
}

/* RIGHT SIDE: Text Content Styling */
.tag-content-right {
    flex-grow: 1; /* Allows the text content to fill the remaining space */
    padding: 10px 15px;
    display: flex;
    justify-content: space-between; /* Pushes the count to the right */
    align-items: center;
}

.tag-name {
    font-size: 1.2em;
    font-weight: 700;
    color: #ffffff;
    text-transform: capitalize;
    text-overflow: ellipsis;
    white-space: normal;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    line-height: 1;
}

.tag-count {
    font-size: 1.2em;
    color: #91e397;
    font-weight: 600;
    margin-left: 15px; /* Adds space from the tag name */
}