/* -------------------
   Reset & Variables
------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Новая палитра: Теплый, дружелюбный, современный */
    --primary: #D97706;
    /* Более насыщенный янтарный/рыжий */
    --primary-dark: #B45309;
    --secondary: #78350F;
    /* Темно-коричневый для текста */
    --accent: #F59E0B;

    --bg: #FFFBF7;
    /* Очень светлый кремовый */
    --surface: #FFFFFF;

    --text-main: #292524;
    --text-muted: #57534E;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    --radius-lg: 24px;
    --radius-md: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.7;
    background-attachment: fixed;
    /* Градиент поверх паттерна с лапками для мягкости */
    position: relative;
}

/* Добавляем "вуаль" поверх фона, чтобы лапки не рябили */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.9) 0%, rgba(255, 251, 247, 0.7) 100%);
    z-index: -1;
    pointer-events: none;
}

h1,
h2,
h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* -------------------
   Header
------------------- */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.paw-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.logo:hover .paw-icon {
    transform: rotate(5deg) scale(1.05);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-nav a {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    color: var(--secondary);
    opacity: 0.85;
    padding: 0.4rem 0;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: center;
}

.header-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
    color: var(--primary-dark);
}

.header-nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.header-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 0;
    width: 44px;
    height: 40px;
    cursor: pointer;
    color: var(--secondary);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.header-nav-toggle-icon {
    width: 18px;
    height: 12px;
    position: relative;
    display: inline-block;
}

.header-nav-toggle-icon::before,
.header-nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 2px;
}

.header-nav-toggle-icon::before {
    top: 0;
}

.header-nav-toggle-icon::after {
    bottom: 0;
}

.header-nav-toggle-icon span {
    display: none;
}

.header-nav-toggle:focus {
    outline: none;
}

.header-nav-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

/* -------------------
   Hero Section
------------------- */
.hero {
    max-width: 1280px;
    margin: 4rem auto 6rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* Текст занимает чуть больше места */
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h2 {
    font-size: 1.25rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    font-weight: 700;
    opacity: 0.8;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-image {
    position: relative;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: var(--primary);
    opacity: 0.1;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    display: block;
    /* Органическая форма вместо квадрата */
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow-lg);
    transition: border-radius 0.5s ease;
}

.hero-image:hover img {
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* -------------------
   Stats Section
------------------- */
.stats {
    max-width: 1100px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.stats h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Декоративная линия под заголовком */
.stats h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.75rem;
    font-family: 'Nunito', sans-serif;
}

.stat-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* -------------------
   Help Section
------------------- */
.help-section {
    max-width: 1280px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.help-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.help-card {
    background: var(--surface);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.help-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Декоративная полоса сверху карточки */
.help-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-card:hover::before {
    opacity: 1;
}

.help-number {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.07;
    font-family: 'Nunito', sans-serif;
    pointer-events: none;
    /* Отключаем старый стиль */
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.help-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    padding-right: 20px;
}

.payment-info {
    background: #FDF4E7;
    /* Очень светлый оранжевый фон */
    padding: 0.8rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    border-left: 4px solid var(--primary);
}

.payment-info strong {
    color: var(--secondary);
}

.payment-info p {
    margin: 0.5rem 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.9rem;
}

.payment-info code {
    cursor: copy;
    user-select: all;
}

.social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    background: white;
    border: 2px solid #F3F4F6;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 700;
    transition: all 0.2s;
}

.social-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #FFFBF0;
    transform: translateY(-2px);
}

/* -------------------
   Dogs Section
------------------- */
.dogs-section {
    max-width: 1400px;
    /* Шире для карточек */
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.dogs-section h2 {
    text-align: center;
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.dogs-section>p {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.dogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.dog-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.dog-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.dog-card img {
    width: 100%;
    height: 320px;
    /* Увеличил высоту фото */
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dog-card:hover img {
    transform: scale(1.05);
}

.dog-info {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dog-info h3 {
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.dog-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* -------------------
   Footer
------------------- */
footer {
    background: var(--surface);
    padding: 4rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.social-link {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    color: var(--text-muted);
}

.social-link:hover {
    transform: translateY(-5px);
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(217, 119, 6, 0.4);
}

.social-link i {
    color: inherit;
    /* наследуем цвет от ссылки */
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-text div:first-child {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* -------------------
   Responsive
------------------- */
@media (max-width: 900px) {
    .header-nav-toggle {
        display: inline-flex;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 1rem;
        left: 1rem;
        margin: 0 auto;
        width: auto;
        max-width: 320px;
        flex-direction: column;
        gap: 0;
        text-align: left;
        padding: 0.5rem 0;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 14px;
        box-shadow: var(--shadow-lg);
        z-index: 1100;
        overflow: hidden;
    }

    .header-nav.is-open {
        display: flex;
    }

    .header-nav a {
        display: block;
        padding: 0.75rem 1rem;
        opacity: 1;
    }

    .header-nav a + a {
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        margin-top: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image {
        order: -1;
        /* Поднимаем фото наверх на мобильных */
    }

    .hero-image img {
        height: 350px;
        border-radius: 20px;
        /* Упрощаем форму на мобильных */
    }

    .hero-image::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: row;
        gap: 0.75rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .help-number {
        font-size: 5rem;
        top: -5px;
        right: -5px;
    }
}

/* -------------------
   Банка добра Page
------------------- */
.jar-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.jar-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.jar-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.jar-hero-intro {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.jar-payments {
    list-style: none;
    padding: 0;
    margin: 0 auto 2.5rem;
    display: grid;
    gap: 0.75rem;
    max-width: 800px;
}

.jar-payment {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--text-main);
}

.jar-payment-value code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95em;
    padding: 0.15em 0.45em;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 10px;
    white-space: nowrap;
    cursor: copy;
    user-select: all;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.jar-payment-value code:active {
    transform: translateY(1px);
}

.jar-payment-value code.is-copied {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
}

.jar-payment-value code.is-copy-failed {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.28);
}

.jar-payment a {
    color: var(--secondary);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.jar-payment a:hover {
    color: var(--primary-dark);
}

.jar-payment-note {
    color: var(--text-muted);
}

.jar-summary {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: inline-block;
}

.jar-summary-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.jar-summary-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.jar-summary-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Nunito', sans-serif;
}

.jar-visual-wrapper {
    margin: 4rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.jar-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1384 / 1552;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.jar-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Стили для слоёв монет */
.coin-layer {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Логика включения слоев в зависимости от уровня */
.jar-wrapper[data-level="1"] .coin-layer-1,
.jar-wrapper[data-level="2"] .coin-layer-1,
.jar-wrapper[data-level="2"] .coin-layer-2,
.jar-wrapper[data-level="3"] .coin-layer-1,
.jar-wrapper[data-level="3"] .coin-layer-2,
.jar-wrapper[data-level="3"] .coin-layer-3,
.jar-wrapper[data-level="4"] .coin-layer-1,
.jar-wrapper[data-level="4"] .coin-layer-2,
.jar-wrapper[data-level="4"] .coin-layer-3,
.jar-wrapper[data-level="4"] .coin-layer-4,
.jar-wrapper[data-level="5"] .coin-layer-1,
.jar-wrapper[data-level="5"] .coin-layer-2,
.jar-wrapper[data-level="5"] .coin-layer-3,
.jar-wrapper[data-level="5"] .coin-layer-4,
.jar-wrapper[data-level="5"] .coin-layer-5,
.jar-wrapper[data-level="6"] .coin-layer-1,
.jar-wrapper[data-level="6"] .coin-layer-2,
.jar-wrapper[data-level="6"] .coin-layer-3,
.jar-wrapper[data-level="6"] .coin-layer-4,
.jar-wrapper[data-level="6"] .coin-layer-5,
.jar-wrapper[data-level="6"] .coin-layer-6,
.jar-wrapper[data-level="7"] .coin-layer-1,
.jar-wrapper[data-level="7"] .coin-layer-2,
.jar-wrapper[data-level="7"] .coin-layer-3,
.jar-wrapper[data-level="7"] .coin-layer-4,
.jar-wrapper[data-level="7"] .coin-layer-5,
.jar-wrapper[data-level="7"] .coin-layer-6,
.jar-wrapper[data-level="7"] .coin-layer-7,
.jar-wrapper[data-level="8"] .coin-layer-1,
.jar-wrapper[data-level="8"] .coin-layer-2,
.jar-wrapper[data-level="8"] .coin-layer-3,
.jar-wrapper[data-level="8"] .coin-layer-4,
.jar-wrapper[data-level="8"] .coin-layer-5,
.jar-wrapper[data-level="8"] .coin-layer-6,
.jar-wrapper[data-level="8"] .coin-layer-7,
.jar-wrapper[data-level="8"] .coin-layer-8,
.jar-wrapper[data-level="9"] .coin-layer-1,
.jar-wrapper[data-level="9"] .coin-layer-2,
.jar-wrapper[data-level="9"] .coin-layer-3,
.jar-wrapper[data-level="9"] .coin-layer-4,
.jar-wrapper[data-level="9"] .coin-layer-5,
.jar-wrapper[data-level="9"] .coin-layer-6,
.jar-wrapper[data-level="9"] .coin-layer-7,
.jar-wrapper[data-level="9"] .coin-layer-8,
.jar-wrapper[data-level="9"] .coin-layer-9,
.jar-wrapper[data-level="10"] .coin-layer {
    opacity: 1;
}

/* Анимация падения монет при добавлении слоя */
@keyframes coinDrop {
    0% {
        transform: translateY(-40px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.jar-wrapper[data-animating="true"] .coin-layer {
    animation: coinDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jar-info {
    text-align: center;
    margin-top: 2rem;
}

.jar-info-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Nunito', sans-serif;
    margin-bottom: 0.5rem;
}

.jar-info-coins {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.jar-info-level {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.jar-info-full {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: rgba(217, 119, 6, 0.1);
    border-radius: var(--radius-md);
    display: inline-block;
}

/* -------------------
   Timeline
------------------- */
.timeline-section {
    margin: 6rem auto;
    max-width: 900px;
}

.timeline-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 120px; /* Останавливаем линию перед кнопкой */
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-items {
    position: relative;
    z-index: 2;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.timeline-item--income {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: var(--shadow-sm);
}

.timeline-marker svg {
    width: 20px;
    height: 20px;
}

.timeline-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    max-width: 45%;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item--income .timeline-card {
    margin-left: auto;
}

.timeline-item--expense .timeline-card {
    margin-right: auto;
}

.timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-card-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.timeline-card-amount {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
}

.timeline-card-amount--income {
    color: #10b981;
    /* Зеленый для поступлений */
}

.timeline-card-amount--expense {
    color: #ef4444;
    /* Красный для расходов */
}

.timeline-card-label {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.5;
}

.timeline-load-more {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    position: relative;
    z-index: 10; /* Кнопка поверх линии */
    background: var(--bg); /* Фон чтобы перекрыть линию */
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.timeline-load-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.timeline-load-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.timeline-load-btn:active {
  transform: translateY(0);
}

.timeline-load-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.timeline-load-btn:disabled:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

.timeline-loading {
    color: var(--text-muted);
    font-size: 1rem;
    padding: 1rem;
}

.timeline-end {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
    position: relative;
    z-index: 10; /* Текст поверх линии */
    background: var(--bg); /* Фон чтобы перекрыть линию */
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* -------------------
   Responsive (Банка добра)
------------------- */
@media (max-width: 900px) {
    .jar-hero h1 {
        font-size: 2.25rem;
    }

    .jar-wrapper {
        max-width: 300px;
    }

  .timeline-line {
    left: 20px;
    bottom: 120px; /* Останавливаем линию перед кнопкой на мобильных */
  }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 3rem;
    }

    .timeline-item--income {
        flex-direction: row !important;
    }

    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-card {
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .jar-page {
        padding: 1rem;
    }

    .jar-hero h1 {
        font-size: 1.75rem;
    }

    .jar-summary-value {
        font-size: 1.5rem;
    }

    .jar-wrapper {
        max-width: 250px;
    }

    .timeline-section h2 {
        font-size: 2rem;
    }

    .timeline-item {
        padding-left: 2.5rem;
    }

    .timeline-marker {
        left: 10px;
        width: 20px;
        height: 20px;
    }

    .timeline-marker svg {
        width: 16px;
        height: 16px;
    }

    .timeline-card {
        padding: 1.25rem;
    }

    .timeline-card-amount {
        font-size: 1rem;
    }
}