/* Post Grid Tabs - CSS */

/* Tabs Navigation */
.advanced-post-grid-tabs {
    margin-bottom: 50px;
}

.apgt-tabs-nav {
    display: flex;
    flex-wrap: nowrap; /* Prevents wrapping */
    overflow-x: auto; /* Enables horizontal scrolling */
    white-space: nowrap; /* Ensures items stay in a single line */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
    scrollbar-width: none; /* Hides scrollbar in Firefox */
    margin: 0px !important;
    padding: 0px !important;
}

.apgt-tabs-nav::-webkit-scrollbar {
    display: none; /* Hides scrollbar in Chrome, Safari, Edge */
}

.apgt-tabs-nav li {
    display: inline-block;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: #f5f5f5;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.apgt-tabs-nav li:hover {
    background: #e0e0e0;
}

.apgt-tabs-nav li.active {
    background: #4054b2;
    color: #fff;
}

/* Grid Container */
.apgt-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
}

@media (max-width: 1024px) {
    .apgt-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .apgt-grid-container {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* Grid Items */
.apgt-item {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apgt-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.apgt-thumbnail {
    padding-top: 60%;
    display: block;
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

.apgt-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.apgt-item:hover .apgt-thumbnail img {
    transform: scale(1.05);
}

.apgt-item-categories {
    padding: 10px 10px 0;
    display: block;
    flex-wrap: wrap;
    gap: 5px;
    position: sticky;
    margin-top: -3.7rem;
    z-index: 1;
}

.apgt-category-label {
    display: inline-block;
    font-size: 15px;
    /*text-transform: uppercase;*/
    font-weight: 600;
    text-decoration: uppercase;
    background-color: #D9D9D9;
    padding: 8px 20px 8px 20px;
    margin: 5px;
    border-radius: 50px;
    color: #03584c;
}

.apgt-title {
    padding: 10px 15px 5px;
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.apgt-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.apgt-title a:hover {
    color: #4054b2;
}

.apgt-excerpt {
    padding: 0 15px 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.apgt-read-more {
    display: inline-block;
    margin: 0 15px 15px;
    padding: 8px 15px;
    background: #fff;
    color: #4054b2;
    border: 1px solid #4054b2;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.apgt-read-more:hover {
    background: #4054b2;
    color: #fff;
}