:root {
  --bg-color: #d1b88e;
  --dark-blue: #1b2e53;
  --white: #ffffff;
  --light-gray: #f8f9fa;
}

* {
  box-sizing: border-box;
}

html:not(.aos-enabled) [data-aos]{
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: "Outfit", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--light-gray);
  color: #444;
  max-width: 100%;
  width: 100%;
  position: relative;
}

/* Navbár */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease,
    padding 0.4s ease;
  padding: 20px 0;
}

.navbar.scrolled {
  background-color: var(--dark-blue);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.nav-logo {
  color: var(--bg-color);
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--bg-color);
}

.mobile-cta-link {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.nav-cta {
  background-color: var(--bg-color);
  color: var(--dark-blue);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}

.nav-cta:hover {
  background-color: #e0c89e;
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.hamburger:hover {
  color: var(--bg-color);
}

@media (max-width: 900px) {
  .navbar {
    background-color: var(--dark-blue) !important;
    padding: 10px 0 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0; /* width: 100% helyett biztonságosabb */
    background-color: var(--dark-blue);
    flex-direction: column;
    gap: 5px;
    padding: 10px 10px 20px 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 24px 24px;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
    box-sizing: border-box; /* Biztosíték */
  }

  .nav-logo {
    max-width: calc(100% - 60px);
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.35rem;
  }

  .nav-links.nav-active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-links li {
    text-align: center;
    list-style: none;
  }

  .nav-links li a {
    display: block;
    padding: 12px 15px;
    margin: 0 10px;
    border-radius: 12px;
    font-size: 1.1rem;
    transition:
      background-color 0.3s ease,
      transform 0.2s ease;
  }

  .nav-links li a:hover,
  .nav-links li a:active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--bg-color);
  }

  .hamburger {
    display: block;
  }

  .nav-cta {
    display: none;
  }

  .mobile-cta-link {
    display: block;
    margin-top: 5px;
  }

  .mobile-cta-link a {
    background-color: var(--bg-color) !important;
    color: var(--dark-blue) !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(209, 184, 142, 0.3);
    border-radius: 12px;
    padding: 12px 15px;
    margin: 0 15px;
  }

  .mobile-cta-link a:hover {
    background-color: #e0c89e !important;
    transform: translateY(-2px);
  }
}

/* Hero */
.hero {
  background-image:
    linear-gradient(rgba(27, 46, 83, 0.85), rgba(27, 46, 83, 0.85)),
    url("../img/hatter2.webp");
  background-image:
    linear-gradient(rgba(27, 46, 83, 0.85), rgba(27, 46, 83, 0.85)),
    image-set(
      url("../img/hatter2.webp") type("image/webp"),
      url("../img/hatter2.jpg") type("image/jpeg")
    );
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  color: var(--white);
  padding: 120px 20px 80px;
  text-align: center;
  border-bottom: 8px solid var(--bg-color);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.logo {
  max-width: 300px;
  height: auto;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--bg-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.hero-contact {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-contact-item {
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.hero-contact-item i {
  color: var(--bg-color);
  font-size: 1.4rem;
}

/* Fő tartalom */
.container {
  max-width: 1000px;
  margin: -40px auto 40px auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

section {
  background: var(--white);
  padding: 50px 40px;
  border-radius: 16px;
  margin-bottom: 40px;
  box-shadow: 0 15px 40px rgba(27, 46, 83, 0.05);
}

/* Szolgáltatások (új) */
.services-intro {
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

h2 {
  color: var(--dark-blue);
  text-align: center;
  text-transform: uppercase;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 15px;
  margin-bottom: 30px;
}

/* Galéria Főcím */
.gallery-main-title {
  color: var(--dark-blue);
  text-align: center;
  text-transform: uppercase;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 15px;
  margin-bottom: 30px;
}

/* Galéria Kategória Címek */
.category-title {
  font-size: 1.8rem;
  text-align: center;
  color: var(--dark-blue);
  margin: 40px 0 20px 0;
  font-weight: bold;
  text-transform: uppercase;
  display: block;
  border-bottom: 1px solid var(--bg-color);
  padding-bottom: 10px;
}

/* Bemutatkozás */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  align-items: center;
}

.profile-pic {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 8px solid var(--bg-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* Termékek listája */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
}

.service-item {
  background: var(--light-gray);
  padding: 15px 25px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--dark-blue);
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.service-item:hover {
  background: var(--white);
  border: 1px solid var(--bg-color);
  box-shadow: 0 5px 15px rgba(209, 184, 142, 0.2);
  transform: translateY(-2px);
  color: var(--dark-blue);
}

.service-item span {
  color: #8b6b33;
  font-weight: bold;
  margin-left: 5px;
}

/* Galéria */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.gallery-item {
  background-color: var(--white);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
}

/* Footer */
footer {
  background-color: var(--dark-blue);
  color: var(--white);
  padding: 60px 0 0;
  margin-top: 60px;
  border-top: 5px solid var(--bg-color);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding: 0 20px 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col h3 {
  color: var(--bg-color);
  font-size: 1.3rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col p {
  line-height: 1.8;
  color: #e0e0e0;
  margin: 0;
}

.footer-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: #e0e0e0;
}

.footer-contact-list i {
  color: var(--bg-color);
  font-size: 1.2rem;
  width: 30px;
  text-align: center;
  margin-right: 10px;
}

.footer-contact-list a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact-list a:hover {
  color: var(--bg-color);
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.2);
}

.footer-bottom p {
  margin: 0;
  color: #aaa;
  font-size: 0.9rem;
}

/* Lightbox háttér */
.lightbox {
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  display: flex;
}

.lightbox.show {
  visibility: visible;
  opacity: 1;
}

.lightbox img {
  transform: scale(0.8);
  transition: transform 0.3s ease;
  max-width: 90%;
  max-height: 85%;
  border: 3px solid var(--bg-color);
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox.show img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
}

/* Vissza a tetejére gomb */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--bg-color);
  color: var(--dark-blue);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.back-to-top:hover {
  background-color: var(--dark-blue);
  color: var(--bg-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
  .hero {
    padding: 100px 20px 50px;
    background-attachment: scroll; /* Fix iOS görgetési akadásokra (parallax hiba) */
  }
  .hero h1 {
    font-size: 2rem;
  }
  .intro-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto;
  }
  .category-title {
    font-size: 1.4rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
}
