/*Variables*/
:root {
  --accent: #f05b33;
  --primary: #fff;
  --secondary: #f6f2f1;
  --text: #333;
}

/*Global Styles*/
html {
  scroll-behavior: smooth;
}

body {
  font-family: sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1,
h2,
h3 {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
}

h1 {
  font-size: 2.5em;
  line-height: 55px;
}

h1 span {
  color: var(--accent);
}

#pricing h3,
#contact h3,
#our-team h3 {
  color: var(--accent);
}

p {
  margin: 1em 0;
  max-width: 400px;
  line-height: 25px;
}

a {
  text-decoration: none;
  transition: 0.3s;
}

section {
  padding: 4em 2em;
}

section:nth-child(odd) {
  background-color: var(--secondary);
}

section:nth-child(even) {
  background-color: var(--primary);
}

.container {
  max-width: 1150px;
  margin: 0 auto;
}

/*Header Section*/
header {
  background-image: url(assets/images/20230606_155749.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6em 2em 2em 2em;
  position: relative;
  color: var(--primary);
}

header a {
  color: var(--primary);
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
}

header a:not(.brand, .btn, .btn-secondary):hover {
  color: var(--accent);
}

header::before {
  content: "";
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1em 2em;
  z-index: 9;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu ul {
  list-style-type: none;
  display: flex;
  justify-content: right;
  align-items: center;
  gap: 1.5em;
}

.brand img {
  width: 100px;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.menu-btn span {
  font-size: 2.2em;
}

.brand-mobile,
.menu-btn {
  display: none;
}

.active {
  position: relative;
}

.active::before {
  content: "";
  position: absolute;
  background: #fff;
  width: 100%;
  height: 4px;
  bottom: -0.5em;
  left: 50%;
  transform: translateX(-50%);
}

.hero {
  position: relative;
  width: 90vw;
}

.hero p {
  margin: 2em 0 2.8em 0;
}

.btn,
.btn-secondary {
  padding: 0.5em 1.5em;
  font-size: 0.9em;
}

.btn {
  background-color: var(--accent);
  color: var(--primary);
  margin-right: 1.5em;
  border: 3px var(--accent) solid;
}

.btn-secondary {
  border: 3px var(--primary) solid;
}

.btn:hover {
  background-color: #d5512d;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-active a {
  color: var(--text);
}

.navbar-active .brand span {
  margin: 0;
  font-size: 1.5em;
}

.navbar-active .brand small {
  display: none;
}

.navbar-active .active::before {
  background-color: var(--accent);
}

/*About*/
#about .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 2em;
}

#about .container > div:nth-child(2) {
  background-image: url(assets/images/IMG_20231209_134433_314.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 2em;
}

#about .container > div:nth-child(2) div {
  position: relative;
  color: var(--primary);
  padding: 2em 0;
  border-bottom: 1px var(--primary) solid;
  text-align: right;
}

#about .container > div:nth-child(2)::before {
  content: "";
  position: absolute;
  background: rgba(240, 91, 51, 0.65);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

/*Services*/
#services .container,
#blog .container,
#our-team .container,
#pricing .container {
  display: flex;
  justify-content: space-between;
  gap: 2em;
}

#services .items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1em;
  text-align: center;
}

#services .title,
#blog .title,
#our-team .title,
#pricing .title {
  display: flex;
  align-items: flex-end;
}

#services .items div {
  background-color: var(--primary);
  padding: 1.5em;
}

#servies .items span {
  font-size: 3em;
  margin-bottom: 0.2em;
}

/*Blog*/
#blog .posts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  grid-gap: 1em;
}

.post4 {
  grid-column: 2 / 3;
  grid-row: 1 / 4;
}

.post1,
.post2,
.post3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1em;
}

.post1 .blog-post-img {
  background-image: url(assets/images/20230706_154042.jpg);
}
.post2 .blog-post-img {
  background-image: url(assets/images/20230608_162110.jpg);
}
.post3 .blog-post-img {
  background-image: url(assets/images/20231211_151346.jpg);
}
.post4 {
  background-image: url(assets/images/20230727_163847.jpg);
}

.posts .blog-post-img,
.post4 {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.post4 {
  display: flex;
  align-items: flex-end;
  padding: 1.5em;
  color: var(--primary);
}

.posts .date {
  position: absolute;
  top: 0.5em;
  left: 0.5em;
  background: var(--accent);
  color: var(--primary);
  padding: 0.2em 0.5em 0.5em 0.5em;
  display: inline-block;
  text-align: center;
}

.posts .date h1 {
  font-size: 2.5em;
}

/*Our Team & Pricing */
#our-team .team,
#pricing .tables {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1em;
}

.team img {
  width: 100%;
  margin-bottom: 0;
  height: 400px;
}

.team p {
  margin-bottom: 0;
}

.tables {
  text-align: center;
}

.tables > div {
  background: var(--primary);
  padding: 1.5em;
}

.tables .btn {
  font-family: "Oswald", sans-serif;
  display: block;
  margin: 1em;
}

.tables span {
  font-size: 4em;
}

.price {
  margin-bottom: 0.5em;
}

/*Portfolio*/
#portfolio {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr 1fr;
  grid-template-rows: 15em 15em 15em;
}

#portfolio > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
  cursor: pointer;
}

#portfolio > img:hover {
  opacity: 0.7;
}

.img1 {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
}

.img2 {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

.img3 {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
}

#portfolio .title {
  grid-column: 2 / 3;
  grid-row: 2 / 4;
  padding: 0 2em;
  display: flex;
  align-items: flex-end;
}

.img4 {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

.img5 {
  grid-column: 3 / 4;
  grid-row: 3 / 4;
}

.img6 {
  grid-column: 4 / 5;
  grid-row: 2 / 4;
}

.modal {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.8);
  top: 4em;
  left: 0;
  width: 100%;
  height: calc(100% - 4em);
  justify-content: center;
  align-items: flex-start;
  padding: 2em;
  overflow-y: scroll;
  display: none;
  opacity: 0;
  transition: 0.5s;
}

.modal img {
  width: 100%;
  max-width: 700px;
}

/*Contact*/
#contact .container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-gap: 2em;
}

#contact img {
  justify-self: right;
  align-self: center;
  width: 100%;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1em;
  margin: 1.5em 0;
}

#contact p {
  margin: 0.5em 0;
}

.contact-method span {
  font-size: 3em;
}

/*Footer*/
footer {
  background: var(--secondary);
  color: #a7a7a7;
  padding: 1.5em;
}

footer p {
  margin: 0 auto;
  text-align: center;
}

/*RESPONSIVE MEDIA QUERIES */

@media screen and (min-width: 1200px) {
  .hero {
    width: 1150px;
  }
}

@media screen and (min-width: 1000px) {
  h1 {
    font-size: 3em;
  }
  #about {
    padding: 0 2em;
  }
  #about .container > div {
    padding: 4em 0;
  }
}

@media screen and (max-width: 1000px) {
  .brand-mobile,
  .menu-btn {
    display: block;
  }
  .brand {
    display: none;
  }
  .navbar {
    background-color: var(--primary);
  }
  .navbar a {
    color: var(--text);
  }
  .menu {
    position: absolute;
    top: -20em;
    left: 0;
    background: var(--secondary);
    width: 100%;
    transition: 0.5s ease-in-out;
  }

  .menu ul {
    padding: 2em;
    flex-direction: column;
    gap: 2em;
    height: 20em;
    overflow-y: scroll;
  }
  .active::before {
    background-color: var(--accent);
  }

  /*Dynamic class for JS */
  .menu-open {
    top: 4.2em;
  }

  #about .container {
    grid-template-columns: 1fr;
  }

  #about .container > div:nth-child(2) {
    align-items: flex-start;
  }

  #about h1 {
    margin-bottom: 1.5em;
  }
}

@media screen and (max-width: 900px) {
  #blog .posts {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
  }

  .post4 {
    grid-column: auto;
    grid-row: auto;
  }

  .post4 .date {
    right: 0.5em;
    left: initial;
  }
}

@media screen and (max-width: 800px) {
  #services .items,
  #our-team .team,
  #pricing .tables {
    grid-template-columns: 1fr;
  }
  #portfolio,
  #contact {
    display: block;
  }
  #portfolio h1 {
    margin: 1em 0;
  }
  #contact h1 {
    margin-bottom: 1.5em;
  }
  #contact img {
    margin-top: 2em;
  }
}

@media screen and (max-width: 600px) {
  #services .container,
  #blog .container,
  #our-team .container,
  #pricing .container {
    display: block;
  }
  #services h1,
  #blog h1,
  #our-team h1,
  #pricing h1 {
    margin-bottom: 1.5em;
  }
}

@media screen and (max-width: 500px) {
  .post1,
  .post2,
  .post3 {
    grid-template-columns: 1fr;
  }
  .blog-post-img {
    height: 10em;
  }
}

@media screen and (max-width: 400px) {
  html {
    font-size: 14px;
  }
}

@media screen and (max-height: 400px) and (max-width: 1000px) {
  .navbar .menu ul {
    height: 70vh;
  }
}
