/**
 * Project Type Gallery CSS
 * Custom styles for project taxonomy gallery layout
 */

/* Body and Container Background */
body.tax-project_type {
    background-color: #000!important;
}

#Content {
    background-color: #000!important;
}

/* Gallery Container */
.project-gallery-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    background-color: #000!important;
    padding: 0;
}

.project-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    padding: 0;
    background-color: #000!important;
}

/* Gallery Items - Base Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: none;
    box-shadow: none;
}

/* Width Classes for Pattern: 50/50, 30/70, 70/30 */
.gallery-item-50 {
    flex: 0 0 calc(50% - 10px);
    width: calc(50% - 10px);
}

.gallery-item-30 {
    flex: 0 0 calc(30% - 10px);
    width: calc(30% - 10px);
}

.gallery-item-70 {
    flex: 0 0 calc(70% - 10px);
    width: calc(70% - 10px);
}

/* Row Management */
.gallery-item.row-start {
    clear: left;
}

.gallery-item.row-end {
    margin-right: 0;
}

/* Project Item Styling */
.project-item {
    position: relative;
    height: 100%;
    background: #000!important;
    border-radius: 0;
    overflow: hidden;
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.project-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
    border-radius: 0;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 3rem;
}

/* No Projects Found */
.no-projects-found {
    text-align: center;
    padding: 60px 20px;
    color: #fff;
}

.no-projects-found p {
    font-size: 1.2rem;
    margin: 0;
}

/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .gallery-item-50 {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
    }
    
    .gallery-item-30 {
        flex: 0 0 calc(35% - 10px);
        width: calc(35% - 10px);
    }
    
    .gallery-item-70 {
        flex: 0 0 calc(65% - 10px);
        width: calc(65% - 10px);
    }
    
    .project-image-wrapper {
        height: 250px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .project-gallery-grid {
        gap: 15px;
    }
    
    .gallery-item-50,
    .gallery-item-30,
    .gallery-item-70 {
        flex: 0 0 100%;
        width: 100%;
    }
    
    .project-image-wrapper {
        height: 200px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .project-gallery-container {
        padding: 0 10px;
    }
    
    .project-gallery-grid {
        gap: 10px;
    }
    
    .project-image-wrapper {
        height: 180px;
    }
}

/* Print Styles */
@media print {
    .project-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .gallery-item {
        border: 1px solid #ddd;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .project-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Focus States for Accessibility */
.project-link:focus {
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

/* Animation for Loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }