/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: #283583;
    text-align: center;
    padding: 1.5em 0 0 0;
}

header .logo-container {
    display: flex;
    flex-direction: column;  /* Stack images vertically */
    align-items: center;     /* Center images horizontally */
}

header img {
    width: auto;
    height: auto;
}

/* Header Text Below Logo */
.header-text {
    font-size: 0.9em;
    font-style: italic;
    font-weight: 400;
    color: #dedede;
    text-align: center;
    margin-top: 0.5em; /* Space between logo and text */
}

/* Specific image sizes */
.first-logo {
    max-width: 650px; /* Set the first image width */
    width: 90%;
    padding-bottom: 1em;
}

.second-logo {
    width: 600px;
    padding-bottom: 1em;
    padding-top: 2em;
}

/* Typography */
.red-text {
    color: #e30613;
}

.itallics-text {
    font-style: italic;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2em;
    padding-top: 1em;
}

h1, h2 {
    color: #d21627;
    text-align: center;
    margin-bottom: 1em;
    font-size: clamp(2em, 5vw, 3em);
}

p {
    font-size: clamp(1em, 2.5vw, 1.4em);
    margin: 1em 0;
    color: #283583;
    font-weight: 400;
}

/* Video Wrapper */
.video-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: auto;
}

/* Default: Show the 16:9 desktop video */
.desktop-video {
    display: block;
}

.mobile-video {
    display: none;
}

/* Standard 16:9 Aspect Ratio Video */
.desktop-video video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

/* Portrait 9:16 Aspect Ratio Video */
.mobile-video video {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: contain;
}

/* Switch to Portrait Video on Mobile */
@media (max-width: 768px) {
    .desktop-video {
        display: none;
    }
    .mobile-video {
        display: block;
    }
}

/* Your Teeth Section */
#your-teeth {
    padding-top: 2em;
    padding-bottom: 2em;
    background-color: #f4f4f4;
}

.image-item {
    display: flex;
    align-items: center;
    margin-bottom: 2em;
    gap: 1em;
}

.image-item.centered {
    justify-content: center;
    text-align: center;
}

.your-teeth-main img {
    max-width: 500px;
    width: 100%;
}

.circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

.circle img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.red-border {
    border: 6px solid #d21627;
}

.blue-border {
    border: 6px solid #143578;
}

.image-item p {
    flex: 1;
}

/* Additional Section Padding */
#how-biodentine-works,
#what-happens-next,
#why-biodentine {
    padding-top: 1em;
}

#why-biodentine p {
    padding: 1em 0em;
}

/* Footer */
/* Footer */
footer {
    background-color: #283583;
    text-align: center;
    padding: 1em 0 0 0;
}

/* Base (Mobile) Layout: Stacked */
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.footer-container .second-logo {
    width: 300px; /* Adjust as needed */
    margin-bottom: 1em;
}

.footer-practice-info {
    text-align: center;
    color: white;
    padding: 1em;
    border-radius: 10px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: -25px;
}

.footer-practice-info h3 {
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 0em;
}

.footer-practice-info p {
    font-size: 0.9em;
    line-height: 0.2em;
    color: white;
}

.footer-practice-info a {
    color: #e30613;
    text-decoration: none;
    font-weight: bold;
}

.footer-note {
    font-size: 0.6em;
    font-style: italic;
    color: #dedede;
    margin-top: 1.5em;
    text-align: center;
}

/* ----- Desktop Layout: Two Columns for Logo & Practice Info ----- */
@media (min-width: 985px) {
    .footer-container {
        flex-direction: row;
        flex-wrap: wrap; /* Allow items to wrap */
        justify-content: space-between;
        align-items: center;
        /* Optional horizontal padding */
        padding: 0 2em;
    }

    /* Logo on Left (taking about 40% of the width) */
    .footer-container .second-logo {
        flex: 0 0 45%;
        margin-bottom: 0; /* Remove bottom margin */
        text-align: left;
        max-width: 500px;
        margin-left: auto;
        margin-right: 5%;
    }

    /* Practice Info on Right (taking about 55% of the width) */
    .footer-practice-info {
        flex: 0 0 45%;
        text-align: center; /* Maintain center alignment */
        margin-right: auto;
        margin-left: 5%;
    }

    /* Force Footer Note to a new row (full width) and center it */
    .footer-note {
        flex-basis: 100%;
        text-align: left;
        margin-top: 1.5em;
    }
}

/* Desktop vs. Mobile Text */
.desktop-text {
    display: block;
}

.mobile-text {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .desktop-text {
        display: none;
    }
    .mobile-text {
        display: block;
    }

    .image-item {
        flex-direction: column;
        text-align: center;
    }

    .circle {
        width: 200px;
        height: 200px;
    }
}
