/* ============================================
   PORTFOLIO GALLERY STYLES
   ============================================ */

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: #FAFAF8;
}

/* Before/After Showcase */
.before-after-showcase {
    margin-bottom: 60px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(182, 140, 53, 0.05) 0%, rgba(110, 114, 119, 0.05) 100%);
    border-radius: 24px;
    border: 2px solid rgba(182, 140, 53, 0.1);
}

.showcase-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    text-align: center;
    margin-bottom: 8px;
}

.showcase-title i {
    color: #B68C35;
    margin-right: 12px;
}

.showcase-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6B7280;
    text-align: center;
    margin-bottom: 40px;
}

.before-after-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 32px;
}

.before-after-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.before-after-images {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.image-side {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #F3F3F1;
}

.image-side img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.image-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.before-label {
    background: rgba(239, 68, 68, 0.9);
    color: #FFFFFF;
}

.after-label {
    background: rgba(16, 185, 129, 0.9);
    color: #FFFFFF;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #B68C35;
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(182, 140, 53, 0.3);
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.card-description {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

/* Portfolio Controls */
.portfolio-controls {
    margin-bottom: 48px;
}

.portfolio-search {
    margin-bottom: 32px;
}

.portfolio-search input {
    width: 100%;
    max-width: 500px;
    padding: 14px 20px 14px 48px;
    font-size: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #FFFFFF;
    transition: all 0.3s ease;
}

.portfolio-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto 32px;
}

.portfolio-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 18px;
}

.portfolio-search input:focus {
    outline: none;
    border-color: #B68C35;
    box-shadow: 0 0 0 3px rgba(182, 140, 53, 0.1);
}

/* Filter Groups */
.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6E7277;
    margin-bottom: 12px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    background: #FFFFFF;
    color: #6E7277;
    border: 2px solid #E5E7EB;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #B68C35;
    color: #B68C35;
    background: rgba(182, 140, 53, 0.05);
}

.filter-btn.active {
    background: #B68C35;
    color: #FFFFFF;
    border-color: #B68C35;
    box-shadow: 0 4px 12px rgba(182, 140, 53, 0.25);
}

/* Project Count */
.project-count {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6E7277;
    margin-bottom: 32px;
    font-weight: 500;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.portfolio-item {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    background: #F3F3F1;
    overflow: hidden;
}

.portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-status {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    color: #1F2937;
    backdrop-filter: blur(8px);
}

.portfolio-status.completed {
    background: rgba(16, 185, 129, 0.95);
    color: #FFFFFF;
}

.portfolio-status.in-progress {
    background: rgba(245, 158, 11, 0.95);
    color: #FFFFFF;
}

.portfolio-status.before {
    background: rgba(107, 114, 128, 0.95);
    color: #FFFFFF;
}

.portfolio-info {
    padding: 24px;
}

.portfolio-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.portfolio-description {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    text-transform: capitalize;
}

.tag-traditional {
    background: rgba(139, 92, 246, 0.1);
    color: #7C3AED;
}

.tag-modern {
    background: rgba(59, 130, 246, 0.1);
    color: #2563EB;
}

.tag-luxury {
    background: rgba(182, 140, 53, 0.1);
    color: #B68C35;
}

.tag-neutral {
    background: rgba(156, 163, 175, 0.1);
    color: #6B7280;
}

.tag-gray {
    background: rgba(75, 85, 99, 0.1);
    color: #4B5563;
}

.tag-bold {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

.tag-mixed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.tag-exterior {
    background: rgba(14, 165, 233, 0.1);
    color: #0284C7;
}

.tag-interior {
    background: rgba(236, 72, 153, 0.1);
    color: #DB2777;
}

.tag-commercial {
    background: rgba(168, 85, 247, 0.1);
    color: #9333EA;
}

.tag-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.tag-in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.tag-before {
    background: rgba(107, 114, 128, 0.1);
    color: #6B7280;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
}

.no-results i {
    font-size: 64px;
    color: #D1D5DB;
    margin-bottom: 24px;
}

.no-results p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #6B7280;
    margin-bottom: 24px;
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    background: #FFFFFF;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: #1F2937;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
    background: #FFFFFF;
    transform: rotate(90deg);
}

.modal-image-container {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background: #F3F3F1;
}

.modal-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 32px;
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 16px;
}

.modal-description {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.modal-paired h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 16px;
}

.paired-project {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.paired-project:hover {
    background: #F3F4F6;
    transform: translateX(4px);
}

.paired-project img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.paired-project p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
}

/* Clear Filters Button */
.clear-filters-container {
    text-align: center;
    margin-top: 32px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio {
        padding: 60px 0;
    }
    
    .before-after-showcase {
        padding: 24px;
        margin-bottom: 40px;
    }
    
    .showcase-title {
        font-size: 22px;
    }
    
    .showcase-subtitle {
        font-size: 14px;
    }
    
    .before-after-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .before-after-images {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .divider {
        transform: rotate(90deg);
        margin: 8px auto;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filter-buttons {
        justify-content: flex-start;
    }
    
    .filter-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .modal-content {
        margin: 20px;
        border-radius: 16px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .before-after-showcase {
        padding: 20px;
    }
    
    .showcase-title {
        font-size: 20px;
    }
    
    .showcase-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    
    .before-after-card {
        padding: 16px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .image-side img {
        height: 160px;
    }
    
    .portfolio-search input {
        font-size: 14px;
        padding: 12px 16px 12px 44px;
    }
    
    .portfolio-search i {
        left: 14px;
        font-size: 16px;
    }
    
    .filter-group h4 {
        font-size: 12px;
    }
    
    .portfolio-item {
        border-radius: 12px;
    }
    
    .portfolio-info {
        padding: 16px;
    }
    
    .portfolio-title {
        font-size: 16px;
    }
    
    .portfolio-description {
        font-size: 13px;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
