* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Times New Roman', Times, serif;
  background-color: #faf9f7;
  margin: 0;
  display: flex;
  flex-direction: column;
}

header {
  position: relative;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 100px;
}

button {
  color: black;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: black;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.2rem;
}

nav a.active {
  font-weight: bold;
}

.logo-text {
  font-size: 1.6rem;
  letter-spacing: 2px;
  font-weight: bold;
  z-index: 2;
}

#home {
  display: flex;
  flex-direction: row;
  height: 100vh;
  align-items: center;
  justify-content: center;
  margin-top: -100px;
}

.home-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 75%;
}

.home-image {
  display: grid;
  align-items: center;
  justify-content: end;
  flex: 1;
}

.home-box {
  width: 600px;
  height: 600px;
  background-color: #e8e3df;
  z-index: 1;
  transform: translate(-200px, 200px);
}

.home-image img, .home-box {
  grid-column: 1;
  grid-row: 1;
}

.home-image img {
  width: 600px;
  height: 600px;
  margin-right: 20px;
  object-fit: cover;
  z-index: 2;
}

.home-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding-left: 10px;
  gap: 40px;
  justify-content: space-between;
  margin: 30px 0;
  flex: 1;
}

.home-text h1 {
  margin: 0;
  letter-spacing: 2px;
  font-size: 5rem;
  font-weight: normal;
}

.home-text h1:nth-of-type(2) {
  margin-top: -40px;
}

.home-text p {
  margin: 0;
  font-size: 1.2rem;
}

.home-text button {
  width: 350px;
  padding: 18px;
  font-size: 1.6rem;
  border: 1.6px solid black;
  border-radius: 80px;
  background-color: transparent;
  cursor: pointer;
}

.portfolio {
  position: relative;
}

.portfolio-box {
  position: absolute;
  top: 50%;
  height: 50%;
  width: 100%;
  background-color: #e8e3df;
  z-index: 1;
}

.portfolio-container {
  display: flex;
  flex-direction: column;
  padding-top: 50px;
  gap: 30px;
}

.portfolio-text {
  z-index: 2;
}

.portfolio-text h1 {
  margin: 0;
  padding-left: 50px;
  letter-spacing: 2px;
  font-size: 5rem;
  font-weight: normal;
}

.portfolio-cards {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  padding-top: 50px;
  z-index: 2;
  text-align: center;
}

.card-image {
  width: 400px;
  height: 600px;
  overflow: hidden;
}

.card-image img {
  width: 400px;
  height: 600px;
  object-fit: cover;
  transition: all ease 0.5s;
}

.card-image img:hover {
  scale: 1.1;
  transition: all ease 0.5s;
}

.card-button {
  padding-top: 40px;
  padding-bottom: 16px;
}

.card-button button {
  width: auto;
  padding: 18px 50px;
  font-size: 1.6rem;
  border: 1.6px solid black;
  border-radius: 80px;
  background-color: #faf9f7;
  cursor: pointer;
}

.card-text {
  width: auto;
  font-size: 1.4rem;
  line-height: 1.5;
}

.csomagok {
  background-color: #e8e3df;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.csomagok-text {
  display: flex;
  justify-content: end;
}

.csomagok-text h1 {
  margin: 0;
  padding-top: 100px;
  padding-right: 50px;
  letter-spacing: 2px;
  font-size: 5rem;
  font-weight: normal;
}

.csomagok-note {
  display: flex;
  justify-content: center;
  color: black;
  font-size: 1.4rem;
  width: 100%;
  text-align: center;
  padding-bottom: 100px;
  padding-top: 60px;
}

.csomagok-note p {
  width: 65%;
}

.csomagok-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: auto;
  padding-top: 120px;
  transition: all ease 0.3s;
}

.csomagok-category {
  display: flex;
  flex-direction: column;
  text-align: right;
  flex: 1;
  padding: 60px;
  gap: 50px;
}

.csomagok-category a {
  margin: 0;
  letter-spacing: 2px;
  font-size: 3rem;
  font-weight: 100;
  color: rgb(171, 170, 170);
  transition: all ease 0.3s;
}

.csomagok-description {
  display: flex;
  flex-direction: column;
  flex: 1.6;
  padding: 60px;
  font-size: 1.2rem;
  font-weight: 100;
  color: rgb(171, 170, 170);
  transition: all ease 0.3s;
}

.csomagok-description p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  transition: all ease 0.3s;
}

.csomagok-description p.highlight {
  display: block;
  max-height: none;
}

.highlight {
  font-size: 1.4rem;
  color: black;
  -webkit-line-clamp: unset;
  transition: all ease 0.3s;
  
}

.csomagok-category a:hover {
  font-size: 5rem;
  font-weight: 400;
  color: black;
  transition: all ease 0.3s;
}

a.highlight-a {
  font-size: 2rem;
  font-weight: 400;
  color: black;
  transition: all ease 0.3s;
}

.kapcsolat-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  width: 100%;
  height: auto;
}

.kapcsolat-box {
  position: absolute;
  background-color: #e8e3df;
  width: 100%;
  height: 400px;
  z-index: 1;
}

.kapcsolat-image {
  width: 600px;
  height: 600px;
  overflow: hidden;
  z-index: 2;
}

.kapcsolat-image img {
  width: 600px;
  height: auto;
  object-fit: cover;
  transform: translateY(-40px);
}

.kapcsolat-text {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
}

.kapcsolat-text h1 {
  margin: 0;
  padding: 50px 0;
  letter-spacing: 2px;
  font-size: 5rem;
  font-weight: normal;
}

.kapcsolat-text p {
  margin: 0 auto;
  width: 800px;
  font-size: 1.2rem;
  letter-spacing: 2;
}

.kapcsolat-button {
  padding: 50px 0;
}

.kapcsolat-button button {
  width: auto;
  padding: 18px 50px;
  font-size: 1.6rem;
  border: 1.6px solid black;
  border-radius: 80px;
  background-color: #faf9f7;
  cursor: pointer;
}

/* BACK BUTTON PORTFOLIO */

.back-button {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 30px;
  height: 68.5px;
}

#backToMain {
  padding: 14px 30px;
  font-size: 1.4rem;
  border: 1.6px solid black;
  border-radius: 80px;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

#backToMain:hover {
  background-color: black;
  color: white;
}

.arrow {
  font-size: 1.6rem;
  line-height: 1;
}

/* SPINNER */

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid black;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* BACK TO TOP BUTTON */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #faf9f7;
  color: black;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top:hover {
  background-color: #faf9f7;
  transform: scale(1.1);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* HAMBURGER MENU */

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding-right: 6px;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background-color: black;
  margin-bottom: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Transform hamburger into 'X' */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.footer {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  align-items: center;
  justify-content: center;
}

.footer-container {
  width: 100%;
}

.contacts {
  width: 60%;
  display: flex;
  flex-direction: row;
  gap: 50px;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
}

.instagram img, .phone img, .email img {
  display: flex;
  width: 40px;
  height: auto;
}

.instagram, .phone, .email {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex: 1;
}

.instagram a, .phone a, .email a {
  text-decoration: none;
  cursor: pointer;
  color: black;
  font-size: 1.2rem;
}

.phone {
  border-left: 1px solid #e8e3df;
  border-right: 1px solid #e8e3df;
  justify-content: center;
}

.contact-form {
  display: flex;
  justify-content: center;
}

form {
  display: flex;
  flex-direction: column;
  width: 600px;
  gap: 20px;
  padding: 50px 0;
}

form label {
  font-size: 1.6rem;
}

form input {
  border: #e8e3df;
  height: 50px;
  font-size: 1.6rem;
  border-radius: 10px;
  padding: 4px 10px;
}

form textarea {
  border: #e8e3df;
  height: auto;
  font-size: 1.6rem;
  border-radius: 10px;
  padding: 10px 10px;
  min-height: 200px;
}

form button {
  padding: 18px 50px;
  font-size: 1.6rem;
  border: 1.6px solid black;
  border-radius: 80px;
  background-color: #faf9f7;
  cursor: pointer;
}

.footer-info {
  border-top: 1px solid #e8e3df;
  text-align: center;
  font-size: 1rem;
}

.portfolio-gallery {
  position: absolute;
  top: 0px;
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  opacity: 0;
  background-color: #faf9f7;
  transition: opacity 0.4s ease;
  z-index: 99999;
  grid-auto-flow: dense;
}

.header-section {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin: 0px 50px;
}

.portfolio-gallery img {
  will-change: transform;
}

.portfolio-gallery.active {
  opacity: 1;
  transition: opacity 0.8s ease;
}

.gallery-filter {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 50px 0;
  gap: 50px;
  height: 150px;
}

.gallery-filter h1 {
  letter-spacing: 2px;
  font-size: 2rem;
  font-weight: 100;
  color: rgb(171, 170, 170);
  transition: all ease 0.3s;
}

.gallery-filter h1:hover {
  font-size: 3rem;
  font-weight: 400;
  color: black;
  transition: all ease 0.3s;
}

.gallery-filter h1.active {
  font-size: 3rem;
  font-weight: 400;
  color: black;
  transition: all ease 0.3s;
}

.row {
  display: flex;
}
.column {
 display: flex;
 flex-direction: column;
 margin: 0.25rem;
}
.item {
  margin-bottom: 0.25rem;
  outline: none;
}
.item > img {
  width: 100%;
  border-radius: 12px;
}

/* General responsiveness */

@media (max-width: 768px) {
  header {
    position: relative;
    padding: 32px 16px;
  }

  .logo-text {
    font-size: 1rem;
    letter-spacing: 1.4px;
  }

  #nav-menu {
    display: none;
  }

  #nav-menu.active {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 100px;
    left: 0;
    background-color: #faf9f7;
    width: 100%;
    z-index: 999999;
    border-top: 1px solid #e8e3df;
    border-bottom: 1px solid #e8e3df;
  }
  #nav-menu.active a {
    padding: 20px 0;
  }

  .hamburger {
    display: flex;
  }

  #home {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .home-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 100px;
  }
  .home-box {
    width: 200px;
    height: 200px;
    transform: translate(-60px, 30px);
  }
  .home-image img {
    width: 300px;
    height: auto;
  }
  .home-text {
    margin: 60px 20px;
    padding-left: 0;
  }
  .home-text h1 {
    font-size: 2.5rem;
  }
  .home-text p {
    font-size: 1rem;
  }
  .home-text button {
    font-size: 1rem;
    width: 100%;
  }
  .portfolio {
    background-color: #e8e3df;
  }
  .portfolio-text h1 {
    padding-left: 20px;
    font-size: 2.5rem;
  }
  .portfolio-cards {
    flex-direction: column;
    padding-top: 20px;
  }
  .card-image {
    width: 100%;
    height: 400px;
  }
  .card-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
  }
  .card-button {
    margin: 0 20px;
  }
  .card-button button {
    width: 80%;
    font-size: 1.2rem;
  }
  .portfolio-box {
    display: none;
  }
  .csomagok-text {
    justify-content: start;
  }
  .csomagok {
    padding-top: 50px;
    margin: 0 20px;
    background-color: transparent;
  }
  .csomagok-text h1 {
    padding: 0;
    font-size: 2.5rem;
  }
  .csomagok-container {
    height: auto;
    padding-top: 20px;
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .csomagok-note {
    font-size: 1rem;
    padding-bottom: 50px;
    padding-top: 30px;
  }
  .csomagok-note p {
    width: 100%;
  }
  .csomagok-category {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
    flex: 1;
  }
  .csomagok-category a {
    font-size: 1rem;
  }
  .csomagok-description {
    padding: 0;
    flex: 12;
    font-size: 0.8rem;
  }
  .csomagok-category a:hover {
    font-size: 1.2rem;
  }
  .highlight-a {
    font-size: 1rem;
  }
  .highlight {
    font-size: 1rem;
  }
  .kapcsolat-container {
    height: auto;
  }
  .kapcsolat-box {
    width: 100%;
    height: 150px;
  }
  .kapcsolat-image {
    width: 200px;
    height: 200px;
  }
  .kapcsolat-image img {
    width: 100%;
  }
  .kapcsolat-text, .kapcsolat-button {
    margin: 20px 20px;
  }
  .kapcsolat-text h1 {
    padding: 0;
    font-size: 2rem;
  }
  .kapcsolat-text p {
    width: 100%;
    margin-top: 20px;
    font-size: 1rem;
  }
  .kapcsolat-button {
    padding: 0;
    display: flex;
    justify-content: center;
  }
  .kapcsolat-button button {
    font-size: 1rem;
    width: 100%;
  }
  .contacts {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: start;
    padding-left: 60px;
  }
  .phone {
    border: none;
  }
  form {
    width: 100%;
    margin: 0 20px;
  }
  form button, form label, form textarea, form input {
    font-size: 1rem;
  }
  .header-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .gallery-filter h1 {
    font-size: 1rem;
  }
  .instagram img, .phone img, .email img {
    display: flex;
    width: 25px;
    height: auto;
  }
  .instagram, .phone, .email {
    width: 100%;
    justify-content: start;
  }
}