/* ===========================
   WordPress Block Styles Fix
   =========================== */

/* Base Entry Content Styling */
.entry-content {
    color: #ffffff;
    font-size: 18px; /* Match backend size */
    line-height: 1.8;
}

/* Remove excessive spacing between blocks */
.entry-content > * {
    margin-top: 0;
    margin-bottom: 1.5em;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* Fix paragraph spacing - remove blank lines */
.entry-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: #ffffff;
    font-size: 18px;
}

.entry-content p:empty {
    display: none; /* Hide empty paragraphs that create blank lines */
}

/* Heading blocks */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #ffffff;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 700;
    line-height: 1.3;
}

.entry-content h1 { font-size: 2.5em; }
.entry-content h2 { font-size: 2em; }
.entry-content h3 { font-size: 1.75em; }
.entry-content h4 { font-size: 1.5em; }
.entry-content h5 { font-size: 1.25em; }
.entry-content h6 { font-size: 1.1em; }

/* List blocks */
.entry-content ul,
.entry-content ol {
    color: #ffffff;
    padding-left: 2em;
    margin-bottom: 1.5em;
    font-size: 18px;
}

.entry-content li {
    margin-bottom: 0.5em;
    line-height: 1.8;
}

.entry-content ul li {
    list-style-type: disc;
}

.entry-content ol li {
    list-style-type: decimal;
}

/* ===========================
   IMAGE ALIGNMENT FIX
   =========================== */

/* WordPress Image Block */
.entry-content .wp-block-image {
    margin: 2em 0;
    clear: both;
}

.entry-content .wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* CENTER ALIGNMENT - THIS IS CRITICAL */
.entry-content .wp-block-image.aligncenter,
.entry-content .aligncenter {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.entry-content .wp-block-image.aligncenter img,
.entry-content .aligncenter img {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Left alignment */
.entry-content .wp-block-image.alignleft,
.entry-content .alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

/* Right alignment */
.entry-content .wp-block-image.alignright,
.entry-content .alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

/* Wide and Full width */
.entry-content .wp-block-image.alignwide,
.entry-content .alignwide {
    max-width: 100%;
    width: 100%;
}

.entry-content .wp-block-image.alignfull,
.entry-content .alignfull {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Figure captions */
.entry-content figcaption,
.entry-content .wp-element-caption {
    text-align: center;
    font-size: 0.875em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.75em;
    font-style: italic;
}

/* ===========================
   OTHER BLOCKS
   =========================== */

/* Quote blocks */
.entry-content .wp-block-quote {
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.entry-content .wp-block-quote cite {
    display: block;
    margin-top: 1em;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

/* Code blocks */
.entry-content .wp-block-code {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
    margin: 2em 0;
}

.entry-content .wp-block-code code {
    color: #a7f3d0;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 0.9em;
    background: none;
    padding: 0;
}

.entry-content code {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    color: #a7f3d0;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 0.9em;
}

/* Button blocks */
.entry-content .wp-block-button {
    margin: 1.5em 0;
}

.entry-content .wp-block-button__link {
    border-radius: 6px;
    padding: 12px 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.entry-content .wp-block-button.aligncenter {
    text-align: center;
    display: block;
}

/* Columns blocks */
.entry-content .wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    margin-bottom: 2em;
}

.entry-content .wp-block-column {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .entry-content .wp-block-columns {
        flex-direction: column;
    }
}

/* Group blocks */
.entry-content .wp-block-group {
    margin-bottom: 2em;
}

/* Separator */
.entry-content .wp-block-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2em auto;
}

.entry-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2em 0;
}

/* Spacer block */
.entry-content .wp-block-spacer {
    clear: both;
}

/* Ensure links are visible */
.entry-content a {
    color: #ffffff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.entry-content a:hover {
    color: #93c5fd;
}

/* Table blocks */
.entry-content table,
.entry-content .wp-block-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}

.entry-content table th,
.entry-content table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    text-align: left;
}

.entry-content table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* Gallery blocks */
.entry-content .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin: 2em 0;
}

.entry-content .wp-block-gallery.aligncenter {
    justify-content: center;
}

/* Preformatted text */
.entry-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Clear floats */
.entry-content::after {
    content: "";
    display: table;
    clear: both;
}

[class^="_tableContainer_"] {
    overflow: scroll;
    -webkit-overflow-scrolling: touch;
}
[class^="_tableContainer_"]::-webkit-scrollbar {
    display: none
}