* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fdfbf7 0%, #f5ece1 100%);
    color: #4a3e3d;
    min-height: 100vh;
    padding: 40px 20px;
}

/* Главный контейнер для всей страницы */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Стили для заголовков разделов */
.section-title {
    font-size: 28px;
    color: #5d4037;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    font-weight: 700;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #d87d4a;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Сетка для карточек внутри раздела */
.pets-grid {
    display: flex;
    flex-direction: row;
    gap: 25px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Общие стили для всех карточек */
.pet-card {
    background: #ffffff;
    flex: 1;
    max-width: 520px;
    min-width: 320px;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(139, 94, 60, 0.06);
    padding: 35px 25px 45px;
    text-align: center;
    border: 1px solid rgba(224, 182, 145, 0.15);
}

/* Выделение для мемориальной карточки */
.pet-card.memorial {
    box-shadow: 0 12px 40px rgba(139, 94, 60, 0.12);
    border: 1px solid rgba(224, 182, 145, 0.3);
}

/* Контейнер для слайдеров */
.pet-photo-container {
    width: 100%;
    height: 280px;
    margin: 0 auto 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(139, 94, 60, 0.08);
    border: 6px solid #fff;
    background: #faf4ed;
    position: relative;
}
.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}
.slider-slide.active {
    opacity: 1;
    z-index: 2;
}
.placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 70px;
    color: #d7ccc8;
    z-index: 0;
}

h1 {
    font-size: 30px;
    color: #5d4037;
    margin-bottom: 5px;
    font-weight: 700;
}
.official-name {
    font-size: 14px;
    color: #bcaaa4;
    font-style: italic;
    margin-bottom: 15px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dates {
    font-size: 15px;
    color: #d87d4a;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
}
.counter {
    font-size: 13px;
    color: #8d6e63;
    background: #fdf8f3;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 35px;
    border: 1px solid #f5ece1;
}
.counter.alive {
    color: #5d4037;
    background: #f1f8e9;
    border: 1px solid #dcedc8;
}
.tribute-text {
    font-size: 15px;
    line-height: 1.7;
    color: #5c5552;
    margin-bottom: 40px;
    font-style: italic;
    padding: 0 5px;
    min-height: 110px;
}

/* Фотогалерея */
.gallery-section {
    margin-top: 20px;
    margin-bottom: 40px;
}
.gallery-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #bcaaa4;
    margin-bottom: 15px;
    font-weight: 600;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.grid-item {
    aspect-ratio: 1 / 1;
    background: #faf4ed;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    display: flex;
    justify-content: center;
    align-items: center;
}
.grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.grid-placeholder {
    font-size: 18px;
    color: #e0d4c8;
}

.bottom-status {
    border-top: 1px dashed #e0d4c8;
    padding-top: 25px;
    font-size: 14px;
    color: #8d6e63;
}
.bottom-status span {
    display: block;
    margin-top: 8px;
    font-size: 18px;
}

/* Адаптивность для мобильных телефонов */
@media (max-width: 768px) {
    .pets-grid {
        flex-direction: column;
        align-items: center;
    }
    .pet-card {
        width: 100%;
    }
}
/* Стили для кнопки-ссылки на галерею */
.gallery-link-container {
    text-align: center;
    width: 100%;
    margin-top: 10px;
}
.btn-gallery {
    display: inline-block;
    padding: 12px 30px;
    background-color: #d87d4a;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(216, 125, 74, 0.2);
    transition: all 0.3s ease;
    font-size: 15px;
}
.btn-gallery:hover {
    background-color: #bf6635;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 125, 74, 0.3);
}

/* Стили для страницы общей галереи */
.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #8d6e63;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.back-link:hover {
    color: #d87d4a;
}
.big-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.big-grid-item {
    aspect-ratio: 4 / 3;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 6px 20px rgba(139, 94, 60, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Стили для всплывающего окна (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    object-fit: contain;
}
.modal.show .modal-content {
    transform: scale(1);
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}
.close-modal:hover {
    color: #d87d4a;
}
/* Курсор-лупа для картинок, которые можно увеличить */
.big-grid-item img {
    cursor: zoom-in;
}
        /* Стили интерактива */
        .interaction-area {
            position: relative;
            display: flex;
            justify-content: center;
        }

        .pet-btn {
            background-color: var(--accent-color);
            color: white;
            border: none;
            padding: 12px 24px;
            font-size: 1rem;
            font-weight: bold;
            border-radius: 50px;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            width: 100%;
        }

        .card-tsatsa .pet-btn { background-color: var(--btn-tsatsa); }
        .card-filya .pet-btn { background-color: var(--btn-filya); }

        .pet-btn:active {
            transform: scale(0.98);
        }

        /* Всплывающее облачко */
        .bark-bubble {
            position: absolute;
            background: white;
            padding: 8px 16px;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.15);
            font-weight: bold;
            font-size: 1.1rem;
            bottom: 65px;
            animation: popUp 1s ease-out forwards;
            pointer-events: none;
            z-index: 10;
        }

        .bark-bubble::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            border-width: 8px 8px 0;
            border-style: solid;
            border-color: white transparent;
        }

        /* Сердечко */
        .heart-effect {
            position: absolute;
            font-size: 1.5rem;
            color: #ff4d4d;
            bottom: 50px;
            animation: floatUp 1s ease-out forwards;
            pointer-events: none;
            z-index: 10;
        }

        @keyframes popUp {
            0% { transform: scale(0); opacity: 0; }
            15% { transform: scale(1.1); opacity: 1; }
            25% { transform: scale(1); }
            80% { opacity: 1; }
            100% { transform: translateY(-10px); opacity: 0; }
        }

        @keyframes floatUp {
            0% { transform: translateY(0) scale(0.5); opacity: 0; }
            20% { opacity: 1; }
            100% { transform: translateY(-60px) translateX(var(--random-x, 10px)) scale(1.3); opacity: 0; }
        }