:root {
  --primary-color: #333;
  --secondary-color: #444;
  --overlay-color: rgba(0, 0, 0, 0.7);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Catamaran", sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
}

ul {
  list-style-type: none;
}

img {
  width: 100%;
}

.navbar {
  font-size: 1.2rem;
  padding: 0.3rem 0;
}

.navbar .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.navbar .logo {
  font-size: 2rem;
}

.navbar .nav {
  justify-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.navbar .nav a:hover {
  color: #555;
}

.hero {
  margin: 2rem 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 4rem;
  color: var(--primary-color);
}

.hero p {
  margin: 1rem 0;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

/* Section Overlay Styles */
.overlay-section {
  position: relative;
  background: url(../assets/stock-images/overlay.jpg) no-repeat bottom
    center/cover;
  height: 600px;
}

.overlay-section-inner {
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: auto;
  max-width: min(860px, 90%);
}

.overlay-section-inner h3 {
  font-size: 2rem;
}

.overlay-section-inner h2 {
  font-size: 5rem;
  margin-top: 1rem;
}

.overlay-section-inner p {
  font-size: 1.5rem;
  margin-top: 1rem;
}

/* GALLERY STYLING */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.gallery img,
.gallery a {
  width: 100%;
  height: 100%;
}

.gallery a:first-child {
  /* 
  The code below this is a shorthand for these 4 lines
  grid-row-start: 1;
  grid-row-end: 3;
  grid-column-start: 1;
  grid-column-end: 3; */

  grid-row: 1/3;
  grid-column: 1/3;
}

.gallery a:nth-child(2) {
  grid-column: 3/5;
}

/* FOOTER STYLING */
.footer-section {
  background: var(--primary-color);
  color: #fff;
  padding: 4rem 0;
}

.footer-section .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.footer-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer-section h3 {
  margin-bottom: 0.7rem;
}

.footer-section a {
  line-height: 1.9;
  color: #ccc;
}

.footer-section a > i {
  color: #555;
  margin-right: 0.5rem;
  transition: color 0.15s;
}

.footer-section a > i:hover,
.footer-section a:hover {
  color: #fff;
}

.email-form {
  width: 100%;
  display: inline-block;
  background-color: #555;
  position: relative;
  border-radius: 20px;
  line-height: 0;
  margin-top: 1rem;
}

.email-form .form-control {
  display: inline-block;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #ddd;
  background-color: transparent;
  font-family: inherit;
  margin: 0;
  padding: 0 3rem 0 1.5rem;
  width: 100%;
  height: 45px;
  border-radius: 20px;
}

.email-form .submit {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  width: 45px;
  height: 45px;
  background-color: #eee;
  color: #333;
  font-size: 1rem;
  text-align: center;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 0 20px 20px 0;
}

/* || XS and SMALL */
@media screen and (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero .container div:first-child {
    order: 2;
  }

  .hero .container div:last-child {
    order: -1;
  }

  .hero img {
    width: 80%;
    margin: auto;
  }

  .overlay-section h2 {
    font-size: 3.5rem;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery a:first-child {
    grid-row: 1/1;
    grid-column: 1/1;
  }

  .gallery a:nth-child(2) {
    grid-row: 2/2;
    grid-column: 2/4;
  }

  .gallery a:last-child {
    display: none;
  }

  .footer-section {
    padding: 2rem 0;
  }

  .footer-section .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-section div:nth-child(2),
  .footer-section div:nth-child(3) {
    display: none;
  }

  .footer-section .email-form {
    width: 90%;
  }
}
