/* Portfolio Page - Modern Redesign */

/* 1. Hero Content - Minimal & Editorial */
.portfolio-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-body);
    /* Clean background, no image clutter */
    position: relative;
    padding-top: 140px;
    /* Offset for fixed nav */
}

.hero-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
    color: var(--gold);
    font-weight: 500;
}

.hero-main-title {
    font-family: 'Gallient', serif;
    /* Use theme font */
    font-size: 5.5rem;
    line-height: 1.1;
    color: var(--charcoal);
    margin-bottom: 25px;
    font-weight: 400;
}

.hero-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.8;
}

.header-line {
    width: 1px;
    height: 80px;
    background-color: var(--gold);
    margin: 40px auto 0;
    opacity: 0.6;
}

/* 2. Filters - Chic Pills */
.portfolio-filters-modern {
    margin-bottom: 30px;
}

.filter-pill {
    background: transparent;
    border: 1px solid transparent;
    padding: 10px 30px;
    margin: 0 5px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.filter-pill:hover,
.filter-pill.active {
    background-color: var(--bg-surface-alt);
    color: var(--charcoal);
    border-color: var(--border-color);
}

/* Sub-filters style */
.sub-filters {
    display: none;
    /* Hidden by default */
    margin-top: 15px;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease;
    margin-bottom: 40px;
}

.sub-filters.visible {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-filter-pill {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 20px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: var(--bg-surface);
}

.sub-filter-pill:hover,
.sub-filter-pill.active {
    background-color: var(--gold);
    color: white;
    border-color: var(--gold);
}

/* 3. Grid Layout Main Structure (Replaces Masonry) */
.section-portfolio-masonry {
    padding-bottom: 150px;
    background-color: var(--bg-body);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns by default */
    gap: 24px;
    width: 100%;
    margin: 0 auto;
}

.masonry-item {
    margin-bottom: 0;
    /* Grid handles gap */
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    height: 100%;
}

/* 4. The Card Design - Fixed Aspect Ratio */
.portfolio-card-modern {
    display: block;
    position: relative;
    width: 100%;
    height: 500px;
    /* Fixed height for uniformity */
    background-color: var(--ivory);
    overflow: hidden;
    cursor: pointer;
}

.portfolio-card-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image covers area without distortion */
    display: block;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.95);
    /* Slight dim by default */
}

.portfolio-card-modern:hover img {
    transform: scale(1.08);
}

/* The Overlay - Always Visible */
.modern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Stronger gradient at bottom for text readability */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 1;
    /* Always visible */
    transition: background 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.portfolio-card-modern:hover .modern-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.2) 100%);
}

/* Content inside overlay - Always Visible */
.overlay-content {
    transform: translateY(0);
    /* No translation */
    transition: transform 0.5s ease;
}

/* Hover effect: slight lift */
.portfolio-card-modern:hover .overlay-content {
    transform: translateY(-5px);
}

.category-tag {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 8px;
    opacity: 1;
    /* Always visible */
    transform: none;
}

.portfolio-card-modern h3 {
    font-family: 'Gallient', serif;
    font-size: 2rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Explore Line - Always Visible but maybe simpler */
.explore-line {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 1;
    /* Always visible */
    transform: none;
}

.explore-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.explore-line .line {
    width: 40px;
    height: 1px;
    background-color: var(--gold);
    /* Gold line for better visibility */
    transition: width 0.3s ease;
}

.portfolio-card-modern:hover .explore-line .line {
    width: 60px;
    background-color: white;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .portfolio-hero,
[data-theme="dark"] .section-portfolio-masonry {
    background-color: var(--bg-body);
}

[data-theme="dark"] .hero-main-title {
    color: var(--text-main);
}

[data-theme="dark"] .filter-pill.active {
    background-color: var(--bg-surface);
    color: var(--text-main);
}

[data-theme="dark"] .filter-pill {
    color: var(--text-muted);
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-card-modern {
        height: 450px;
    }
}

@media (max-width: 576px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-hero {
        height: auto;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-main-title {
        font-size: 2.8rem;
    }

    .portfolio-card-modern {
        height: 400px;
    }

    .portfolio-card-modern h3 {
        font-size: 1.8rem;
    }
}