/*
Theme Name: KotPes
Theme URI: https://kotpes.local
Author: KotPes Shelter
Description: Multilingual theme for a dog and cat adoption shelter. Works with Polylang.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: kotpes
*/

:root {
    --accent: #f0802f;
    --accent-dark: #cf5f18;
    --accent-soft: #ffe9d3;
    --bg: #fff4e6;
    --card: #fffdf8;
    --text: #33221a;
    --muted: #8b7060;
    --border: #f7e2cd;
    --green: #3a9a5e;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(160, 85, 30, 0.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    /* Warm base colour plus a barely-visible tiled paw print pattern. */
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76' viewBox='0 0 76 76'%3E%3Cg fill='%23c98a4e' fill-opacity='0.07' transform='translate(13,11) scale(2)'%3E%3Ccircle cx='6.2' cy='9.6' r='2.1'/%3E%3Ccircle cx='10' cy='6.7' r='2.2'/%3E%3Ccircle cx='14' cy='6.7' r='2.2'/%3E%3Ccircle cx='17.8' cy='9.6' r='2.1'/%3E%3Cpath d='M12 11.4c-3 0-5.7 2.4-5.7 5.1 0 2.1 1.6 3.6 3.7 3.6.9 0 1.5-.4 2-.4s1.1.4 2 .4c2.1 0 3.7-1.5 3.7-3.6 0-2.7-2.7-5.1-5.7-5.1z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 76px 76px;
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 250, 243, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
}

.site-brand .paw {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.main-nav {
    display: flex;
    gap: 22px;
    margin-left: auto;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-dark);
    border-color: var(--accent);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 6px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}

.lang-switcher a {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.lang-switcher a:hover { color: var(--accent-dark); }

.lang-switcher a.active {
    background: var(--accent);
    color: #fff;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    background: #42271a;
}

/* Portrait photo sits in a column on the right so it keeps its natural
   proportions instead of being stretched across the whole banner. */
.hero-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(300px, 32%, 470px);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* Softly blend the left edge of the photo into the background. */
.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #42271a 0%, rgba(66, 39, 26, 0.75) 26%, rgba(66, 39, 26, 0) 68%);
}

.hero-content {
    position: relative;
    padding: 92px 0 100px;
}

/* Constrain the text itself so the container keeps its normal left edge and
   never slides under the photo column. */
.hero-content h1,
.hero-content p {
    max-width: 600px;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.3rem);
    line-height: 1.12;
    margin: 0 0 18px;
    font-weight: 800;
}

.hero p {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    opacity: 0.94;
    margin: 0 0 30px;
}

.hero .badge-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.hero .pill {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 999px;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
    box-shadow: 0 8px 20px rgba(240, 128, 47, 0.4);
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    margin-left: 12px;
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.15); }

.btn-dark {
    background: var(--text);
    box-shadow: none;
}

.btn-dark:hover { background: #1e130c; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: #fffbf5; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
}

.section-head .sub {
    color: var(--muted);
    margin: 6px 0 0;
    max-width: 620px;
}

/* Filter pills */
.filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter a {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 9px 20px;
    border-radius: 999px;
    background: #fffdf9;
    border: 1px solid var(--border);
    color: var(--muted);
    transition: all 0.15s;
}

.filter a:hover { border-color: var(--accent); color: var(--accent-dark); }

.filter a.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

/* ---------- Animal cards ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 26px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(160, 85, 30, 0.16);
}

.card-media {
    position: relative;
    aspect-ratio: 4 / 3.4;
    background: linear-gradient(135deg, var(--accent-soft), #ffdfbe);
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-media .no-photo {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3.4rem;
    color: var(--accent);
    opacity: 0.75;
}

.card-media .species {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 252, 246, 0.95);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-body h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
}

.card-body h3 a { text-decoration: none; color: var(--text); }
.card-body h3 a:hover { color: var(--accent-dark); }

.status {
    align-self: flex-start;
    background: #e9f8ef;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
}

.card-link {
    font-weight: 700;
    text-decoration: none;
    color: var(--accent-dark);
    font-size: 0.95rem;
}

.card-link::after { content: " →"; }

/* ---------- Help / About blocks ---------- */
.split {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 46px;
    align-items: center;
}

.split img.photo {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    object-fit: cover;
    max-height: 460px;
}

.split h2 { margin-top: 0; }

.help-list {
    list-style: none;
    padding: 0;
    margin: 22px 0 26px;
    display: grid;
    gap: 14px;
}

.help-list li {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.help-list .ico {
    font-size: 1.5rem;
    line-height: 1.2;
}

.help-list strong { display: block; margin-bottom: 2px; }

.help-list span.desc { color: var(--muted); font-size: 0.94rem; }

/* ---------- CTA banner ---------- */
.cta {
    background: linear-gradient(120deg, var(--accent), #f9a94e);
    color: #fff;
    border-radius: var(--radius);
    padding: 42px 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    box-shadow: 0 16px 40px rgba(240, 128, 47, 0.35);
}

.cta h2 { margin: 0 0 6px; font-size: 1.7rem; }
.cta p { margin: 0; opacity: 0.95; }

.cta .btn { background: #fffdf9; color: var(--accent-dark); box-shadow: none; }
.cta .btn:hover { background: var(--text); color: #fff; }

/* ---------- Single animal ---------- */
.single-animal .container { padding: 48px 0 72px; }

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 26px;
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-dark); }

.animal-layout {
    display: grid;
    grid-template-columns: minmax(280px, 460px) 1fr;
    gap: 44px;
    align-items: start;
}

.animal-photo {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--accent-soft), #ffdfbe);
    aspect-ratio: 4 / 4.4;
    display: grid;
    place-items: center;
}

.animal-photo img { width: 100%; height: 100%; object-fit: cover; }
.animal-photo .no-photo { font-size: 5rem; color: var(--accent); opacity: 0.7; }

.animal-info h1 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 3.5vw, 2.7rem);
    font-weight: 800;
}

.animal-facts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.fact {
    background: #fffdf9;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 600;
}

.animal-content { font-size: 1.03rem; }

.animal-cta {
    margin-top: 28px;
    background: var(--accent-soft);
    border: 1px solid #ffd0a8;
    border-radius: var(--radius);
    padding: 24px 26px;
}

.animal-cta h3 { margin: 0 0 8px; }
.animal-cta p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Static pages ---------- */
.page-content { padding: 56px 0 72px; }
.page-content h1 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); margin-top: 0; }
.page-content .entry { max-width: 760px; font-size: 1.04rem; }
.page-content .entry h2 { margin-top: 34px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #2e1a0f;
    color: #ead6c4;
    padding: 46px 0 34px;
    margin-top: 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.site-footer .site-brand { color: #fff; margin-bottom: 10px; }
.site-footer p { margin: 0 0 8px; font-size: 0.94rem; }

.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #f3d9c4; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 30px;
    padding-top: 18px;
    font-size: 0.85rem;
    color: #b39a88;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Misc ---------- */
.archive-title { padding: 46px 0 8px; }
.empty-note {
    background: #fffdf9;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    color: var(--muted);
    text-align: center;
    grid-column: 1 / -1;
}

/* Below 1000px the side column would squeeze the text — put the photo back
   as a full-bleed background with a stronger dark overlay. */
@media (max-width: 999px) {
    .hero-media {
        width: 100%;
    }

    .hero-media::after {
        background: linear-gradient(100deg, rgba(45, 24, 12, 0.9) 0%, rgba(45, 24, 12, 0.74) 55%, rgba(45, 24, 12, 0.5) 100%);
    }

    .hero-content {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
    .animal-layout { grid-template-columns: 1fr; }
    .hero-content { padding: 64px 0 72px; }
    .main-nav { order: 3; width: 100%; margin-left: 0; }
}

@media (max-width: 560px) {
    .section { padding: 52px 0; }
    .cta { padding: 30px 26px; }
    .btn-outline { margin-left: 0; margin-top: 10px; display: block; text-align: center; }
}

/* ==================== Impact counters ==================== */
.impact {
    padding: 64px 0 4px;
}

.impact-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 34px;
}

.impact-head h2 {
    margin-bottom: 8px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: linear-gradient(130deg, #fff2e0 0%, #fffdf8 55%, #ffe9d3 100%);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stat {
    position: relative;
    padding: 36px 22px 34px;
    text-align: center;
}

.stat + .stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24%;
    bottom: 24%;
    width: 1px;
    background: var(--border);
}

.stat-ico {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #fffdf9;
    border: 1px solid var(--border);
    font-size: 1.45rem;
    box-shadow: 0 6px 16px rgba(160, 85, 30, 0.10);
}

.stat-num {
    display: block;
    font-size: clamp(2.1rem, 3.6vw, 3rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--accent-dark);
    font-variant-numeric: tabular-nums;
}

.stat-num .plus {
    font-size: 0.6em;
    vertical-align: 0.35em;
    margin-left: 2px;
    color: var(--accent);
}

.stat-label {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

/* Highlighted "looking for a home now" card */
.stat.is-highlight {
    background: linear-gradient(150deg, var(--accent), #f9a94e);
}

.stat.is-highlight + .stat::before {
    background: transparent;
}

.stat.is-highlight .stat-ico {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: none;
}

.stat.is-highlight .stat-num,
.stat.is-highlight .stat-label {
    color: #fff;
}

.stat.is-highlight .stat-num .plus {
    color: rgba(255, 255, 255, 0.85);
}

/* ==================== Favourite (heart) button ==================== */
.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.94);
    color: var(--accent-dark);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(160, 85, 30, 0.20);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.fav-btn:hover {
    transform: scale(1.12);
}

.fav-btn.is-active {
    background: var(--accent);
    color: #fff;
}

.fav-btn.pop {
    animation: favPop 0.35s ease;
}

@keyframes favPop {
    50% { transform: scale(1.35); }
}

/* ==================== Reveal on scroll ==================== */
.js-anim [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-anim [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js-anim [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==================== Responsive add-ons ==================== */
@media (max-width: 900px) {
    .impact-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(odd)::before { display: none; }
    .stat:nth-child(n+3)::after {
        content: "";
        position: absolute;
        left: 18%;
        right: 18%;
        top: 0;
        height: 1px;
        background: var(--border);
    }
    .stat.is-highlight + .stat::after { background: transparent; }
    .stat.is-highlight::before { background: transparent; }
}

@media (max-width: 560px) {
    .impact { padding-top: 48px; }
    .stat { padding: 26px 14px 24px; }
}

/* ==================== "Found a home" status ==================== */
.status.is-home {
    background: var(--green);
    color: #fff;
}

.fact.is-home {
    background: var(--green);
    color: #fff;
}

.animal-cta.is-home {
    background: #ecf7ee;
    border: 1px solid #cdebd8;
}

.animal-cta.is-home h3 { color: var(--green); }

/* ==================== Adopted pets feed (marquee) ==================== */
.home-feed {
    padding: 8px 0 76px;
}

.feed-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 26px;
}

.feed-head h2 { margin-bottom: 8px; }

.feed-all {
    font-weight: 800;
    color: var(--accent-dark);
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
}

.feed-all:hover { text-decoration: underline; }

.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 18px;
    width: max-content;
    padding: 4px 0;
    animation: marqueeScroll 45s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    to { transform: translateX(calc(-50% - 9px)); }
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 22px 9px 9px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.feed-item:hover {
    transform: translateY(-3px);
}

.feed-avatar {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--accent-soft);
    font-size: 1.5rem;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(160, 85, 30, 0.15);
}

.feed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-name {
    font-weight: 800;
    color: var(--text);
    font-size: 1.02rem;
}

.feed-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--green);
    padding: 4px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ==================== Stories page ==================== */
.stories-intro {
    padding-bottom: 12px;
}

.stories-intro .container { max-width: 860px; }

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 22px;
}

.story-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.story-avatar {
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--accent-soft);
    font-size: 2.4rem;
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(160, 85, 30, 0.18);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-body { min-width: 0; }

.story-body h3 {
    margin: 0 0 6px;
    font-size: 1.22rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.story-body h3 a {
    text-decoration: none;
    color: var(--text);
}

.story-body h3 a:hover { color: var(--accent-dark); }

.story-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: var(--green);
    padding: 3px 10px;
    border-radius: 999px;
}

.story-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
}

.story-quote {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #ecf7ee;
    border-left: 3px solid var(--green);
    border-radius: 10px;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text);
}

.story-quote cite {
    display: block;
    margin-top: 7px;
    font-style: normal;
    font-weight: 700;
    font-size: 0.83rem;
    color: var(--green);
}

/* ==================== Share block ==================== */
.share-block {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px dashed var(--border);
}

.share-title {
    display: block;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

.share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.s-tg:hover { background: #229ed9; color: #fff; border-color: #229ed9; }
.s-wa:hover { background: #25d366; color: #fff; border-color: #25d366; }
.s-vk:hover { background: #0077ff; color: #fff; border-color: #0077ff; }
.s-copy:hover,
.s-copy.is-copied { background: var(--accent); color: #fff; border-color: var(--accent); }

@media (max-width: 560px) {
    .feed-head { flex-direction: column; align-items: flex-start; }
    .story-card { flex-direction: column; }
    .story-grid { grid-template-columns: 1fr; }
    .share-btn { flex: 1 1 auto; justify-content: center; }
}

/* ==================== Reduced motion: static feed ==================== */
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
    .marquee { overflow-x: auto; }
    .tm-track { animation: none; }
    .season-p { display: none; }
}

/* ==================== Inline SVG icons ==================== */
.kico {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.14em;
    flex: 0 0 auto;
}

.site-brand .paw .kico { width: 21px; height: 21px; }
.hero .pill .kico { color: var(--accent); width: 17px; height: 17px; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; }

.stat-ico .kico { width: 26px; height: 26px; color: var(--accent-dark); }
.stat.is-highlight .stat-ico .kico { color: #fff; }

.help-list .ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); }
.help-list .ico .kico { width: 22px; height: 22px; }
.help-list li { align-items: center; }

h1 .kico-title, h2 .kico-title { color: var(--accent); width: 0.95em; height: 0.95em; }
.archive-title h1 .kico-title { color: var(--accent); }

.feed-badge .kico, .story-badge .kico { width: 13px; height: 13px; }
.story-badge .kico { width: 12px; height: 12px; }
.feed-avatar .kico, .story-avatar .kico { width: 26px; height: 26px; color: var(--accent); opacity: 0.8; }
.story-avatar .kico { width: 34px; height: 34px; }

.card-media .no-photo .kico, .animal-photo .no-photo .kico { width: 3.4rem; height: 3.4rem; }
.animal-photo .no-photo .kico { width: 5rem; height: 5rem; }
.empty-note .kico { width: 34px; height: 34px; color: var(--accent); opacity: 0.75; }

.fact .kico { width: 14px; height: 14px; }
.animal-cta.is-home h3 .kico { width: 1em; height: 1em; }
.share-title .kico { color: var(--accent-dark); width: 1.1em; height: 1.1em; }
.footer-loc { display: flex; align-items: center; gap: 6px; }
.footer-loc .kico { width: 15px; height: 15px; color: var(--accent); }
.cta .btn { display: inline-flex; align-items: center; gap: 8px; }
.cta .btn .kico { width: 19px; height: 19px; }

/* ==================== Scrolling mission band ==================== */
.text-marquee {
    background: #2e1a0f;
    color: #ffe4c9;
    overflow: hidden;
    padding: 17px 0;
    border-top: 3px solid var(--accent);
}

.tm-track {
    display: flex;
    width: max-content;
    animation: tmScroll 30s linear infinite;
}

.text-marquee:hover .tm-track { animation-play-state: paused; }

.tm-half {
    display: flex;
    align-items: center;
    gap: 34px;
    padding-right: 34px;
}

.tm-item {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tm-dot { display: inline-grid; place-items: center; }
.tm-dot .kico { width: 17px; height: 17px; color: var(--accent); }

@keyframes tmScroll {
    to { transform: translateX(-50%); }
}

/* ==================== "Found a home" rubber stamp ==================== */
.stamp {
    position: absolute;
    left: 50%;
    top: 56%;
    z-index: 3;
    transform: translate(-50%, -50%) rotate(-13deg);
    padding: 7px 15px;
    border: 3px double var(--green);
    border-radius: 7px;
    color: var(--green);
    background: rgba(255, 253, 248, 0.16);
    backdrop-filter: blur(1px);
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.94;
    filter: drop-shadow(0 2px 5px rgba(20, 70, 40, 0.35));
    animation: stampIn 0.4s ease both;
}

@keyframes stampIn {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(-13deg) scale(1.7); }
    60% { opacity: 1; transform: translate(-50%, -50%) rotate(-13deg) scale(0.94); }
    100% { opacity: 0.94; transform: translate(-50%, -50%) rotate(-13deg) scale(1); }
}

/* ==================== Card tilt + photo zoom ==================== */
.grid { perspective: 1100px; }

.card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.card-media img { transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.07); }

/* ==================== Scroll progress + back-to-top ==================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #f9a94e, var(--accent-dark));
    z-index: 200;
}

#to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 150;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(240, 128, 47, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.15s;
    padding: 0;
}

#to-top .kico { width: 24px; height: 24px; }

#to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

#to-top:hover { background: var(--accent-dark); transform: scale(1.08); }

/* ==================== Seasonal decor toggle (maple leaf) ==================== */
.season-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.season-toggle .kico {
    width: 21px;
    height: 21px;
    transform-origin: 50% 85%;
    /* Periodic wiggle that invites a click (idle most of the time). */
    animation: leafWiggle 5.5s ease-in-out infinite;
}

.season-toggle:hover {
    transform: scale(1.12);
    box-shadow: var(--shadow);
}

.season-toggle:active { transform: scale(0.94); }

.season-toggle[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(240, 128, 47, 0.4);
}

.season-toggle[aria-pressed="true"] .kico { animation-duration: 1.6s; }

@keyframes leafWiggle {
    0%, 84%, 100% { transform: rotate(0deg); }
    87% { transform: rotate(-16deg); }
    90% { transform: rotate(13deg); }
    93% { transform: rotate(-9deg); }
    96% { transform: rotate(5deg); }
}

/* ==================== Seasonal particles ==================== */
#season-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 90;
}

.season-p {
    position: absolute;
    top: -40px;
    animation: seasonFall linear infinite;
}

@keyframes seasonFall {
    to { transform: translateY(112vh) rotate(540deg); }
}

/* ==================== Instagram teaser grid ==================== */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.ig-cell {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.ig-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ig-cell:hover img { transform: scale(1.08); }

.ig-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(46, 26, 15, 0.42);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.ig-overlay .kico { width: 30px; height: 30px; }
.ig-cell:hover .ig-overlay { opacity: 1; }

/* ==================== Pet profile (age / size / character) ==================== */
.pet-profile {
    margin: 18px 0 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.pp-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 16px;
}

.pp-row + .pp-row { border-top: 1px solid var(--border); }

.pp-ico { display: inline-grid; place-items: center; color: var(--accent); }
.pp-ico .kico { width: 18px; height: 18px; }

.pp-label { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.pp-value {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: right;
}

/* ==================== Hero photo parallax ==================== */
.hero-media img {
    transform: translateY(var(--par, 0px)) scale(1.07);
    will-change: transform;
}

/* ==================== New-section responsive tweaks ==================== */
@media (max-width: 900px) {
    .ig-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .ig-grid { grid-template-columns: repeat(2, 1fr); }
    .stamp { font-size: 0.78rem; padding: 6px 11px; }
    .tm-item { font-size: 0.88rem; }
    #to-top { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}

/* ---------- CTA ghost button (submit a pet) ---------- */
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta .btn-ghost { background: transparent; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: none; color: #fff; }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ---------- Submit a pet form ---------- */
.submit-intro { padding-bottom: 0; }
.submit-forms { padding-top: 0; }
.submit-wrap { max-width: 820px; margin: 0 auto; }

.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
    scroll-margin-top: 90px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.95rem; }
.form-field .hint { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.form-card input[type="text"],
.form-card select,
.form-card textarea,
.form-card input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #fffbf5;
    color: var(--text);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-card input[type="text"]:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 128, 47, 0.18);
}

.form-card textarea { min-height: 150px; resize: vertical; }
.form-card input[type="file"] { padding: 9px 12px; }

.kind-radios { display: flex; gap: 10px; flex-wrap: wrap; }

.kind-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 10px 18px;
    background: #fffbf5;
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.kind-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.kind-option input { accent-color: var(--accent); }

.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-actions { margin-top: 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-card .btn { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font-family: inherit; }
.form-card .btn .kico { width: 19px; height: 19px; }
.form-note { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 420px; }

.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 22px;
    font-weight: 600;
    line-height: 1.45;
}

.notice .kico { width: 21px; height: 21px; flex: 0 0 auto; margin-top: 2px; }
.notice-ok { background: #e9f8ef; border: 1px solid #a7ddbd; color: #1e6b43; }
.notice-err { background: #fdecea; border: 1px solid #f4b9b1; color: #8f2f22; }

@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 24px 20px; }
    .form-actions { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .card, .card-media img, .ig-cell img { transition: none; }
    .hero-media img { transform: none; }
    .stamp { animation: none; }
    .season-toggle .kico { animation: none; }
}
