/* ============================================================
   RESPONSIVE.CSS — breakpointok és reszponzív finomítások
   ============================================================ */

/* ---------- KÖZEPES DESKTOP (≤ 1280px) ----------
   Header páddingot csökkentünk, hogy a 3 elem ne ütközzön. */
@media (max-width: 1280px) {
  .site-header {
    padding: 0 clamp(1rem, 3vw, 2rem);
  }

  .nav-primary {
    gap: 1.5rem;
  }
}

/* ---------- TABLET (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  :root {
    --grid-cols-desktop: 2;
  }

  .projects {
    grid-template-columns: repeat(var(--grid-cols-tablet), 1fr);
  }

  .brand-name {
    font-size: clamp(1rem, 0.9rem + 0.6vw, 1.375rem);
  }

  .lightbox__title {
    font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
  }
}

/* ---------- KÖZEPES TABLET (≤ 880px) ---------- */
@media (max-width: 880px) {
  .nav-utility {
    gap: 0.875rem;
  }

  .nav-utility a,
  .nav-utility button {
    width: 1.5rem;
    height: 1.5rem;
  }

  .nav-utility svg {
    width: 1rem;
    height: 1rem;
  }
}

/* ---------- MOBIL (≤ 720px) ---------- */
@media (max-width: 720px) {
  :root {
    --header-height: var(--header-height-mobile);
  }

  .site-header {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 1rem;
  }

  .nav-primary {
    display: none;
  }

  .nav-utility {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
  }

  .brand-tagline {
    font-size: 0.625rem;
    letter-spacing: 0.18em;
  }

  .projects {
    grid-template-columns: repeat(var(--grid-cols-mobile), 1fr);
  }

  .project-card {
    aspect-ratio: 16 / 10;
  }

  .project-card__overlay {
    opacity: 1;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 50%,
      rgba(0, 0, 0, 0.78) 100%
    );
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    padding: 1rem 1.25rem;
  }

  .project-card__title {
    text-align: left;
    font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1.125rem);
    max-width: 100%;
  }

  .project-card__category {
    text-align: left;
  }

  .project-card:hover .project-card__media {
    filter: none;
    transform: none;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
  }

  .nav-overlay {
    overflow-y: auto;
    padding: 4rem 1.5rem 6rem;
  }

  .lightbox {
    padding: 0.75rem;
  }

  .lightbox__inner {
    gap: 0.75rem;
  }

  .lightbox__title {
    font-size: 1rem;
  }

  .contact {
    padding-top: clamp(2rem, 6vw, 4rem);
  }

  .contact__bio {
    max-width: 28rem;
    line-height: 1.6;
  }
}

/* ---------- KIS MOBIL (≤ 480px) ---------- */
@media (max-width: 480px) {
  :root {
    --space-page-x: 1rem;
  }

  .brand-name {
    font-size: 1.0625rem;
    letter-spacing: 0.14em;
  }

  .project-card__overlay {
    padding: 0.875rem 1rem;
  }

  .site-footer {
    padding: clamp(1.5rem, 4vw, 3rem) var(--space-page-x);
  }
}

/* ---------- ALACSONY VIEWPORT MAGASSÁG (landscape phone) ---------- */
@media (max-height: 500px) and (max-width: 720px) {
  .nav-overlay {
    justify-content: flex-start;
    padding-top: 4rem;
    gap: 1.25rem;
  }

  .nav-overlay-utility {
    position: static;
    margin-top: 1.5rem;
  }
}

/* ---------- ÉRINTŐS ESZKÖZÖK ---------- */
@media (hover: none) {
  .project-card__overlay {
    opacity: 1;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.72) 100%
    );
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    padding: 1rem 1.25rem;
  }

  .project-card__title {
    text-align: left;
  }

  .project-card__category {
    text-align: left;
  }

  .project-card:hover .project-card__media {
    filter: none;
    transform: none;
  }
}

/* ---------- MOTION SAFE ---------- */
@media (prefers-reduced-motion: reduce) {
  .project-card__media,
  .project-card__overlay,
  .lightbox__inner,
  .nav-overlay {
    transition-duration: 0.01ms !important;
  }
}
