/* Frontend styles for the Featured News block */

.featured-news-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px;
}

.featured-news-title {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #000;
}

.featured-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
    margin-bottom: 40px;
}

.featured-news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.featured-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Simplified image container */
.featured-news-image-container {
    display: block;
    overflow: hidden;
    background-color: #f5f5f5;
    text-decoration: none;
}

/* Simplified image styling */
.featured-news-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.featured-news-image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #666;
}

.featured-news-content {
    padding: 20px;
}

.featured-news-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.featured-news-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.featured-news-category {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
}

.page h3.featured-news-item-title {
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    line-height: 1.4;
    color: #000;
}

.featured-news-item-title a {
    color: inherit;
    text-decoration: none;
}

.featured-news-item-title a:hover {
    color: #00A05D;
}

/* Horizontal divider styling */
.featured-news-divider {
    border: none;
    border-top: 1px solid #000000;
    margin: 20px auto 30px;
    width: 100%;
}

.featured-news-button-container {
    text-align: center;
    margin-top: 10px;
}

.featured-news-button {
    display: inline-block;
    padding: 12px 32px;
    background-color: #00A05D;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.featured-news-button:hover {
    color: white;
    text-decoration: none;
}

/* Responsive styles */
@media (max-width: 900px) {
    .featured-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .featured-news-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-news-title {
        font-size: 28px;
    }
}
/* Editor-only styles for the Featured News block */

.editor-styles-wrapper .featured-news-block {
    padding: 20px 0;
}

.featured-news-no-posts {
    text-align: center;
    padding: 40px;
    background-color: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

/* Fix spacing in editor */
.editor-styles-wrapper .featured-news-title {
    margin-top: 0;
}

/* Make the block stand out in the editor */
.is-selected .featured-news-block {
    position: relative;
}

.is-selected .featured-news-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: 0 0 0 2px #007cba;
    border-radius: 4px;
}

/* Button styles for editor */
.editor-styles-wrapper .featured-news-button {
    cursor: text;
}

/* Spinner centering */
.featured-news-grid .components-spinner {
    display: block;
    margin: 40px auto;
}
