/* Block styles */
.wp-block-button {
    padding: 0.5em 1em;
    border-radius: 4px;
}

.wp-block-button__link {
    color: var(--wp--preset--color--base);
    background-color: var(--wp--preset--color--accent-2);
}

.wp-block-button__link:hover {
    background-color: var(--wp--preset--color--accent-1);
}

.wp-block-cover {
    min-height: 400px;
}

.wp-block-cover__inner-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2em;
}

.wp-block-post-template {
    border-bottom: 1px solid var(--wp--preset--color--accent-8);
    padding-bottom: 1.5em;
    margin-bottom: 1.5em;
}

.wp-block-post-template:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wp-block-post-title {
    margin-bottom: 0.5em;
}

.wp-block-post-excerpt {
    margin-bottom: 1em;
}

.wp-block-post-date {
    color: var(--wp--preset--color--accent-8);
    font-size: 0.9em;
}

/* Navigation menu */
.wp-block-navigation {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-block-navigation__container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.wp-block-navigation-link {
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wp-block-navigation-link:hover {
    background-color: var(--wp--preset--color--accent-2);
    color: var(--wp--preset--color--base);
}

/* Image block styles - Comprehensive fix for padding, border, and radius issues */
.wp-block-image {
    display: block;
    margin: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.wp-block-image figure {
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    opacity: 1;
    visibility: visible;
    border: none;
    border-radius: 0;
}

/* Ensure image blocks with padding work properly */
.wp-block-image[style*="padding"] {
    display: block;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.wp-block-image[style*="padding"] figure {
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.wp-block-image[style*="padding"] img {
    display: block;
    max-width: 100%;
    height: auto;
    opacity: 1;
    visibility: visible;
}

/* Handle background colors on image blocks */
.wp-block-image[style*="background"] {
    display: block;
    overflow: visible;
}

.wp-block-image[style*="background"] figure {
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
}

}

.wp-block-image figure[style*="border-radius"] {
    border-radius: inherit !important;
    overflow: hidden !important;
}

/* Editor-specific fixes */
.editor-styles-wrapper .wp-block-image {
    display: block !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

.editor-styles-wrapper .wp-block-image figure {
    display: block !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

.editor-styles-wrapper .wp-block-image img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.editor-styles-wrapper .wp-block-image[style*="padding"] {
    display: block !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

.editor-styles-wrapper .wp-block-image[style*="padding"] img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Editor-specific fixes for borders and radius - maximum override */
.editor-styles-wrapper .wp-block-image figure {
    border: inherit !important;
    border-radius: inherit !important;
    border-width: inherit !important;
    border-color: inherit !important;
    border-style: inherit !important;
}

.editor-styles-wrapper .wp-block-image img {
    border: none !important;
    border-radius: 0 !important;
    border-width: 0 !important;
    border-color: transparent !important;
    border-style: none !important;
}

.editor-styles-wrapper .wp-block-image img[style*="border"] {
    border: none !important;
    border-radius: 0 !important;
    border-width: 0 !important;
    border-color: transparent !important;
    border-style: none !important;
}

.editor-styles-wrapper .wp-block-image img[style*="border-radius"] {
    border-radius: 0 !important;
}

.editor-styles-wrapper .wp-block-image figure[style*="border"] {
    border: inherit !important;
}

.editor-styles-wrapper .wp-block-image figure[style*="border-radius"] {
    border-radius: inherit !important;
    overflow: hidden !important;
}

/* Additional editor-specific overrides for iframe content */
.editor-styles-wrapper iframe[name="editor-canvas"] .wp-block-image figure {
    border: inherit !important;
    border-radius: inherit !important;
    border-width: inherit !important;
    border-color: inherit !important;
    border-style: inherit !important;
}

.editor-styles-wrapper iframe[name="editor-canvas"] .wp-block-image img {
    border: none !important;
    border-radius: 0 !important;
    border-width: 0 !important;
    border-color: transparent !important;
    border-style: none !important;
}

/* Target WordPress border classes in editor */
.editor-styles-wrapper .wp-block-image.has-border-color figure,
.editor-styles-wrapper .wp-block-image.has-border-width figure,
.editor-styles-wrapper .wp-block-image.has-border-style figure,
.editor-styles-wrapper .wp-block-image.has-border-radius figure {
    border: inherit !important;
    border-radius: inherit !important;
    border-width: inherit !important;
    border-color: inherit !important;
    border-style: inherit !important;
    overflow: hidden !important;
}

.editor-styles-wrapper .wp-block-image.has-border-color img,
.editor-styles-wrapper .wp-block-image.has-border-width img,
.editor-styles-wrapper .wp-block-image.has-border-style img,
.editor-styles-wrapper .wp-block-image.has-border-radius img {
    border: none !important;
    border-radius: 0 !important;
    border-width: 0 !important;
    border-color: transparent !important;
    border-style: none !important;
}

/* Columns justification styles */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
}

/* Horizontal justification for columns container */
.wp-block-columns.is-horizontally-aligned-left {
    justify-content: flex-start;
}

.wp-block-columns.is-horizontally-aligned-center {
    justify-content: center;
}

.wp-block-columns.is-horizontally-aligned-right {
    justify-content: flex-end;
}

.wp-block-columns.is-horizontally-aligned-space-between {
    justify-content: space-between;
}

/* Vertical alignment for columns container */
.wp-block-columns.is-vertically-aligned-top {
    align-items: flex-start;
}

.wp-block-columns.is-vertically-aligned-center {
    align-items: center;
}

.wp-block-columns.is-vertically-aligned-bottom {
    align-items: flex-end;
}

/* Individual column justification */
.wp-block-column {
    display: flex;
    flex-direction: column;
}

/* Horizontal justification for individual columns */
.wp-block-column.is-horizontally-aligned-left {
    align-items: flex-start;
}

.wp-block-column.is-horizontally-aligned-center {
    align-items: center;
}

.wp-block-column.is-horizontally-aligned-right {
    align-items: flex-end;
}

/* Vertical justification for individual columns */
.wp-block-column.is-vertically-aligned-top {
    justify-content: flex-start;
}

.wp-block-column.is-vertically-aligned-center {
    justify-content: center;
}

.wp-block-column.is-vertically-aligned-bottom {
    justify-content: flex-end;
}

.wp-block-column.is-vertically-aligned-stretch {
    justify-content: stretch;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .wp-block-navigation__container {
        flex-direction: column;
        align-items: center;
    }

    .wp-block-navigation-link {
        width: 100%;
        text-align: center;
    }
    
    /* Reset column justification on mobile for better readability */
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column.is-horizontally-aligned-left,
    .wp-block-column.is-horizontally-aligned-center,
    .wp-block-column.is-horizontally-aligned-right {
        align-items: stretch;
    }
}
