/* VILLANYSZERELÉS MESTERFOKON - FULL REFACTORED CSS */

:root {
  --color-primary: #0097b2ff;
  --color-primary-darker: #0097b2ff;
  --color-primary-opacity: rgba(75, 146, 178, 0.2);
  --color-secondary: #ffcb03;
  --color-secondary-darker: #ffbb00;
  --color-secondary-opacity: rgba(255, 205, 3, 0.2);
  --color-tertiary: #ff585f;
  --color-tertiary-darker: #fd424b;
  --color-tertiary-opacity: rgba(255, 88, 96, 0.2);
  --gradient-primary: linear-gradient(to bottom, #0097b2ff, rgb(157, 227, 239));
  --gradient-secondary: linear-gradient(to top left, #ffb003, #ffcb03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  font-size: 62.5%;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevents side-scrolling */
}

body {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  color: #444;
  line-height: 1.6;
  background-color: #f3f3f3;
  overflow-x: hidden;
}

/* GENERAL ELEMENTS */
.section {
  padding: 10rem 3rem; /* Reduced from 15rem for better mobile feel */
  border-top: 1px solid #ddd;
  transition:
    transform 1s,
    opacity 1s;
}

.section--hidden {
  opacity: 0;
  transform: translateY(8rem);
}

.section__title {
  max-width: 80rem;
  margin: 0 auto 8rem auto;
}

.section__description {
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.section__header {
  font-size: 4rem;
  line-height: 1.3;
  font-weight: 500;
}

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  font-size: 1.6rem;
  font-family: inherit;
  font-weight: 500;
  border: none;
  padding: 1.25rem 4.5rem;
  border-radius: 10rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  color: white;
}

.btn:hover {
  background-color: var(--color-primary-darker);
  transform: translateY(-2px);
}

.btn--text {
  display: inline-block;
  background: none;
  font-size: 1.7rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--color-primary);
  border: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  cursor: pointer;
  transition: all 0.3s;
}

p {
  color: #666;
}
button:focus {
  outline: none;
}
img {
  transition: filter 0.5s;
  max-width: 100%;
}

/* NAVIGATION */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 9rem;
  width: 100%;
  padding: 0 6rem;
  z-index: 100;
  transition: all 0.3s;
  position: absolute;
  top: 0;
  left: 0;
}

.nav.sticky {
  position: fixed;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav__logo {
  height: 7rem;
  transition: all 0.3s;
  cursor: pointer;
}

.nav__links {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav__item {
  margin-left: 4rem;
}

.nav__link:link,
.nav__link:visited {
  font-size: 1.7rem;
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  display: block;
  transition: all 0.3s;
}

.nav__link--btn:link,
.nav__link--btn:visited {
  padding: 0.8rem 2.5rem;
  border-radius: 3rem;
  background-color: var(--color-primary);
  color: #fff;
}

/* HEADER / HERO */
.header {
  padding: 0 6rem;
  padding-top: 9rem; /* Match the nav height */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header__text-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

h1 {
  font-size: 5.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}

h4 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.header__intro {
  font-size: 1.8rem;
  color: #666;
  margin-bottom: 3.5rem;
  line-height: 1.8;

  /* Justification without word-breaking */
  text-align: justify;
  text-justify: inter-word; /* Distributes space between words only */
  hyphens: none; /* Explicitly prevents breaking words */
}

.header__img {
  width: 60%; /* Reduced by 40% */
  justify-self: center; /* Keeps it centered in its grid cell */
  border-radius: 5px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

.header__signature {
  display: block;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--color-primary); /* Uses your #0097b2ff color */
  text-align: right;
  font-style: italic;
}

.highlight {
  position: relative;
}

.highlight::after {
  display: block;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  opacity: 0.7;
  transform: scale(1.07, 1.05) skewX(-15deg);
  background-image: var(--gradient-primary);
}

/* MODAL WINDOW */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Megnövelt szélesség a jobb olvashatóságért */
  max-width: 70rem;
  width: 90%;
  background-color: #f3f3f3;
  padding: 5rem 6rem;
  box-shadow: 0 4rem 6rem rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.5s;

  /* Görgethetővé tesszük, ha túl hosszú a szöveg mobilon */
  max-height: 85vh;
  overflow-y: auto;
}

.modal__header {
  font-size: 3.25rem; /* Nagyobb cím */
  margin-bottom: 3rem;
  line-height: 1.2;
}

.modal__details {
  font-size: 2rem; /* Jelentősen megnövelt alapszöveg */
  line-height: 1.8;
  color: #444;
}

.modal__details p {
  margin-bottom: 2rem;
}

.modal__details ul {
  list-style: none;
  margin-top: 2rem;
}

.modal__details li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

/* Egy kis sárga villám vagy pötty a felsorolás elé */
.modal__details li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  transition: all 0.5s;
}

.btn--close-modal {
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 4rem;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

/* FOOTER */
.footer {
  padding: 10rem 3rem;
  background-color: #37383d;
}

.footer__logo {
  height: 5rem;
  display: block;
  margin: 0 auto 5rem auto;
}

.footer__copyright {
  font-size: 1.4rem;
  color: #aaa;
  text-align: center;
}

/* SERVICES SECTION */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: 4rem;
  max-width: 120rem;
  margin: 0 auto;
}

.service-card {
  background-color: #fff;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-1rem);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.1);
}

.service-card__icon {
  font-size: 4rem;
  margin-bottom: 2rem;
  background-color: var(--color-primary-opacity);
  width: 7rem;
  height: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.service-card__title {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: #333;
}

.service-card__text {
  font-size: 1.6rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1; /* Ensures buttons/prices align at the bottom */
}

.service-card__price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  border-top: 1px solid #eee;
  padding-top: 1.5rem;
  margin-top: auto;
}

/* --- PRICING BULLETS SECTION --- */
.pricing-bullets {
  max-width: 90rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

.pricing-list {
  list-style: none;
  font-size: 2rem;
  line-height: 1.6;
}

.pricing-list li {
  margin-bottom: 2.5rem;
  padding-left: 4rem;
  position: relative;
}

/* Villám ikon a pontok helyett */
.pricing-list li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: bold;
}

.pricing-sub {
  font-size: 1.5rem;
  color: #666;
  display: block;
  margin-top: 0.5rem;
}

.pricing-offer-link {
  margin-top: 4rem;
  padding: 2rem;
  background-color: var(--color-primary-opacity);
  border-left: 5px solid var(--color-primary);
  border-radius: 5px;
  text-align: center;
}

.pricing-offer-link p {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.pricing-cta {
  margin-top: 2rem;
}

/* Mobile Devices */
@media screen and (max-width: 37.5em) {
  .footer {
    padding: 5rem 3rem;
    background-color: #37383d;
    text-align: center;
  }

  .footer__copyright {
    font-size: 1.4rem;
    color: #aaa;
  }

  .footer__copyright a {
    color: #eee;
    text-decoration: none;
  }
  /* --- RESPONSIVE MEDIA QUERIES --- */

  /* Tablet (Landscape and Portrait) */
  @media screen and (max-width: 64em) {
    .nav {
      padding: 0 3rem;
    }

    .header__title {
      grid-template-columns: 1fr;
      text-align: center;
      padding: 10rem 0 5rem 0;
    }

    .header__text-box {
      align-items: center;
      order: 1;
      padding: 6rem 0 0 0;
    }

    .header__img {
      max-width: 24rem; /* 40% reduction from 40rem */
      margin: 1rem auto 0 auto;
      order: 2;
    }
    .header__btn-container {
      order: 3; /* Third: The Button */
      margin-top: 2rem;
    }

    h1 {
      font-size: 4.5rem;
    }
    .section {
      padding: 8rem 3rem;
    }
  }

  /* Mobile Devices */
  @media screen and (max-width: 37.5em) {
    html {
      font-size: 50%; /* Adjusts REM scale */
    }

    .nav {
      flex-direction: column;
      height: auto;
      padding: 3rem;
    }

    .nav__links {
      margin-top: 2rem;
      flex-wrap: wrap;
      justify-content: center;
      width: 100%;
    }

    .nav__item {
      margin: 0.5rem 1.5rem;
    }

    .header {
      padding-top: 12rem;
    }

    h1 {
      font-size: 3.5rem;
    }

    .header__intro {
      font-size: 1.6rem;
    }

    .btn {
      padding: 1.2rem 3rem;
      width: 100%; /* Makes buttons full width on small phones */
      text-align: center;
    }

    .modal {
      padding: 3rem;
      width: 95%;
    }

    .modal__details {
      font-size: 1.6rem;
      line-height: 1.6;
      margin-top: 2rem;
      color: #444;
    }
    .services-grid {
      gap: 2rem;
    }

    .service-card {
      padding: 2.5rem;
      cursor: pointer;
      transition: all 0.3s; /* Smooth transition for hover effect */
    }
    .service-card:hover {
      transform: translateY(-5px);
      border: 1px solid var(--color-primary); /* Subtle highlight */
    }
    .nav.sticky {
      position: relative; /* Overrides fixed position on mobile */
      background-color: #fff;
    }
    .pricing-list {
      font-size: 1.7rem;
    }

    .pricing-offer-link p {
      font-size: 1.6rem;
    }
  }
}
/* Ensure the layout stays horizontal on PC */
@media screen and (min-width: 64.01em) {
  .header__title {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr;
    align-items: center;
  }

  /* On PC, make the button container look like part of the text box */
  .header__btn-container {
    grid-column: 1;
    margin-top: -2rem;
  }
}
