* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.3em;
    opacity: 0.9;
}

/* Навигация */
nav {
    background: #f8f9fa;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: #764ba2;
}

/* Секции */
section {
    padding: 60px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 40px;
}

/* О нас */
#about {
    background: white;
}

.about-content {
    display: grid;
    gap: 40px;
    align-items: center;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.about-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
}

/* Новости */
#news {
    background:#f8f9fa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    --image-corner-radius: 20px;
    background:white;
    border-radius: var(--image-corner-radius);
    padding: 20px;
}

.news-item > a {
    text-decoration: none;
}

.news-tag {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 10px;
    background: #ffeaa7;
    color: #d63031;
}

.news-item h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.news-item p {
    margin-bottom: 0.6em;
    line-height: 1.4;
}

.news-image-carousel {
    --image-corner-radius: inherit;
    --carousel-slide-duration: 350ms;
    position: relative;
    width: calc(100% + 40px);
    overflow: hidden;
    margin: -20px -20px 15px;
    touch-action: pan-y;
    transition: height 350ms ease;
}

.news-image-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    border-radius: var(--image-corner-radius);
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 300ms ease, transform 300ms ease, border-radius 250ms ease;
}

.news-image-carousel img.is-active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
}

.news-image-carousel img.is-entering-previous {
    transform: translateX(-12px);
}

.news-image-carousel img.is-leaving-next {
    opacity: 0;
    transform: translateX(-12px);
}

.news-image-carousel img.is-leaving-previous {
    opacity: 0;
    transform: translateX(12px);
}

.news-image-carousel img.is-drag-preview {
    opacity: 1;
}

.news-image-carousel.is-dragging img {
    transition: none;
}

.news-image-carousel.is-settling img {
    transition: transform var(--carousel-slide-duration) ease;
}

.news-image-carousel.is-settling img.is-active,
.news-image-carousel.is-settling img.is-drag-preview {
    animation: carousel-image-radius var(--carousel-slide-duration) ease both;
}

@keyframes carousel-image-radius {
    0% {
        border-radius: var(--starting-image-radius, var(--image-corner-radius));
    }
    70% {
        border-radius: 0;
    }
    100% {
        border-radius: var(--image-corner-radius);
    }
}

.news-image-carousel.is-finalizing img {
    transition: none !important;
    border-radius: 0 !important;
}

.carousel-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.2s;
}

.carousel-toggle--previous {
    right: auto;
    left: 12px;
}

.news-image-carousel:hover .carousel-toggle,
.news-image-carousel .carousel-toggle:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none) {
    .news-image-carousel .carousel-toggle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-image-carousel,
    .news-image-carousel img,
    .news-image-carousel.is-settling img {
        transition-duration: 0.01ms;
    }

    .news-image-carousel.is-settling img.is-active,
    .news-image-carousel.is-settling img.is-drag-preview {
        animation-duration: 0.01ms;
    }
}

/* Деятельность */
#activities {
    background: white;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.activity-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.activity-card:hover {
    transform: translateY(-10px);
}

.activity-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.activity-card h3 {
    color: #667eea;
    margin-bottom: 15px;
}

/* Наши подопечные */
#cats {
    background: #f8f9fa;
}

.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cat-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4em;
}

.cat-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.cat-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cat-info h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.cat-age {
    font-size: 0.9em;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.cat-status {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: auto;
    
}

.status-seeking {
    background: #ffeaa7;
    color: #d63031;
}

.status-treated {
    background: #55efc4;
    color: #00b894;
}

/* Помощь */
#help {
    background: white;
}

.help-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.help-option {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.help-option:hover {
    transform: translateY(-10px);
}

.help-option h3 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (min-width: 1000px) {
    .activity-card:nth-child(4):last-child,
    .help-option:nth-child(4):last-child {
        grid-column: 2;
    }
}

/* Кнопка Telegram */
.telegram_button {
    display: inline-block;
    background: linear-gradient(135deg, #0088cc 0%, #005f8f 100%);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2em;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 20px;
}

.telegram_button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,136,204,0.3);
}

.cta-center {
    text-align: center;
}

.cat-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.cat-buttons .telegram_button {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-width: min-content;
    max-width: 320px;
    text-align: center;
}

/* Колонтитул */
footer {
    position: relative;
    background: #2d3436;
    color: white;
    padding: 40px 0;
}

footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

footer p {
    opacity: 0.8;
}

.footer-copy {
    flex: 1;
    text-align: center;
}

.github-link {
    position: absolute;
    right: 20px;
    top: 50%;
    z-index: 101;
    display: grid;
    width: 48px;
    aspect-ratio: 1;
    place-items: center;
    flex: 0 0 48px;
    border-radius: 50%;
    background-color: transparent;
    color: white;
    text-decoration: none;
    transform: translateY(-50%);
    transition: transform 0.2s, background-color 0.2s;
}

.github-link svg {
    width: 26px;
    height: 26px;
}

.github-link:hover {
    background-color: #22282a;
}

.github-link:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* Страница 404 */
.not-found {
    background: white;
    text-align: center;
}

.not-found-code {
    display: block;
    font-size: 6em;
    font-weight: 700;
    line-height: 1;
    color: #667eea;
    margin-bottom: 10px;
}

.not-found p {
    max-width: 640px;
    margin: 0 auto 10px;
    font-size: 1.15em;
}

.not-found .telegram_button {
    margin-top: 30px;
}

/* Responsive - нужна для мобильных устройств */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }

    .cat-buttons .telegram_button {
        padding: 15px 0.8em;
    }

    .not-found-code {
        font-size: 4em;
    }

}

@media (max-width: 264px) {
    .cat-buttons {
        flex-direction: column;
    }
}
