/* =====================================================================
   Vegvis Adoption - Frontend v3
   Autor: Maciej Senderowski | RedRockS  https://redrocks.pl/
   ===================================================================== */
:root {
    --va-primary:   #f29100;
    --va-primary-d: #d47d00;
    --va-dark:      #2d2d2d;
    --va-muted:     #6b7280;
    --va-border:    #e5e7eb;
    --va-bg:        #f8f8f8;
    --va-white:     #ffffff;
    --va-radius:    10px;
    --va-shadow:    0 2px 16px rgba(0,0,0,.07);
    --va-shadow-h:  0 8px 32px rgba(0,0,0,.13);
    --va-t:         .18s ease;
}

/* ── Wrapper ─────────────────────────────────────────────────────────── */
.va-wrap { max-width: 1280px; margin: 0 auto; padding: 32px 20px 80px; }

/* ══════════════════════════════════════════════════════════════════════
   PASEK FILTRÓW (wizualny, 2-rzędowy)
   ══════════════════════════════════════════════════════════════════════ */

.va-filters-wrap {
    background: var(--va-white);
    border: 1px solid var(--va-border);
    border-radius: var(--va-radius);
    margin-bottom: 28px;
    box-shadow: var(--va-shadow);
    overflow: hidden;
}

/* Rząd 1 — Gatunek */
.va-species-bar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--va-border);
    background: var(--va-bg);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.va-species-bar::-webkit-scrollbar { display: none; }

.va-spc-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: var(--va-dark);
    white-space: nowrap;
    transition: all var(--va-t);
    flex-shrink: 0;
}
.va-spc-pill:hover { color: var(--va-primary); text-decoration: none; }
.va-spc-pill--active { background: var(--va-primary); color: #fff !important; }
.va-spc-icon { font-size: 20px; line-height: 1; display:flex; align-items:center; }
.va-spc-img  { width: 24px; height: 24px; object-fit: contain; filter: brightness(0); transition: filter var(--va-t); }
.va-spc-pill--active .va-spc-img { filter: brightness(0) invert(1); }
.va-spc-pill:hover .va-spc-img   { filter: brightness(0) saturate(100%) invert(55%) sepia(80%) saturate(500%) hue-rotate(10deg); }
.va-spc-label { font-size: 15px; }
.va-spc-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    background: rgba(0,0,0,.1); border-radius: 20px;
    font-size: 11px; font-weight: 700;
}
.va-spc-pill--active .va-spc-count { background: rgba(255,255,255,.3); }

/* Rząd 2 — Sub-filtry */
.va-subfilters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.va-subfilters-bar::-webkit-scrollbar { display: none; }

.va-sf-sep {
    width: 1px; height: 24px;
    background: var(--va-border);
    flex-shrink: 0;
    margin: 0 4px;
}

.va-sf-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--va-border);
    background: var(--va-white);
    color: var(--va-dark);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--va-t);
    flex-shrink: 0;
}
.va-sf-chip:hover { border-color: var(--va-primary); color: var(--va-primary); text-decoration: none; }
.va-sf-chip--active { background: var(--va-primary); border-color: var(--va-primary); color: #fff !important; }
.va-sf-chip--active:hover { color: #fff !important; }

/* SVG w sub-chipach */
.va-sf-img {
    width: 18px; height: 18px; object-fit: contain;
    filter: brightness(0);
    transition: filter var(--va-t);
    flex-shrink: 0;
}
.va-sf-chip--active .va-sf-img { filter: brightness(0) invert(1); }

/* Rozmiar — ta sama ikona pets.svg w różnych rozmiarach */
.va-sf-size-img { object-fit: contain; filter: brightness(0); transition: filter var(--va-t), width var(--va-t), height var(--va-t); }
.va-sf-chip--active .va-sf-size-img { filter: brightness(0) invert(1); }

.va-sf-size--micro  .va-sf-size-img { width: 12px; height: 12px; }
.va-sf-size--small  .va-sf-size-img { width: 16px; height: 16px; }
.va-sf-size--medium .va-sf-size-img { width: 20px; height: 20px; }
.va-sf-size--large  .va-sf-size-img { width: 25px; height: 25px; }
.va-sf-size--xlarge .va-sf-size-img { width: 30px; height: 30px; }

/* Wyczyść */
.va-sf-clear {
    margin-left: auto;
    font-size: 12px;
    color: var(--va-muted);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--va-border);
    flex-shrink: 0;
    transition: all var(--va-t);
}
.va-sf-clear:hover { border-color: #ef4444; color: #ef4444; text-decoration: none; }

/* Stare chipsy (kompatybilność) */
.va-active-filters { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:16px; }
.va-chip { display:inline-flex; align-items:center; gap:4px; padding:4px 12px; background:#fff8ee; border:1px solid #f5d08a; border-radius:20px; font-size:13px; color:var(--va-primary-d); font-weight:600; text-decoration:none; }
.va-chip:hover { background:#ffecc8; text-decoration:none; }
.va-clear-filters { font-size:13px; color:var(--va-muted); text-decoration:underline; margin-left:4px; }

/* ══════════════════════════════════════════════════
   ZAKŁADKI STATUSU (szuka domu / adoptowane / tęcza)
   ══════════════════════════════════════════════════ */
.va-status-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    margin-top: 8px;
    border-bottom: 2px solid var(--va-border);
}
.va-stab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--va-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all var(--va-t);
    white-space: nowrap;
}
.va-stab:hover { color: var(--va-dark); text-decoration: none; }
.va-stab-icon { font-size: 18px; }
.va-stab-count {
    background: var(--va-bg);
    border: 1px solid var(--va-border);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
}

/* Aktywne zakładki */
.va-stab--available.va-stab--active { color: var(--va-primary); border-bottom-color: var(--va-primary); }
.va-stab--available.va-stab--active .va-stab-count { background: #fff8ee; border-color: #f5d08a; color: var(--va-primary-d); }

.va-stab--adopted.va-stab--active { color: #e11d48; border-bottom-color: #e11d48; }
.va-stab--adopted.va-stab--active .va-stab-count { background: #fff1f2; border-color: #fda4af; color: #e11d48; }

.va-stab--rainbow.va-stab--active { color: #7c3aed; border-bottom-color: #7c3aed; }
.va-stab--rainbow.va-stab--active .va-stab-count { background: #f5f3ff; border-color: #c4b5fd; color: #7c3aed; }

/* ── Hero statusu ───────────────────────────────── */
.va-status-hero {
    border-radius: var(--va-radius);
    padding: 28px 32px;
    margin-bottom: 32px;
}
.va-status-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.va-status-hero-icon { font-size: 48px; flex-shrink: 0; }
.va-status-hero h2 { margin: 0 0 6px; font-size: 22px; }
.va-status-hero p  { margin: 0; font-size: 15px; opacity: .85; }

.va-status-hero--adopted {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border: 1px solid #fda4af;
    color: #881337;
}
.va-status-hero--rainbow {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #c4b5fd;
    color: #4c1d95;
}

/* Licznik adopcji */
.va-adopted-counter {
    margin-left: auto;
    text-align: center;
    flex-shrink: 0;
}
.va-adopted-number { display: block; font-size: 48px; font-weight: 800; line-height: 1; }
.va-adopted-label  { font-size: 13px; opacity: .7; }

/* Badge na zdjęciu */
.va-status-badge-special {
    position: absolute; bottom: 10px; left: 10px;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}
.va-badge-adopted { background: rgba(225,29,72,.9); color: #fff; }
.va-badge-rainbow { background: rgba(124,58,237,.85); color: #fff; font-size: 18px; padding: 4px 10px; }

/* Karty adoptowane — lekko "przygaszone" */
.va-card--adopted .va-card__photo-wrap { filter: saturate(.8); }
.va-card--adopted:hover .va-card__photo-wrap { filter: saturate(1); }
.va-card--deceased { opacity: .85; }
.va-card--deceased .va-card__name a { color: var(--va-muted); }

/* ── Licznik wyników ─────────────────────────────── */
.va-results-count { font-size:14px; color:var(--va-muted); margin-bottom:20px; }

/* ══════════════════════════════════════════════════════════════════════
   GRID KART
   ══════════════════════════════════════════════════════════════════════ */
.va-grid { display:grid; gap:24px; }
.va-grid--3col { grid-template-columns: repeat(3,1fr); }
.va-grid--2col { grid-template-columns: repeat(2,1fr); }
.va-grid--4col { grid-template-columns: repeat(4,1fr); }

@media (max-width:1100px) {
    .va-grid--4col { grid-template-columns: repeat(3,1fr); }
    .va-grid--3col { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:720px) {
    .va-grid--2col,.va-grid--3col,.va-grid--4col { grid-template-columns: 1fr; }
    .va-species-bar { flex-wrap: nowrap; }
}

/* ══════════════════════════════════════════════════════════════════════
   KARTA ZWIERZĘCIA
   ══════════════════════════════════════════════════════════════════════ */
.va-card {
    background: var(--va-white);
    border-radius: var(--va-radius);
    box-shadow: var(--va-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--va-t), box-shadow var(--va-t);
}
.va-card:hover { transform: translateY(-5px); box-shadow: var(--va-shadow-h); }

/* Zdjęcie */
.va-card__photo-wrap {
    position: relative; display: block;
    aspect-ratio: 4/3; overflow: hidden; background: var(--va-bg);
}
.va-card__img { width:100%; height:100%; object-fit:cover; transition: transform .4s ease; display:block; }
.va-card:hover .va-card__img { transform: scale(1.05); }
.va-card__no-photo { display:flex; align-items:center; justify-content:center; width:100%; height:100%; font-size:64px; color:#ddd; }

/* Status pill */
.va-status-pill {
    position: absolute; top:12px; left:12px;
    padding: 4px 11px; border-radius: 20px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.va-status--available { background: #16a34a; color:#fff; }
.va-status--reserved  { background: var(--va-primary); color:#fff; }
.va-status--adopted   { background: #94a3b8; color:#fff; }
.va-status--deceased  { background: #64748b; color:#fff; }

/* Ikony zdrowia */
.va-health-icons {
    position:absolute; bottom:10px; right:10px;
    display:flex; gap:4px;
    background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
    border-radius:20px; padding:3px 8px; font-size:13px;
}

/* Body */
.va-card__body { padding:16px 18px 18px; display:flex; flex-direction:column; flex:1; }
.va-card__top { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:8px; gap:8px; }
.va-card__name { margin:0; font-size:19px; font-weight:700; line-height:1.3; }
.va-card__name a { color:var(--va-dark); text-decoration:none; transition:color var(--va-t); }
.va-card__name a:hover { color:var(--va-primary); }
.va-gender-icon { font-size:20px; color:var(--va-muted); flex-shrink:0; margin-top:2px; }
.va-gender-icon-svg {
    width: 20px; height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) opacity(.45);
}

/* Chipsy */
.va-card__chips { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:10px; }
.va-card__chips .va-chip { background:var(--va-bg); border:1px solid var(--va-border); border-radius:20px; padding:3px 10px; font-size:12px; color:var(--va-muted); font-weight:500; }
.va-card__chips .va-chip--species { background:#fff8ee; border-color:#f5d08a; color:var(--va-primary-d); font-weight:700; }

/* Compat */
.va-card__compat { display:flex; gap:6px; margin-bottom:10px; }
.va-compat-icon { font-size:18px; }

.va-card__note { margin:0 0 14px; font-size:13px; color:var(--va-muted); line-height:1.5; flex:1; }

/* CTA */
.va-btn-adopt {
    display:block; text-align:center;
    padding:10px 0; background:var(--va-primary);
    color:#fff; border-radius:6px; font-size:14px; font-weight:700;
    text-decoration:none; transition:background var(--va-t); margin-top:auto;
}
.va-btn-adopt:hover { background:var(--va-primary-d); color:#fff; text-decoration:none; }

/* ── Paginacja ───────────────────────────────────── */
.va-pagination { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; margin-top:40px; }
.va-page-btn {
    display:inline-flex; align-items:center; justify-content:center;
    min-width:40px; height:40px; padding:0 12px;
    border:2px solid var(--va-border); border-radius:6px;
    color:var(--va-dark); text-decoration:none; font-weight:600; font-size:14px;
    transition:all var(--va-t);
}
.va-page-btn:hover,.va-page-btn--active { background:var(--va-primary); border-color:var(--va-primary); color:#fff; text-decoration:none; }

/* ── Puste wyniki ────────────────────────────────── */
.va-empty { text-align:center; padding:60px 20px; }
.va-empty__icon { font-size:64px; display:block; margin-bottom:16px; }
.va-empty p { font-size:18px; color:var(--va-muted); margin-bottom:20px; }
.va-btn { display:inline-block; padding:12px 28px; background:var(--va-primary); color:#fff; border-radius:6px; font-weight:700; text-decoration:none; transition:background var(--va-t); }
.va-btn:hover { background:var(--va-primary-d); color:#fff; text-decoration:none; }

/* ══════════════════════════════════════════════════════════════════════
   AKTUALNOŚCI — timeline na stronie zwierzęcia
   ══════════════════════════════════════════════════════════════════════ */
.va-diary-timeline { margin: 48px 0; }
.va-diary-heading  { font-size: 22px; margin-bottom: 28px; color: var(--va-dark); border-bottom: 2px solid var(--va-primary); padding-bottom: 8px; display: inline-block; }
.va-diary-item { display: grid; grid-template-columns: 20px 1fr; gap: 0 20px; margin-bottom: 32px; position: relative; }
.va-diary-item::before { content: ''; position: absolute; left: 9px; top: 24px; bottom: -32px; width: 2px; background: var(--va-border); }
.va-diary-item:last-child::before { display: none; }
.va-diary-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--va-primary); margin-top: 4px; box-shadow: 0 0 0 4px rgba(var(--va-primary-rgb),.15); }
.va-diary-body { padding-top: 2px; }
.va-diary-date  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--va-primary); display: block; margin-bottom: 4px; }
.va-diary-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--va-dark); }
.va-diary-content { font-size: 15px; line-height: 1.7; color: #444; margin: 0 0 10px; }
.va-diary-photo { width: 100%; max-width: 480px; border-radius: var(--va-radius); margin-top: 10px; }

/* ══════════════════════════════════════════════════════════════════════
   SINGLE — karta zwierzęcia
   ══════════════════════════════════════════════════════════════════════ */
.va-single { max-width:1280px; margin:0 auto; padding:40px 20px 80px; }
.va-single__hero { display:grid; grid-template-columns:1fr 1fr; gap:48px; margin-bottom:48px; align-items:start; }
@media (max-width:720px) { .va-single__hero { grid-template-columns:1fr; } }
.va-single__photo img { width:100%; border-radius:var(--va-radius); box-shadow:var(--va-shadow); }
.va-single__name { font-size:36px; margin:0 0 20px; color:var(--va-dark); }
.va-single__table { width:100%; border-collapse:collapse; margin-bottom:24px; }
.va-single__table th,.va-single__table td { padding:10px 0; border-bottom:1px solid var(--va-border); text-align:left; }
.va-single__table th { width:140px; color:var(--va-muted); font-size:13px; text-transform:uppercase; letter-spacing:.4px; font-weight:600; }
.va-single__badges { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:28px; }
.va-gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
.va-gallery-grid img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:var(--va-radius); }
.va-single__back { margin-top:40px; }
