/**
 * Hero Image Block Styles
 */

.hero-image-block {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.hero-image-block.alignfull {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-image-wrapper {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-image-wrapper {
        max-height: 300px;
    }
}

/* Optional: Add aspect ratio container for consistent height */
.hero-image-wrapper.aspect-ratio {
    position: relative;
    padding-bottom: 40%; /* 5:2 aspect ratio, adjust as needed */
    height: 0;
}

.hero-image-wrapper.aspect-ratio .hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Backend editor preview styles */
.hero-image-preview-message {
    padding: 30px;
    background: #f0f0f0;
    text-align: center;
    border: 2px dashed #ccc;
    border-radius: 4px;
    margin: 20px 0;
}

.hero-image-preview-message p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Additional styling for better visual hierarchy */
.hero-image-block + * {
    margin-top: 2rem;
}

/* Ensure proper spacing in editor */
.block-editor-block-list__block .hero-image-block {
    margin-top: 0;
    margin-bottom: 0;
}

/* Loading state styles */
.hero-image[loading="lazy"] {
    transition: opacity 0.3s ease-in-out;
}

/* Focus styles for accessibility */
.hero-image:focus {
    outline: 2px solid #005cee;
    outline-offset: 2px;
}