/*
 * Phone and small-tablet layout for Milán's pages (client 2026-11-25: "make it responsive for mobile").
 * His pages style almost everything inline, so these overrides need !important. Desktop (> 960px)
 * is untouched: every rule here sits inside a max-width media query, except the hidden-by-default
 * nav pieces and the word-wrap safety net.
 */

/* Long words and URLs (the legal pages' headings, e-mail addresses) wrap instead of overflowing. */
body { overflow-wrap: break-word; }

/* ── Navigation: the menu button and the in-menu login link only exist on small screens ───────── */
.site-nav-toggle { display: none; }
.site-nav-links .site-nav-mobile-only { display: none; }

@media (max-width: 960px) {
  .site-nav { padding-top: 18px !important; padding-bottom: 18px !important; gap: 12px !important; }
  .site-nav > a:first-child img { height: 42px !important; }
  .site-nav-actions { gap: 10px !important; }
  .site-nav-login { display: none !important; }
  .site-nav-actions .btn3d { padding: 11px 18px !important; font-size: 16px !important; }

  .site-nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 46px; height: 46px; padding: 0; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.2);
  }
  .site-nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #FFFFFF; transition: transform .2s, opacity .2s; }
  .site-nav.is-open .site-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav.is-open .site-nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.is-open .site-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav-links {
    display: none !important; order: 3; width: 100%; flex-direction: column !important; gap: 0 !important;
    padding: 4px 20px !important; border-radius: 18px;
    background: rgba(10, 12, 16, 0.96); border: 1px solid #1F2430;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .site-nav.is-open .site-nav-links { display: flex !important; }
  .site-nav-links a { display: block; padding: 15px 0; font-size: 18px; border-bottom: 1px solid #1A1E26; }
  .site-nav-links a:last-child { border-bottom: 0; }
  .site-nav-links .site-nav-mobile-only { display: block; }

  /* Footer links: finger-sized tap targets. */
  footer a { display: inline-block; padding-top: 10px; padding-bottom: 10px; }
}

/* ── Home (index.html) ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* Hero: as tall as the screen (not a fixed 960px), so both buttons sit on the first screen. */
  #top { height: auto !important; min-height: 100svh !important; }

  /* The rotating card deck: smaller cards, spaced so no card's text sits under the next one. */
  .deck-stack { height: 280px !important; }
  .deck { padding: 14px 16px 14px 14px !important; gap: 14px !important; animation-name: deck-m !important; }
  .deck > span { width: 56px !important; height: 56px !important; border-radius: 14px !important; }
  .deck > span svg { width: 28px; height: 28px; }
  .deck p { font-size: 16px !important; }

  /* Bento tiles: less padding on a narrow screen. */
  .tile { padding: 26px !important; }

  /* Discover tile: a swipeable row instead of three squeezed columns (like the app's rows). */
  .dc-row {
    display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -26px !important; padding: 0 26px 4px !important; scroll-padding: 0 26px;
  }
  .dc-row::-webkit-scrollbar { display: none; }
  .dc-row > .dc-card { flex: 0 0 72%; scroll-snap-align: start; }

  .dc-more { font-size: 14px !important; }
}
@keyframes deck-m {
  0% { transform: translateY(-30px) scale(.86); opacity: 0; z-index: 0 }
  3.57%, 14.29% { transform: translateY(0) scale(.9); opacity: .75; z-index: 1 }
  17.86%, 28.57% { transform: translateY(80px) scale(.95); opacity: .9; z-index: 2 }
  32.14%, 42.86% { transform: translateY(164px) scale(1); opacity: 1; z-index: 3 }
  47.86%, 100% { transform: translateY(250px) scale(1.02); opacity: 0; z-index: 4 }
}

/* ── Miért az MLN? (miert-az-mln.html) ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* The two right-hand floating labels are anchored from the right so they stay on screen, and the
     lower pair moves below the call-to-action button. */
  .chip-field .chip:nth-of-type(2), .chip-field .chip:nth-of-type(4) { left: auto !important; right: 4% !important; }
  .chip-field .chip:nth-of-type(3) { top: 84% !important; }
  .chip-field .chip:nth-of-type(4) { top: 90% !important; }
}

/* ── Árak (arak.html): the comparison table fits the screen, all three columns visible ──────── */
.cmp-title-m { display: none; }
@media (max-width: 700px) {
  .cmp-title-m { display: block; margin-bottom: 8px; }
  .cmp-wrap { overflow-x: visible !important; }
  .cmp { min-width: 0 !important; }
  .cmp col:nth-child(1) { width: 40% !important; }
  .cmp col:nth-child(2), .cmp col:nth-child(3) { width: 30% !important; }
  .cmp thead th:first-child > span { display: none; }
  .cmp thead th { padding: 0 6px 18px !important; }
  .cmp thead th > span { font-size: 22px !important; margin-bottom: 12px !important; }
  .cmp thead th a { display: block !important; text-align: center; font-size: 12px !important; padding: 10px 4px !important; overflow-wrap: normal; }
  .cmp tbody th, .cmp tbody td { padding: 16px 6px !important; font-size: 14px !important; }
  .cmp tbody th[colspan] { font-size: 28px !important; padding: 36px 6px 12px !important; }
}

/* ── ÁSZF / Adatvédelem (body.legal): section headings fit a phone without breaking mid-word ─── */
@media (max-width: 700px) {
  .legal h2 { font-size: 24px !important; line-height: 1.2 !important; }
}
