/* Root Container */
.magazine-wrapper {
    position: relative;
    width: 100%;
}

.magazine-wrapper:not(.layout-overlay)::after {
    content: "";
    display: table;
    clear: both;
}

/* Base Image */
img.magazine-img-15689cd0 {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Floated Image */
img.magazine-img-15689cd0.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 15px;
}

img.magazine-img-15689cd0.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 15px;
}

img.magazine-img-15689cd0.alignnone {
    float: none;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
}

/* Overlay Layout */
.magazine-wrapper.layout-overlay {
    display: flex;
    overflow: hidden;
    min-height: 300px;
}

.magazine-wrapper.layout-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

.magazine-wrapper.layout-overlay .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.magazine-wrapper.layout-overlay .overlay-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Sibling Text Blocks */
.magazine-wrapper .magazine-text-block-15689cd0 {
    margin-top: 0;
    margin-bottom: 15px;
    position: relative;
}

/* Ensure WYSIWYG internal elements inherit if global format toggle is on */
.magazine-wrapper .magazine-text-block-15689cd0 p,
.magazine-wrapper .magazine-text-block-15689cd0 h1,
.magazine-wrapper .magazine-text-block-15689cd0 h2,
.magazine-wrapper .magazine-text-block-15689cd0 h3,
.magazine-wrapper .magazine-text-block-15689cd0 h4,
.magazine-wrapper .magazine-text-block-15689cd0 h5,
.magazine-wrapper .magazine-text-block-15689cd0 h6 {
    /* Margin top is overridden inline by our custom spacing controls in TinyMCE if applied */
}

/* Fix Indentation for Word Wrapper Spans during animation */
.magazine-text-block-15689cd0 .mag-txt-anim-word {
    /* Prevent words from acting as blocks and taking up 100% width and applying their own indentation again */
    text-indent: 0 !important; 
    margin-left: 0 !important;
}


/* Text Animation Helpers */
.mag-txt-anim-wrapper {
    position: relative;
    display: inline-block;
    white-space: pre-wrap; 
}
.mag-txt-anim-item {
    display: inline-block;
    opacity: 0;
    white-space: pre-wrap;
    /* Invisible placeholder space reserves layout */
}

/* Visibility fixes for real typewriter */
.mag-txt-anim-typewriter-item {
    opacity: 0; 
    /* width is not affected, space is reserved natively by the character being invisible */
}

.mag-txt-anim-item.visible, .mag-txt-anim-typewriter-item.visible {
    opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
    .mag-txt-anim-item, .mag-txt-anim-typewriter-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}
