﻿/* =========================================================
   Trifecta Section — Square Collage
   ========================================================= */
.trifecta {
    /*padding: 120px 48px;*/
    background: var(--m8crc-surface-raised);
    transition: background .3s;
}

.trifecta-inner {
    max-width: 1200px;
    margin-left: 15px;
    margin-right: 12px !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.trifecta-content h2 {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 300;
    color: var(--m8crc-text-base);
    margin-bottom: 28px;
    transition: color .3s;
    text-align: center;
}

    .trifecta-content h2 em {
        font-style: italic;
        color: var(--m8crc-secondary);
    }

.trifecta-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--m8crc-text-subdued);
    margin-bottom: 20px;
    transition: color .3s;
}

.trifecta-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--m8crc-border-subtle);
}

.trifecta-stat {
    text-align: center;
}

.trifecta-stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 300;
    color: var(--m8crc-secondary);
    line-height: 1;
    margin-bottom: 8px;
}

.trifecta-stat-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--m8crc-text-muted);
}

/* Square Collage — 3×2 grid, every other column offset down */
.sq-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
}

.sq-item {
    width: 140px;
    height: 140px;
    background: var(--m8crc-surface-overlay);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .4s, background .3s;
    overflow: hidden;
}

    /* Offset columns 2 & 5 (0-indexed: 1 & 4) down by 24px */
    .sq-item:nth-child(3n+2) {
        transform: translateY(24px);
    }

    .sq-item:hover {
        transform: scale(1.05);
    }

    .sq-item:nth-child(3n+2):hover {
        transform: translateY(24px) scale(1.05);
    }

    .sq-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sq-item.accent {
        background: var(--m8crc-primary);
    }

        .sq-item.accent svg {
            width: 44px;
            height: 44px;
            stroke: #fff;
            fill: none;
            stroke-width: 1.5px;
        }

    /* Teal accent tile */
    .sq-item.accent-teal {
        background: var(--m8crc-secondary);
    }

        .sq-item.accent-teal svg {
            width: 44px;
            height: 44px;
            stroke: #fff;
            fill: none;
            stroke-width: 1.5px;
        }

    .sq-item.accent-neutral {
        background: var(--m8crc-surface-overlay);
        border: 1px solid var(--m8crc-text-muted);
    }

        .sq-item.accent-neutral svg {
            width: 44px;
            height: 44px;
            stroke: var(--m8crc-text-base);
            fill: none;
            stroke-width: 1.5px;
        }

/* Responsive */
@media (max-width: 1024px) {
    .trifecta-inner {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .trifecta {
        padding: 80px 24px;
    }

    .trifecta-stats {
        flex-direction: column;
        gap: 32px;
    }

    /* Mobile: 2x3 grid */
    .sq-collage {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .sq-item {
        width: 120px;
        height: 120px;
    }

        /* Remove desktop offset on mobile */
        .sq-item:nth-child(3n+2) {
            transform: none;
        }

            .sq-item:nth-child(3n+2):hover {
                transform: scale(1.05);
            }

    /* Mobile Layout:
       Row 1: [Government] [Industry]
       Row 2: [Implementation] [Empty]
       Row 3: [Empty] [Empty (hidden)]
    */
}
