/* --- Reset and Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #f0f4f8;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Navigation Bar --- */
nav {
    background-color: #333;
    padding: 0.5rem;
    width: 790px;
}

.error {
    font-weight: bold;
    color: red;
}

.menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.menu-left,
.menu-right {
    display: flex;
    gap: 0.5rem;
}

.menu a {
    color: white;
    text-decoration: none;
    font-family: Arial, sans-serif;
    padding: 0.3rem 0.7rem;
    font-size: 1rem;
}

.menu a:hover {
    background-color: #555;
    border-radius: 4px;
    color: silver;
}

/* --- Content Card --- */
.content {
    max-width: 790px;
    width: 100%;
    margin: 0.9rem auto;
    /* Reduced top and bottom margin by 2px */
    padding: 2rem;
    background-color: aliceblue;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.content h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

/* --- Images --- */
.img-rc {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.ser-img-left {
    float: left;
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 1rem 1rem 0;
}

.ser-img-right {
    float: right;
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 0 1rem 1rem;
}

.doc-end {
    margin-top: 0.9rem;
    /* Reduced top margin by 2px */
    text-align: center;
    color: #777;
}

.media {
    border-bottom: none;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

    /* Ensure the menu container is visible and properly laid out */
    .menu {
        display: flex !important;
        /* Explicitly set display to flex */
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        /* Ensure menu takes full width */
        padding: 0.5rem;
        /* Add padding for better spacing */
        box-sizing: border-box;
        /* Prevent padding issues */
    }

    /* Style for left and right menu sections */
    .menu-left,
    .menu-right {
        display: flex;
        /* Ensure these are flex containers */
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        /* Full width for mobile */
    }

    /* Menu links */
    .menu a {
        display: block;
        /* Ensure links are block-level for better clickability */
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        text-decoration: none;
        /* Prevent underlines if unwanted */
        color: inherit;
        /* Ensure text is visible, adjust color if needed */
    }

    /* Ensure images are visible and responsive */
    .ser-img-left,
    .ser-img-right {
        display: block;
        /* Ensure images are displayed */
        float: none;
        /* Remove float for mobile */
        width: 100%;
        /* Full width for responsiveness */
        height: auto;
        /* Maintain aspect ratio */
        margin: 1rem 0;
        /* Vertical spacing */
        object-fit: contain;
        /* Ensure images fit without cropping */
    }

    /* Ensure image containers don’t hide images */
    .ser-img-left img,
    .ser-img-right img {
        max-width: 100%;
        /* Prevent images from overflowing */
        height: auto;
        /* Maintain aspect ratio */
        display: block;
        /* Remove any inline spacing issues */
    }

    /* Content container */
    .content {
        padding: 1.5rem;
        box-sizing: border-box;
        /* Prevent padding issues */
    }

    /* Content headings */
    .content h1 {
        font-size: 1.8rem;
    }

    /* Content paragraphs */
    .content p {
        font-size: 1rem;
    }

    /* Ensure no parent containers hide the menu or images */
    header,
    nav,
    .menu-container {
        display: block;
        /* Ensure header/nav is visible */
        width: 100%;
        position: relative;
        /* Avoid positioning issues */
    }
}