/**
 * Flexible Post Query Block Styles
 */

/* Block Container */
.flexible-post-query-block {
    width: 100%;
}

/* Header Section */
.fpq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.fpq-title {
    margin: 0;
}

.fpq-view-all {
    text-decoration: none;
    font-weight: 600;
}

/* Layout: Grid */
.fpq-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
}

.fpq-columns-1 {
    grid-template-columns: 1fr;
}

.fpq-columns-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .fpq-columns-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fpq-columns-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .fpq-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fpq-columns-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.fpq-columns-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .fpq-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fpq-columns-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Layout: List */
.fpq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fpq-list .fpq-post {
    width: 100%;
}

/* Layout: Featured + Grid */
.fpq-featured-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
}

.fpq-featured-grid .fpq-featured-post {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .fpq-featured-grid .fpq-featured-post {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .fpq-featured-grid .fpq-featured-post .event-card__image,
    .fpq-featured-grid .fpq-featured-post .post-card img {
        height: 100%;
        object-fit: cover;
    }
}

/* Post/Event Cards */
.fpq-post {
    display: flex;
    flex-direction: column;
}

/* Event Card Styles */
.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-card__image {
    margin-bottom: 1rem;
}

.event-card__image img {
    width: 100%;
    height: auto;
    display: block;
}

.event-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-card__date {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-card__title {
    margin: 0 0 0.75rem 0;
}

.event-card__title a {
    text-decoration: none;
    color: inherit;
}

.event-card__title a:hover {
    opacity: 0.7;
}

.event-card__type {
    margin-bottom: 0.5rem;
}

.event-type-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--wp--preset--color--light-green, #BCD382);
    color: var(--wp--preset--color--dark-green, #172713);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.event-card__location {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.event-card__excerpt {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.event-card__link {
    margin-top: auto;
}

.event-card__link a {
    display: inline-block;
    text-decoration: none;
}

/* Footer Section */
.fpq-footer {
    margin-top: 2rem;
    text-align: center;
}

/* No Results Message */
.fpq-no-results {
    padding: 2rem;
    text-align: center;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

.fpq-no-results p {
    margin: 0;
    color: #666;
}

/* Alignment Support */
.alignwide .fpq-grid,
.alignwide .fpq-list,
.alignwide .fpq-featured-grid {
    max-width: var(--wp--custom--layout--wide-size, 1600px);
}

.alignfull .fpq-grid,
.alignfull .fpq-list,
.alignfull .fpq-featured-grid {
    max-width: 100%;
}
