/* ========================================
   🐾 КОТОПОЛИС — ОСНОВНЫЕ СТИЛИ
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #fff7fb;
    color: #493b49;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ========================================
   🌸 НАВИГАЦИЯ
======================================== */

.navbar {
    position: sticky;
    top: 20px;
    z-index: 100;
    
    width: calc(100% - 80px);
    max-width: 1240px;
    margin: 20px auto;
    padding: 20px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(255, 255, 255, 0.92);
    border-radius: 28px;
    box-shadow: 0 10px 35px rgba(170, 120, 150, 0.12);

    backdrop-filter: blur(15px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 24px;
    font-weight: 800;
    color: #ef718f;

    cursor: pointer;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar nav a {
    color: #554855;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.navbar nav a:hover {
    color: #ef718f;
}

.theme-button {
    width: 42px;
    height: 42px;

    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;

    cursor: pointer;
    font-size: 20px;
}

/* ========================================
   🏠 ГЛАВНАЯ
======================================== */

.hero {
    max-width: 1240px;
    min-height: 620px;

    margin: 50px auto;
    padding: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        radial-gradient(circle at 85% 20%, #eadcff 0, transparent 30%),
        radial-gradient(circle at 10% 70%, #ffe1eb 0, transparent 35%),
        white;

    border-radius: 40px;
}

.hero-text {
    width: 48%;
}

.little-title {
    color: #ef718f;
    font-size: 15px;
    font-weight: 800;
}

.hero h1 {
    margin: 25px 0;
    font-size: 64px;
    line-height: 1.05;
    color: #493b49;
}

.hero h1 span {
    color: #ef718f;
}

.hero-text > p {
    max-width: 560px;

    font-size: 19px;
    line-height: 1.8;
    color: #776a77;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.main-button,
.second-button {
    padding: 16px 24px;

    border-radius: 16px;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
    text-decoration: none;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.main-button {
    background: #ef718f;
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(239, 113, 143, 0.25);
}

.second-button {
    background: white;
    color: #604f60;
    border: 2px solid #f0d9e2;
}

.main-button:hover,
.second-button:hover {
    transform: translateY(-3px);
}

#result {
    margin-top: 20px;
    font-weight: 700;
    color: #ef718f;
}

/* ========================================
   🐱 КОТИКИ НА ГЛАВНОЙ
======================================== */

.hero-decoration {
    position: relative;
    width: 45%;
}

.hero-cats {
    width: 430px;
    height: 430px;

    margin: auto;

    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;

    overflow: hidden;

    border: 7px solid #ff9ab0;
    border-radius: 50%;

    background: white;
}

.hero-cats img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-cats img:first-child {
    grid-column: 1 / 3;
}

.paw {
    position: absolute;
    z-index: 2;
    font-size: 34px;
}

.paw1 {
    left: 0;
    top: 20%;
}

.paw2 {
    right: 0;
    top: 15%;
    color: #ff8fa8;
}

.paw3 {
    right: 5%;
    bottom: 5%;
    color: #b99aff;
}

/* ========================================
   🐾 СЕКЦИЯ КОТИКОВ
======================================== */

.cats-section {
    max-width: 1240px;
    margin: 100px auto;
    padding: 0 20px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title h2 {
    margin: 0;

    font-size: 42px;
    color: #493b49;
}

.section-title span {
    font-size: 24px;
}

.section-subtitle {
    text-align: center;
    color: #8b7c89;
    font-size: 18px;
    margin: 20px 0 60px;
}

/* ========================================
   🐱 СЕТКА КАРТОЧЕК
======================================== */

.cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.cat-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: white;
    border-radius: 25px;

    box-shadow: 0 15px 40px rgba(120, 80, 110, 0.10);

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 45px rgba(120, 80, 110, 0.16);
}

/* ========================================
   🖼️ ФОТО
======================================== */

.photo-container,
.cat-card > img {
    width: 100%;
    height: 280px;
    flex-shrink: 0;

    object-fit: cover;
}

.photo-container {
    position: relative;
}

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

.cat-card > img {
    display: block;
}

/* ========================================
   🏷️ ИМЕНА
======================================== */

.name-tag {
    position: absolute;
    left: 15px;
    bottom: 15px;

    padding: 7px 14px;

    border-radius: 12px;

    background: rgba(255, 255, 255, 0.9);

    font-weight: 800;
}

.purple {
    color: #8d6aa8;
}

.orange {
    color: #d98535;
}

.blue {
    color: #6288b5;
}

/* ========================================
   ❤️ СЕРДЕЧКО
======================================== */

.heart {
    position: absolute;
    right: 15px;
    top: 15px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.9);

    color: #ef718f;
    font-size: 25px;

    cursor: pointer;
}

.heart.liked {
    color: #ef4e72;
}

/* ========================================
   📝 СОДЕРЖИМОЕ КАРТОЧКИ
======================================== */

.card-content,
.cat-card-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 22px;
}

.card-content h3,
.cat-card-content h3 {
    margin: 0 0 14px;

    font-size: 22px;
    color: #493b49;
}

.card-content p,
.cat-card-content p {
    margin: 0;

    color: #655766;
    font-size: 16px;
    line-height: 1.45;
}

/* ========================================
   🌸 КНОПКИ «ПОДРОБНЕЕ»
======================================== */

.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;

    margin-top: auto;
    padding: 11px 20px;

    border: none;
    border-radius: 14px;

    background: #f7dce6;
    color: #8c5269;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition: transform 0.2s ease, background 0.2s ease;
}

.details-button:hover {
    transform: translateY(-2px);
    background: #f2cbd9;
}

.purple-button {
    background: #eadff3;
    color: #79578e;
}

.orange-button {
    background: #f8e3ce;
    color: #a4662c;
}

.blue-button {
    background: #dce9f6;
    color: #557da4;
}

/* ========================================
   ❤️ БЛОК FEATURES
======================================== */

.features {
    max-width: 1240px;

    margin: 100px auto;
    padding: 50px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    padding: 30px;

    background: white;
    border-radius: 25px;

    box-shadow: 0 12px 35px rgba(120, 80, 110, 0.08);
}

.feature-icon {
    width: 55px;
    height: 55px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #ffe3eb;

    font-size: 25px;
}

.feature h3 {
    margin: 0 0 10px;
    color: #493b49;
}

.feature p {
    margin: 0;

    color: #756775;
    line-height: 1.5;
}

/* ========================================
   🐾 FOOTER
======================================== */

footer {
    max-width: 1240px;

    margin: 80px auto 30px;
    padding: 35px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    background: white;
    border-radius: 25px;

    color: #6d5c6b;
}

footer b {
    color: #ef718f;
    font-size: 20px;
}

footer p {
    margin: 8px 0 0;
}

.footer-paws {
    font-size: 24px;
}

/* ========================================
   🪟 ОКОШКО «ПОДРОБНЕЕ»
======================================== */

.modal,
.easter-egg {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(45, 30, 45, 0.55);
    backdrop-filter: blur(8px);
}

.modal.show,
.easter-egg.show {
    display: flex;
}

.modal-content {
    position: relative;

    width: min(850px, 100%);

    display: flex;

    overflow: hidden;

    background: white;
    border-radius: 30px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.modal-content img {
    width: 45%;
    min-height: 400px;

    object-fit: cover;
}

.modal-text {
    padding: 45px;
}

.modal-text h2 {
    margin-top: 0;
    color: #ef718f;
    font-size: 32px;
}

.modal-text p {
    white-space: pre-line;
    color: #655766;
    line-height: 1.7;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;

    z-index: 2;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: white;

    font-size: 28px;
    cursor: pointer;
}

/* ========================================
   ✨ ПАСХАЛКА
======================================== */

.easter-egg-window {
    position: relative;

    width: min(500px, 100%);

    padding: 35px;

    text-align: center;

    background: white;
    border-radius: 30px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.easter-egg-title {
    margin-bottom: 20px;

    color: #9b70bd;
    font-size: 25px;
    font-weight: 800;
}

.easter-egg-window img {
    width: 100%;
    max-height: 300px;

    object-fit: cover;

    border-radius: 20px;
}

.easter-egg-text {
    margin-top: 20px;

    color: #8b55ad;
    font-size: 18px;
    font-weight: 800;
}

.easter-egg-small {
    margin-top: 10px;
    color: #817482;
}

.easter-egg-close {
    position: absolute;
    right: 15px;
    top: 15px;

    border: none;
    background: none;

    font-size: 28px;
    cursor: pointer;
}

/* ========================================
   🌙 ТЁМНАЯ ТЕМА
======================================== */

body.dark-mode {
    background: #211c24;
    color: #eee5ed;
}

body.dark-mode .navbar,
body.dark-mode .hero,
body.dark-mode .cat-card,
body.dark-mode .feature,
body.dark-mode footer,
body.dark-mode .modal-content,
body.dark-mode .easter-egg-window {
    background: #302833;
}

body.dark-mode .navbar nav a,
body.dark-mode .hero h1,
body.dark-mode .section-title h2,
body.dark-mode .card-content h3,
body.dark-mode .cat-card-content h3,
body.dark-mode .feature h3 {
    color: #f4eaf2;
}

body.dark-mode .hero-text > p,
body.dark-mode .section-subtitle,
body.dark-mode .card-content p,
body.dark-mode .cat-card-content p,
body.dark-mode .feature p,
body.dark-mode .modal-text p {
    color: #cbbdca;
}

body.dark-mode .second-button,
body.dark-mode .theme-button {
    background: #3b323e;
    color: #f4eaf2;
    border-color: #574b5b;
}

body.dark-mode .close-modal {
    background: #3b323e;
    color: white;
}

/* ========================================
   📱 АДАПТИВ
======================================== */

@media (max-width: 900px) {

    .navbar {
        width: calc(100% - 30px);
        padding: 16px 20px;
    }

    .navbar nav {
        gap: 15px;
    }

    .hero {
        margin: 30px 15px;
        padding: 40px 25px;

        flex-direction: column;
        gap: 50px;
    }

    .hero-text,
    .hero-decoration {
        width: 100%;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero-cats {
        width: min(400px, 90vw);
        height: min(400px, 90vw);
    }

    .cats {
        grid-template-columns: repeat(2, 1fr);
    }

    .features {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    footer {
        margin-left: 15px;
        margin-right: 15px;

        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {

    .navbar {
        position: relative;
        top: 0;

        flex-direction: column;
        gap: 15px;
    }

    .navbar nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 38px;
    }

    .cats {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .modal-content {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content img {
        width: 100%;
        min-height: 250px;
        max-height: 300px;
    }

    .modal-text {
        padding: 25px;
    }

.yellow {
    background: #fff3b0;
    color: #8a7415;
}

.blue {
    background: #c9e9f6;
    color: #39758c;
}

.brown {
    background: #e5d0bd;
    color: #795548;
}

.pink {
    background: #f7d6e5;
    color: #9b5575;
}

.gray {
    background: #dedede;
    color: #666666;
}
   .yellow-button {
    background: #fff3b0;
    color: #8a7415;
}

.blue-button {
    background: #c9e9f6;
    color: #39758c;
}

.brown-button {
    background: #e5d0bd;
    color: #795548;
}

.pink-button {
    background: #f7d6e5;
    color: #9b5575;
}

.gray-button {
    background: #dedede;
    color: #666666;
}
/* ===== ЦВЕТА КОТИКОВ ===== */

/* Соня 💛 */
.name-tag.yellow {
    background: #fff1a8 !important;
    color: #806b00 !important;
}

.details-button.yellow-button {
    background: #fff1a8 !important;
    color: #806b00 !important;
}

/* Миса 🩵 */
.name-tag.blue {
    background: #c9e9f6 !important;
    color: #4f82a3 !important;
}

.details-button.blue-button {
    background: #c9e9f6 !important;
    color: #4f82a3 !important;
}

/* Маруся 🤎 */
.name-tag.brown {
    background: #dfc5ad !important;
    color: #76543d !important;
}

.details-button.brown-button {
    background: #dfc5ad !important;
    color: #76543d !important;
}

/* Анфиса 🩷 */
.name-tag.pink {
    background: #f6c9dc !important;
    color: #a34f73 !important;
}

.details-button.pink-button {
    background: #f6c9dc !important;
    color: #a34f73 !important;
}

/* Оливия 🩶 */
.name-tag.gray {
    background: #d7d7d7 !important;
    color: #5f5f5f !important;
}

.details-button.gray-button {
    background: #d7d7d7 !important;
    color: #5f5f5f !important;
}
/* ========================================
   📸 ГАЛЕРЕЯ КОТОМЕНТОВ
======================================== */

.gallery-section {
    width: 100%;
    padding: 70px 20px;
    box-sizing: border-box;
}

.gallery {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;

    box-sizing: border-box;
}

.gallery-item {
    width: 100%;
    min-width: 0;

    overflow: hidden;
    border-radius: 24px;

    background: white;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);

    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16);
}

.gallery-item img {
    display: block;

    width: 100%;
    height: 260px;

    object-fit: cover;

    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    width: 100%;
    box-sizing: border-box;

    padding: 16px;

    text-align: center;

    font-size: 18px;
    font-weight: 700;

    background: white;
    color: #493b49;
}


/* 🌙 ТЁМНАЯ ТЕМА */

body.dark-mode .gallery-item {
    background: #292332;
}

body.dark-mode .gallery-caption {
    background: #292332;
    color: #f5edf8;
}


/* 📱 ПЛАНШЕТ */

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* 📱 ТЕЛЕФОН */

@media (max-width: 550px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 280px;
    }
}
   
/* ========================================
   🔍 ПРОСМОТР ФОТО
   ======================================== */

.photo-viewer {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(20, 15, 25, 0.88);
    backdrop-filter: blur(10px);

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease,
                visibility 0.25s ease;

    overflow: hidden;
}

.photo-viewer.active {
    opacity: 1;
    visibility: visible;
}

.photo-viewer img {
    max-width: 90vw;
    max-height: 85vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 18px;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);

    cursor: zoom-in;

    transform: scale(1);

    transition: transform 0.15s ease;
}

/* ✕ КНОПКА */

.viewer-close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);
    color: white;

    font-size: 24px;

    cursor: pointer;

    z-index: 2;

    transition: background 0.2s ease,
                transform 0.2s ease;
}

.viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* 💬 ПОДСКАЗКА */

.zoom-hint {
    position: absolute;

    bottom: 25px;
    left: 50%;

    transform: translateX(-50%);

    padding: 10px 18px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.12);
    color: #fff;

    font-size: 14px;

    backdrop-filter: blur(8px);
}

/* 📱 ТЕЛЕФОН */

@media (max-width: 600px) {

    .photo-viewer {
        padding: 15px;
    }

    .photo-viewer img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .viewer-close {
        top: 15px;
        right: 15px;
    }

    .zoom-hint {
        font-size: 12px;
        bottom: 15px;
    }
}
/* ========================================
   🔍 УВЕЛИЧЕНИЕ ФОТО
   ======================================== */

.cat-gallery-grid img {
    cursor: zoom-in;
}

/* затемнение фона */

.photo-overlay {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    background: rgba(20, 15, 22, 0.82);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
    box-sizing: border-box;

    z-index: 99999;

    opacity: 0;

    transition: opacity 0.25s ease;

    cursor: zoom-out;
}

.photo-overlay.show {
    opacity: 1;
}

/* увеличенная фотография */

.photo-overlay img {
    display: block;

    max-width: 90vw;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 20px;

    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);

    transform: scale(0.85);

    transition: transform 0.25s ease;
}

.photo-overlay.show img {
    transform: scale(1);
}
/* ========================================
   📸 КНОПКА ГАЛЕРЕИ
   ======================================== */

.gallery-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 16px 24px;

    border-radius: 16px;

    background: #eadff3;
    color: #79578e;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    box-shadow: 0 8px 20px rgba(140, 100, 160, 0.12);

    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease;
}

.gallery-button:hover {
    transform: translateY(-3px);

    background: #e1d2ed;

    box-shadow: 0 12px 25px rgba(140, 100, 160, 0.18);
}

/* 🌙 Тёмная тема */

body.dark-mode .gallery-button {
    background: #403548;
    color: #eadcf1;
}

body.dark-mode .gallery-button:hover {
    background: #4b3e52;
}
