.pagemargin {
    padding-top: 2%;
}

.pagemargin > img {
  width: 400px;
  height: auto;
  float: left;
  margin-right: 40px;
  margin-bottom: 20px;
  border-radius: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nev h5 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.nev + p {
  font-weight: 500;
}

.pagemargin > p {

  line-height: 1.6;
  margin-bottom: 15px;
}


.pagemargin h1 {

  margin-top: 40px;
  margin-bottom: 30px;
  clear: both;
  text-align: center;
}

.kapcs {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 30px;
  clear: both;
}

.kapcs img {
  flex: 1;
  max-width: calc(27% - 20px);
  height: auto;
  border: 3px solid #ddd;
  border-radius: 999px;
  padding-left: 1.5%;
  padding-right: 1.5%;
  padding-top: 1%;
  padding-bottom: 1%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
}

.kapcs img:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 159, 180, 0.3), 0 12px 40px rgba(0, 0, 0, 0.15);
  filter: drop-shadow(0 8px 20px rgba(0, 159, 180, 0.2));
}

.line-3 {
  margin-left: 440px;
  margin-right: 15% !important;
  width: calc(100% - 440px);
}

/* Image grid restyled to match previous 'kapcs' look */
.image-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 30px;
  clear: both;
  align-items: center;
}

.image-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  max-width: calc(27% - 20px);
  border: 3px solid #ddd;
  border-radius: 999px;
  padding: 1% 1.5%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
}

.image-grid a:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 159, 180, 0.3), 0 12px 40px rgba(0, 0, 0, 0.15);
  filter: drop-shadow(0 8px 20px rgba(0, 159, 180, 0.2));
}

.image-grid img {
  width: clamp(40px, 4.8vw, 64px);
  height: clamp(40px, 4.8vw, 64px);
  object-fit: contain;
  flex-shrink: 0;
  margin: 0 !important;
}

.image-grid h6 {
  margin: 0 !important;
  line-height: 1.25 !important;
  flex: 0 1 auto;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

/* Mobile: stack vertically like previous 'kapcs' */
@media (max-width: 767px) {
  .image-grid {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  .image-grid a {
    max-width: none;
    width: 100%;
    padding: 14px 18px;
  }
}

@media (max-width: 1024px) {
  .pagemargin > img {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }

  .kapcs {
    flex-direction: column;
    gap: 20px;
  }

  .kapcs img {
    max-width: 100%;
  }
  .line-3 {
    display: none;
  }


}