img, picture, video, iframe {
    max-width: 100%;
    height: auto;
    display: block; 
    margin: 0 auto; 
}

body {
    font-family: 'Courier Prime', monospace;
    line-height: 1.6;
    color: #000000;
    background: #6B6054; 
    margin: 0;
    padding: 0;
}

#myparent {
    display: grid;
    grid-template-areas:
        "header header header"
        "menu main right"
        "footer footer footer";
    grid-template-columns: 1fr 3fr 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    gap: 15px;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

header {
    grid-area: header;
    background-color: #6B6054;
    color: #FFFFFF;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid #929487;
    border-radius: 8px;
}

.logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

header h1 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

nav a {
    color: black;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background-color: #929487;
    outline: 1px solid #000000; 
}

nav a:hover {
    background-color: #A1B0AB;
    color: #6B6054; 
    outline: 1px solid #000000; 
}

aside.sidebar-left {
    grid-area: menu;
    background-color: #C3DAC3;
    padding: 1.5rem;
    border: 2px solid #929487;
    border-radius: 8px;
}

article {
    grid-area: main;
    background-color: #FFFFFF;
    padding: 1.5rem;
    border: 2px solid #929487;
    border-radius: 8px;
}

article h2, article h3 {
    color: #6B6054;
}

article img {
    max-width: 100%;
    height: auto;
    margin: 1rem auto; 
}

figure {
    margin: 1rem 0;
    text-align: center; 
}

figcaption {
    font-style: italic;
    color: #6B6054;
    font-size: 0.9rem;
    text-align: center;
}

aside.sidebar-right {
    grid-area: right;
    background-color: #C3DAC3;
    padding: 1.5rem;
    border: 2px solid #929487;
    border-radius: 8px;
    display: block; 
}

footer {
    grid-area: footer;
    background-color: #6B6054;
    color: #FFFFFF;
    text-align: center;
    padding: 1rem;
    border: 2px solid #929487;
    border-radius: 8px;
}

footer a {
    color: #D5ECD4;
    text-decoration: none;
}

footer a:hover {
    color: #FFFFFF;
}

@media screen and (max-width: 767px) {
    #myparent {
        grid-template-areas:
            "header"
            "menu"
            "main"
            "right"
            "footer";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        width: 100%;
        text-align: center;
    }

    .logo {
        max-width: 100px;
    }

    aside.sidebar-right {
        display: none;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    #myparent {
        grid-template-areas:
            "header header"
            "menu main"
            "right right"
            "footer footer";
        grid-template-columns: 1fr 2fr;
        grid-template-rows: auto 1fr auto auto;
    }

    aside.sidebar-right {
        text-align: center;
        display: block; 
    }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
    #myparent {
        grid-template-areas:
            "header header header"
            "menu main right"
            "footer footer footer";
        grid-template-columns: 1fr 2fr 1fr;
        grid-template-rows: auto 1fr auto;
    }
}

@media screen and (min-width: 1200px) {
    #myparent {
        grid-template-areas:
            "header header header"
            "menu main right"
            "footer footer footer";
        grid-template-columns: 1fr 3fr 1fr;
        grid-template-rows: auto 1fr auto;
    }
}

@media print {
    body {
        background-color: white;
        color: black;
        font-size: 16px;
    }

    body * {
        background-color: white !important;
        color: black !important;
    }

    nav {
        display: none;
    }

    img, picture {
        max-width: 50%;
    }
}