/*
Author: Keion Morgan
Date: 10-19-2025
File Name: styles.css
*/

/* CSS Reset including semantic elements */
body, header, nav, main, footer, img, h1, ul, section, aside, figure, figcaption {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Images */
img {
    max-width: 100%;
    display: block;
}

/* Box-sizing for all elements */
* {
    box-sizing: border-box;
}

/* Header content */
header {
    text-align: center;
    font-size: 3em;
    color: #373684;
    font-family: 'DM Serif Display', serif;
}

header h1 {
    font-style: italic;
}

/* Music notes next to header (desktop/tablet only) */
.tab-desk {
    font-size: 1em;
    color: #373684;
    margin: 0 5px;
}

@media (max-width: 768px) {
    .tab-desk {
        display: none;
    }
}

/* Navigation area */
nav {
    background-color: #373684;
}

nav ul {
    list-style-type: none;
    text-align: center;
}

nav li {
    display: inline-block;
    font-size: 2em;
}

nav li a {
    display: block;
    color: #fff;
    text-align: center;
    padding: 0.5em 1em;
    text-decoration: none;
    transition: 0.3s;
}

/* Navigation hover effect */
nav li a:hover {
    color: #373684;
    background-color: #e5e9fc;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
        position: relative;
        background-color: #373684;
    }

    #menu-links {
        display: none;
        text-align: center;
        background-color: #373684;
    }

    .menu-icon {
        font-size: 2em;
        color: #fff;
        padding: 10px;
        cursor: pointer;
        text-align: center;
    }

    #menu-links a {
        display: block;
        padding: 1em;
        color: #fff;
        text-decoration: none;
    }

    #menu-links a:hover {
        background-color: #e5e9fc;
        color: #373684;
    }
}

/* Main content */
main {
    padding: 2%;
    background-color: #e5e9fc;
    overflow: auto;
    font-family: 'Roboto', sans-serif;
}

main p {
    font-size: 1.25em;
}

/* Bio text in aside */
aside {
    text-align: center;        /* centers the bio */
    font-size: 1.5em;
    font-weight: bold;
    color: #373684;
    font-family: 'Roboto', sans-serif;
    text-shadow: 3px 3px 10px #8280cb;
    margin-bottom: 20px;
}

/* Instructor figures with overlay captions */
figure {
    position: relative; 
    margin: 0;                 
    max-width: 350px;           
    height: auto;
    border: 8px solid #373684;
    border-radius: 10px;
    overflow: hidden;
}

figure img {
    display: block;
    width: 100%;
    height: auto;
}

figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(55, 54, 132, 0.7);
    color: #fff;
    font-family: Verdana, Arial, sans-serif;
    font-size: 1.5em;  
    font-weight: bold;
    padding: 12px 0; 
    text-align: left;
}

figcaption a {
    color: #fff;
    text-decoration: none;
    display: block;
    width: 100%;
    transition: background 0.3s, color 0.3s;
}

figcaption a:hover {
    background-color: rgba(55, 54, 132, 0.9);
    color: #ffd700;
}

/* Instructor grid spacing */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

/* Rentals page heading */
#rental h2 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
}

/* Rentals table styling */
table {
    border: 1px solid #373684;
    border-collapse: collapse;
    margin: 0 auto;
    width: 95%;
}

caption {
    font-size: 1.5em;
    font-weight: bold;
    padding: 1%;
}

th, td {
    border: 1px solid #373684;
    padding: 16px;
    text-align: left;
}

th {
    background-color: #373684;
    color: #fff;
    font-size: 1.15em;
}

tr:nth-child(odd) {
    background-color: #b7b7e1;
}

/* Contact form styling */
fieldset, input {
    margin-bottom: 28px;
}

fieldset legend {
    font-weight: bold;
    font-size: 1.25em;
}

label {
    display: block;
    padding-top: 3%;
}

#submit {
    display: block;
    margin: 0 auto;
    padding: 3%;
    background-color: #b7b7e1;
    font-size: 1em;
}

/* Mobile viewport */
@media (max-width: 768px) {
    header {
        font-size: 1.5em;
    }

    figure {
        max-width: 350px;
        margin: 10px auto;
        border: 8px solid #373684;
    }

    figcaption {
        font-size: 1.2em;
        padding: 10px 0;
    }

    #rental h2, #contact {
        text-align: center;
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }

    /* ADDED AS PER INSTRUCTIONS */
    .social img {
        display: inline-block;
        padding: 4%;
    }
}

/* Tablet viewport */
@media screen and (min-width: 550px) and (max-width: 768px) {
    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
    }

    aside {
        grid-column: 1 / span 2;
    }

    table {
        width: 90%;
    }

    form {
        width: 70%;
        margin: 0 auto;
    }

    /* ADDED AS PER INSTRUCTIONS */
    /* Tablet Viewport: Style rules for footer area */
    .copyright {
        float: left;
        width: 65%;
    }

    .social {
        float: right;
        width: 25%;
    }
}

/* Desktop viewport */
@media screen and (min-width: 769px) {
    .grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 10px;
    }

    figcaption {
        font-size: 1em;
        padding: 12px 0;
    }

    aside {
        grid-column: 1 / span 4;
    }

    #piano, #guitar, #violin {
        width: 28%;
        float: left;
        margin: 0 0.5%;
    }

    table {
        width: 70%;
        margin: 0 auto;
    }

    .form-grid {
        display: grid;
        grid-template-columns: auto auto;
        grid-gap: 20px;
    }

    .btn {
        grid-column: 1 / span 2;
    }
}

/* Print viewport */
@media print {
    body {
        background-color: #fff;
        color: #000;
    }
}
