/* Preserve vertical alignment for images */
.lw,
dt img,
dd img,
p img,
li img,
h1 img,
h2 img,
h3 img,
h4 img,
dt img,
td img,
button img {
    vertical-align: middle;
}

/* Enhanced centered image styling */
.centered-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 70%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.centered-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Ensure images don't cause overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Video container styling */
.vidcont {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.embeddedvid {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* QR code styling */
.qr {
    max-width: 150px;
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.qr:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}