/* === Small CSS Reset === */
* {
  margin: 0;
  padding: 0;
}
*,
*::after,
*::before {
  box-sizing: border-box;
  text-decoration: none;
}

:root {
  /* Fonts */
  --main-font: "lato", sans-serif;
  /* Colors */
  --main-title-color: #ff377a;
  --main-icon-color: #37e1ff;
  /* --gradient: linear-gradient(90deg, #4a1196 0%, #542aba 100%); */
  --main-bg-gradient: linear-gradient(
    to right,
    #5e3294,
    #4a1196,
    #4c23ab,
    #391e75
  );
  --main-bg-color: #5e3294;
  --second-bg-color: #4a1196;
  --third-bg-color: #4c23ab;
  --fourth-bg-color: #391e75;
  --main-text-color: #ffffff;
  --main-border-color: #e39263;
}

@font-face {
  font-family: "title-font";
  src: url("../font/SP.otf");
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--main-font);
  background: var(--main-bg-gradient);
  color: var(--main-text-color);
}

/* ======================= Header ======================= */

#header {
  width: 100%;
  height: 85vh;
  background: url("../images/bg5.png");
  background-size: cover;
  background-position: center;
}

/* .container {
  padding: 10px 1%;
} */

.header-text {
  margin-top: 20%;
  font-size: 30px;
  padding: 0 5%; /* 0 Up + Down / 5% Left + Right */
}

.header-text h1 {
  font-size: 60px;
  margin-top: 2px;
  text-shadow: 1px 1px 2px pink;
}

.header-text h1 span {
  color: var(--main-title-color);
}

/* ====================== Navigation ======================= */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 20px;
}

.logo {
  width: 140px;
  transition: 0.3s;
}

.logo:hover {
  transform: scale(1.1);
}

nav ul li {
  list-style: none;
  display: inline-block; /* Aligns it horizontally */
  margin: 10px 20px;
  transition: 0.3s;
}

nav ul li:hover {
  transform: scale(1.3);
}

nav ul li a {
  color: var(--main-text-color);
  text-decoration: none;
  font-size: 22px;
  font-family: title-font;
  position: relative;
}

/* Animated Underline */
nav ul li a::after {
  content: "";
  width: 0; /* Width of the line to make it invisible */
  height: 3px;
  background: var(--main-title-color);
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: 0.5s;
}

nav ul li a:hover::after {
  width: 100%;
}

/* ======================= About ======================= */

#about {
  padding: 80px 5%; /* 80px Up + Down / 5% Left + Right */
  color: var(--main-text-color);
}

.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-col-1 {
  flex-basis: 35%; /* 35% of the row */
}

.about-col-1 img {
  width: 100%;
  border-radius: 15px;
  /* border: solid 1px white; */
}

.about-col-2 {
  flex-basis: 60%; /* 60% of the row means 5% spacing in between */
  padding-left: 20px;
}

.sub-title {
  font-size: 50px;
  font-weight: 600;
  color: var(--main-text-color);
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px pink;
}

.tab-titles {
  display: flex;
  margin: 20px 0 40px;
}

.tab-links {
  margin-right: 50px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

.tab-links::after {
  content: "";
  width: 0;
  height: 3px;
  background: var(--main-title-color);
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: 0.5s;
}

.tab-links.active-link::after {
  width: 50%;
}

.tab-contents ul li {
  list-style: none;
  margin: 10px 0;
  font-size: 14px;
}

.tab-contents ul li span {
  color: var(--main-title-color);
  font-weight: 700;
  font-size: 16px;
}

.tab-contents {
  display: none;
}

.tab-contents.active-tab {
  display: block; /* To make sure this tab will be visible */
}

/* ======================= Services ======================= */

#services {
  padding: 30px 5%;
  color: var(--main-text-color);
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.services-list div {
  background: rgba(0, 0, 0, 0.4);
  padding: 40px;
  font-size: 13px;
  font-weight: 300;
  border-radius: 10px;
  transition: 0.5s, 0.5s; /* 0.5s for background, 0.5s for transform */
}

/* Services Icons */
.services-list div i {
  font-size: 50px;
  margin-bottom: 30px;
}

.services-list div h2 {
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 15px;
}

.services-list div p {
  font-size: 15px;
  margin-bottom: 20px;
}

.services-list div a {
  text-decoration: none;
  color: var(--main-text-color);
  font-size: 12px;
  display: inline-block;
  border: solid 1px var(--main-text-color);
  border-radius: 15px;
  padding: 5px 10px;
}

.services-list div a.specialbtn {
  margin-top: 40px;
}

.services-list div a:hover {
  background: var(--main-text-color);
  color: var(--main-title-color);
  font-weight: 500;
}

.services-list div:hover {
  background: var(--main-title-color);
  transform: translateY(-10px);
}

/* ======================= Projekte ======================= */

#projekte {
  padding: 30px 5%;
  color: var(--main-text-color);
}

.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}

.work {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.work img {
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.5s;
}

.work:hover img {
  transform: scale(1.1);
}

.layer {
  width: 100%;
  height: 0%; /* 0% means it will be hidden */
  background: linear-gradient(rgba(0, 0, 0, 0.8), var(--main-title-color));
  border-radius: 10px;
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  font-size: 14px;
  transition: height 0.5s;
}

.layer h3 {
  font-weight: 500;
  margin-bottom: 20px;
  font-size: 20px;
}

.layer a {
  margin-top: 20px;
  color: var(--main-title-color);
  text-decoration: none;
  font-size: 18px;
  line-height: 60px;
  background: var(--main-text-color);
  width: 60px;
  height: -60px;
  border-radius: 50%;
  text-align: center;
  transition: 0.3s;
}

.layer a:hover {
  transform: scale(1.3);
}

.work:hover .layer {
  height: 100%;
}

.btn {
  display: block;
  margin: 50px auto;
  width: fit-content;
  border: 2px solid var(--main-title-color);
  padding: 14px 50px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--main-text-color);
  transition: 0.5s, 0.5s; /* 0.5s for background, 0.5s for transform */
}

.btn:hover {
  background: var(--main-title-color);
  transform: scale(1.2);
}

/* ======================= Contact ======================= */

#contact {
  padding: 30px 5%;
  color: var(--main-text-color);
}

/* class .row is defined on line 130 with the flex stuff
because we used it in the about section as well */
.contact-left {
  flex-basis: 35%;
}

.contact-right {
  flex-basis: 60%;
}

.contact-left p {
  margin-top: 30px;
}

.contact-left p i {
  color: var(--main-title-color);
  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(--main-icon-color);
  display: inline-block;
  transition: transform 0.5s;
}

.social-icons a:hover {
  color: var(--main-text-color);
  transform: translateY(-5px);
}

.btn.btn2 {
  display: inline-block;
  background: var(--main-title-color);
}

.btn.btn3 {
  display: inline-block;
  background: var(--main-title-color);
  font-size: 16px;
  margin-top: 20px;
  cursor: pointer;
}

.btn.btn2:hover,
.btn.btn3:hover {
  background: none;
}

.contact-right form {
  width: 100%;
}

form input,
form textarea {
  width: 100%;
  padding: 15px;
  margin: 15px 0;
  border: 1px solid var(--main-title-color);
  border-radius: 6px;
  background: var(--second-bg-color);
  color: var(--main-text-color);
  font-family: var(--main-font);
  font-size: 16px;
}

.copyright {
  width: 100%;
  text-align: center;
  padding: 25px 0;
  background: rgba(0, 0, 0, 0.4);
  font-weight: 300;
  margin-top: 20px;
}

.copyright i {
  color: var(--main-title-color);
}

#msg {
  color: var(--main-icon-color);
  margin-top: -20px;
  display: block;
  font-size: 20px;
  font-weight: 500;
  text-shadow: 1px 1px 10px white;
}

/* ======================= Back to Top ======================= */

#myBtn {
  opacity: 0.5;
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 80px; 
  right: 30px; 
  z-index: 99; /* Make sure it does not overlap */
  border: none; 
  outline: none; 
  background-color: var(--main-border-color);
  color: white; /* Text color */
  cursor: pointer; 
  padding: 10px; 
  border-radius: 10px; /* Rounded corners */
  font-size: 18px; /* Increase font size */
}

#myBtn i {
  font-size: 30px;
}

#myBtn:hover {
  opacity: 1;
  background-color: var(--main-icon-color); /* Add a dark-grey background on hover */
}