/* ============================================
   Projekty Manager — Main Stylesheet v1.8.2
   ============================================ */

/* --- Tokens --- */
:root {
  --pm-blue:       #009fe3;
  --pm-blue-dark:  #1d4ed8;
  --pm-blue-light: #eff6ff;
  --pm-blue-badge: #3b82f6;
  --pm-text:       #111827;
  --pm-text-muted: #6b7280;
  --pm-text-faint: #9ca3af;
  --pm-bg:         #f9fafb;
  --pm-surface:    #ffffff;
  --pm-border:     rgba(0,0,0,.09);
  --pm-radius:     .75rem;
  --pm-radius-sm:  .5rem;
  --pm-shadow-sm:  0 1px 3px rgba(0,0,0,.07),0 1px 2px rgba(0,0,0,.05);
  --pm-shadow-md:  0 4px 16px rgba(0,0,0,.08);
  --pm-shadow-lg:  0 12px 32px rgba(0,0,0,.10);
  --pm-transition: 160ms cubic-bezier(.16,1,.3,1);
  --pm-font:       -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}

/* --- Page wrapper --- */
.pm-page-main { background: var(--pm-bg); min-height: 60vh; }
.pm-page-container { max-width: 1440px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.pm-page-heading { font-size: clamp(1.5rem,2.5vw,2rem); font-weight:700; color:var(--pm-text); margin-bottom:2rem; }

/* ============================================
   ARCHIVE — toolbar + grid
   ============================================ */
.pm-archive { font-family: var(--pm-font); }

.pm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.pm-search-wrap { position: relative; flex: 1 1 260px; }
.pm-search-icon {
  position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--pm-text-faint); pointer-events: none;
}
.pm-search-input {
  width: 100%;
  padding: .6rem .9rem .6rem 2.5rem;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  font-size: .95rem;
  background: var(--pm-surface);
  color: var(--pm-text);
  box-shadow: var(--pm-shadow-sm);
  transition: border-color var(--pm-transition), box-shadow var(--pm-transition);
  outline: none;
}
.pm-search-input:focus {
  border-color: var(--pm-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.pm-filter-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.pm-filter-btn {
  padding: .5rem 1.1rem;
  border: 1.5px solid var(--pm-border);
  border-radius: var(--pm-radius);
  background: var(--pm-surface);
  color: var(--pm-text-muted);
  font-size: .875rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--pm-transition);
}
.pm-filter-btn:hover { border-color: var(--pm-blue); color: var(--pm-blue); }
.pm-filter-btn.active {
  background: var(--pm-blue); border-color: var(--pm-blue);
  color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25);
}

/* Grid */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* Card */
.pm-card {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  overflow: hidden;
  box-shadow: var(--pm-shadow-sm);
  transition: box-shadow var(--pm-transition), transform var(--pm-transition);
}
.pm-card:hover { box-shadow: var(--pm-shadow-lg); transform: translateY(-3px); }
.pm-card.pm-hidden { display: none; }
.pm-card-link { display: block; text-decoration: none; color: inherit; }
.pm-card-image { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #e5e7eb; }
.pm-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.pm-card:hover .pm-card-img { transform: scale(1.04); }
.pm-card-img-placeholder { width:100%; height:100%; background: linear-gradient(135deg,#e5e7eb,#d1d5db); }

/* Status badge */
.pm-status-badge {
  position: absolute; top: .75rem; right: .75rem;
  padding: .3rem .8rem;
  border-radius: var(--pm-radius);
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  backdrop-filter: blur(4px);
}
.pm-status-w_realizacji { background: var(--pm-blue); color: #fff; }
.pm-status-zakonczone   { background: #6b7280; color: #fff; }

/* Card body */
.pm-card-body { padding: 1.25rem 1.25rem 1.5rem; }
.pm-card-category {
  display: inline-block; font-size: .78rem; font-weight: 600;
  color: var(--pm-blue); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .5rem;
}
.pm-card-title {
  font-size: 1.05rem; font-weight: 700; color: var(--pm-text);
  margin: 0 0 .6rem; line-height: 1.35;
  transition: color var(--pm-transition);
}
.pm-card:hover .pm-card-title { color: var(--pm-blue); }
.pm-card-excerpt { font-size: .875rem; color: var(--pm-text-muted); line-height: 1.55; margin-bottom: .9rem; }
.pm-card-date {
  display: flex; align-items: center; gap: .4rem;
  font-size: .82rem; color: var(--pm-text-faint); margin-bottom: .9rem;
}
.pm-card-date svg { flex-shrink: 0; }
.pm-card-more { display: inline-block; font-size: .875rem; font-weight: 600; color: var(--pm-blue); }

/* Empty state */
.pm-empty, .pm-no-results {
  grid-column: 1/-1;
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; padding: 4rem 2rem;
  color: var(--pm-text-muted); text-align: center;
}
.pm-no-results { padding: 3rem 2rem; }

/* ============================================
   SINGLE PROJECT
   ============================================ */
.pm-single { font-family: var(--pm-font); }

/* Breadcrumb — pełna szerokość */
.pm-breadcrumb {
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
  margin-left:  calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-top:    .7rem;
  padding-bottom: .7rem;
  padding-left:  calc(50vw - 50% + 1.5rem);
  padding-right: calc(50vw - 50% + 1.5rem);
}
.pm-back-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .875rem; font-weight: 500;
  color: #6b7280; text-decoration: none;
  transition: color 160ms ease;
}
.pm-back-link:hover { color: #2563eb; }
.pm-back-link svg { flex-shrink: 0; }

/* Hero — proporcje jak w prototypie: tekst trochę szerszy od zdjęcia */
.pm-single-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}
.pm-single-hero-content { display: flex; flex-direction: column; align-items: flex-start; }
.pm-single-hero-content .pm-status-badge {
  position: static; display: inline-block; margin-bottom: 1rem;
}
.pm-single-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--pm-text);
  line-height: 1.2; margin: 0 0 1rem;
}
.pm-single-excerpt {
  font-size: 1rem; color: var(--pm-text-muted);
  line-height: 1.65; margin-bottom: 1rem; max-width: 55ch;
}
.pm-single-period {
  display: flex; align-items: center; gap: .5rem;
  font-size: .9rem; color: var(--pm-text-muted);
}
.pm-single-period svg { flex-shrink: 0; color: #9ca3af; }
.pm-single-period strong { color: var(--pm-text); font-weight: 600; }
.pm-single-hero-image {
  border-radius: var(--pm-radius);
  overflow: hidden;
  box-shadow: var(--pm-shadow-md);
}
.pm-single-hero-image img {
  width: 100%; height: 300px;
  object-fit: cover; display: block;
}

/* Layout: 2fr + stała sidebar 320px */
.pm-single-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2.5rem;
  align-items: start;
}

/* Sections */
.pm-section { margin-bottom: 2.5rem; }
.pm-section-title {
  font-size: 1.25rem; font-weight: 700; color: var(--pm-text);
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--pm-border);
}

/* Goals — niebieskie kółko z ikoną target (Lucide) */
.pm-goals-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.pm-goal-item { display: flex; align-items: flex-start; gap: .75rem; font-size: .95rem; color: var(--pm-text-muted); line-height: 1.6; }
.pm-goal-icon {
  width: 1.5rem; height: 1.5rem; min-width: 1.5rem;
  border-radius: 50%;
  background: var(--pm-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: .1rem;
}
.pm-goal-icon svg { width: 14px; height: 14px; stroke: #fff; }

/* Actions grid */
.pm-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.pm-action-card {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius-sm);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--pm-shadow-sm);
}
.pm-action-title { font-size: .95rem; font-weight: 700; color: var(--pm-text); margin: 0 0 .4rem; }
.pm-action-desc  { font-size: .875rem; color: var(--pm-text-muted); line-height: 1.5; margin: 0; }

/* Results — border-left-4 blue, jasne tło, ✓ tekstowy */
.pm-results-box {
  background: var(--pm-blue-light);
  border-left: 4px solid var(--pm-blue);
  border-radius: var(--pm-radius-sm);
  padding: 1.25rem 1.5rem;
}
.pm-results-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .65rem; }
.pm-results-list li { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--pm-text); }
.pm-results-check { font-weight: 700; color: var(--pm-blue); flex-shrink: 0; font-size: 1rem; line-height: 1.55; }

/* Sidebar */
.pm-single-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.pm-sidebar-box {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius-sm);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--pm-shadow-sm);
}
.pm-sidebar-box h3 {
  font-size: .88rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--pm-text); margin: 0 0 .65rem;
}
.pm-sidebar-box p { font-size: .875rem; color: var(--pm-text-muted); line-height: 1.55; margin: 0; }

/* Partners — ikona users (dwie sylwetki) */
.pm-partners-list, .pm-downloads-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.pm-partners-list li {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .875rem; color: var(--pm-text-muted);
}
.pm-partners-list li svg { flex-shrink: 0; margin-top: .15rem; color: var(--pm-blue); }

/* Downloads */
.pm-downloads-list a {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; color: var(--pm-blue);
  text-decoration: none;
  transition: color var(--pm-transition);
}
.pm-downloads-list a:hover { color: var(--pm-blue-dark); text-decoration: underline; }

/* CTA box */
.pm-sidebar-cta { background: var(--pm-blue) !important; border-color: transparent !important; }
.pm-sidebar-cta h3 { color: #fff !important; }
.pm-sidebar-cta p  { color: rgba(255,255,255,.9) !important; margin-bottom: 1rem !important; }
.pm-btn-primary {
  display: block; text-align: center;
  background: #fff; color: var(--pm-blue);
  font-weight: 700; font-size: .9rem;
  padding: .7rem 1rem;
  border-radius: var(--pm-radius-sm);
  text-decoration: none;
  transition: background var(--pm-transition);
}
.pm-btn-primary:hover { background: #f0f4ff; }

/* ============================================
   HERO SHORTCODE [projekty_hero]
   ============================================ */
.pm-hero-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  padding: 3.5rem 1.5rem; width: 100%;
}
.pm-hero-inner { max-width: 1200px; margin: 0 auto; }
.pm-hero-title {
  font-family: var(--pm-font);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; color: #fff;
  margin: 0 0 .75rem; line-height: 1.15;
}
.pm-hero-subtitle {
  font-family: var(--pm-font);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255,255,255,.88);
  margin: 0; max-width: 65ch; line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) and (min-width: 641px) {
  .pm-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pm-single-hero { grid-template-columns: 1fr; }
  .pm-single-hero-image { order: -1; }
  .pm-single-hero-image img { height: 220px; }
  .pm-single-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pm-toolbar { flex-direction: column; align-items: stretch; }
  .pm-filter-buttons { justify-content: flex-start; }
  .pm-actions-grid { grid-template-columns: 1fr; }
  .pm-page-container { padding: 1.5rem 1rem; }
  .pm-hero-banner { padding: 2.5rem 1rem; }
}
