/*
 * Project Single Page Styles
 * Modern gallery with masonry layout
 */

/* ============================================
   PROJECT SINGLE WRAPPER
   ============================================ */

.project-single-wrapper {
    background: #F9FAFB;
    padding: 60px 0 80px;
}

/* ============================================
   PROJECT DETAILS SECTION
   ============================================ */

.project-details-section {
    margin-bottom: 48px;
}

.project-details-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.project-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.project-meta-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0072BC 0%, #0A4A7D 100%);
    border-radius: 10px;
    color: #fff;
}

.project-meta-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-meta-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
}

.project-meta-value {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.project-section-header {
    margin-bottom: 32px;
    text-align: center;
}

.project-section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 12px 0;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #0072BC, #0A4A7D);
    margin: 0 auto 16px;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
}

/* ============================================
   PROJECT DESCRIPTION SECTION
   ============================================ */

.project-description-section {
    margin-bottom: 60px;
}

.project-description-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    font-size: 16px;
    line-height: 1.8;
    color: #4B5563;
}

.project-description-content p {
    margin: 0 0 16px 0;
}

.project-description-content ul,
.project-description-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.project-description-content li {
    margin-bottom: 8px;
}

/* ============================================
   PROJECT GALLERY SECTION
   ============================================ */

.project-gallery-section {
    margin-bottom: 60px;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 280px;
    gap: 16px;
    grid-auto-flow: dense;
}

/* Gallery Item Sizes */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

/* Masonry Pattern Sizes */
.gallery-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.gallery-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.gallery-regular {
    grid-column: span 1;
    grid-row: span 1;
}

/* Gallery Images */
.gallery-item-image,
.gallery-item-video {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
    background: #1F2937;
}

.gallery-item-image img,
.gallery-item-video img,
.gallery-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Gallery Overlay */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    margin-bottom: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-icon {
    background: rgba(0, 114, 188, 0.9);
    transform: scale(1.1);
}

.gallery-item-caption {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    max-width: 100%;
    line-height: 1.4;
}

/* Video Specific Styles */
.gallery-video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
}

.gallery-video-placeholder svg {
    color: #6B7280;
}

.gallery-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-video-play {
    transform: translate(-50%, -50%) scale(1.15);
}

.gallery-video-play svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* ============================================
   PROJECT CTA SECTION
   ============================================ */

.project-cta-section {
    margin-bottom: 60px;
}

.project-cta-card {
    position: relative;
    background: linear-gradient(135deg, #0072BC 0%, #0A4A7D 100%);
    border-radius: 20px;
    padding: 60px 40px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 114, 188, 0.25);
}

.project-cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}

.project-cta-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
}

.project-cta-content p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 32px 0;
    color: rgba(255, 255, 255, 0.95);
}

.project-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.project-cta-buttons .btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.project-cta-buttons .btn-primary {
    background: #fff;
    color: #0072BC;
}

.project-cta-buttons .btn-primary:hover {
    background: #F3F4F6;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.project-cta-buttons .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.project-cta-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

.project-cta-decoration {
    position: absolute;
    top: 50%;
    right: -50px;
    transform: translateY(-50%);
    opacity: 0.2;
    z-index: 1;
}

/* ============================================
   RELATED PROJECTS SECTION
   ============================================ */

.related-projects-section {
    margin-bottom: 40px;
}

.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.related-project-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.related-project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.related-project-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.related-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-project-card:hover .related-project-image img {
    transform: scale(1.1);
}

.related-project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-project-card:hover .related-project-overlay {
    opacity: 1;
}

.view-project-btn {
    padding: 10px 24px;
    background: #0072BC;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.related-project-card:hover .view-project-btn {
    background: #0A4A7D;
    transform: translateY(-2px);
}

.related-project-content {
    padding: 20px;
}

.related-project-title {
    margin: 0 0 8px 0;
}

.related-project-title a {
    color: #1F2937;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.related-project-title a:hover {
    color: #0072BC;
}

.related-project-type {
    display: inline-block;
    padding: 6px 12px;
    background: #EFF6FF;
    color: #0072BC;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
}

.related-projects-footer {
    text-align: center;
}

.related-projects-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .project-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        grid-auto-rows: 240px;
        gap: 12px;
    }

    .project-meta-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .project-single-wrapper {
        padding: 40px 0 60px;
    }

    .project-section-header h2 {
        font-size: 28px;
    }

    .project-details-card {
        padding: 24px;
    }

    .project-meta-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-description-content {
        padding: 28px;
    }

    .project-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 10px;
    }

    /* Simplify masonry on mobile */
    .gallery-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-wide,
    .gallery-tall,
    .gallery-regular {
        grid-column: span 1;
        grid-row: span 1;
    }

    .project-cta-card {
        padding: 40px 24px;
    }

    .project-cta-content h2 {
        font-size: 24px;
    }

    .project-cta-content p {
        font-size: 16px;
    }

    .project-cta-buttons {
        flex-direction: column;
    }

    .project-cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .project-cta-decoration {
        display: none;
    }

    .related-projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .project-details-card {
        padding: 20px;
    }

    .project-description-content {
        padding: 24px;
        font-size: 15px;
    }

    .project-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-large,
    .gallery-wide,
    .gallery-tall,
    .gallery-regular {
        grid-column: span 1;
        grid-row: span 1;
    }

    .project-section-header h2 {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }
}

/* ============================================
   LIGHTBOX ENHANCEMENTS
   ============================================ */

/* fslightbox custom styling when it's initialized */
.fslightbox-container {
    z-index: 999999;
}

.fslightbox-fade-in {
    animation: fslightboxFadeIn 0.3s ease;
}

.fslightbox-fade-out {
    animation: fslightboxFadeOut 0.3s ease;
}

@keyframes fslightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fslightboxFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
