/* Vars */
:root {
  --main-color: #10cab7;
  --secondary-color: #2b4856;
  --darker-bg: #f6f6f6;
}
/* Global rules */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
}

.container {
  padding: 0 15px;
  margin: 0 auto;
}

.special-heading {
  margin: 0;
  padding-top: 2rem;
  color: #ddd;
  font-weight: 900;
  font-size: 5rem;
  text-align: center;
}

.special-heading  + .subheading {
  margin-top: -28px;
  text-align: center;
  color: #666;
  font-weight: 500;
}

@media (max-width: 400px){
  .special-heading {
    font-size: 3.7rem;
  }
  .special-heading  + .subheading {
  margin-top: -20px;
  font-size: 80%;
  }
}

.navigatable-sections {
  position: relative;
}
/* Header */

.header {
  padding: 20px 15px;
  display: flex;
  align-items: center;
  position: relative;
}

.header .logo {
  width: 60px;
}

.header .nav {
  /* Using absolute postion so when the menu is open it won't affect header height */
  position: absolute;
  right: 15px;
  /* parent element has 20px padding and height of 24px, this element has 18px height */
  top: 23px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.header .nav .icon {
  width: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header .nav .icon span {
  border-bottom: 2px solid #222;
  width: 100%;
  margin-bottom: 6px;
}

.header .nav:hover .icon span:nth-child(2) {
  width: 100%;
}

.header .nav .icon span:nth-child(2) {
  width: 65%;
  transition: 0.3s;
}
.header .nav .icon span:last-child {
  margin-bottom: 0;
}

.header .nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: var(--darker-bg);
  min-width: 200px;
  position: relative;
  top: 10px;
  display: none;
}

.header .nav:hover ul {
  display: block;
}

.header .nav ul::before {
  content: "";
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent var(--darker-bg) transparent;
  position: absolute;
  right: 5px;
  top: -20px;
}

.header .nav li {
  padding: 4px;
}

.header .nav a {
  position: relative;
  display: block;
  padding: 15px;
  color: #222;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.header .nav a::after {
  content: "";
  position: absolute;
  left: 25px;
  bottom: 12px;
  width: 0;
  height: 2px;
  background-color: var(--main-color);
  transition: width 0.3s ease-in-out;
}

.header .nav li a:hover {
  padding-left: 25px;
}

.header .nav li a:hover::after {
  width: 2.7rem;
}

.header .nav li:not(:last-child) {
  border-bottom: 1px solid #ddd;
}

/* Main */
/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  line-height: 1.7;
  /* without cover for <bg-size> there might be additional empty space around background */
  background: no-repeat center/cover url('../img/hero-background.jpg');
  height: calc(100vh - 64px);
}

.hero h1 {
  margin: 0;
  padding-bottom: 20px;
  font-size: 2.3rem;
  color: var(--main-color);
}

.hero p {
  max-width: 350px;
  text-align: center;
  margin: 0;
  font-size: 1.1rem;
}

/* Features section */
.features {
  padding: 20px 0;
  text-align: center;
  display: grid;
  gap: 1.7rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 956px){

  .features .feat:last-child {
    grid-column: 1/-1;
  }
}

.features .feat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 3.5rem;
}

.features .feat h3 {
  font-weight: 800;
}

.features .feat p {
  line-height: 1.7;
  color: #777;
}

.features i {
  color: var(--main-color);
}

/* services */

#services {
  margin: 0 auto;
  background-color: var(--darker-bg);
}

#services .container {
  display: flex;
  justify-content: space-around;
  position: relative;
  padding: 30px 0 50px 0;
}

#services .side::before {
  content: "";
  position: absolute;
  right: 0;
  top: 3px;
  width: 100px;
  height: 350px;
  background-color: var(--secondary-color);
}

#services .side img {
  position: relative;
  right: 15px;
}

#services .list-container {
  max-width: 70%;
  padding: 0 20px;
}

#services .list-container ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

}

#services .list-container ul li {
  display: flex;
  flex: 1 250px;
  padding: 20px;
}

#services .list-container ul li div {
  padding-left: 1.2rem;
}

#services .list-container ul li h3 {
  display: inline-block;
  margin: 0;
}

#services .list-container ul i {
  color: var(--main-color);
}

/* portfolio */

#portfolio .container ul {
  list-style: none;
  padding: 0 40px;
  margin-top: 80px;
  display: grid;
  gap: 30px;
}

@media (min-width: 750px) {
  #portfolio .container ul {
    padding: 0;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

#portfolio .container ul li {
  background-color: var(--darker-bg);
  border-radius: 1rem;
  padding-bottom: 8px;
  box-shadow: 4px 6px 20px 3px #ccc;
}

#portfolio .container ul li:hover {
  position: relative;
  top: -8px;
  left: -8px;
}

#portfolio .container ul li img {
  width: 100%;
  border-radius: 1rem 1rem 0 0;
}

#portfolio .container ul li p,
#portfolio .container ul li h5 {
  padding: 0 30px;
}

/* about section */

#about {
  background-color: var(--darker-bg);
}

#about .about-content {
  padding: 60px 20px;
  display: flex;
}

#about .about-content .about-text {
  padding-left: 20px;
  flex: 1 1 50%;
  line-height: 1.6;
}

#about .about-content .about-text p:first-child {
  font-weight: 700;
  color: #333;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 30px;
}

#about .about-content .about-text p:last-child {
  color: #777;
  letter-spacing: 1px;
  position: relative;
  padding-top: 10px;
}

#about .about-content .about-text p:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40%;
  height: 2px;
  background-color: var(--main-color);

}

#about .container .about-img {
  flex: 1 1 50%;
  position: relative;
}

#about .container .about-img::before {
  content: "";
  position: absolute;
  right: 50px;
  top: 0;
  width: 100px;
  height: 120px;
  background-color: var(--darker-bg);
  z-index: 1;
}


#about .container .about-img::after {
  content: "";
  position: absolute;
  right: 100px;
  top: 40px;
  width: 100px;
  height: 150px;
  background-color: var(--main-color);
}

#about .container .about-img img {
  width: 40%;
   position: absolute;
  right: 170px;
  top: 125px;
  z-index: 1;
}

/* contact section */
#contact .contact-content {
  padding: 20px 20px;
  text-align: center;
}

#contact .contact-content h4 {
  margin: 0;
  padding-bottom: 20px;
  font-size: 2rem;
  color: var(--secondary-color);
}

#contact .contact-content a {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--main-color);
}

#contact .contact-content .social-links {
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

#contact .contact-content .social-links a {
  padding: 0 5px;
  color: var(--secondary-color);
  display: inline-block;
  height: 23px;
}

/* footer */

footer {
  text-align: center;
  background-color: var(--secondary-color);
  color: var(--darker-bg);
  padding: 15px;
}

footer p { 
  margin: 0;
}

footer span {
  font-weight: 700;
  color: var(--main-color);
}

@media (max-width: 600px) {
  #about .about-content .about-img {
    display: none;
  }
}

@media (max-width: 990px) {
  .side {
    display: none;
  }
  #services .list-container {
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .container{
    width: 750px;
  }
  .header {
    padding: 20px 150px;
  }
  .header .nav {
    right: 150px;
  }
}

@media (min-width: 992px) {
  .container {
    width: 970px;
  }

}

@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}