/* Banner Post Block Styles */
.wp-block-seo-banner-post {
    --banner-aspect-desktop: 56.25%;
    --banner-aspect-mobile: 100%;
    --banner-bg-position: 50% 50%;
    position: relative;
    width: 100%;
}

.wp-block-seo-banner-post,
.wp-block-seo-banner-post * {
    box-sizing: border-box;
}

.wp-block-seo-banner-post.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-seo-banner-post.alignfull {
    width: 100%;
    max-width: 100%;
}

/* Main Link Wrapper */
.banner-post-link {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: var(--banner-aspect-desktop);
    text-decoration: none;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

/* Background Image */
.banner-post-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: var(--banner-bg-position);
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.banner-post-link:hover .banner-post-background {
    transform: scale(1.03);
}

.banner-post-background.banner-post-no-image {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* Gradient Overlay - Black at bottom, transparent at top */
.banner-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

/* Content at Bottom */
.banner-post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: #fff;
    text-align: left;
}

/* Category */
.banner-post-category {
    display: inline-block;
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #fff;
    opacity: 0.9;
}

/* Title */
.banner-post-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0px 0 !important;
    color: #fff;
}

/* Meta (date, read time) */
.banner-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #fff;
    opacity: 0.85;
}

.banner-post-date,
.banner-post-readtime {
    color: #fff;
}

.banner-post-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

/* Empty State */
.banner-post-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f8f8f8;
    border-radius: 8px;
    color: #666;
}

/* Loading State */
.banner-post-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #666;
    gap: 8px;
}

/* Responsive - Mobile (less than 767px) */
@media (max-width: 767px) {
    .banner-post-link {
        padding-bottom: var(--banner-aspect-mobile);
    }

    .banner-post-content {
        padding: 16px;
    }

    .banner-post-category {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .banner-post-title {
        font-size: 20px;
        margin-bottom: 8px !important;
    }

    .banner-post-meta {
        font-size: 12px;
        gap: 8px;
    }
}

/* Editor specific */
.block-editor-block-list__block .wp-block-seo-banner-post {
    margin-top: 0;
    margin-bottom: 0;
}

.wp-block-seo-banner-post .components-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
}

/* Editor Preview Styles */
.wp-block-seo-banner-post .banner-post-preview {
    position: relative;
    width: 100%;
    padding-bottom: var(--banner-aspect-desktop);
    overflow: hidden;
    border-radius: 8px;
}

.wp-block-seo-banner-post .banner-post-preview-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: var(--banner-bg-position);
    background-repeat: no-repeat;
}

.wp-block-seo-banner-post .banner-post-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 70%);
}

.wp-block-seo-banner-post .banner-post-preview-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: #fff;
    text-align: left;
}

.wp-block-seo-banner-post .banner-post-preview-content .banner-post-category {
    color: #fff;
}

.wp-block-seo-banner-post .banner-post-preview-content .banner-post-title {
    color: #fff;
}

.wp-block-seo-banner-post .banner-post-preview-content .banner-post-meta {
    color: #fff;
}
