/*
   Student Name: Simon Digafe
   File Name: style.css
   Today's Date: July 2026
*/

html, body, header, nav, main, footer, aside, figure, figcaption, .mobile-tablet, .desktop {
    margin: 0;
    padding: 0;
    border: 0;
}

#wrapper {
    width: 100%;
    margin: 0 auto;
}

.tab-desk, .desktop {
    display: none;
}

.mobile, .mobile-tablet {
    display: block;
    text-align: center;
    padding: 10px;
}

aside {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 4px 4px 10px #c5a687;
}

figure {
    border: 4px solid #2a1f14;
    box-shadow: 6px 6px 10px #c5a687;
    max-width: 400px;
    margin: 2% auto;
}

figcaption {
    padding: 2%;
    border-top: 4px solid #2a1f14;
}

#form h2 {
    text-align: center;
}

/* Style rules for form elements */
fieldset, input, textarea {
    bottom-margin: 2%;
}

fieldset legend {
    font-weight: bold;
    font-size: 1.25em;
}

label {
    display: block;
    padding-top: 2%;
}

#submit {
    margin: 0 auto;
    display: block;
    padding: 2%;
    background-color: #78593a;
    color: #f6eee4;
    font-size: 1.25em;
    border-radius: 10px;
}

@media screen and (min-width: 768px) {
    .tab-desk {
        display: block;
    }
    .mobile {
        display: none;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
    }

    aside {
        grid-column: 1 / span 2;
    }

    /* Tablet Viewport: Style rule for form element */
    form {
        width: 70%;
        margin: 0 auto;
    }
}

@media screen and (min-width: 1024px) {
    nav li a:hover {
        opacity: 0.5;
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 30px;
    }

    aside {
        grid-column: 1 / span 3;
        font-size: 2em;
    }

    /* Desktop Viewport: Show desktop class, hide mobile-tablet class */
    .desktop {
        display: block;
    }
    .mobile-tablet {
        display: none;
    }

    /* Style rules for table */
    table {
        border: 1px solid #2a1f14;
        border-collapse: collapse;
        margin: 0 auto;
    }

    caption {
        font-size: 1.5em;
        font-weight: bold;
        padding: 1%;
    }

    th, td {
        border: 1px solid #2a1f14;
        padding: 1%;
    }

    th {
        background-color: #2a1f14;
        color: #fff;
        font-size: 1.15em;
    }

    tr:nth-child(odd) {
        background-color: #deccba;
    }

    /* Desktop Viewport: Style rules for form elements */
    form {
        width: auto;
    }

    .form-grid {
        display: grid;
        grid-template-columns: auto auto;
        grid-gap: 20px;
    }

    .btn {
        grid-column: 1 / span 2;
    }
}

@media screen and (min-width: 1920px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    aside {
        grid-column: 1 / span 4;
        font-size: 3em;
    }
}