/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
    z-index: 1;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb .current {
    color: white;
    font-weight: 600;
}

.gallery-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Gallery Filter */
.gallery-filter {
    padding: 2rem 0;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.filter-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Gallery Section */
.gallery-section {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

.gallery-container {
    width: 100%;
    padding: 0;
    margin: 0;
}

.masonry-grid {
    columns: 4;
    column-gap: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    break-inside: avoid;
    column-fill: balance;
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin: 0;
    padding: 0;
    break-inside: avoid;
    position: relative;
    overflow: hidden;
    background: white;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: transform 0.3s ease;
    vertical-align: top;
    page-break-inside: avoid;
}

.gallery-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0px;
    transition: transform 0.5s ease;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    width: 95%;
    height: 95%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close:hover {
    color: #dc2626;
}

.modal-info {
    margin-top: 1rem;
    color: white;
}

.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Portfolio Actions */
.portfolio-actions {
    text-align: center;
    padding: 3rem 0;
    background: #f8fafc;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .masonry-grid {
        columns: 3;
        column-gap: 0;
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2.5rem;
    }

    .gallery-subtitle {
        font-size: 1.1rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .masonry-grid {
        columns: 2;
        column-gap: 0;
    }

    .gallery-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .modal-content {
        width: 98%;
        height: 98%;
        margin: 1% auto;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 6rem 0 3rem;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .masonry-grid {
        columns: 1;
        column-gap: 0;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
        justify-content: center;
    }
}

/* Animation for filter */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.filtered {
    opacity: 0;
    transform: scale(0.8);
    display: none !important;
}

.gallery-item.show {
    opacity: 1;
    transform: scale(1);
    display: inline-block !important;
}

/* Loading animation */
.gallery-item.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item.loaded {
    opacity: 1;
    transform: translateY(0);
}