.logo {
    max-height: 150px;
    margin-bottom: 0px;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
        max-height: 220px;
}


        
        header.company-header {
            background-color: white;
            padding: 30px 0;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }
        
        .company-info {
            display: flex;
            align-items: center;
            gap: 30px;
        }
        
        .company-logo {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--secondary-color);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .company-text h1 {
            margin: 0;
            color: var(--primary-color);
            font-size: 2.2rem;
        }
        
        .company-text p {
            color: #666;
            margin-top: 10px;
            max-width: 800px;
        }
        
        .portfolio-section {
            margin-bottom: 50px;
        }
        
        .section-title {
            font-size: 1.8rem;
            color: var(--primary-color);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--secondary-color);
            display: inline-block;
        }
        
        .filters {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .filter-btn {
            padding: 8px 15px;
            background: #bfbfbf;
            border: 1px solid #ddd;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .filter-btn:hover, .filter-btn.active {
            background: var(--secondary-color);
            color: white;
            border-color: var(--secondary-color);
        }
        
        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 25px;
        }
        
        .portfolio-item {
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s, box-shadow 0.3s;
            position: relative;
        }
        
        .portfolio-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        }
        
        .portfolio-image {
            height: 220px;
            width: 100%;
            object-fit: cover;
        }
        
        .portfolio-content {
            padding: 20px;
        }
        
        .portfolio-content h3 {
            margin: 0 0 10px;
            color: var(--primary-color);
            font-size: 1.3rem;
        }
        
        .portfolio-content p {
            color: #666;
            margin: 0 0 15px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .portfolio-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .meta-item {
            display: flex;
            gap: 5px;
            font-size: 16px;
            color: #555;
        }
        
        .meta-item i {
            color: var(--secondary-color);
        }
        
        .portfolio-status {
    position: absolute;
    top: 25px;
    right: 25px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: white;
        }
        
        .status-completed {
            background-color: #c4d81c;
        }
        
        .status-in-progress {
            background: var(--secondary-color);
        }
        
        .status-planned {
            background: var(--warning-color);
        }
        
        .view-details {
            display: inline-block;
            padding: 8px 15px;
            background: var(--secondary-color);
            color: white;
            text-decoration: none;
            border-radius: 5px;
            transition: background 0.3s;
        }
        
        .view-details:hover {
            background: var(--primary-color);
        }
        
        /* Модальное окно */
        .object-modal {
            max-width: 900px;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            margin: 30px auto;
            position: relative;
        }
        
        .modal-header {
            padding: 20px;
            background: var(--primary-color);
            color: white;
        }
        
        .modal-header h2 {
            margin: 0;
        }
        
        .modal-content {
            padding: 20px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        
        .modal-image {
            width: 100%;
            height: 300px;
            object-fit: cover;
            border-radius: 5px;
        }
        
        .modal-details {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }
        
        .detail-item {
            margin-bottom: 15px;
        }
        
        .detail-item h4 {
            margin: 0 0 5px;
            color: var(--primary-color);
        }
        
        .detail-item p {
            margin: 0;
            color: #555;
        }
        
        .modal-description {
            grid-column: 1 / -1;
        }
        
        .modal-gallery {
            grid-column: 1 / -1;
        }
        
        .gallery-thumbnails {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }
        
        .gallery-thumb {
            height: 80px;
            width: 100%;
            object-fit: cover;
            cursor: pointer;
            border-radius: 5px;
            transition: transform 0.3s;
        }
        
        .gallery-thumb:hover {
            transform: scale(1.05);
        }
        
        .progress-container {
            margin-top: 20px;
        }
        
        .progress-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        
        .progress-bar {
            height: 10px;
            background: #eee;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: var(--secondary-color);
            transition: width 0.5s;
        }
        
        @media (max-width: 768px) {
            .portfolio-grid {
                grid-template-columns: 1fr;
            }
            
            .modal-content {
                grid-template-columns: 1fr;
            }
            
            .company-info {
                flex-direction: column;
                text-align: center;
            }
        }
         .company-contacts {
            margin-top: 20px;
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .contact-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #555;
        }
        
        .contact-item i {
            color: var(--secondary-color);
            width: 20px;
            text-align: center;
        }
        
        .company-details {
            margin-top: 30px;
            background: #f9f9f9;
            padding: 20px;
            border-radius: 8px;
        }
        
        .details-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }
        
        .detail-card {
            background: white;
            padding: 15px;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        
        .detail-card h4 {
            margin: 0 0 10px;
            color: var(--primary-color);
            font-size: 1.1rem;
        }
        
        .services-list {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        
        .services-list li {
            padding: 5px 0;
            border-bottom: 1px solid #eee;
        }
        
        .services-list li:last-child {
            border-bottom: none;
        }
    


















        
        .status-completed {
            background-color: #4CAF50;
            color: white;
        }
        
        .status-planned {
            background-color: #17a2b8;
            color: white;
        }

 .object-header {
            display: flex;
            align-items: flex-start !important; /* прижато к верху */
            justify-content: flex-start !important; /* прижато влево */
            gap: 30px;
            margin-bottom: 30px;
        }
        
        .object-image-container {
            width: 400px;
            height: 300px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f8f9fa;
            border: 2px dashed #dee2e6;
            position: relative;
        }
        
        .object-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 10px;
        }
        
        .object-image-placeholder {
            text-align: center;
            color: #6c757d;
        }
        
        .object-image-placeholder i {
            font-size: 64px;
            margin-bottom: 10px;
        }
        
        .object-title {
font-size: 21px;
    color: #6e7da1
        }
        
        .object-status {
display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 25px;
    font-weight: bold;
    color: white;
    align-self: flex-start !important;
    margin: 0 0 12px 0;
        }
        
        .object-info {
            display: flex;
            flex-direction: column;
            align-items: flex-start !important; /* всё строго слева */
            justify-content: flex-start !important; /* контент от верха */
            gap: 15px;
        }
        
        .object-meta {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .meta-item h3 {
            margin: 0 0 5px;
            color: #616161;
            font-size: 16px;
        }
        
        .meta-item p {
            margin: 0;
            color: #555;
        }
        
        .object-description {
            margin-bottom: 30px;
        }
        
        .object-description h2 {
            color: var(--primary-color);
            margin-bottom: 15px;
        }
        
        .object-description p {
            line-height: 1.6;
            color: #555;
        }
        
        .progress-container {
            margin: 30px 0;
        }
        
        .progress-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        
        .progress-bar {
            height: 10px;
            background: #eee;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: var(--secondary-color);
            transition: width 0.5s;
        }
        
        .gallery-section h2 {
            color: #6487ab;
            margin-bottom: 20px;
        }
        
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 15px;
        }
        
        .gallery-item {
            height: 80px;
            border-radius: 5px;
            overflow: hidden;
            position: relative;
            background: #f8f9fa;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #dee2e6;
            cursor: pointer;
        }
        
        .gallery-item img, .gallery-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .video-stub {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            background: #eef2f6;
        }

        .video-stub .play-btn {
            position: absolute;
            width: 54px;
            height: 54px;
            border-radius: 999px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0,0,0,.65);
            color: #fff;
            font-size: 22px;
        }

        .video-stub .video-icon {
            font-size: 42px;
            color: #6c757d;
            opacity: .85;
        }

        /* Lightbox */
        .lb-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.75);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 18px;
        }
        .lb-backdrop.open { display: flex; }
        .lb-modal {
            width: min(1100px, 100%);
            max-height: 92vh;
            background: #111;
            border-radius: 10px;
            overflow: hidden;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .lb-content {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .lb-content img, .lb-content video {
            max-width: 100%;
            max-height: 92vh;
            width: auto;
            height: auto;
            display: block;
        }
        .lb-close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
            border: 0;
            border-radius: 8px;
            background: rgba(255,255,255,.12);
            color: #fff;
            font-size: 18px;
            cursor: pointer;
        }
        .lb-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 44px;
            height: 44px;
            border: 0;
            border-radius: 999px;
            background: rgba(255,255,255,.12);
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }
        .lb-prev { left: 10px; }
        .lb-next { right: 10px; }
        .lb-nav:disabled { opacity: .35; cursor: default; }

        .video-stub {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(180deg, #f1f3f5 0%, #e9ecef 100%);
            position: relative;
        }
        .video-stub .play-btn {
            width: 54px;
            height: 54px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0,0,0,.55);
            color: #fff;
            font-size: 22px;
            line-height: 1;
        }
        .video-stub .badge {
            position: absolute;
            left: 8px;
            top: 8px;
            background: rgba(0,0,0,.55);
            color: #fff;
            font-size: 12px;
            padding: 3px 7px;
            border-radius: 999px;
        }

        /* Lightbox */
        .media-modal {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.72);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 16px;
        }
        .media-modal.open { display: flex; }
        .media-modal__box {
            width: min(1100px, 100%);
            max-height: 88vh;
            background: #111;
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .media-modal__content img,
        .media-modal__content video {
            max-width: 100%;
            max-height: 88vh;
            display: block;
        }
        .media-modal__close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
            border: 0;
            border-radius: 10px;
            background: rgba(255,255,255,.14);
            color: #fff;
            cursor: pointer;
            font-size: 18px;
        }
        .media-modal__nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 44px;
            height: 44px;
            border: 0;
            border-radius: 999px;
            background: rgba(255,255,255,.14);
            color: #fff;
            cursor: pointer;
            font-size: 18px;
        }
        .media-modal__prev { left: 10px; }
        .media-modal__next { right: 10px; }
        
        
        .stage-group { margin-top: 14px; }
        .stage-group-title{
            font-weight: 600;
            color:#111;
            margin: 10px 0 10px;
        }
        .js-media-thumb{ cursor: pointer; }

        .gallery-placeholder {
            text-align: center;
            color: #6c757d;
            padding: 20px;
        }
        
        .gallery-placeholder i {
            font-size: 32px;
            margin-bottom: 10px;
        }
        
        .back-button {
            display: inline-flex;
            font-size: 12px;
            align-items: center;
            padding: 5px 10px;
            background: #5f5f5f;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            margin-bottom: 30px;
            transition: background 0.3s;
        }
        
        .back-button:hover {
            background: #668199;
        }
        
        .back-button i {
            margin-right: 8px;
        }
        
        .status-completed {
            background: #28a745;
        }
        
        .status-in-progress {
            background: #cba124;
        }
        
        .status-planning {
            background: #17a2b8;
        }
        
        .status-on-hold {
            background: #dc3545;
        }
        
        @media (max-width: 768px) {
            .object-header {
                flex-direction: column;
                text-align: center;
            }
            
            .object-image-container {
                width: 100%;
                max-width: 400px;
                margin: 0 auto;
            }
            
            .object-meta {
                grid-template-columns: 1fr;
            }
            
            .object-info {
                align-items: center; /* Центрируем на мобильных */
            }
        }
    







        
        /* Стили для прогресса как в object.php */
        .progress-header-big {
            margin: 20px 0;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            border: 1px solid #bebebe4f;
        }
        
        .progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .progress-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
        }
        
        .progress-title2 {
            font-size: 16px;
            color: #666;
        }
        
        .progress-container {
            width: 100%;
            height: 20px;
            background-color: #e9ecef;
            border-radius: 10px;
            overflow: hidden;
            position: relative;
            margin-bottom: 5px;
        }
        
        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #4CAF50, #8bc34a);
            border-radius: 10px;
            transition: width 0.5s ease;
        }
        
        .progress-text {
            text-align: center;
            font-size: 14px;
            font-weight: 500;
            color: #333;
            margin-top: 5px;
        }
        
        /* Секции прогресса (как в object.php) */
        .sections-progress {
            margin-top: 15px;
            border-top: 1px solid #e9ecef;
            padding-top: 15px;
        }
        
        .section-progress-item {
            margin-bottom: 12px;
        }
        
        .section-name {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
            font-size: 14px;
            color: #555;
        }
        
        .section-progress-container {
            height: 10px;
            background-color: #f0f0f0;
            border-radius: 5px;
            overflow: hidden;
            position: relative;
        }
        
        .section-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #4CAF50, #8bc34a);
            border-radius: 5px;
        }
        
        .section-progress-text {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 11px;
            color: #333;
            font-weight: 500;
        }
        
        .section-progress-toggle {
            margin-top: 10px;
            font-size: 14px;
            color: #007bff;
            cursor: pointer;
            display: inline-block;
            padding: 5px 0;
        }
        
        .section-progress-toggle:hover {
            text-decoration: underline;
        }
        
        .collapsed:before {
            content: '▶ ';
            font-size: 12px;
        }
        
        .section-progress-toggle:before {
            content: '▼ ';
            font-size: 12px;
        }