/* ==========================================
   BOOTSTRAP 4 RESPONSIVE (MOBILE & TABLET)
   ========================================== */

/* Tablet és kisebb kijelzők (991px alatt - Bootstrap lg breakpoint) */
@media (max-width: 991.98px) {
  #myCarousel .carousel-item {
    min-height: auto;
    padding: 50px 0;
  }

  #myCarousel .row.align-items-center {
    min-height: auto;
  }

  #myCarousel h4 {
    font-size: 32px;
  }

  #myCarousel p {
    font-size: 15px;
  }

  /* A maszk relatívvá tétele, hogy mobilon ne takarja ki a szöveget */
  #myCarousel .carousel-item .mask {
    position: relative;
    height: auto;
    background-attachment: scroll; /* Mobilon a fixed background okozhat szaggatást */
  }

  #myCarousel .carousel-item .mask img {
    max-height: 280px;
    margin-top: 25px;
  }
}

/* Okostelefonok (767.98px alatt - Bootstrap md breakpoint) */
@media (max-width: 767.98px) {
  #myCarousel {
    text-align: center; /* Mobilon középre igazított szöveg és gomb */
  }

  #myCarousel h4 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  #myCarousel p {
    font-size: 14px;
    margin-bottom: 20px;
  }

  #myCarousel .carousel-item a {
    padding: 10px 24px;
    font-size: 13px;
  }

  #myCarousel .carousel-item .mask img {
    max-height: 200px;
  }

  /* Nyilak méretezése és pozicionálása mobilon */
  .carousel-control-next, 
  .carousel-control-prev {
    height: 36px;
    width: 36px;
    padding: 8px;
  }
}

/*=================================================
  RESPONSIVE LAPTOP, NOTEBOOK, TABLET, MOBIL
==================================================*/
@media (max-width: 900px) {
  .main-nav {
    gap: 17px;
  }
  .main-nav > a {
    font-size: 12px;
  }
  .about-grid {
    gap: 45px;
  }
  .contact-grid {
    gap: 45px;
  }
  .trust-item {
    padding-left: 5px;
  }
  .hero {
    min-height: 610px;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 36px, 560px);
  }
  .topbar-inner {
    flex-direction: column;
    justify-content: center;
    padding: 6px 0;
    gap: 4px;
    text-align: center;
  }

  .topbar-inner > span {
    display: block;
    font-size: 11px;
    opacity: 0.9;
  }

  .topbar-contact {
    min-height: 34px;
    gap: 8px; /* Kisebb hézag mobilon, hogy biztosan elférjen egy sorban */
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Nyelvválasztó méretezése mobilon */
  .language-switcher {
    font-size: 11px;
  }
  .nav-wrap {
    min-height: 72px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .brand-name {
    font-size: 22px;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
  }
  .menu-toggle span {
    width: 19px;
    height: 2px;
    background: var(--blue);
    border-radius: 3px;
    transition:
      transform 0.2s,
      opacity 0.2s;
  }
  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 22px 22px;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 15px 25px rgba(9, 48, 86, 0.08);
    align-items: stretch;
    gap: 0;
  }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
  }
  .main-nav > a:not(.button) {
    padding: 13px 4px;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
  }
  .main-nav .button {
    margin-top: 15px;
  }
  .hero {
    min-height: 650px;
    align-items: flex-start;
  }
  .hero-photo {
    background-position: 58% center;
  }
  .hero-shade {
    background: linear-gradient(
      90deg,
      rgba(3, 31, 60, 0.91),
      rgba(4, 45, 83, 0.68)
    );
  }
  .hero-content {
    padding-block: 75px 85px;
  }
  .hero h1 {
    font-size: clamp(39px, 10vw, 56px);
    letter-spacing: -1.8px;
  }
  .hero-content > p {
    font-size: 14px;
    max-width: 430px;
  }
  .hero-actions {
    gap: 18px;
  }
  .hero-actions .button {
    min-height: 50px;
    padding-inline: 17px;
  }
  .hero-proof {
    margin-top: 38px;
  }
  .hero-note {
    bottom: 18px;
    padding: 11px 18px;
    font-size: 10px;
  }
  .trust-grid {
    grid-template-columns: 1fr;
    padding-block: 12px;
    gap: 0;
  }
  .trust-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }
  .trust-item:last-child {
    border-bottom: 0;
  }
  .trust-icon {
    padding: 10px;
  }
  .section {
    padding: 72px 0;
  }
  .section-heading {
    display: block;
    margin-bottom: 25px;
  }
  .section-heading h2,
  .about-copy h2,
  .contact-copy h2 {
    font-size: 34px;
    letter-spacing: -1.2px;
  }
  .section-heading > p {
    margin-top: 15px;
  }
  .about-section {
    padding: 72px 0;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .about-image-wrap {
    padding-left: 14px;
    padding-bottom: 25px;
    margin-right: 10px;
  }
  .about-image {
    height: 340px;
  }
  .image-caption {
    right: -8px;
    max-width: 280px;
    padding: 12px;
  }
  .benefits-section {
    padding: 72px 0;
  }
  .benefit-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .benefit-card {
    padding: 24px;
  }
  .benefit-card h3 {
    margin-top: 14px;
  }
  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 50px;
    gap: 24px;
  }
  .cta-inner h2 {
    font-size: 39px;
  }
  .cta-decoration {
    right: -40px;
    top: 0;
  }
  .contact-section {
    padding: 72px 0;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .contact-form {
    padding: 24px;
  }
  .footer-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .footer-inner > p {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .footer-brand .brand-mark {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 390px) {
 .container {
    width: calc(100% - 28px);
  }

  .topbar-contact {
    font-size: 10px;
    gap: 6px; /* Kicsit szűkebb hézag, hogy legkisebb mobilokon is kényelmesen kiférjen */
  }

  /* A nyelvválasztó is átveszi a 10px-es betűméretet */
  .language-switcher {
    font-size: 10px;
  }

  .language-switcher .lang-separator {
    margin: 0 2px;
  }
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .contact-form {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/*====================================
  PRODUCT CARD
=====================================*/
@media (max-width: 992px) {
  .product-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}
@media (max-width: 640px) {
  .product-card {
    flex: 0 0 100%;
  }
}

@media (min-width: 768px) {
  .catalog-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ==========================================
   RESPONSIVE (MOBIL ÉS TÁBLAGÉP) IGAZÍTÁS
   ========================================== */

@media (max-width: 767.98px) {
  .topbar-inner {
    flex-direction: column;
    padding: 8px 0;
    gap: 6px;
    text-align: center;
  }

  .topbar-contact {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}