/* Advanced Post Grid CSS Layout */

.apg-container-wrapper {
    width: 100%;
}

.apg-header-row {
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
}

.apg-top-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.apg-top-info-left {
    color: #050505;
}

.apg-top-info-right {
    color: #7a7a7a;
}

.apg-filters-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.apg-filter-item {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 5px 0 10px 0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.apg-filter-item .apg-term-count {
    font-size: 9px;
    vertical-align: super;
    opacity: 0.6;
    margin-left: 2px;
}

/* Core CSS Grid Layout */
.advanced-post-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-column-gap: 40px;
    grid-row-gap: 50px;
}

/* Desktop position-based column span rule */
.advanced-post-grid .advanced-post-item {
    display: flex;
    flex-direction: column;
}

.advanced-post-grid .advanced-post-item:nth-child(1),
.advanced-post-grid .advanced-post-item:nth-child(2) {
    grid-column: span 3;
}

.advanced-post-grid .advanced-post-item:nth-child(n+3) {
    grid-column: span 2;
}

/* Responsive constraints */
@media screen and (max-width: 1024px) {
    .advanced-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .advanced-post-grid .advanced-post-item:nth-child(1),
    .advanced-post-grid .advanced-post-item:nth-child(2),
    .advanced-post-grid .advanced-post-item:nth-child(n+3) {
        grid-column: span 1 !important;
    }
}

@media screen and (max-width: 767px) {
    .advanced-post-grid {
        grid-template-columns: 1fr !important;
    }
    .advanced-post-grid .advanced-post-item:nth-child(1),
    .advanced-post-grid .advanced-post-item:nth-child(2),
    .advanced-post-grid .advanced-post-item:nth-child(n+3) {
        grid-column: span 1 !important;
    }
}

/* Card layout elements */
.apg-card {
    display: flex;
    flex-direction: column;
}

.apg-img-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 20px;
}

.apg-img-wrapper img,
.apg-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    transition: transform 0.4s ease;
}

/* Hover effects */
.apg-hover-zoom-in:hover .apg-featured-image,
.apg-hover-zoom-in:hover .apg-img-wrapper img {
    transform: scale(1.08);
}

.apg-hover-zoom-out .apg-featured-image,
.apg-hover-zoom-out .apg-img-wrapper img {
    transform: scale(1.08);
}
.apg-hover-zoom-out:hover .apg-featured-image,
.apg-hover-zoom-out:hover .apg-img-wrapper img {
    transform: scale(1);
}

.apg-hover-grayscale:hover .apg-featured-image,
.apg-hover-grayscale:hover .apg-img-wrapper img {
    filter: grayscale(100%);
}

/* Card Content details */
.apg-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.apg-meta-sep {
    color: #e5e7eb;
}

.apg-post-title {
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.apg-post-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.apg-excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.apg-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
    margin-top: auto;
}

.apg-read-more-icon {
    font-size: 12px;
}

/* Horizontal Dividers */
.apg-divider {
    border-top: 1px solid #e5e7eb;
    margin-top: 35px;
    width: 100%;
}

/* Empty state */
.apg-empty-state {
    padding: 60px 20px;
    text-align: center;
}
