/* =============================================================================
   HOMEPAGE.CSS — strona główna
   Breakpointy (każdy raz na dole):
     - 980px = 2 kolumny kafelków
     - 700px = pełne zdjęcia na kartach (bez crop)
     - 560px = 1 kolumna + ciasteczko mniejsze
     - hover:none = bez skalowania na touch
     - prefers-reduced-motion = wyłącza animację ciasteczka
   ============================================================================= */

/* --- Baza i zmienne --- */
.ngh-page {
  --ngh-bg: #0a0a0f;
  --ngh-card: rgba(18, 18, 26, 0.85);
  --ngh-border: rgba(255, 255, 255, 0.08);
  --ngh-text: #ffffff;
  --ngh-muted: #a1a1b5;
  --ngh-blue: #5b8cff;
  --ngh-cyan: #7ec8ff;
  font-family: 'Lato', 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--ngh-text);
  background: var(--ngh-bg);
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 72px 24px 100px;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100vw;
}
.ngh-page *,
.ngh-page *::before,
.ngh-page *::after { box-sizing: border-box; }
.ngh-page a {
  text-decoration: none;
  color: inherit;
}

/* Dekoracyjne poświaty w tle (niebieskie) */
.ngh-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.ngh-glow--1 {
  width: 520px;
  height: 520px;
  top: -80px;
  left: 50%;
  transform: translateX(-70%);
  background: radial-gradient(circle, rgba(42, 92, 168, 0.55) 0%, transparent 70%);
  opacity: 0.85;
}
.ngh-glow--2 {
  width: 480px;
  height: 480px;
  top: -40px;
  left: 50%;
  transform: translateX(10%);
  background: radial-gradient(circle, rgba(30, 63, 115, 0.55) 0%, transparent 70%);
  opacity: 0.8;
}
.ngh-glow--3 {
  width: 360px;
  height: 360px;
  top: 180px;
  left: 50%;
  transform: translateX(-20%);
  background: radial-gradient(circle, rgba(13, 31, 58, 0.5) 0%, transparent 70%);
  opacity: 0.7;
}

.ngh-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
}

/* --- Hero --- */
.ngh-hero {
  text-align: center;
  padding: 40px 0 72px;
}
.ngh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ngh-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8cff, #2a5ca8);
  box-shadow: 0 0 10px rgba(91, 140, 255, 0.8);
}
.ngh-title {
  margin: 0 auto 18px;
  max-width: 820px;
  font-size: clamp(2.4rem, 5.2vw, 3.75rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #8ec5ff 0%, #5b8cff 50%, #2a5ca8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ngh-subtitle {
  margin: 0 auto 36px;
  max-width: 640px;
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.55;
  color: var(--ngh-muted);
  font-weight: 400;
}
.ngh-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.ngh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.ngh-btn--primary {
  background: linear-gradient(135deg, #4f7cff 0%, #2a5ca8 55%, #1e3f73 100%);
  color: #fff;
  border: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 8px 32px rgba(91, 140, 255, 0.45),
    0 0 48px rgba(42, 92, 168, 0.3);
}
.ngh-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 12px 40px rgba(91, 140, 255, 0.55),
    0 0 60px rgba(42, 92, 168, 0.4);
}
.ngh-btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ngh-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* --- Kafelki obszarów --- */
.ngh-section-title {
  margin: 0 0 28px;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: center;
}
.ngh-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}
.ngh-card {
  position: relative;
  display: flex;
  cursor: pointer;
  flex-direction: column;
  background: var(--ngh-card);
  border: 1px solid var(--ngh-border);
  border-radius: 20px;
  padding: 22px 20px 18px;
  min-height: 340px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: scale(1);
  opacity: 1;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
  will-change: transform;
  z-index: 1;
}
/* Hover: aktywny kafelek rośnie, pozostałe maleją */
.ngh-cards:hover .ngh-card {
  transform: scale(0.92);
  opacity: 0.55;
}
.ngh-cards:hover .ngh-card:hover {
  transform: scale(1.07);
  opacity: 1;
  z-index: 3;
  border-color: rgba(91, 140, 255, 0.45);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(91, 140, 255, 0.18);
}
.ngh-card__visual {
  width: 100%;
  height: 150px;
  display: block;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  flex-shrink: 0;
}
.ngh-card__visual picture {
  display: block;
  width: 100%;
  height: 100%;
}
.ngh-card__visual img,
.ngh-card__visual picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
  background: transparent;
}
.ngh-card--sport .ngh-card__visual { overflow: hidden; }
.ngh-card--sport .ngh-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.22);
  transform-origin: center center;
}
.ngh-card__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.ngh-card__desc {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ngh-muted);
  flex: 1;
}
.ngh-card__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
a.ngh-card:focus-visible {
  outline: 2px solid rgba(91, 140, 255, 0.8);
  outline-offset: 3px;
}

/* --- Ciasteczko (info o cookies, tylko homepage) --- */
.ngh-cookie {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(280px, calc(100vw - 36px));
  pointer-events: none;
  opacity: 0;
  transform: translate(-24px, 36px) scale(0.92);
}
.ngh-cookie.is-in {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ngh-cookie__icon {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
  animation: ngh-cookie-bob 3.6s ease-in-out infinite;
  animation-play-state: paused;
}
.ngh-cookie.is-in .ngh-cookie__icon { animation-play-state: running; }
.ngh-cookie__svg {
  display: block;
  width: 56px;
  height: 56px;
}
.ngh-cookie__bubble {
  pointer-events: auto;
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: max-content;
  max-width: min(280px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 18, 26, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  visibility: hidden;
}
.ngh-cookie__bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}
.ngh-cookie__bubble.is-gone {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  visibility: hidden;
}
.ngh-cookie__bubble::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(18, 18, 26, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}
.ngh-cookie__text {
  margin: 0;
  font-family: 'Lato', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}
.ngh-cookie__link {
  color: #8ec5ff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}
.ngh-cookie__link:hover { color: #9fd0ff; }
@keyframes ngh-cookie-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

/* =============================================================================
   RESPONSIVE — każdy breakpoint tylko raz
   ============================================================================= */

@media (max-width: 980px) {
  .ngh-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  /* Pełne zdjęcia na kartach — bez object-fit: cover */
  .ngh-card__visual,
  .ngh-card--sport .ngh-card__visual {
    height: auto !important;
    overflow: visible;
  }
  .ngh-card__visual picture { height: auto; }
  .ngh-card__visual img,
  .ngh-card__visual picture img,
  .ngh-card--sport .ngh-card__visual img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    border-radius: 14px;
  }
}

@media (max-width: 560px) {
  .ngh-page { padding: 48px 16px 72px; overflow-x: hidden; }
  .ngh-hero { text-align: center; padding: 28px 0 48px; }
  .ngh-title {
    text-align: center;
    font-size: clamp(1.65rem, 8vw, 2.2rem);
    max-width: 100%;
  }
  .ngh-subtitle {
    text-align: center;
    max-width: 100%;
  }
  .ngh-section-title {
    text-align: center;
    margin-bottom: 20px;
  }
  .ngh-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ngh-cards:hover .ngh-card {
    transform: scale(1);
    opacity: 1;
  }
  .ngh-cards:hover .ngh-card:hover { transform: scale(1.02); }
  .ngh-card {
    min-height: auto;
    text-align: center;
    align-items: center;
  }
  .ngh-card__desc { text-align: center; }
  .ngh-card__tag { align-self: center; }
  .ngh-btn { width: 100%; }

  .ngh-cookie {
    left: 12px;
    bottom: 12px;
    max-width: min(240px, calc(100vw - 24px));
  }
  .ngh-cookie__icon,
  .ngh-cookie__svg {
    width: 48px;
    height: 48px;
  }
  .ngh-cookie__text { font-size: 0.72rem; }
}

/* Touch: bez efektu „powiększania” kafelków */
@media (hover: none) {
  .ngh-cards:hover .ngh-card,
  .ngh-cards:hover .ngh-card:hover {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ngh-cookie,
  .ngh-cookie__bubble { transition: none; }
  .ngh-cookie__icon { animation: none; }
}
