/* =====================================================
   OSOBY — LIST PAGE + DETAIL PAGE (firma-style)
===================================================== */

/* ===== HERO (list page) ===== */
.os-hero{
  position:relative;overflow:hidden;
  min-height:140px;
  display:flex;align-items:center;
}
.os-hero-bg{
  position:absolute;inset:0;
  background:linear-gradient(135deg,#2f2559 0%,#3b2f7f 40%,#6c5ce7 100%);
}
.os-hero-bg::after{
  content:'';position:absolute;inset:0;
  background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.os-hero-in{
  position:relative;z-index:2;color:#fff;
  max-width:1200px;margin:0 auto;padding:0 20px;
  display:flex;align-items:center;gap:18px;
}
.os-hero-icon{
  flex:0 0 auto;width:56px;height:56px;border-radius:16px;
  background:rgba(255,255,255,.15);
  display:flex;align-items:center;justify-content:center;
  backdrop-filter:blur(4px);
}
.os-hero-icon svg{ width:30px;height:30px; }
.os-hero-text h1{ font-size:22px;font-weight:800;margin:0 0 2px;line-height:1.2; }
.os-hero-text p{ font-size:14px;opacity:.8;margin:0; }

/* ===== FILTERS (list page) ===== */
.os-filters{
  display:flex;flex-wrap:wrap;gap:8px;
  margin:0 0 18px;align-items:center;
}
.os-filters select,
.os-filters input{
  height:38px;padding:0 12px;border-radius:10px;
  border:1px solid rgba(59,47,127,.15);font-size:13px;
  background:#fff;color:#333;outline:none;
  transition:border .2s,box-shadow .2s;
}
.os-filters select:focus,
.os-filters input:focus{
  border-color:#3b2f7f;box-shadow:0 0 0 3px rgba(59,47,127,.1);
}
.os-filters input{ min-width:200px; }

/* ===== GRID (list page) ===== */
.os-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));
  gap:16px;
}
.os-item{ display:flex; }

/* ===== CARD (shared: list + carousel) ===== */
.os-card{
  width:100%;display:flex;flex-direction:column;align-items:center;
  background:#fff;border-radius:14px;padding:22px 16px 18px;
  box-shadow:0 2px 10px rgba(0,0,0,.05);
  transition:all .3s cubic-bezier(.25,.8,.25,1);
  border:1px solid rgba(59,47,127,.08);
  position:relative;overflow:hidden;
  text-decoration:none;color:inherit;
}
.os-card::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,#3b2f7f,#6c5ce7);
  transform:scaleX(0);transition:transform .3s;transform-origin:left;
}
.os-card:hover{ box-shadow:0 8px 28px rgba(59,47,127,.12);transform:translateY(-4px); }
.os-card:hover::before{ transform:scaleX(1); }

/* AVATAR (card) */
.os-avatar{
  width:80px;height:80px;border-radius:50%;
  background:linear-gradient(135deg,#e9e6f5,#d4cff0);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;margin-bottom:12px;
  box-shadow:0 3px 10px rgba(59,47,127,.1);
}
.os-avatar img{ width:100%;height:100%;object-fit:cover;border-radius:50%; }
.os-initials{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-size:24px;font-weight:800;color:#3b2f7f;
  text-transform:uppercase;letter-spacing:1px;
}

/* NAME / FUNCTION / LOC (card) */
.os-name{
  font-size:15px;font-weight:700;text-align:center;line-height:1.3;
  margin:0 0 4px;min-height:36px;
  display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;color:#1a1a2e;
}
.os-function{ font-size:12px;color:#64748b;text-align:center;margin-bottom:6px;font-weight:600; }
.os-loc{ font-size:12px;color:#64748b;display:flex;align-items:center;gap:3px;margin-bottom:8px; }
.os-loc svg{ width:13px;height:13px;fill:#3b2f7f;flex-shrink:0; }

/* VOTES BAR (card) */
.os-votes{ width:100%;margin-top:auto;padding-top:8px; }
.os-vote-bar{ width:100%;height:6px;border-radius:3px;background:#fee2e2;overflow:hidden; }
.os-vote-fill{ height:100%;border-radius:3px;background:linear-gradient(90deg,#22c55e,#16a34a);transition:width .4s ease; }
.os-vote-labels{ display:flex;justify-content:space-between;font-size:11px;margin-top:4px;font-weight:600; }
.os-vote-up{ color:#16a34a; }
.os-vote-down{ color:#dc2626; }
.os-badge-new{
  display:inline-flex;align-items:center;gap:3px;
  padding:2px 8px;border-radius:20px;
  background:linear-gradient(135deg,#f0fdf4,#dcfce7);
  color:#166534;font-size:11px;font-weight:600;margin-top:auto;
}
.os-partia{ font-size:11px;color:#94a3b8;margin-top:4px;text-align:center; }

/* ===== PAGINATION (list page) ===== */
.os-pag{ display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin:18px 0; }
.os-pag-info{ font-size:13px;color:#64748b; }
.os-pag-pages{ display:flex;gap:4px;align-items:center;flex-wrap:wrap; }
.os-pg{
  min-width:32px;height:32px;padding:0 10px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px;background:#fff;
  border:1px solid rgba(59,47,127,.1);color:#3b2f7f;
  text-decoration:none;font-weight:600;font-size:13px;transition:all .2s;
}
.os-pg:hover{ background:#f0eef9;border-color:#3b2f7f; }
.os-cur{ background:#3b2f7f!important;color:#fff!important;border-color:#3b2f7f!important; }
.os-dots{ background:transparent!important;border:none!important;color:#94a3b8!important;pointer-events:none; }


/* =====================================================
   OSOBA DETAIL PAGE (firma-style with tabs)
===================================================== */

/* ── FRM CLASSES (copied from firma.css for osoba page) ── */
.frm-wrapper{
  padding-top:20px;
  padding-bottom:40px;
}
.frm-tabs{
  display:flex;
  gap:2px;
  border-bottom:2px solid #e9e6f5;
  margin-bottom:20px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.frm-tab{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:12px 18px;
  border:none;
  background:none;
  cursor:pointer;
  font-size:14px;
  font-weight:600;
  color:#777;
  white-space:nowrap;
  border-bottom:3px solid transparent;
  margin-bottom:-2px;
  transition:all .2s;
}
.frm-tab:hover{
  color:#3b2f7f;
  background:rgba(59,47,127,.04);
}
.frm-tab.active{
  color:#3b2f7f;
  border-bottom-color:#3b2f7f;
}
.frm-tab svg{
  flex-shrink:0;
  opacity:.65;
}
.frm-tab.active svg{
  opacity:1;
}
.frm-tab-count{
  background:#3b2f7f;
  color:#fff;
  font-size:11px;
  font-weight:800;
  padding:2px 7px;
  border-radius:999px;
  min-width:20px;
  text-align:center;
}
.frm-tab-panel{
  display:none;
}
.frm-tab-panel.active{
  display:block;
  animation:frmFadeIn .25s ease;
}
@keyframes frmFadeIn{
  from{opacity:0;transform:translateY(6px)}
  to{opacity:1;transform:translateY(0)}
}
.frm-card{
  background:#fff;
  border-radius:16px;
  padding:24px;
  box-shadow:0 2px 12px rgba(0,0,0,.06);
  border:1px solid #f0eff5;
}
.frm-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  text-align:center;
  padding:40px 20px;
  color:#999;
}
.frm-empty-state strong{
  color:#666;
  font-size:16px;
}
.frm-empty-state span{
  font-size:13px;
}
/* Timeline */
.frm-timeline{
  position:relative;
  padding-left:24px;
}
.frm-timeline::before{
  content:'';
  position:absolute;
  left:7px;
  top:4px;
  bottom:4px;
  width:2px;
  background:#e0dce8;
}
.frm-timeline-item{
  position:relative;
  padding:0 0 16px;
}
.frm-timeline-item:last-child{
  padding-bottom:0;
}
.frm-timeline-dot{
  position:absolute;
  left:-21px;
  top:2px;
  width:12px;
  height:12px;
  border-radius:50%;
  border:2px solid #e0dce8;
  background:#fff;
}
.frm-timeline-active .frm-timeline-dot{
  border-color:#2e7d32;
  background:#2e7d32;
}
.frm-timeline-content{
  display:flex;
  align-items:baseline;
  gap:10px;
}
.frm-timeline-date{
  font-weight:700;
  font-size:13px;
  color:#333;
  min-width:80px;
}
.frm-timeline-label{
  font-size:13px;
  color:#666;
}

/* TOPBAR INITIALS PLACEHOLDER */
.oso-topbar-initials{
  width:120px;height:120px;border-radius:18px;
  background:linear-gradient(135deg,#3b2f7f,#6366f1);
  display:flex;align-items:center;justify-content:center;
  font-size:40px;font-weight:900;color:#fff;
  letter-spacing:2px;text-transform:uppercase;
  box-shadow:0 4px 20px rgba(59,47,127,.15);
}

/* TOPBAR VOTES */
.oso-topbar-votes{
  display:inline-flex;align-items:center;gap:8px;
  font-size:14px;font-weight:600;
}
.oso-tv-up{ color:#22c55e; }
.oso-tv-down{ color:#ef4444; }
.oso-tv-sep{ color:rgba(255,255,255,.3); }
.oso-tv-total{ color:rgba(255,255,255,.6);font-weight:400;font-size:13px; }

/* BADGES */
.badge-loc,.badge-party,.badge-func{
  display:inline-flex;align-items:center;gap:4px;
  padding:4px 12px;border-radius:999px;
  font-size:12px;font-weight:600;white-space:nowrap;
}
.badge-loc{ background:rgba(255,255,255,.12);color:rgba(255,255,255,.85); }
.badge-party{ background:rgba(255,255,255,.12);color:rgba(255,255,255,.85); }
.badge-func{ background:rgba(255,255,255,.12);color:rgba(255,255,255,.85); }

/* FULL WIDTH LAYOUT */
.oso-main-full{
  max-width:900px;
  margin:0 auto;
  padding:20px 0;
}

/* SECTION TITLE */
.oso-section-title{
  font-size:20px;font-weight:800;color:#1a1a2e;
  margin:0 0 20px;
}

/* VOTE WIDGET (in tab) */
.oso-vote-widget{
  text-align:center;
}
.oso-vote-bar-wrap{
  margin-bottom:24px;
}
.oso-vote-bar-big{
  width:100%;height:18px;border-radius:9px;
  background:#fee2e2;overflow:hidden;margin-bottom:10px;
}
.oso-vote-fill-big{
  height:100%;border-radius:9px;
  background:linear-gradient(90deg,#22c55e,#16a34a);
  transition:width .6s ease;
}
.oso-vote-stats{
  display:flex;justify-content:space-between;
  font-size:14px;font-weight:600;
  flex-wrap:wrap;gap:8px;
}
.oso-vs-up{ color:#16a34a; }
.oso-vs-down{ color:#dc2626; }
.oso-vs-total{ color:#64748b;font-weight:400; }

.oso-vote-btns{
  display:flex;gap:16px;justify-content:center;flex-wrap:wrap;
  margin-top:20px;
}
.oso-btn-popieram,
.oso-btn-nie{
  padding:14px 36px;border-radius:12px;
  font-size:16px;font-weight:700;cursor:pointer;
  border:2px solid transparent;
  transition:all .2s;display:inline-flex;align-items:center;gap:8px;
}
.oso-btn-popieram{ background:#dcfce7;color:#166534;border-color:#22c55e; }
.oso-btn-popieram:hover{ background:#22c55e;color:#fff;box-shadow:0 4px 16px rgba(34,197,94,.3); }
.oso-btn-nie{ background:#fee2e2;color:#991b1b;border-color:#ef4444; }
.oso-btn-nie:hover{ background:#ef4444;color:#fff;box-shadow:0 4px 16px rgba(239,68,68,.3); }

.oso-vote-thanks{
  padding:14px 32px;background:#f0fdf4;border-radius:12px;
  color:#166534;font-weight:700;font-size:16px;
}

/* QUICK INFO GRID */
.oso-quick-info{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:12px;
  margin-top:28px;
  padding-top:24px;
  border-top:2px solid #e9e6f5;
}
.oso-qi-item{
  padding:12px 16px;
  background:#f8f7fc;
  border-radius:10px;
  border:1px solid #e9e6f5;
}
.oso-qi-label{
  font-size:11px;font-weight:600;color:#94a3b8;
  text-transform:uppercase;letter-spacing:.5px;
  margin-bottom:4px;
}
.oso-qi-value{
  font-size:14px;font-weight:700;color:#1a1a2e;
}

/* DESCRIPTION */
.oso-description{
  font-size:15px;line-height:1.8;color:#333;
}
.oso-description h3{
  font-size:16px;font-weight:800;color:#1a1a2e;margin:0 0 12px;
}
.oso-description p{
  margin:0 0 12px;
}

/* GALLERY */
.oso-gallery{
  margin-top:24px;padding-top:20px;border-top:2px solid #e9e6f5;
}
.oso-gallery h3{
  font-size:16px;font-weight:800;color:#1a1a2e;margin:0 0 12px;
}
.oso-gallery-grid{
  display:grid;grid-template-columns:repeat(auto-fill, minmax(200px,1fr));gap:12px;
}
.oso-gallery-grid img{
  width:100%;height:200px;object-fit:cover;border-radius:12px;
  border:1px solid #e9e6f5;
}

/* SOURCE LINK */
.oso-source-link{
  margin-top:20px;padding-top:16px;border-top:1px solid #f0eef9;
  font-size:13px;color:#64748b;
  display:flex;align-items:center;gap:6px;
}
.oso-source-link a{ color:#3b2f7f;font-weight:600;text-decoration:none; }
.oso-source-link a:hover{ text-decoration:underline; }

/* CATEGORIES */
.oso-categories{
  margin-top:20px;padding-top:16px;border-top:2px solid #e9e6f5;
}
.oso-categories h3{
  font-size:16px;font-weight:800;color:#1a1a2e;margin:0 0 10px;
}
.oso-cat-list{
  display:flex;flex-wrap:wrap;gap:8px;
}
.oso-cat-tag{
  display:inline-block;padding:5px 14px;
  background:#e9e6f5;border-radius:999px;
  font-size:13px;font-weight:600;color:#3b2f7f;
  text-decoration:none;transition:background .2s;
}
.oso-cat-tag:hover{ background:#d4cff0; }

/* TIMELINE (reuse frm-timeline from firma.css) */
.oso-timeline-section h3{
  display:flex;align-items:center;gap:8px;
  font-size:16px;font-weight:800;color:#1a1a2e;margin:0 0 16px;
}

/* OPINIONS LIST (detail) */
.oso-opinions-list{
  display:flex;flex-direction:column;gap:16px;
  margin-bottom:24px;
}
.oso-opinion-card{
  padding:18px;
  background:#f8f7fc;
  border-radius:12px;
  border:1px solid #e9e6f5;
}
.oso-opinion-header{
  display:flex;align-items:center;gap:12px;
  margin-bottom:10px;
}
.oso-opinion-avatar{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,#3b2f7f,#6366f1);
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:800;color:#fff;
  text-transform:uppercase;flex-shrink:0;
}
.oso-opinion-meta{
  display:flex;flex-direction:column;
}
.oso-opinion-author{
  font-size:14px;font-weight:700;color:#1a1a2e;
}
.oso-opinion-date{
  font-size:12px;color:#94a3b8;
}
.oso-opinion-body{
  font-size:14px;line-height:1.7;color:#555;
}

/* OPINION FORM (detail) */
.oso-opinion-form{
  background:#f0eef9;border-radius:14px;padding:24px;
  margin-top:20px;
}
.oso-opinion-form h3{
  font-size:16px;font-weight:800;color:#3b2f7f;margin:0 0 14px;
}
.oso-opinion-form textarea{
  width:100%;min-height:100px;border:1px solid #d4cff0;border-radius:10px;
  padding:14px;font-size:14px;resize:vertical;outline:none;
  background:#fff;transition:border .2s;font-family:inherit;
}
.oso-opinion-form textarea:focus{
  border-color:#3b2f7f;box-shadow:0 0 0 3px rgba(59,47,127,.1);
}
.oso-form-row{
  display:flex;gap:10px;margin-top:10px;align-items:stretch;
}
.oso-form-row input[type="text"]{
  flex:1;height:44px;border:1px solid #d4cff0;border-radius:10px;
  padding:0 14px;font-size:14px;outline:none;background:#fff;
  transition:border .2s;
}
.oso-form-row input[type="text"]:focus{ border-color:#3b2f7f; }
.oso-form-submit{
  padding:0 28px;height:44px;
  background:#3b2f7f;color:#fff;border:none;border-radius:10px;
  font-weight:700;font-size:14px;cursor:pointer;
  display:inline-flex;align-items:center;gap:8px;
  transition:background .2s;white-space:nowrap;
}
.oso-form-submit:hover{ background:#2f2559; }

/* BACK LINK (detail) */
.oso-back-link{
  margin-top:24px;padding-top:16px;
  border-top:1px solid #e9e6f5;
}
.oso-back-link a{
  display:inline-flex;align-items:center;gap:8px;
  color:#3b2f7f;font-weight:600;font-size:14px;
  text-decoration:none;transition:gap .2s;
}
.oso-back-link a:hover{ gap:12px; }

/* ===== RESPONSIVE ===== */
@media (max-width:640px){
  .os-hero-in{ gap:12px; }
  .os-hero-text h1{ font-size:18px; }
  .os-hero-icon{ width:44px;height:44px; }
  .os-hero-icon svg{ width:24px;height:24px; }
  .os-filters{ gap:6px; }
  .os-filters input{ min-width:100%; }
  .os-grid{ grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));gap:12px; }
  .os-card{ padding:16px 12px 14px; }
  .os-avatar{ width:64px;height:64px; }
  .os-pag{ justify-content:center; }
  .os-pag-info{ width:100%;text-align:center; }

  /* Detail page */
  .oso-topbar-initials{ width:80px;height:80px;font-size:28px;border-radius:14px; }
  .oso-main-full{ padding:12px 0; }
  .oso-quick-info{ grid-template-columns:1fr; }
  .oso-vote-btns{ flex-direction:column; }
  .oso-btn-popieram,.oso-btn-nie{ width:100%;justify-content:center; }
  .oso-form-row{ flex-direction:column; }
  .oso-form-submit{ width:100%;justify-content:center; }
}
