.cards-wrapper {
    margin: 0 auto;
}

.cols {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 2rem;
}

.col {
    flex: 1 1 calc(33.333% - 2rem);
    margin: 0;
    cursor: pointer;
    min-width: 0;
    height: 500px;
    position: relative;
    transition: flex-basis 0.3s ease, width 0.3s ease;
}

.col:only-child {
    flex-basis: 100%;
    width: 100%;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 30px;
    /* Base neon glow for container */
    box-shadow:
        0 0 10px rgba(255, 107, 0, 0.3),
        0 0 20px rgba(255, 107, 0, 0.2),
        0 0 30px rgba(255, 107, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.front,
.back {
    background-size: cover;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.25);
    border-radius: 30px;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    text-align: center;
    color: #fff;
    font-size: 1.5rem;
    transition: opacity 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.front {
    /*border: 15px solid var(--off-orange);*/
    /*background-color: var(--d-orange);*/
    opacity: 1;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Front side neon effect */
    box-shadow:
        inset 0 0 15px rgba(255, 107, 0, 0.2),
        0 0 10px rgba(255, 107, 0, 0.3);
    transition: opacity 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* Image overlay for front */
.front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background: linear-gradient(to bottom, rgba(56, 58, 77, 0.2) 0%, rgba(56, 58, 77, 0.7) 70%, rgba(56, 58, 77, 0.9) 100%);*/
    border-radius: 15px;
    z-index: 1;
}

.front .inner {
    position: relative;
    z-index: 2;
    padding: 2rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.back {
    background: black;
    opacity: 0;
    transform: scale(0.95);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    transition: opacity 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.back .inner {
    width: 100%;
    height: auto;
    padding: 2rem;
    box-sizing: border-box;
    text-align: center;
}

/* Hover effect: fade front out, fade back in with enhanced neon */
.col:hover .container {
    /*box-shadow:
        0 0 15px rgba(255, 107, 0, 0.6),
        0 0 30px rgba(255, 107, 0, 0.4),
        0 0 50px rgba(255, 107, 0, 0.3);
    /*transform: scale(1.01);*/
    animation: card-flicker 1.2s infinite steps(1, end);*/
}

.col:hover .front {
    opacity: 0;
    /*transform: scale(0.95);*/
    /*box-shadow:
        inset 0 0 25px rgba(255, 107, 0, 0.4),
        0 0 20px rgba(255, 107, 0, 0.5);*/
}

.col:hover .back {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
    /*box-shadow:
        inset 0 0 30px rgba(255, 107, 0, 0.5),
        0 0 25px rgba(255, 107, 0, 0.6),
        0 0 45px rgba(255, 107, 0, 0.4);*/
}

/* Card flicker animation on hover */
@keyframes card-flicker {
    0%, 16%, 100% {
        box-shadow:
            0 0 15px rgba(255, 107, 0, 0.6),
            0 0 30px rgba(255, 107, 0, 0.4),
            0 0 50px rgba(255, 107, 0, 0.3);
    }
    18% {
        box-shadow:
            0 0 8px rgba(255, 107, 0, 0.4),
            0 0 15px rgba(255, 107, 0, 0.3),
            0 0 25px rgba(255, 107, 0, 0.2);
    }
    19% {
        box-shadow:
            0 0 20px rgba(255, 107, 0, 0.7),
            0 0 40px rgba(255, 107, 0, 0.5),
            0 0 60px rgba(255, 107, 0, 0.4);
    }
    52% {
        box-shadow:
            0 0 10px rgba(255, 107, 0, 0.5),
            0 0 20px rgba(255, 107, 0, 0.3),
            0 0 35px rgba(255, 107, 0, 0.2);
    }
    54% {
        box-shadow:
            0 0 18px rgba(255, 107, 0, 0.8),
            0 0 35px rgba(255, 107, 0, 0.6),
            0 0 55px rgba(255, 107, 0, 0.4);
    }
    74% {
        box-shadow:
            0 0 12px rgba(255, 107, 0, 0.6),
            0 0 25px rgba(255, 107, 0, 0.4),
            0 0 40px rgba(255, 107, 0, 0.3);
    }
    75% {
        box-shadow:
            0 0 15px rgba(255, 107, 0, 0.6),
            0 0 30px rgba(255, 107, 0, 0.4),
            0 0 50px rgba(255, 107, 0, 0.3);
    }
}


.front .inner h2 {
    text-align: center;
}

.front .inner span {
    font-size: 0.875rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: block;
    margin-bottom: 0.5rem;
    display: none;
}

.card-info {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.expand-link {
    position: relative;
    padding: 1rem;
    text-align: center;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    display: none; /* Hide expand link for cleaner design */
}

.expand-link a {
    color: #54C5D0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.expand-link a:hover {
    color: #7dd8e0;
}

.back p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

/* Add a neon glow to the back content text */
.back .inner p {
    text-shadow: 
        0 0 5px rgba(255, 107, 0, 0.5),
        0 0 10px rgba(255, 107, 0, 0.3);
}

/* Optional: Add a neon border effect */
/*.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 32px;
    background: linear-gradient(45deg, 
        rgba(255, 107, 0, 0.8), 
        rgba(255, 179, 71, 0.8), 
        rgba(255, 107, 0, 0.8));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}*/

.col:hover .container::before {
    opacity: 0.6;
    animation: neon-border-flicker 1.2s infinite steps(1, end);
}

@keyframes neon-border-flicker {
    0%, 100% { opacity: 0.6; }
    18% { opacity: 0.4; }
    19% { opacity: 0.8; }
    52% { opacity: 0.5; }
    54% { opacity: 0.7; }
    74% { opacity: 0.5; }
    75% { opacity: 0.6; }
}
/*
.card-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
    border: 4px solid #fff;
    background: #222;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
*/


@media screen and (max-width: 1200px) {
    .col{height: 420px;}
}

@media screen and (max-width: 1000px) {
        .cols {
        flex-direction: column;
        align-items: center;
    }

    .col {
        flex: none;
        width: 100%;
        max-width: 500px;
        height: 420px;
    }
}

@media screen and (max-width: 500px) {
    .col {
        height: 300px;
    }
}
/*

@media screen and (max-width: 64rem) {
    .col {
        width: calc(50% - 2rem);
        min-width: 350px;
    }
}

@media screen and (max-width: 48rem) {
    .col {
        width: calc(100% - 2rem);
        min-width: 300px;
    }
}

@media screen and (max-width: 32rem) {
    .cards-wrapper {
        padding: 0 20px;
    }

    .col {
        width: 100%;
        margin: 0 0 2rem 0;
        min-width: 280px;
        height: 500px;
    }
    
    .front .inner p {
        font-size: 1.4rem;
    }
    
    .back p {
        font-size: 1rem;
    }
    */
    /* Reduce glow intensity on mobile for performance */
    .col:hover .container {
        box-shadow:
            0 0 10px rgba(255, 107, 0, 0.4),
            0 0 20px rgba(255, 107, 0, 0.3);
        transform: none;
        animation: none;
    }
}

.col:hover .front .card-info {
    opacity: 1;
    visibility: visible;
}

.col:hover .front .expand-link {
    display: flex;
}

.card-link {
    display: block;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}