﻿/* Portfolio Page Styles */

.portfolio-page-container {
    max-width: 1400px;
    margin: 0 auto;
    transition: filter 0.3s ease;
}

/* Darken background when case study is open */
body:has(.case-study-full.visible) .main-container {
    background-color: #e8ecf1;
    transition: background-color 0.4s ease;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 3rem;
    transition: opacity 0.3s ease;
}

body:has(.case-study-full.visible) .portfolio-header {
    opacity: 0.6;
}

.portfolio-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.portfolio-header .highlight {
    color: #0077b5;
}

.portfolio-header .intro-paragraph {
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

.content-divider {
    text-align: center;
    margin: 2rem 0;
    color: #0077b5;
    font-size: 1.5rem;
}

.divider-icon {
    opacity: 0.4;
}

/* Portfolio Grid - Left/Right Split */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Portfolio Card (Clickable Summary) */
.portfolio-card-large {
    background-color: #fafbfc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 2rem;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, opacity 0.3s ease, background-color 0.3s ease;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

    .portfolio-card-large:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        border-color: rgba(0, 119, 181, 0.3);
    }

    .portfolio-card-large.active {
        border: none;
        border-left: 6px solid #0077b5;
        background-color: #fff;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transform: translateY(0);
        padding-left: calc(2rem - 5px);
    }

/* Fade out non-active cards when one is selected */
.portfolio-grid:has(.portfolio-card-large.active) .portfolio-card-large:not(.active) {
    opacity: 0.4;
    transform: scale(0.98);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.card-title-group h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.card-summary {
    margin-bottom: 1.5rem;
}

    .card-summary h3 {
        font-size: 1rem;
        color: #0077b5;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
    }

    .card-summary p {
        color: #555;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

.key-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.metric-item {
    background-color: #fff;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0077b5;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.85rem;
    color: #666;
}

.expand-indicator {
    text-align: center;
    margin-top: 1.5rem;
    color: #0077b5;
    font-size: 0.9rem;
    font-weight: 500;
}

    .expand-indicator::after {
        content: ' ↓';
        display: inline-block;
        transition: transform 0.3s ease;
    }

.portfolio-card-large.active .expand-indicator::after {
    transform: rotate(180deg);
}

/* Full Case Study (Hidden by default, shown when card is clicked) */
.case-study-full {
    display: none;
    grid-column: 1 / -1;
    background-color: #fff;
    border: none;
    border-left: 6px solid #0077b5;
    border-radius: 8px;
    padding: 3rem;
    padding-left: calc(3rem - 5px);
    margin-top: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .case-study-full.visible {
        display: block;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.case-study-full h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0077b5;
}

    .case-study-full h3:first-of-type {
        margin-top: 0;
    }

.case-study-full p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

    .results-list li {
        padding: 1rem;
        margin-bottom: 0.75rem;
        background-color: #f8f9fb;
        border-left: 4px solid #0077b5;
        border-radius: 4px;
        line-height: 1.6;
    }

        .results-list li strong {
            color: #0077b5;
            font-weight: 600;
        }

.case-insight {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-left: 4px solid #0077b5;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 4px;

    color: #2c3e50;
}

    .case-insight strong {
        color: #0077b5;
        font-style: normal;
    }

.close-case-study {
    text-align: center;
    margin-top: 2rem;
}

.close-button {
    background-color: #0077b5;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

    .close-button:hover {
        background-color: #005a8c;
    }

/* Responsive Design */
@media (max-width: 968px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .key-metrics {
        grid-template-columns: 1fr;
    }

    .case-study-full {
        padding: 2rem;
    }
}
