﻿h1 {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

h2 {
    font-family: 'Montserrat', sans-serif;
}

p {
    font-family: 'Montserrat', sans-serif;
}

strong {
    font-family: 'Montserrat', sans-serif;
}

.a-custom {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff !important;
}

.btn-custom {
    background-color: #C33D3C;
    border-color: #C33D3C;
    color: #ffffff;
}

.btn-custom:hover {
    background-color: #FA4E4D;
    border-color: #FA4E4D;
    color: #ffffff;
}

.tb-sign-custom {
    margin-left: 25%;
}

.error-label {
    color: red;
    font-family: 'Montserrat', sans-serif;
}

/* Основные стили для меню */
.main-menu {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500; /* можно 400, 500, 600 – по вкусу */
    font-size: 1.1rem; /* размер шрифта – подбери под дизайн */
}

    /* Убираем стандартные точки и делаем элементы inline */
.main-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem; /* расстояние между пунктами – удобно менять */
}

.main-menu li {
    margin: 0;
}

.main-menu a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    transition: all 0.25s ease;
    border-radius: 6px;
}

.main-menu a:hover,
.main-menu a:active,
.main-menu a:focus {
    background-color: rgba(255,255,255,0.15);
    color: white;
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* ≈ 4:3 — подбери под большинство твоих скриншотов (56.25% = 16:9, 75% = 4:3, 100% = 1:1) */
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px;
}

.before-after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* главное свойство — обрезает без искажений */
    object-position: center;
}

.code-snippet {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #2d2d2d;
    padding: 4px;
    max-height: 280px;
    object-fit: contain; /* для кода лучше contain, чтобы ничего не обрезать */
}

/* На маленьких экранах пункты могут переноситься – выглядит нормально */
@media (max-width: 768px) {
    .main-menu ul {
        gap: 1.2rem;
        font-size: 1rem;
    }
    .image-container {
        padding-top: 100%; /* квадрат на мобильных выглядит лучше */
    }

    .before-after-img {
        object-fit: contain; /* опционально: на мобильных можно contain вместо cover */
    }
}

/* CSS-only lightbox / modal для изображений */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .lightbox:target {
        display: flex;
        opacity: 1;
    }

    .lightbox img {
        max-width: 92vw;
        max-height: 92vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    }

    .lightbox .close {
        position: absolute;
        top: 20px;
        right: 30px;
        color: white;
        font-size: 3rem;
        font-weight: bold;
        text-decoration: none;
        opacity: 0.8;
        transition: opacity 0.2s;
    }

        .lightbox .close:hover {
            opacity: 1;
        }

    /* Фон для закрытия по клику вне картинки */
    .lightbox .backdrop {
        position: absolute;
        inset: 0;
    }

/* Для карточек с кодом можно сделать меньше отступы или другой стиль */
.code-snippet-lightbox img {
    max-height: 85vh;
}
