/* Обнуление и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', 'Segoe UI', serif;
    background-image: url('images/bg.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: #2e2a24;
    line-height: 1.5;
    position: relative;
}

/* Секции */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Главный блок (hero) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-card {
    background: rgba(255, 255, 245, 0.50);
    border-radius: 48px;
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: scale(1.01);
}

.avatar img {
    width: 500px;
    height: 500px;
    object-fit: cover;
    border-radius: 10%;
    border: 5px solid #d4b48c;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

h1 {
    font-size: 3rem;
    letter-spacing: 2px;
    color: #5a3e1b;
    margin-bottom: 0.5rem;
}

.years {
    font-size: 3rem;
    color: #a5672e;
    margin-bottom: 2rem;
}

.description {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.stats {
    background: #fef3e2;
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 60px;
    margin-top: 1rem;
    font-style: italic;
    color: #6b4c2c;
}

/* Галерея */
.gallery {
    background: rgba(255, 255, 245, 0.50);
    border-radius: 48px;
    margin: 2rem auto;
    backdrop-filter: blur(4px);
}

.gallery h2 {
    font-size: 2rem;
    color: #5a3e1b;
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.gallery-grid img {
    width: 100%;
    max-width: 280px;
    height: 280px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #3e2a1a;
    background: rgba(255, 248, 235, 0.85);
    margin-top: 2rem;
}

/* Цитата */
.quote-block {
    background: rgba(255, 255, 245, 0.85);
    border-radius: 48px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.quote-text {
    font-size: 1.5rem;
    font-style: italic;
    color: #5a3e1b;
    max-width: 900px;
    margin: 0 auto 1rem;
    line-height: 1.4;
}

/* Видео */
.video-block {
    background: rgba(255, 255, 245, 0.50);
    border-radius: 48px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.video-block h2 {
    font-size: 1.8rem;
    color: #5a3e1b;
    margin-bottom: 1.5rem;
}

/* Контейнер для видео */
.video-container {
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border-radius: 28px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-note {
    margin-top: 1rem;
    color: #a5672e;
    font-style: italic;
}

/* Родословная */
.pedigree-block {
    background: rgba(255, 255, 245, 0.50);
    border-radius: 48px;
    margin: 2rem auto;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.pedigree-block h2 {
    font-size: 1.8rem;
    text-align: center;
    color: #5a3e1b;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
.pedigree-block {
        padding: 2rem 1.5rem;
        margin: 1.5rem auto;
        border-radius: 32px;
    }

.quote-block {
        padding: 2rem 1.5rem;
        margin: 1.5rem auto;
        border-radius: 32px;
    }
    
.video-container {
    border-radius: 20px;
}

    .hero-card {
        padding: 1.5rem;
    }

    .avatar img {
        max-width: 500px; /* На планшетах делаем чуть меньше */
    }

    h1 {
        font-size: 2.4rem;
    }

    .years {
        font-size: 1.2rem;
    }

    .description {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }

    .gallery-grid img {
        height: 200px;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .hero-card {
        border-radius: 32px;
    }

    .avatar img {
        width: 250px;
        height: 300px;
    }

    h1 {
        font-size: 2rem;
    }

    .stats {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .gallery-grid img {
        height: auto;
        max-width: 280px;
    }
}

/* Затемнённый фон для увеличенной картинки */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* Кнопка закрытия */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: 0.2s;
}

.lightbox-close:hover {
    color: #d4b48c;
}