/* MaxiCoatings - static site stylesheet */
:root {
  --charcoal: #444444;
  --navy: #254b68;
  --text: #35546d;
  --muted: #777;
  --line: #e4e4e4;
  --link: #008b8b;
  --page-width: 1060px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}
img {
  max-width: 100%;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header */
.top-strip {
  height: 12px;
  background: var(--charcoal);
  position: relative;
}
.top-contact {
  position: absolute;
  right: 24px;
  top: 0;
  color: #fff;
  font-size: 8px;
  line-height: 12px;
  white-space: nowrap;
}
.site-header {
  background: #fff;
}
.header-inner {
  width: min(var(--page-width), calc(100% - 40px));
  min-height: 110px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: block;
  width: 150px;
  height: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  align-self: center;
  margin-top: 2px;
}
.main-nav a {
  color: #222;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--link);
  text-decoration: none;
}
.menu-button {
  display: none;
}

/* Page title */
.page-banner {
  background: var(--charcoal);
  color: #fff;
}
.page-banner-inner {
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}
.page-banner h1 {
  margin: 0;
  padding: 10px 10px 11px;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

/* General content */
.content {
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 25px 0 55px;
}
.intro {
  margin: 0 0 20px;
  font-size: 14px;
  letter-spacing: 0.045em;
  line-height: 1.5;
}
h2 {
  margin: 0 0 13px;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 0.035em;
}
h3 {
  margin: 25px 0 8px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 400;
}
p {
  margin: 0 0 14px;
}
ul {
  margin: 6px 0 18px;
  padding-left: 16px;
}
li {
  padding-left: 0;
  margin-bottom: 7px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* Home */
.home-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 30px;
}
.home-images img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.home-columns {
  display: grid;
  grid-template-columns: 1.72fr 0.9fr;
  gap: 48px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 4px;
}
.contact-list li {
  margin-bottom: 7px;
}
.quote {
  color: #777;
  font-size: 16px;
  line-height: 1.8;
  font-style: italic;
  padding: 0 14px;
}
.quote-author {
  margin-top: 12px;
  color: #3f5263;
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

/* Services */
.service {
  padding: 0 0 25px;
  margin: 0 0 25px;
  border-bottom: 1px solid var(--line);
}
.service:last-child {
  border-bottom: 0;
}
.service::after {
  content: "";
  display: block;
  clear: both;
}
.service-image {
  float: right;
  width: 300px;
  max-height: 220px;
  margin: 0 0 16px 30px;
  object-fit: cover;
}
.service p:last-child {
  margin-bottom: 0;
}

/* FAQ */
.faq-list {
  max-width: 950px;
}
details {
  border-bottom: 1px solid var(--line);
}
summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 15px 40px 15px 0;
  color: var(--navy);
  font-size: 16px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  position: absolute;
  right: 5px;
  top: 10px;
  color: #999;
  font-size: 22px;
  font-weight: 300;
}
details[open] summary::after {
  content: "−";
}
details .answer {
  padding: 0 40px 16px 0;
  color: #555;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  margin: 0;
  overflow: hidden;
}
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.gallery-item:hover img {
  transform: scale(1.02);
}
.gallery-item figcaption {
  padding: 7px 2px 2px;
  color: #777;
  font-size: 12px;
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: #ddd;
  text-align: center;
  padding: 22px 20px;
  font-size: 11px;
}
.site-footer a {
  color: #fff;
}

/* Mobile */
@media (max-width: 760px) {
  .top-contact {
    display: none;
  }

  .header-inner {
    min-height: 100px;
    position: relative;
  }

  .logo {
    width: 120px;
  }

  .main-nav {
    display: none;
  }

  .menu-button {
    display: block;
    position: static;
  }

  .menu-button input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .menu-button label {
    padding: 7px;
    color: #444;
    font-size: 23px;
    line-height: 1;
  }

  /*
   * Mobile dropdown.
   * Position it relative to the header rather than the
   * small hamburger button so it has a proper width.
   */
  .mobile-nav {
    display: none;
    position: absolute;
    z-index: 20;
    top: 100%;
    right: 0;
    left: auto;
    width: 180px;
    padding: 8px 20px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  }

  .menu-button input:checked ~ .mobile-nav {
    display: block;
  }

  .mobile-nav a {
    display: block;
    padding: 10px 0;
    color: #222;
    font-size: 12px;
    text-transform: uppercase;
  }

  .content,
  .page-banner-inner,
  .header-inner {
    width: calc(100% - 36px);
  }

  .page-banner h1 {
    font-size: 22px;
  }

  .content {
    padding-top: 21px;
  }

  .home-images {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .home-images img {
    height: 135px;
  }

  .home-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .service-image {
    float: none;
    width: 100%;
    max-height: none;
    margin: 0 0 17px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 430px) {
  .home-images,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .home-images img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
