@import url("variables.css");

* {
  margin: 0;
  padding: 0;
  font-family: "Raleway", sans-serif;
  font-weight: 100;
  box-sizing: border-box;
}

p {
  font-family: "Roboto", sans-serif;
  font-weight: 100;
}

html {
  scroll-behavior: smooth;
}

.popup {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  backdrop-filter: blur(8px);
  background-color: var(--clr-gradient-weak);
}

.popup-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 80vh;
  border: 20px solid var(--clr-white);
}

.popup .close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: var(--clr-white);
  font-size: 40px;
  font-weight: 100;
  cursor: pointer;
  transition: 0.3s;
}

.popup .close:hover {
  color: #bbb;
}

.popup-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.nav-arrow {
  font-size: 2.5rem;
  color: var(--clr-white);
  cursor: pointer;
  pointer-events: all;
  padding: 10px 20px;
  user-select: none;
  transition: 0.2s ease;
}

.nav-arrow i {
  pointer-events: none;
}

.nav-arrow:hover {
  color: var(--clr-accent);
}

.popup-title,
.popup-caption {
  color: var(--clr-text);
  margin-top: 1rem;
  text-align: center;
}

.popup-title {
  font-size: 1.5rem;
  font-weight: bold;
}

.popup-caption {
  font-size: 1rem;
  color: var(--clr-text);
}

body {
  background: var(--clr-background);
  color: var(--clr-text);
}

#header {
  width: 100%;
  height: 100vh;
  background-image: url(https://oscarbergstrom.netlify.app/public/images/background.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
/*-----------------------------Nav-----------------------------*/
.container {
  padding: 10px 10%;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  width: 140px;
}
nav ul {
  display: flex;
  justify-content: space-between;
  padding: 0;
  list-style: none;
  margin-left: auto;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

nav ul li {
  display: inline-block;
  list-style: none;
  margin: 10px 20px;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideIn 0.5s forwards;
  transition: opacity 0.5s, transform 0.5s;
}

nav ul li:nth-child(1) {
  animation-delay: 1.2s;
}

nav ul li:nth-child(2) {
  animation-delay: 1.4s;
}

nav ul li:nth-child(3) {
  animation-delay: 1.6s;
}

nav ul li:nth-child(4) {
  animation-delay: 1.8s;
}

nav ul li:nth-child(5) {
  animation-delay: 2s;
}

nav ul li a {
  color: var(--clr-text);
  text-decoration: none;
  font-size: 18px;
  position: relative;
}

nav ul li a::after {
  content: "";
  width: 0;
  height: 3px;
  background: var(--clr-primary);
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: 0.5s;
}

nav ul li a:hover::after {
  width: 100%;
}
/*-----------------------------Language-----------------------------*/
.language-dropdown {
  position: relative;
  display: inline-block;
}

#language-menu {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 10px;
  background-color: transparent;
  box-shadow: none;
  z-index: 1;
  border-radius: 0;
}

#language-menu button {
  background-color: transparent;
  color: var(--clr-white);
  padding: 8px 12px;
  width: auto;
  border: none;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  position: relative;
}

#language-menu button:hover {
  text-decoration: none;
  background: transparent;
}

#language-menu button::after {
  content: "";
  width: 0;
  height: 3px;
  background: var(--clr-primary);
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: 0.5s;
}

#language-menu button:hover::after {
  width: 100%;
}
/*-----------------------------Header-----------------------------*/
@keyframes slideUp {
  0% {
    transform: translateY(100%); /* Börja från botten */
    opacity: 0;
  }
  100% {
    transform: translateY(0); /* Sluta på sin ursprungliga position */
    opacity: 1;
  }
}

.header-text h1 {
  font-size: 100px;
  margin-top: 20px;
  animation: slideUp 1s ease-out forwards;
  opacity: 0;
  animation-delay: 1s;
}

.header-text h2 {
  font-size: 30px;
  animation: slideUp 1s 0.5s ease-out forwards;
  opacity: 0;
}
.header-text h2:nth-child(2) {
  animation-delay: 1.2s;
}

.header-text h2:nth-child(3) {
  animation-delay: 1.4s;
}

.header-text h2:nth-child(4) {
  animation-delay: 1.7s;
}

.header-text h1 span {
  color: var(--clr-primary);
}
/*-----------------------------About-----------------------------*/
#about {
  padding: 0 0 30px 0;
  color: var(--clr-text);
}

.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-col-1 {
  flex-basis: 35%;
  position: relative;
}

.about-col-1 img {
  width: 100%;
  display: block;
}

.about-col-2 {
  flex-basis: 60%;
}

.sub-title {
  font-size: 60px;
  font-weight: 100;
  color: var(--clr-text);
}

.tab-title {
  display: flex;
  margin: 20px 0 40px;
}
.tab-links {
  margin-right: 50px;
  font-size: 30px;
  font-weight: 100;
  cursor: pointer;
  position: relative;
}

.tab-links::after {
  content: "";
  width: 0;
  height: 3px;
  background: var(--clr-primary);
  position: absolute;
  left: 0;
  bottom: -8px;
  transition: 0.5s;
}

.tab-links.active-link::after {
  width: 50%;
}

.tab-contents ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 30px;
  margin-top: 50px;
}

.tab-contents ul li {
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.tab-contents ul li h4 {
  color: var(--clr-accent);
  font-size: 20px;
}

.tab-contents ul li p {
  font-size: 14px;
}

.tab-contents {
  display: none;
}

.tab-contents.active-tab {
  display: block;
}

/*-----------------------------Services-----------------------------*/

#services {
  padding: 30px 0;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.services-list div {
  background: var(--clr-content-background);
  padding: 40px;
  font-size: 13px;
  font-weight: 100;
  border-radius: 10px;
  transition: background 0.5s, transform 0.5s;
}

.services-list div h2 {
  font-size: 30px;
  font-weight: 100;
  margin-bottom: 15px;
}

.services-list div a {
  text-decoration: none;
  color: var(--clr-text);
  font-size: 12px;
  margin-top: 20px;
  display: inline-block;
}

.services-list div:hover {
  background: var(--clr-primary);
  transform: translateY(-10px);
}

/*----------------------------- Portfolio-----------------------------*/

#portfolio {
  padding: 50px, 0;
}
.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-gap: 30px;
  margin-top: 50px;
}

.work {
  position: relative;
  overflow: hidden;
  padding: 15px;
  background-color: var(--clr-white);
}

.work img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
}

.btn {
  background-color: var(--clr-primary);
  display: block;
  margin: 50px auto;
  width: fit-content;
  border: 1px solid var(--clr-primary);
  padding: 14px 50px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--clr-text);
  transition: background 0.5s;
}

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

/*----------------------------- Contact-----------------------------*/
.contact-left {
  flex-basis: 35%;
}
.contact-right {
  flex-basis: 60%;
}

.contact-left p {
  margin-top: 30px;
}

.contact-left p i {
  color: var(--clr-primary);
  margin-right: 15px;
  font-size: 25px;
}

.social-icons {
  margin-top: 30px;
}

.social-icons a {
  text-decoration: none;
  font-size: 30px;
  margin-right: 15px;
  color: var(--clr-primary);
  display: inline-block;
}

.btn.btn2 {
  display: inline-block;
  width: auto;
  background: var(--clr-primary);
}

.contact-right form {
  width: 100%;
}

form input,
form textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: var(--clr-content-background);
  padding: 15px;
  margin: 15px 0;
  color: var(--clr-text);
  font-size: 18px;
  border-radius: 6px;
}

form .btn2 {
  padding: 14px 60px;
  font-size: 18px;
  margin-top: 20px;
  cursor: pointer;
}

.copyright {
  width: 100%;
  text-align: center;
  padding: 25px 0;
  background: var(--clr-content-background);
  font-weight: 100;
  margin-top: 20px;
}

#msg {
  color: var(--clr-msg);
  margin-top: -40px;
  display: block;
}
nav .fas {
  display: none;
}
/*-----------------------------Animations-----------------------------*/
.animate-item {
  opacity: 0;
  transform: translateY(50px);
  transition: none;
}

.animate-visible {
  animation: fadeInSlideUp 0.5s forwards;
}

@keyframes fadeInSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-item:nth-child(1) {
  animation-delay: 0.2s;
}
.animate-item:nth-child(2) {
  animation-delay: 0.4s;
}

.animate-item:nth-child(3) {
  animation-delay: 0.6s;
}
.animate-item:nth-child(4) {
  animation-delay: 0.3s;
}

.animate-item:nth-child(5) {
  animation-delay: 0.5s;
}
.animate-item:nth-child(6) {
  animation-delay: 0.7s;
}

/*-----------------------------Small screens-----------------------------*/

/*-----------------------------1150-----------------------------*/
@media only screen and (max-width: 1150px) {
  .popup .close {
    top: 0px;
  }

  .popup .close:hover {
    color: none;
  }

  .popup-nav {
    top: 50%;
  }

  .nav-arrow:hover {
    color: var(--clr-white);
  }

  .header-text {
    margin-top: 0px;
    font-size: 16px;
  }

  .header-text h1 {
    font-size: 60px;
    margin-top: 0px;
  }

  .header-text h2 {
    font-size: 17px;
  }
  /*-----------------------------Nav-----------------------------*/

  /*-----------------------------About-----------------------------*/

  /*-----------------------------Services-----------------------------*/

  /*-----------------------------Portfolio-----------------------------*/
  .work-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
  }

  /*-----------------------------Contact-----------------------------*/
  .btn.btn2 {
    padding: 10px 20px;
    margin: 10px 10px 30px 0px;
  }
}

/*-----------------------------850-----------------------------*/
@media only screen and (max-width: 850px) {
  .popup-nav {
    position: relative;
    top: auto;
    margin-top: 40px;
  }

  /*-----------------------------Nav-----------------------------*/
  nav .fas {
    display: block;
    font-size: 25px;
  }
  
  nav {
      justify-content: end;
      margin-top: 20px;
  }

  .logo {
    width: 70px;
  }

  nav ul {
    background: var(--clr-gradient);
    display: block;
    position: fixed;
    top: 0;
    right: -200px;
    width: 200px;
    height: 100vh;
    padding-top: 50px;
    z-index: 2;
    transition: right 0.5s;
  }

  nav ul li {
    display: block;
    margin: 25px;
  }

  nav ul .fas {
    position: absolute;
    top: 25px;
    left: 25px;
    cursor: pointer;
  }

  nav ul .language-dropdown {
    display: block;
  }

  /*-----------------------------About-----------------------------*/

  /*-----------------------------Services-----------------------------*/

  /*-----------------------------Portfolio-----------------------------*/
  .work-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /*-----------------------------Contact-----------------------------*/
  .btn.btn2 {
    padding: 10px 20px;
    margin: 10px 5px 30px 0px;
  }
}
/*-----------------------------600px-----------------------------*/
@media only screen and (max-width: 600px) {
  #header {
    background-image: url(https://oscarbergstrom.netlify.app/public/images/small-screens/background.jpg);
  }

  /*-----------------------------Nav-----------------------------*/

  /*-----------------------------About-----------------------------*/
  #about {
    padding: 0;
  }

  .sub-title {
    font-size: 40px;
  }

  .about-col-1,
  .about-col-2 {
    flex-basis: 100%;
  }

  .about-col-1 {
    margin-bottom: 0px;
  }

  .about-col-2 {
    font-size: 14px;
  }

  .tab-contents ul {
    margin-top: 10px;
    grid-gap: 0px;
  }

  .tab-links {
    font-size: 20px;
    margin-right: 20px;
  }
  /*-----------------------------Services-----------------------------*/

  .services-list {
    margin-top: 10px;
    grid-gap: 20px;
  }

  /*-----------------------------Portfolio-----------------------------*/
  #portfolio {
    padding: 10px, 0;
  }

  .work-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 15px;
  }

  /*-----------------------------Contact-----------------------------*/
  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }

  .btn.btn2 {
    padding: 15px 40px;
    margin: 20px 20px 30px 0px;
  }

  .copyright {
    font-size: 14px;
  }
}

/*-----------------------------400px-----------------------------*/
@media only screen and (max-width: 400px) {

  .container
  {
    padding: 10px 5%;
  }
  /*-----------------------------Nav-----------------------------*/

  /*-----------------------------About-----------------------------*/
  #about {
    padding: 0;
  }
  /*-----------------------------Services-----------------------------*/

  /*-----------------------------Portfolio-----------------------------*/

  .work {
    padding: 8px;
  }

  .work-list {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-gap: 15px;
  }

  /*-----------------------------Contact-----------------------------*/
  .btn.btn2 {
    padding: 10px 20px;
    margin: 10px 10px 30px 0px;
  }
}
