/* Portfolio Custom CSS */

:root {
    --port-primary: #d54029;
    --port-dark: #1a1a1a;
    --port-gray: #f4f4f4;
    --port-text: #333;
    --port-card-bg: #ffffff;
    --port-hero-bg: #111;
}

/* Hero Section */
.portfolio-hero {
    background-color: var(--port-hero-bg);
    color: #fff;
    /* padding: 100px 0 60px; REMOVED in favor of flex centering */
    min-height: 500px;
    /* Increased height for better proportions */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    /* Offset for fixed navbar */
    padding-bottom: 40px;
    /* Visual balance */
    /* Lightened gradient from 0.7 to 0.4 */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/img/portfolio_hero_ai.png');
    /* Fallback or existing bg */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.portfolio-hero h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-family: 'Montserrat', sans-serif;
}

.portfolio-hero p.lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Stats Section */
.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
    /* Gold for visibility */
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Filter Section */
.portfolio-filter-container {
    padding: 2rem 0;
    text-align: center;
}

#categoryChips {
    justify-content: center;
}

.chip {
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Premium Card Design */
.premium-card {
    background: var(--port-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.premium-card-thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 65%;
    /* 16:10 Aspect Ratio roughly */
}

.premium-card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.premium-card:hover .premium-card-thumb {
    transform: scale(1.08);
    /* Subtle zoom */
}

.premium-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(213, 64, 41, 0.9);
    /* Primary color overlay */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-card:hover .premium-card-overlay {
    opacity: 1;
}

.premium-card-overlay i {
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.premium-card:hover .premium-card-overlay i {
    transform: translateY(0);
}

.premium-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.premium-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #222;
    transition: color 0.2s;
}

.premium-card:hover .premium-card-title {
    color: var(--port-primary);
}

.premium-card-client {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: auto;
    font-weight: 500;
}

.premium-card-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.card-tag {
    font-size: 0.75rem;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #666;
}

/* Index Page Portfolio Section */
#portfolio.index-portfolio-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/img/portfolio_hero_ai.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    padding: 100px 0;
    color: #fff !important;
}

#portfolio.index-portfolio-bg .section-heading {
    color: #fff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#portfolio.index-portfolio-bg .section-subheading {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure grid gap for index page */
#portfolio_list .premium-card {
    margin-bottom: 30px;
}