/*
Author: Arjun Madichetty
Date: September 21, 2025
File Name: styles.css
*/

body, header, nav, main, footer, img, h1, section, aside, figure, figcaption {
  margin: 0;
  padding: 0;
  border: 0;
}

img {
  max-width: 100%;
  display: block;
}

/* Style rule for box sizing applies to all elements */
* {
  box-sizing: border-box;
}

header {
  text-align: center;
  font-size: 3em;
  color: #373684;
  font-family: "DM Serif Display", serif;
}

header h1 {
  font-style: italic;
}

nav {
  background-color: #373684;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav ul {
  list-style-type: none;
  margin: 0;
  text-align: center;
  padding: 0;
}

nav li {
  display: block;
  font-size: 2em;
  font-family: "Roboto", sans-serif;
  border-top: 1px solid #e5e9fc;
}

nav li a {
  display: block;
  color: #fff;
  text-align: center;
  padding: 0.5em 1em;
  text-decoration: none;
}

main {
  padding: 2%;
  background-color: #e5e9fc;
  overflow: auto;
  font-family: Verdana, Arial, sans-serif;
}

main p {
  font-size: 1.25em;
}

.action {
  font-size: 1.75em;
  color: #373684;
  font-weight: bold;
}

#piano, #guitar, #violin {
  margin: 0 0 2% 0;
}

#info {
  clear: left;
  background-color: #c0caf7;
  padding: 1% 2%;
}

#contact {
  text-align: center;
}

#contact .email-link {
  color: #4645a8;
  text-decoration: none;
  font-weight: bold;
}

.tel-link {
  background-color: #373684;
  padding: 2%;
  margin: 0 auto;
  width: 80%;
  text-align: center;
  border-radius: 5px;
}

.tel-link a {
  color: #fff;
  text-decoration: none;
  font-size: 1.5em;
  display: block;
}

.email-link {
  font-style: italic;
}

.map {
  border: 5px solid #373684;
  width: 100%;
  height: 450px;
}

.round {
  border-radius: 15px;
}

footer {
  text-align: center;
  font-size: 0.65em;
  clear: left;
}

footer a {
  color: #4645a8;
  text-decoration: none;
}

a:hover, a:focus {
  color: #a52a2a;
  text-decoration: underline;
}

.tab-desk {
  display: none;
}

/* Step 13 — aside (mobile viewport) */
aside {
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #373684;
  text-shadow: 3px 3px 10px #8280cb;
}

/* Step 14 — figure (mobile viewport) */
figure {
  position: relative;
  max-width: 275px;
  margin: 2% auto;
  border: 8px solid #373684;
}

/* Step 15 — figcaption (mobile viewport) */
figcaption {
  position: absolute;
  bottom: 0;
  background: rgba(55, 54, 132, 0.7);
  color: #fff;
  width: 100%;
  padding: 5% 0;
  text-align: center;
  font-family: Verdana, Arial, sans-serif;
  font-size: 1.5em;
  font-weight: bold;
}

@media (min-width: 620px) {
  .tab-desk {
      display: inline;
  }

  nav li {
      display: inline-block;
      font-size: 1.25em;
      border-top: none;
  }

  #piano, #guitar, #violin {
      width: 29%;
      float: left;
      margin: 0 2%;
  }
}

@media (min-width: 1000px) {
  nav li {
      font-size: 1.5em;
  }

  main {
      font-size: 1.1em;
  }
}

/* Media Query for Tablet Viewport */
@media screen and (min-width: 550px), print {

  /* Tablet Viewport: Show tab-desk class, hide mobile class */
  .tab-desk {
      display: block;
  }
  .mobile {
      display: none;
  }

  /* Tablet Viewport: Style rule for header content */
  span.tab-desk {
      display: inline;
  }

  /* Tablet Viewport: Style rules for nav area */
  nav li {
      border-top: none;
      display: inline-block;
      font-size: 1.5em;
      border-right: 1px solid #e5e9fc;
  }

  nav li:last-child {
      border-right: none;
  }

  nav li a {
      padding: 0.25em 0.5em;
  }

  /* Tablet Viewport: Style rule for map */
  .map {
      width: 500px;
      height: 450px;
  }

  /* Step 16 — grid (tablet) */
  .grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-gap: 20px;
  }

  /* Step 17 — aside span (tablet) */
  aside {
      grid-column: 1 / span 2;
  }
}

/* Media Query for Desktop Viewport */
@media screen and (min-width: 769px), print {

  /* Desktop Viewport: Style rule for header */
  header {
      padding: 2%;
  }

  /* Desktop Viewport: Style rules for nav area */
  nav li a {
      padding: 0.5em 1.5em;
  }

  nav li a:hover {
      color: #373684;
      background-color: #e5e9fc;
  }

  /* Desktop Viewport: Style rules for main content */
  #info ul {
      margin-left: 5%;
  }

  main h3 {
      font-size: 1.5em;
  }

  #piano, #guitar, #violin {
      width: 29%;
      float: left;
      margin: 0 2%;
  }

  /* Step 18 — grid (desktop) */
  .grid {
      grid-template-columns: repeat(4, 1fr);
  }

  /* Step 19 — figcaption font size (desktop) */
  figcaption {
      font-size: 1em;
  }

  /* Step 20 — aside span (desktop) */
  aside {
      grid-column: 1 / span 4;
  }
}

/* Media Query for Print */
@media print {
  body {
      background-color: #fff;
      color: #000;
  }
}

/* =========================
 LESSON 8 — MINIMAL ADDITIONS
 (No global overrides)
 ========================= */

/* Rentals + Contact section headings only (black, bold, centered) */
#rental h2,
#form h2 {
  text-align: center;
  font-size: 1.5em;
  color: #000;
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  padding: 1%;
}

/* Table styles (Rentals page) */
table {
  border: 1px solid #373684;
  border-collapse: collapse;
  margin: 0 auto;
  width: 100%;
}

caption {
  font-size: 1.5em;
  font-weight: bold;
  padding: 1%;
}

th, td {
  border: 1px solid #373684;
  padding: 2%;
}

th {
  background-color: #373684;
  color: #fff;
  font-size: 1.15em;
}

tr:nth-child(odd) {
  background-color: #b7b7e1;
}

/* Form styles (bottom of Contact page) */
fieldset, input {
  margin-bottom: 2%;
}

fieldset legend {
  font-weight: bold;
  font-size: 1.25em;
}

label {
  display: block;
  padding-top: 3%;
}

#submit {
  margin: 0 auto;
  display: block;
  padding: 3%;
  background-color: #b7b7e1;
  font-size: 1em;
}

/* Tablet: center and constrain form width (only form) */
@media screen and (min-width: 550px), print {
  form {
      width: 70%;
      margin: 0 auto;
  }
}

/* Desktop: table width + two-column form (only form/table) */
@media screen and (min-width: 769px), print {

  /* Desktop table width */
  table {
      width: 70%;
  }

  /* Two-column layout for the form’s fieldsets */
  form.form-grid {
      display: grid;
      grid-template-columns: auto auto;
      grid-gap: 20px;
  }

  .btn {
      grid-column: 1 / span 2;
  }
}
