﻿/* ============================
   THREE‑COLUMN LAYOUT (FINAL)
   ============================ */

.page-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

/* Main grid */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1800px; /* 4K friendly */
    margin: 0 auto;
    padding: 0 10px;
    animation: fadeIn 0.4s ease-out;
}

/* Sticky left & right columns */
.left-column,
.right-column {
    position: sticky;
    top: 90px; /* adjust based on your header height */
    height: fit-content;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden; /* column container still clips content, but items inside can overflow */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

    /* Smooth hover animation */
    .left-column:hover,
    .right-column:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }

/* Main content */
.main-content {
    background: transparent;
    padding: 0;
}

/* Column items – allow image to overflow outside the card */
.column-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    overflow: visible; /* image can scale outside this container */
    position: relative;
    z-index: 1;
}

    .column-item:last-child {
        border-bottom: none;
    }

/* Column images – enhanced "pop out" effect with larger scale */
.column-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.3s ease, filter 0.3s ease;
    display: block;
    will-change: transform;
}

    .column-image:hover {
        transform: scale(1.2); /* more dramatic scale */
        box-shadow: var(--shadow-hover), 0 20px 35px rgba(0, 0, 0, 0.25);
        filter: brightness(1.03) contrast(1.07);
        z-index: 10; /* ensure it floats above everything in the card */
        position: relative; /* required for z-index to work */
    }

.column-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Placeholder */
.placeholder {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* ============================
   MOBILE COLLAPSE (Auto)
   ============================ */

@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .left-column,
    .right-column {
        position: relative;
        top: 0;
        width: 100%;
        opacity: 1;
        transform: none;
        box-shadow: var(--shadow-soft);
    }
}

/* ============================
   SMALL MOBILE (Edge-to-edge)
   ============================ */

@media (max-width: 600px) {
    .page-layout {
        padding: 0 6px;
        gap: 14px;
    }

    .column-item {
        padding: 12px 14px;
    }
}

/* ============================
   ULTRA SMALL (iPhone Mini)
   ============================ */

@media (max-width: 400px) {
    .page-layout {
        padding: 0 4px;
        gap: 10px;
    }

    .column-item {
        padding: 10px 12px;
    }
}

/* ============================
   4K / Ultra‑Wide Screens
   ============================ */

@media (min-width: 2000px) {
    .page-layout {
        max-width: 2400px;
        grid-template-columns: 1fr 2.5fr 1fr;
        gap: 30px;
    }

    .column-item {
        padding: 20px 24px;
    }

    .column-text {
        font-size: 1.1rem;
    }
}

/* ============================
   Smooth Fade Animation
   ============================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
