/* ========== FIGURE CONTAINER ========== */
.figure-container-left {
    margin-left: 0;
    margin-right: auto;
}

.figure-container-center {
    margin: 0 auto;
}

.figure-container-right {
    margin-left: auto;
    margin-right: 0;
}

.inline-figure-container-left {
    float: left;
    margin-right: 30px; /* spacing between image and text */
}

.inline-figure-container-center {
    float: center;
    margin: 0px 15px; /* spacing between image and text */
}

.inline-figure-container-right {
    float: right;
    margin-left: 30px; /* spacing between image and text */
}

/* ========== FIGURE ELEMENTS ========== */

.figure-container > figure > img, .figure-container > figure > video {
    margin-left: auto; 
    margin-right: auto; 
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.figure-caption {
    text-align: center;
    font-size: 0.9em;
    font-style: italic;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    color: #666;
    position: relative;
}

.figure-caption span {
    position: relative;
    display: inline-block;  /* This will make the span only as wide as the text */
    padding-bottom: 5px;   /* Space for the underline */
}

/* Bottom border of caption */
.figure-caption span::after {
    content: "";
    position: absolute;
    left: -30px;  /* Starts 15px from the left of the text */
    right: -30px; /* Ends 15px from the right of the text */
    bottom: 0;
    height: 1px;
    background-color: #e7e7e7;
}

.figure-shadow {
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}

.figure-shadow-caption {
    margin-top: 15px !important;
}

/* ========== FIGURE ENLARGEABLE ========== */

figure.enlargeable-image, figure.enlargeable-video {
    text-align: center;
    cursor: pointer;
}

figure.enlargeable-image img, figure.enlargeable-video video {
    max-width: 100%;
    height: auto;
}

figure.enlargeable-image figcaption, figure.enlargeable-video figcaption {
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    cursor: pointer;
}

.image-container {
    background-color: #f9f9f9; /* This is white; you can change it to any other color */
    max-width: 80%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal img {
    max-width: 100%;
    max-height: 100%;
}

/* ========== WARNING MESSAGE ========== */

.warning-message {
    background-color: #fff1d1;  /* Light orange background */
    border: 1px solid #ffb700; /* Orange border */
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.icon-warning {
    font-size: 1.5em;
    margin-right: 15px;
}