.ap { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* ── Hero ───────────────────────────── */
.ap-hero { background: var(--surface); border-radius: 1rem; padding: 1.5rem 1.5rem 2rem; margin-bottom: 1rem; position: relative; overflow: hidden; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ap-hero::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--border); border-radius: 1rem; pointer-events: none; }
.ap-site-logo { height: 5rem; width: auto; position: absolute; top: 1rem; left: 1rem; z-index: 1; }
.ap-source-logo-badge { width: 4.5rem; height: 4.5rem; position: absolute; top: 1rem; right: 1rem; z-index: 1; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.ap-source-logo { width: 3.25rem; height: 3.25rem; object-fit: contain; border-radius: 0.25rem; }
.ap-site-logo-link { display: contents; }
.ap-hero h1 { margin: 0 0 0.35rem; font-size: 1.5rem; color: var(--text-bright); line-height: 1.3; }
.ap-hero-stats { font-size: 1rem; font-weight: 700; color: #9ca3af; margin-bottom: 0.35rem; }
.ap-hero-sub { font-size: 0.9rem; color: #d1d5db; margin-bottom: 0.5rem; }
.ap-hero-cta { display: inline-block; background: var(--accent); color: #000; font-weight: 700; font-size: 0.95rem; padding: 0.6rem 1.8rem; border-radius: 0.6rem; text-decoration: none; font-family: var(--font); margin-top: 0.75rem; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 14px rgba(249,166,29,0.3); }
.ap-hero-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,166,29,0.4); }
.ap-cta-emoji { display: inline-block; margin-inline-start: 0.35rem; unicode-bidi: isolate; }
.ap-source-hero-row { display: flex; justify-content: center; gap: 0.9rem; flex-wrap: wrap; margin-top: 1rem; margin-bottom: 0.9rem; max-width: 30rem; }
.ap-source-hero-link { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.15s ease; }
.ap-source-hero-link:hover { transform: translateY(-2px); }
.ap-source-hero-badge { width: 4.1rem; height: 4.1rem; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.ap-source-hero-logo { width: 2.95rem; height: 2.95rem; object-fit: contain; border-radius: 0.25rem; }
.ap-source-hero-fallback { color: var(--text-bright); font-size: 0.8rem; }

/* ── Filters ────────────────────────── */
.ap-filter { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; margin-bottom: 1rem; }
.ap-filter-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.ap-filter-inline-row { display: flex; align-items: flex-start; justify-content: flex-start; gap: 4rem; flex-wrap: nowrap; }
.ap-filter-subgroup { flex: 0 1 auto; min-width: 0; }
.ap-filter-title { font-size: 0.95rem; color: var(--text-bright); font-weight: 700; margin: 0; }
.ap-filter-count { font-size: 0.82rem; color: #9ca3af; }
.ap-filter-group + .ap-filter-group { margin-top: 0.85rem; }
.ap-filter-label { display: block; font-size: 0.8rem; color: #9ca3af; margin-bottom: 0.5rem; }
.ap-filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ap-filter-pills--source { gap: 1rem; }
.ap-filter-pill { border: 1px solid var(--border); background: transparent; color: #d1d5db; border-radius: 999px; padding: 0.2rem 0.75rem; font: inherit; font-size: 0.75rem; cursor: pointer; transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
.ap-filter-pill:hover { border-color: var(--accent); color: var(--text-bright); }
.ap-filter-pill.is-active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
.ap-filter-pill--source { width: 3.2rem; height: 3.2rem; padding: 0; border-radius: 50%; background: #fff; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
.ap-filter-pill--source.is-active { background: #fff; border-color: var(--accent); color: inherit; box-shadow: 0 0 0 1.5px var(--accent); }
.ap-filter-source-badge { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ap-filter-source-logo { width: 2.3rem; height: 2.3rem; object-fit: contain; border-radius: 0.2rem; }
.ap-filter-source-fallback { padding: 0 0.5rem; font-size: 0.75rem; }
.ap-no-results { display: none; text-align: center; color: #9ca3af; padding: 2rem 1rem; background: var(--surface); border-radius: 0.75rem; border: 1px dashed var(--border); margin-bottom: 1.5rem; }
.ap-no-results.is-visible { display: block; }

/* ── Pet grid ─────────────────────────── */
.section-heading { font-size: 1.15rem; color: var(--text-bright); margin: 0 0 0.75rem; }
.ag { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ac { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.15s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .ac:hover { border-color: var(--accent); transform: translateY(-2px); } }
.ac-img-wrap { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #1a1a2e; }
.ac-img { width: 100%; height: 100%; object-fit: cover; }
.ac-new-badge { position: absolute; top: 0; right: 0; z-index: 1; background: var(--accent); color: #000; font-size: 0.78rem; font-weight: 800; padding: 0.22rem 0.6rem; border-radius: 0 0.75rem 0 0.75rem; }
.ac-life-saving { position: absolute; top: 0; left: 0; background: rgba(220,38,38,0.8); backdrop-filter: blur(4px); color: #fff; direction: rtl; text-align: right; padding: 0.35rem 0.6rem 0.3rem 0.8rem; border-radius: 0 0 6px 0; font-size: 0.75rem; font-weight: 700; box-shadow: 0 4px 8px rgba(0,0,0,0.4); z-index: 1; }
.ac-logos { position: absolute; bottom: 0.4rem; left: 0.4rem; display: flex; direction: ltr; gap: 0.3rem; align-items: center; }
.ac-share { position: absolute; top: 0.4rem; right: 0.4rem; z-index: 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: background 0.2s, transform 0.15s; color: #fff; -webkit-tap-highlight-color: transparent; }
.ac-share svg { width: 1.15rem; height: 1.15rem; }
@media (hover: hover) { .ac-share:hover { background: rgba(249,166,29,0.9); color: #000; transform: scale(1.1); } }
.ac-share-toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: var(--accent); color: #000; font-weight: 700; font-size: 0.9rem; padding: 0.6rem 1.5rem; border-radius: 0.6rem; z-index: 9999; box-shadow: 0 4px 14px rgba(0,0,0,0.3); pointer-events: none; animation: ap-toast-fade 2s ease forwards; }
@keyframes ap-toast-fade { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.ac-source-logo { height: 2.5rem; width: auto; background: rgba(255,255,255,0.9); border-radius: 0.25rem; padding: 0.1rem 0.25rem; }
.ac-org-logo { height: 2.5rem; width: auto; background: rgba(255,255,255,0.9); border-radius: 0.25rem; padding: 0.1rem 0.25rem; }
.ac-body { padding: 0.65rem; flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.ac-updated-row { text-align: left; }
.ac-updated { font-size: 0.72rem; color: #9ca3af; padding: 0; margin: 0 0 0.15rem; background: none; border-radius: 0; }
.ac-name { font-size: 1.05rem; color: var(--text-bright); font-weight: 600; }
.ac-breed { font-size: 0.78rem; color: #9ca3af; margin-top: -0.08rem; }

/* ── Bottom CTA ───────────────────────── */
.ap-cta--bottom { display: block; background: var(--accent); color: #000; font-weight: 700; font-size: 1rem; padding: 0.75rem 2rem; border-radius: 0.6rem; text-decoration: none; font-family: var(--font); text-align: center; margin: 1.5rem auto 0; max-width: 22rem; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 14px rgba(249,166,29,0.3); }
.ap-cta--bottom:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,166,29,0.4); }

/* ── More links ───────────────────────── */
.ap-more { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.5rem; font-size: 0.85rem; }
.ap-more-label { color: #9ca3af; }
.ap-more-link { color: var(--link); text-decoration: none; background: var(--surface); border: 1px solid var(--border); padding: 0.3rem 0.75rem; border-radius: 2rem; transition: border-color 0.15s; }
.ap-more-link:hover { border-color: var(--accent); }

/* ── Back to top ──────────────────────── */
.back-to-top { display: block; text-align: center; color: #9ca3af; font-size: 0.8rem; margin-top: 1.25rem; text-decoration: none; }
.back-to-top:hover { color: var(--accent); }

/* ── Footer ───────────────────────────── */
.ap-footer { text-align: center; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.ap-footer a { color: var(--link); font-size: 0.85rem; }

/* ── Source social links (inside hero) ────── */
.ap-source-links { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-top: 0.75rem; flex-wrap: wrap; }
.ap-source-link { position: relative; display: flex; align-items: center; justify-content: center; width: 2.64rem; height: 2.64rem; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); color: #d1d5db; transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease; -webkit-tap-highlight-color: transparent; }
.ap-source-link img, .ap-source-link svg { height: 1.43rem; width: 1.43rem; object-fit: contain; border-radius: 0.3rem; }
.ap-source-link[aria-label="אינסטגרם"]::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #ffdc80, #fcaf45, #f77737, #f56040, #e1306c, #c13584, #833ab4, #5851db);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.ap-source-link[aria-label="אימייל"] img { height: 1.69rem; width: 1.69rem; }
@media (hover: hover) {
    .ap-source-link:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.25);
    }
    .ap-source-link[aria-label="אתר"]:hover {
        color: var(--accent);
        border-color: var(--accent);
    }
    .ap-source-link[aria-label="פייסבוק"]:hover {
        color: #1877f2;
        border-color: #1877f2;
    }
    .ap-source-link[aria-label="אינסטגרם"]:hover {
        color: #e1306c;
        border-color: transparent;
    }
    .ap-source-link[aria-label="אינסטגרם"]:hover::before {
        opacity: 1;
    }
    .ap-source-link[aria-label="וואטסאפ"]:hover {
        color: #25d366;
        border-color: #25d366;
    }
}

/* ── Mobile ───────────────────────────── */
@media (max-width: 600px) {
    .ap-hero { padding: 1.25rem 1rem; }
    .ap-site-logo-link { display: block; }
    .ap-site-logo { position: static; height: 6rem; }
    .ap-filter-inline-row { flex-direction: column; gap: 0.85rem; }
    .ap-filter-subgroup { width: 100%; }
    .ap-source-link { width: 2.42rem; height: 2.42rem; }
    .ap-source-link img, .ap-source-link svg { width: 1.27rem; height: 1.27rem; }
    .ap-source-link[aria-label="אימייל"] img { width: 1.53rem; height: 1.53rem; }
    .ap-filter-top { align-items: flex-start; }
    .ap-filter-pills { gap: 0.4rem; }
    .ap-filter-pills--source { gap: 1rem; }
    .ap-filter-pill { padding: 0.4rem 0.8rem; }
    .ag { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
}
/* ── Related articles ────────────── */
.bp-related-articles { margin-top: 1rem; }
.bp-related-header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 0.5rem; }
.bp-related-header h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); margin: 0; }
.bp-related-see-all { color: var(--accent); font-size: 0.85rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: opacity 0.2s; }
.bp-related-see-all:hover { opacity: 0.8; }
.bp-related-row { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 9rem; gap: 0.65rem; }
.bp-related-card { position: relative; border-radius: 0.75rem; overflow: hidden; cursor: pointer; text-decoration: none; border: 1px solid #374151; }
.bp-related-card:first-child { grid-row: span 2; }
.bp-related-card > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s ease; }
.bp-related-card:hover > img { transform: scale(1.09); }
.bp-related-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 2.5rem 0.75rem 0.6rem; background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.5) 65%, rgba(0,0,0,0.15) 80%, transparent 100%); }
.bp-related-title { font-size: 0.82rem; font-weight: 700; color: #f9fafb; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-related-card:first-child .bp-related-title { font-size: 1rem; font-weight: 800; -webkit-line-clamp: 3; }
@media (max-width: 600px) {
    .bp-related-row { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 8rem; }
    .bp-related-card:first-child { grid-column: span 2; grid-row: span 1; }
}
.bp-related-card .bc-reviewer { margin-bottom: 0; margin-top: 0.3rem; }
.bp-related-card .bc-reviewer-pic { width: 18px !important; height: 18px !important; max-width: 18px; max-height: 18px; min-width: 18px; min-height: 18px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--accent); margin-left: 0.3rem; flex-shrink: 0; }
.bc-reviewer { display: flex; align-items: center; flex-wrap: wrap; row-gap: 0.15rem; column-gap: 0; margin-bottom: 0.4rem; margin-top: 0.5rem; font-size: 0.78rem; color: #9ca3af; line-height: 1.4; }
.bc-reviewer-pic { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--accent); margin-left: 0.3rem; }
.bc-reviewer-label { color: var(--accent); font-weight: 700; margin-left: 0.25rem; }
.bc-reviewer-name { font-weight: 700; color: var(--text); }
.bc-reviewer-title { font-weight: bold; }
.show-more-btn { display: block; width: fit-content; margin: 1.25rem auto 0; background: var(--surface); border: 1.5px solid var(--border); color: var(--accent, #f9a61d); font-weight: 700; font-size: 0.9rem; padding: 0.6rem 2rem; border-radius: 0.6rem; cursor: pointer; font-family: var(--font); transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.15s; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.show-more-btn:hover { border-color: var(--accent); background: rgba(249,166,29,0.06); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(249,166,29,0.15); }
.show-more-btn:active { transform: translateY(0); }
/* ── Menu toggle button (matches .menu-icon-btn from React) ── */
.menu-toggle {
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 3.5vw, 16px);
    width: 2.34em;
    height: 2.34em;
    -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
    .menu-toggle:hover { background: #222325; }
}
.menu-toggle:active { background: #292c31; }
.menu-toggle-bars {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}
.menu-toggle .bar {
    width: 1.25em;
    height: 0.125em;
    background-color: #f9fafb;
    border-radius: 1px;
}

/* ── Side menu panel ───────────────── */
/* em units used inside panel so sizes are relative to this
   element's font-size (matching React's rem-based layout). */
.side-menu {
    position: fixed;
    top: 0;
    right: -21em;
    width: 21em;
    height: 100dvh;
    background-color: #1f2937;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease-in-out;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 1em 1.25em 0;
    font-size: clamp(14px, 3.5vw, 16px);
    line-height: normal;
    direction: ltr;
}
.side-menu.open { right: 0; }

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    padding-bottom: 0.375em;
}
.side-menu-title {
    margin: 0;
    text-align: right;
    font-weight: 800;
    color: #f9fafb;
    font-size: 1.25em;
}
.menu-close-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
    .menu-close-btn:hover { background: #374151; }
}
.menu-close-btn:active { background: #292c31; }

.side-menu-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5em;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.side-menu-body::-webkit-scrollbar { display: none; }

.side-menu-item {
    background: none;
    border: none;
    padding: 0.57em 0.715em;
    text-align: right;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 700;
    transition: background-color 0.2s ease;
    color: #f9a61d;
    text-decoration: none;
    display: block;
    font-family: inherit;
}
.side-menu-item:hover { background-color: #374151; }

.side-menu-divider {
    border-top: 1px solid #374151;
    margin: 0.667em 0.715em 0;
    width: 50%;
    align-self: flex-end;
}
.side-menu-section-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #d1d5db;
    padding: 0.475em 0.715em 0.285em;
    margin-top: 0.38em;
    text-align: right;
    letter-spacing: 0.03em;
}

.side-menu-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15em;
    padding: 0.5em 0.75em;
    border-top: 1px solid #374151;
}
.side-menu-footer-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
}
.side-menu-footer-item {
    background: none;
    border: none;
    padding: 0.2em 0;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 400;
    transition: color 0.2s ease;
    color: #9ca3af;
    text-decoration: none;
    font-family: inherit;
}
.side-menu-footer-item:hover { color: #f9fafb; }
.side-menu-footer-sep { color: #4b5563; }

.side-menu-promo {
    display: block;
    margin: 0.5em 0.715em;
    padding: 0.6em 0.715em;
    background: rgba(167,139,250,0.08);
    border: 1px dashed rgba(167,139,250,0.5);
    border-radius: 8px;
    font-size: 0.9em;
    color: #d1d5db;
    text-align: center;
    text-decoration: none;
}
.side-menu-promo span { color: #f9a61d; font-weight: 700; }
.side-menu-promo:hover { background: rgba(167,139,250,0.14); }

/* ── Overlay ───────────────────────── */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}
.side-menu-overlay.open { display: block; }
/* ── Toolbar ──────────────────────── */
.toolbar {
    margin-top: -1.2rem;
    margin-bottom: 0;
    margin-right: -0.1em;
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
}
.toolbar-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.toolbar .breadcrumb {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.toolbar .breadcrumb a, .toolbar .breadcrumb span { unicode-bidi: isolate; }
.toolbar .breadcrumb a { color: var(--link); text-decoration: none; }
.toolbar .breadcrumb a:hover { text-decoration: underline; }
.toolbar .breadcrumb .bc-sep { color: #9ca3af; margin: 0 0.2rem; }
.hero-updated {
    display: block;
    font-size: 0.75rem;
    color: #a1aabd;
    background: rgba(107,114,128,0.1);
    padding: 0.15rem 0.55rem;
    border-radius: 0.3rem;
    white-space: nowrap;
    text-align: end;
    margin-top: 0;
    width: fit-content;
    align-self: flex-end;
}
