/* ==========================================================================
   styles-portfolio-item.css - Portfolio Item Page Styles
   Used by: aquarelle.html, bildtv.html, cashtag.html, design-system.html,
            hey.html, illustrations.html, logos.html, reichweiten-bild.html,
            teaser.html, tracebloc.html
   ========================================================================== */

/* Hero Section for Portfolio Items */
.hero-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-item h3 {
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 32px;
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-md);
    max-width: 50%;
}

.hero-subtitle p {
    max-width: none;
    color: var(--color-text-light);
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    width: 110%;
    margin-left: -10%;
    align-items: start;
}

.content-grid .image-container,
.content-grid .image-placeholder {
    max-height: 80vh;
    overflow: hidden;
}

.content-grid .image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-placeholder {
    background: var(--color-surface);
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    width: 100%;
}

/* Meta Info */
.meta-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.meta-item h6 {
    margin-bottom: var(--space-xs);
}

.meta-item p {
    font-size: var(--font-size-footnote);
    color: var(--color-text-light);
    margin: 0;
    max-width: none;
}

/* Section with Typewriter */
.section-typewriter {
    margin-bottom: var(--space-2xl);
}

.section-typewriter h3 {
    font-size: clamp(32px, 5vw, 72px);
}

.section-typewriter p {
    color: var(--color-text-light);
    max-width: 65ch;
}

/* Content Sections */
.content-section {
    margin-bottom: var(--space-2xl);
}

.content-section h5 {
    color: var(--color-highlight);
}

.content-section p {
    color: var(--color-text-light);
    max-width: 50%;
}

/* Second Image Section */
.second-image-section {
    margin-bottom: var(--space-2xl);
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.second-image-section .image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1.5;
    background: var(--color-surface);
    border-radius: 8px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .second-image-section {
        grid-template-columns: 1fr;
    }
}

/* Image Grid */
.image-grid-bottom {
    display: grid;
    grid-template-columns: 6fr 3fr;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    width: 100%;
    position: relative;
}

.image-grid-bottom::before {
    content: '';
    display: block;
    padding-bottom: 66%;
}

.image-grid-bottom .image-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    border-radius: 8px;
    object-fit: cover;
}

.image-grid-bottom .image-placeholder:first-child {
    left: 0;
    width: calc(66.666% - calc(var(--space-md) / 2));
}

.image-grid-bottom .image-placeholder:last-child {
    right: 0;
    width: calc(33.333% - calc(var(--space-md) / 2));
}

/* Full Width Image Section */
.full-width-image {
    margin-bottom: var(--space-2xl);
    width: 110%;
    margin-left: -5%;
}

.full-width-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Color Palette Section */
.color-palette-section {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    align-items: flex-start;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 80px;
}

.color-swatch {
    width: 100%;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.color-hex {
    font-size: var(--font-size-footnote);
    color: var(--color-text-light);
    margin: 0;
    font-family: monospace;
    text-align: center;
}

/* Square Image Grid */
.square-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    width: 110%;
    margin-left: -5%;
}

.square-image-grid img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        width: 100%;
        margin-left: 0;
        margin-bottom: var(--space-lg);
        gap: var(--space-lg);
    }

    .content-grid .image-container,
    .content-grid .image-placeholder {
        max-height: none;
    }

    .hero-item {
        margin-bottom: var(--space-lg);
    }

    .hero-subtitle {
        max-width: 100% !important;
    }

    .content-section {
        margin-bottom: var(--space-lg);
    }

    .content-section p {
        max-width: 100% !important;
        width: 100%;
    }

    .content-section {
        width: 100%;
    }

    .meta-info {
        flex-direction: row !important;
        justify-content: space-between;
        gap: var(--space-md);
    }

    .full-width-image {
        width: 100%;
        margin-left: 0;
        margin-bottom: var(--space-lg);
    }

    .square-image-grid {
        width: 100%;
        margin-left: 0;
        grid-template-columns: 1fr;
        margin-bottom: var(--space-lg);
    }

    .second-image-section {
        margin-bottom: var(--space-lg);
    }

    .second-image-section .image-container {
        width: 100%;
    }

    .second-image-section .image-container img {
        width: 100%;
        height: auto;
    }

    .image-grid-bottom {
        margin-bottom: var(--space-lg);
    }

    .color-palette-section {
        margin-bottom: var(--space-lg);
    }

    /* Ensure all images stay within content width */
    img {
        max-width: 100%;
        height: auto;
    }

    .image-container {
        width: 100%;
        overflow: hidden;
    }

    .image-container img {
        width: 100%;
        height: auto;
    }
}
