/* Kinti Projects - Frontend Styles */

/* Project Grid */
.kinti-projects-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

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

.kinti-projects-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.kinti-projects-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.kinti-projects-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .kinti-projects-grid.columns-3,
    .kinti-projects-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .kinti-projects-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Project Card */
.kinti-project-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kinti-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.project-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f0f0;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    /* Improve image quality */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.kinti-project-card:hover .project-card-image img {
    transform: scale(1.05) translateZ(0);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.no-image-placeholder .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: rgba(255, 255, 255, 0.5);
}

.project-card-status {
    position: absolute;
    top: 15px;
    right: 15px;
}

.project-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status-badge.in-progress {
    background: #ffa726;
    color: #fff;
}

.project-status-badge.completed {
    background: #66bb6a;
    color: #fff;
}

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

.project-card-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.project-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.project-card-title a:hover {
    color: #2B3D8B;
}

.project-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.project-card-location svg {
    flex-shrink: 0;
}

.project-card-excerpt {
    margin: 12px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.project-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #999;
}

.project-gallery-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-category-badge {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 0;
    font-size: 12px;
    color: #666;
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2B3D8B 0%, #32A9DE 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 61, 139, 0.3);
}

/* Single Project */
.kinti-project-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.project-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.project-title {
    font-size: 42px;
    font-weight: 700;
    margin: 20px 0;
    color: #333;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    color: #666;
}

.project-meta > span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.project-featured-image {
    margin: 40px 0;
    border-radius: 0;
    overflow: hidden;
}

.project-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-description {
    max-width: 800px;
    margin: 40px auto;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

/* Project Galleries */
.project-galleries {
    margin: 60px 0;
}

.project-comparison {
    margin: 40px 0;
}

.comparison-wrapper {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 20px;
    align-items: start;
}

.comparison-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}

.comparison-divider svg {
    color: #2B3D8B;
    opacity: 0.5;
}

.project-gallery {
    margin: 40px 0;
}

.gallery-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: block;
    aspect-ratio: 4/3;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Improve image quality */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Documents */
.project-documents {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 0;
}

.project-documents h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.documents-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.documents-list li {
    margin-bottom: 12px;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 0;
    text-decoration: none;
    color: #333;
    transition: background 0.3s, transform 0.3s;
}

.document-link:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #2B3D8B;
    color: #fff;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
}

.doc-name {
    flex: 1;
    font-size: 14px;
}

/* Project Videos */
.project-videos {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 0;
}

.project-videos h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.video-item {
    background: #000;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-item video {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

.video-item .video-title {
    padding: 12px 16px;
    background: #fff;
    color: #333;
    font-size: 14px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Project Tags */
.project-tags {
    margin: 40px 0;
    text-align: center;
}

.project-tags h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #666;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.project-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 0;
    font-size: 13px;
    transition: background 0.3s, color 0.3s;
}

.project-tag:hover {
    background: #2B3D8B;
    color: #fff;
}

/* Project Navigation */
.project-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #f9f9f9;
    color: #333;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}

.nav-link:hover {
    background: #2B3D8B;
    color: #fff;
    transform: translateX(-5px);
}

.nav-link.nav-next:hover {
    transform: translateX(5px);
}

/* Lightbox */
.kinti-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.kinti-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .comparison-wrapper {
        grid-template-columns: 1fr;
    }
    
    .comparison-divider {
        padding: 0;
        transform: rotate(90deg);
    }
    
    .project-title {
        font-size: 32px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
