

.projekt-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
}

.photo-grid-large,
.photo-grid-small > div,
.related-project-card-image {
    background: #e0e0e0;
}

.rad-gallery-image {
    background: #e0e0e0;
}

@keyframes lp-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.lightbox-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lp-spin 0.8s linear infinite;
    z-index: 1;
    display: none;
}

.lightbox-spinner.active {
    display: block;
}

.projekt-header {
    margin-bottom: 16px;
}

.projekt-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a3c5e;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

.projekt-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #1a3c5e;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.projekt-share-btn:hover {
    background: #f0f0f0;
}

.projekt-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.projekt-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.projekt-date svg {
    color: #999;
    flex-shrink: 0;
}

.projekt-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    max-height: 480px;
}

.photo-grid-large {
    min-height: 0;
}

.photo-grid-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.photo-grid-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    min-height: 0;
}

.photo-grid-item {
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.projekt-photo-grid[data-count="1"] {
    grid-template-columns: 1fr;
}

.projekt-photo-grid[data-count="2"] .photo-grid-small {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.projekt-photo-grid[data-count="3"] .photo-grid-small {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.projekt-photo-grid[data-count="4"] .photo-grid-small {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr;
}

.show-all-photos-btn {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    background: #fff !important;
    border: 1px solid #222 !important;
    border-radius: 8px !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #222 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    z-index: 2;
    transition: background 0.2s;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
    min-width: 0 !important;
}

.show-all-photos-btn:hover {
    background: #f0f0f0 !important;
}

.projekt-radovi-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.radovi-nav-link {
    display: block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #1a3c5e;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.radovi-nav-link:hover {
    background: #1a3c5e;
    color: #fff;
}

.projekt-rad {
    margin-bottom: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.projekt-rad:first-child {
    border-top: none;
}

.rad-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a3c5e;
    margin: 0 0 16px;
    text-align: center;
}

.rad-description {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 28px;
    text-align: center;
}

.rad-description p {
    margin-bottom: 1em;
}

.rad-description p:last-child {
    margin-bottom: 0;
}

.rad-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.rad-gallery-image {
    width: 220px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.rad-gallery-image:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.related-projects {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.related-projects-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a3c5e !important;
    text-align: center !important;
    margin: 0 0 30px !important;
}

.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.related-project-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.related-project-card-info {
    padding: 16px;
}

.related-project-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a3c5e !important;
    margin: 0 0 6px !important;
    line-height: 1.4 !important;
}

.related-project-card-date {
    font-size: 12px;
    color: #999;
}

.projekt-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

.projekt-lightbox[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 2;
}

.lightbox-close {
    position: fixed !important;
    top: 20px !important;
    right: 24px !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 36px !important;
    cursor: pointer !important;
    z-index: 2;
    line-height: 1 !important;
    padding: 4px 10px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
}

.lightbox-close:hover {
    color: #ccc !important;
    background: transparent !important;
}

.lightbox-prev,
.lightbox-next {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: #fff !important;
    font-size: 0 !important;
    cursor: pointer !important;
    width: 50px !important;
    height: 50px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    z-index: 2;
    transition: background 0.2s;
    min-height: 0 !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

.lightbox-prev {
    left: 20px !important;
}

.lightbox-next {
    right: 20px !important;
}

.lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    z-index: 2;
}

@media (max-width: 768px) {
    .projekt-page {
        padding: 30px 15px 40px;
    }

    .show-all-photos-btn {
        font-size: 11px !important;
        padding: 5px 10px !important;
        gap: 4px !important;
        border-radius: 6px !important;
    }

    .show-all-photos-btn svg {
        width: 12px !important;
        height: 12px !important;
    }

    .related-projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .related-project-card-image img {
        height: 140px;
    }

    .projekt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .projekt-title {
        font-size: 22px;
    }

    .projekt-photo-grid {
        grid-template-columns: 1fr;
        max-height: none;
        border-radius: 12px;
    }

    .photo-grid-large img {
        height: 250px;
    }

    .photo-grid-small {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .photo-grid-item img {
        height: 140px;
    }

    .projekt-radovi-nav {
        gap: 6px;
    }

    .radovi-nav-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .rad-title {
        font-size: 18px;
    }

    .rad-gallery {
        gap: 8px;
    }

    .rad-gallery-image {
        width: 150px;
        height: 130px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .related-projects-grid {
        grid-template-columns: 1fr;
    }

    .rad-gallery-image {
        width: calc(50% - 6px);
        height: 110px;
    }

    .photo-grid-item img {
        height: 110px;
    }
}
