:root {
    --gap: 0;
    --left: #1c003f;
    --right: #fb9400;
    --radius: 28px;
    --transition: 0.5s ease;

    /* Image opacity levels */
    --img-opacity-normal: 0.6;
    /* default image transparency */
    --img-opacity-hover: 1;
    /* fully visible on hover */

    /* Gradient darkness levels */
    --mask-darkness-normal: 0.3;
    /* lighter mask */
    --mask-darkness-hover: 0.6;
    /* darker mask */
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background: #ededed url('../images/layout/wrapper.jpg') no-repeat center center fixed;
    background-size: auto;
    background-size: cover;
    transition: all .4s ease-out;
}

.wrap {
    display: flex;
    gap: var(--gap);
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.panel {
    color: #fff;
    padding: 40px clamp(20px, 45px, 70px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 1;
    transition: flex var(--transition), transform var(--transition);
    will-change: flex, transform;
    z-index: 1;
}

.panel .background {
    inset: 0;
    width: 100vw;
    height: 100vh;
    position: fixed;
    opacity: var(--img-opacity-normal);
    transition: flex var(--transition), opacity var(--transition), var(--transition);
}

.panel .content {
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    position: relative;
    transition: transform var(--transition);
    height: 100%;
}

.panel .content section {
    background-color: rgba(0, 0, 0, .2);
    position: relative;
    padding: 25px;
    border-radius: 25px;
    transition: all var(--transition);
}

.panel .content section:hover {
    background-color: rgba(0, 0, 0, .4);
    box-shadow: 0 0 25px 5px #0000003b;
}

.panel .content section a {
    color: #fff;
    text-decoration: none;
    /* position: absolute;
    inset: 0; */
    /* background-color: greenyellow; */
    width: 100%;
    height: 100%;
    display: block;
}

.panel .content section h2 {
    margin-top: 0;
    text-shadow: 2px 2px 5px #2B2B2B;
    font-size: .9rem;
    letter-spacing: 3px;
}

.panel .content section p {
    line-height: 1.7;
    text-shadow: 2px 2px 5px #2B2B2B;
    font-size: 1rem;
}

.panel .content section p:last-child {
    text-align: right;
}

/* Left panel */
.panel--left .background {
    background: var(--left);
    background: url('./images/programmer.jpg') center/cover no-repeat;
}

.panel--left .background {
    background: url('./images/programmer.jpg') center/cover no-repeat;
    position: fixed;
    inset: 0;
}

/* SECOND layer = overlay.jpg (starts invisible) */
.panel--left .background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('./images/overlay.jpg') center/cover no-repeat;
    opacity: 0;
    /* Start invisible */
    transition: opacity 1.2s ease;
    /* Smooth fade */
    z-index: 2;
}

.panel--left:hover .background::after {
    opacity: 1;
}

.panel--left:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#1c003f4a, #1c003f);
    pointer-events: none;
    z-index: 1;
}

/* Right panel */
.panel--right .background {
    background: var(--right);
    background: url('./images/freeway.jpg') center/cover no-repeat;
}

.panel--right:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#fb92005d, #fb9200);
    pointer-events: none;
    z-index: 1;
}

/* Hover effect */
.wrap:hover .panel {
    flex: .9;
    /* transform: scale(1); */
}

.wrap .panel:hover {
    flex: 1.1;
    /* transform: scale(1.02); */
    z-index: 2;
}

.wrap .panel:hover .background {
    opacity: 1;
    transform: scale(1.1);
}

.panel .content section h2,
.panel .content section p:last-of-type {
    transition: font-size 0.4s ease, transform 0.4s ease;
    transform-origin: center center;
}

.panel .content section a h2 {
    font-weight: 100;
}

.panel .content section:hover h2 {
    /* font-size: 2.5vw; */
    transform: translate(-3px, 0);
}

.panel .content section:hover p:last-of-type {
    /* font-size: 1.5vw; */
    /* transform: scale(1.2) translateX(45px); */
    /* transition-delay: 250ms; */
}

@media (max-width: 1200px) {

    .panel {
        padding: 10px;
    }

    .panel .content {
        height: 100%;
        padding: 10px;
    }
}

@media (max-width: 800px) {
    .panel .content section h2 {
        font-size: .7rem;
        margin-bottom: 10px;
    }

    .panel .content section p {
        font-size: .7rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .panel .content section p:last-child {
        margin-bottom: 0;
    }
}


/* Mobile: stack vertically */
@media (max-width: 720px) {
    .wrap {
        flex-direction: column !important;
    }

    /* .panel {
        flex: 1 !important;
        clip-path: none !important;
        transform: none !important;
        padding: 0;
    } */

    .panel .content section {
        padding: 15px;
    }

    /* Left panel */
    .panel.panel--left .background {
        background: url('./images/programmer_mobile.jpg') top center no-repeat;
        background-size: cover;
    }


    /* Right panel */
    .panel.panel--right .background {
        background: url('./images/freeway_mobile.jpg') top center no-repeat;
        background-size: cover;
    }

    /* Disable hover grow/shrink on mobile */
    .wrap:hover .panel,
    .wrap .panel:hover {
        flex: 1 !important;
        transform: none !important;
    }
}

/* Mobile: stack vertically */
@media (max-width: 500px) {

    .wrap {
        height: 100vh;
        /* or whatever container height you want to split */
    }

    .panel .content section a h2 {
        font-size: 12px;
    }

    .panel .content section:hover h2 {
        transform: scale(1);
    }

    .panel .content section a p:last-child {
        font-size: 16px;
        text-align: right;
    }

    .panel .content section:hover p:last-of-type {
        /* transform: scale(1) translateX(-10px) translateY(-5px); */
        /* transition-delay: 150ms; */
    }

    /* Left panel */
    .panel--left .background {
        background: url('./images/programmer_small.jpg') top center no-repeat;
    }

    /* .panel--left {
        flex: 1 !important;
    } */

    /* Right panel */
    .panel--right .background {
        background: url('./images/freeway_small.jpg') top center no-repeat;
    }

    /* .panel--right {
        flex: 1.3 !important;
    } */

    .panel {
        padding: 0;
    }

    .panel .content {
        padding: 5px;
    }

    .panel .content section {
        padding: 5px 15px;
    }
}



/* CHRISTMASS overlay
.panel--left .background::after {
    background-image: url('./images/overlay_santa.jpg');
}

.panel .content section:before {
    content: '';
    position: absolute;
    top: -50px;
    right: -2px;
    z-index: 999;
    width: 104%;
    height: 74px;
}

.panel.panel--left .content section:first-child:before {
    background: transparent url('../images/layout/seasonal/christmass/teaser_1.png') no-repeat top right;
}

.panel.panel--left .content section:last-child:before {
    background: transparent url('../images/layout/seasonal/christmass/teaser_2.png') no-repeat top right;
}

.panel.panel--right .content section:first-child:before {
    background: transparent url('../images/layout/seasonal/christmass/teaser_3.png') no-repeat top right;
}

.panel.panel--right .content section:last-child:before {
    background: transparent url('../images/layout/seasonal/christmass/teaser_4.png') no-repeat top right;
}
*/
