@import url("variables.css");
@import url("state.css");

/* =========================
   MENU / NAVBAR
   ========================= */

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: var(--spacing-md);
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 1999;
}

/* Lewa / prawa sekcja */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

/* ===== LOGO ===== */
/* TYLKO logo jest klikalne */
.logo {
  display: inline-flex;
  align-items: center;
  width: auto;
  position: static;

  font-weight: 700;
  font-size: var(--font-size-lg);
  letter-spacing: 1px;
}

.logo img {
  display: block;
  height: 70px; /* stabilniejszy niż % */
  width: auto;
}

/* ===== BURGER ===== */
.burger {
  width: 28px;
  height: 22px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background: none;
  border: none;
  padding: 0;
  cursor: pointer;

  position: relative;
  z-index: 1001;
}

/* Linie burgera – ZAWSZE widoczne */
.burger span {
  display: block;
  width: 100%;
  height: 3px;

  background-color: var(--color-primary);
  border-radius: 2px;
}

/* Subtelny hover (opcjonalny, bez psucia UX) */
.burger:hover span {
  background-color: var(--color-primary-hover);
}

/* ===== OVERLAY MENU ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1999;

  background: rgba(0, 0, 0, 0.4);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.7s ease;
}

.nav-panel {
  position: absolute;
  top: 0;
  right: 0;

  height: 100%;
  width: 60%;
  max-width: 420px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(0,0,0,0.15)
    ),
    var(--color-bg-soft);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.2);

  padding: var(--spacing-lg);

  transform: scale(0.98) translateX(100%);

  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.7s ease;

  will-change: transform, opacity;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay.open .nav-panel {
  transform: scale(1) translateX(0);
}

.nav-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);

  width: 36px;
  height: 36px;
  border-radius: 10px;

  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--color-text);

  font-size: 1.2rem;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background 0.2s, transform 0.2s;
}

.nav-close:hover {
  background: rgba(255,255,255,0.1);
  transform: rotate(90deg);
}



/* ===== LISTA MENU ===== */
.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-top: 40px;
  padding: 0;
}

.nav-menu a {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;

  display: block;
  text-align: center;
  transition: color 0.2s, transform 0.2s;
}

.nav-menu a:hover {
  color: var(--color-primary);
  transform: translateX(2px);
}

.nav-menu li {
  padding: 18px 0;
  position: relative;
    opacity: 0;
  transform: translateX(10px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.nav-overlay.open .nav-menu li {
  opacity: 1;
  transform: translateX(0);
}

.nav-menu li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.nav-footer {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 0;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  color: rgba(255,255,255,0.5);
}

.nav-brand {
  font-size: 0.75rem;
  letter-spacing: 2px;
  opacity: 0.7;
}

.nav-socials {
  display: flex;
  gap: 18px;
}

.nav-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bfc4c9;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.nav-socials a:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.nav-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;

  background: linear-gradient(
    180deg,
    transparent,
    rgba(255,140,60,0.4),
    transparent
  );
}


.nav-menu li:nth-child(1) { transition-delay: 0.05s; }
.nav-menu li:nth-child(2) { transition-delay: 0.1s; }
.nav-menu li:nth-child(3) { transition-delay: 0.15s; }


/* =========================
   KOMPONENTY OGÓLNE
   ========================= */

.card {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
}

.section-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

/* =========================
   MAP TILE (HOME)
   ========================= */

.maps-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  align-items: center;
  margin-top: 20px;
}

.home-maps-loading-state {
  min-height: 220px;
  justify-content: center;
}

.home-maps-loading-text {
  color: var(--color-text-muted);
  font-size: 1rem;
  text-align: center;
  padding: 8px 16px;
}

/* Kafelek */
.map-tile {
  position: relative;
  width: 90%;
  max-width: 900px;

  border-radius: var(--radius-md);
  overflow: hidden;

  cursor: pointer;

    background: #141414;

  border: 1px solid rgba(255,255,255,0.06);

  box-shadow:
    0 10px 24px rgba(0,0,0,0.45);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.map-tile:hover {
  transform: translateY(-3px);

  box-shadow:
    0 18px 36px rgba(0,0,0,0.6);

  border-color: rgba(255,140,60,0.35);
}

/* Zdjęcie */
.map-tile img {
  width: 100%;
  height: auto;
  display: block;
}

/* Overlay wspólny */
.map-tile-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Tytuł – lewy górny róg */
.map-tile-title {
  position: absolute;
  top: 16px;
  left: 16px;

  background: rgba(0, 0, 0, 0.55);
  padding: 8px 12px;
  border-radius: var(--radius-sm);

  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
}

/* Cena – prawy górny róg */
.map-tile-price {
  position: absolute;
  top: 16px;
  right: 16px;

  background: var(--color-primary);
  color: #000;

  padding: 6px 10px;
  border-radius: var(--radius-sm);

  font-size: var(--font-size-sm);
  font-weight: 600;
}

.map-tile-price-free {
  background: #0fbe3b;
  color: #0e2b1c;
  opacity: 0.8;
    position: absolute;
  top: 15px;
  right: 15px;

  padding: 8px 14px;
  border-radius: 10px;

  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.map-tile-price.owned {
  background: #3b82f6;   /* niebieski */
  color: #fff;
}



/* Liczba miejscówek – prawy dolny róg */
.map-tile-count {
  position: absolute;
  bottom: 16px;
  right: 16px;

  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--color-primary);
  color: var(--color-text);

  padding: 6px 10px;
  border-radius: var(--radius-sm);

  font-size: var(--font-size-sm);
}

/* =========================
   FOOTER
   ========================= */

.footer {
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-lg);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);

  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Brand */
.footer-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 1px;
}

.footer-description {
  font-size: var(--font-size-sm);
  color: var(--color-footer-text);
  max-width: 400px;
}

/* Linki */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-footer-text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
}

/* Social */
.footer-social {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bfc4c9;
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: #ff8a3d;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: block;
  margin-right: 0;
  transform-origin: center;
}

.social-icon--facebook {
  transform: scale(0.98);
}

.social-icon--facebook path {
  stroke: currentColor;
  stroke-width: 1.25;
}

.social-icon--instagram {
  transform: scale(0.93);
}

.social-icon--website {
  transform: scale(0.95);
}


/* Dół */
.footer-bottom {
  text-align: center;
  padding: var(--spacing-sm);
  font-size: var(--font-size-xs);
  color: var(--color-footer-text-muted);
  border-top: 1px solid var(--color-border);
}

/* Desktop */
@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}


/* ================= SCROLL TO TOP ================= */

#scrollTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;

  width: 48px;
  height: 48px;
  border-radius: 50%;

  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(6px);

  border: 1px solid var(--color-primary);
  color: var(--color-primary);

  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.2s ease;

  z-index: 1500;
}

#scrollTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scrollTopBtn:hover {
  background: rgba(255,140,60,0.18);
}

/* Gdy menu otwarte — chowamy przycisk */
.nav-overlay.open ~ #scrollTopBtn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
