/* Стили для галереи */
.gallery-item {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    overflow: hidden;
    border-radius: 8px;
}
.gallery-item:hover {
    transform: scale(1.05);
}
.gallery-item:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.img-fluid {
    display: block;
    width: 100%;
    height: auto;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.row.g-3 > * {
    padding: 0.75rem;
}

.col-md-4,
.col-md-6,
.col-sm-6 {
    width: 100%;
}

@media (min-width: 576px) {
    .col-sm-6 {
        width: 50%;
    }
}

@media (min-width: 768px) {
    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.75);
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    width: min(100%, 1200px);
}

.modal-content {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    max-height: calc(100vh - 2rem);
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 0.75rem 0;
}

.modal-body {
    padding: 0.75rem 0.75rem 1rem;
}

.modal-body img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.btn-close {
    position: relative;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 9999px;
    background: #e5e7eb;
    cursor: pointer;
}

.btn-close::before,
.btn-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 2px;
    background: #111827;
    transform-origin: center;
}

.btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body.modal-open {
    overflow: hidden;
}

/* Стили для логотипа проекта */
.project-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: contain;
    background: white;
    border: 2px solid #f3f4f6;
    padding: 8px;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.project-info h3 {
    margin: 0;
}

.project-placeholder-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}
