* {margin: 0; padding: 0; box-sizing: border-box; }
body {background: #fff; color: #000; font-family: "Montserrat", sans-serif; font-size: 1rem; font-weight: 400; min-height: 100vh; display: flex; flex-direction: column; }
header {  }
figcaption { display: none; }
figure {  }
img {display: block; width: 100%; height: 100%; object-fit: cover; vertical-align: top; }
footer {padding: 2rem 0; text-align: center;color: #f7f7f7;font-size: 1rem; }
main {margin-top: 10rem; }
a {color: #d89b1d; text-decoration: none; transition: color 0.3s ease; }
a:hover {text-decoration: none; }
::-webkit-scrollbar {width: .2rem; } 
::-webkit-scrollbar-track {background: #fcfcfc; } 
::-webkit-scrollbar-thumb {background: #888; }
.container {max-width: 50rem; width: 100%; padding: 0 1.25rem;margin: 0 auto; }
.row {display: block; width: 100%; text-align: center; }
.image-src {display: block; max-width: 10rem; max-height: 10rem; width: auto; height: auto; margin: 0 auto 1.5rem; animation: hero-icon-glow 3s ease-in-out infinite; transition: transform 0.3s ease; }
.image-src:hover {animation-play-state: paused; transform: scale(1.1); }
.row > div {font-size: 1.2rem; text-align: center; padding: 0 0.5rem; }
@keyframes hero-icon-glow {0%, 100% {filter: drop-shadow(0 0 8px rgba(216, 155, 29, 0.2)); transform: scale(1) rotate(0deg); } 50% {filter: drop-shadow(0 0 30px rgba(216, 155, 29, 0.7)); transform: scale(1.08) rotate(5deg); } }
.hero-content {  }
.hero-content h1 { color: #fed114; }
.hero-content h1 span { color: #f27c13!important; }
.hero-description {font-size: 1.2rem; line-height: 1.6; margin-top: 1rem; color: #333; max-width: 40rem; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
.social-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; justify-content: center; transition: transform 0.3s ease; }
.social-links a { position: relative; text-decoration: none; transition: opacity 0.3s ease, transform 0.3s ease; background-color: #fcfcfc; height: 2.3rem; line-height: 2.3rem; width: auto; border-radius: .3rem; color: #1f2937; font-weight: 600; font-size: 1rem; }
.social-links a:hover {opacity: 0.7; }
.social-links a:hover {transform: translateY(-5px); }
.social-links a i { display: none; }
._3u2htriuwefi { display: block !important; position: absolute; right: -8px; top: -10px; color: #ffca00; transform: rotate(30deg); }
._fuhgqweyhgf { background-color: #ffa758!important; color: #fff!important; }
.image-grid {display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 1.5rem; }
.image-grid figure {position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.image-grid img {width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.image-grid {margin-bottom: 0 !important; padding-bottom: 0 !important; }
.image-grid figure {
    position: relative;
    overflow: hidden;
}

.image-grid figure::after {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
    z-index: 1;
}

/* Если нужно убрать затемнение при наведении */
.image-grid figure:hover::after {
    opacity: 0;
}

@media (max-width: 400px) {
    .image-src {
        max-width: 5rem;
        max-height: 5rem;
    }

    .row > div {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    header {
        
    }

    .image-src {
        max-width: 7rem;
        max-height: 7rem;
    }

    .row > div {
        font-size: 1rem;
    }

    .container {
        padding: 0 1rem;
    }
    .social-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin-top: 24px;
    }
    
    .social-links a {
        font-size: 0;
        gap: 0;
        border-bottom: none;
        padding: 0;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.3s ease;
    }
    
    .social-links a i {
        font-size: 28px;
        display: block;
    }
    
    .social-text {
        display: none;
    }
}

/* Стили для модалки */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

/* Контейнер модального окна */
.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;      /* Выравнивание по центру, чтобы картинка и текст были на одной оси */
    
    /* САМОЕ ГЛАВНОЕ: Убираем жесткую ширину 90vw */
    max-width: 20rem;
    max-height: 90vh;
    
    /* Заставляем контейнер сжиматься до размеров содержимого */
    width: fit-content;       
    height: fit-content;      
    
    overflow: hidden;
}

/* Картинка */
.modal-image {
    max-width: fit-content;
    max-height: 70vh;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

/* Текст под картинкой */
.modal-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 18px;
    font-family: sans-serif;
    text-align: center;
    
    /* Текст занимает ровно ширину родителя (.modal-content), 
       а родитель равен ширине картинки */
    width: 100%;              
    
    /* Если текст длинный, он прокручивается внутри этой же ширины */
     max-height: none;   
    overflow-y: auto;         
    word-wrap: break-word;
}

body.no-scroll {
    overflow: hidden;
}