/* Expanding Blocks - FLIP Animation Styles */

:root {
    --eb-red: #A855F7;
    /* Neon Purple */
    --eb-blue: #D4AF37;
    /* Golden Metallic */
    --eb-yellow: #FFD700;
    /* Neon Gold */
    --eb-hover-translate: 12px;
    --eb-block-size: clamp(220px, 28vw, 280px);
    --eb-container-max-width: 1200px;
    --eb-ease: cubic-bezier(0.4, 0.0, 0.0, 1);
    --eb-ease-in: cubic-bezier(0.0, 0.0, 0.2, 1);
}

.block-wrap {
    width: 100%;
    min-height: 400px;
    background: transparent;
    display: flex;
    position: relative;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    margin: auto;
    gap: 20px;
    padding: 12px;
    flex-wrap: wrap;
}

.block-col {
    display: flex;
    height: 100%;
    margin: 0;
    width: min(100%, var(--eb-block-size));
    flex: 0 1 var(--eb-block-size);
    justify-content: center;
}

.block {
    width: 100%;
    max-width: var(--eb-block-size);
    aspect-ratio: 1 / 1;
    min-height: 200px;
    border-radius: 20px;
    margin: auto 0;
    position: relative;
    will-change: transform;
    display: block;
    color: white;
    cursor: pointer;
    transition: transform 0.2s var(--eb-ease);
}

.block:not(.block--active):hover {
    transform: translateY(calc(-1 * var(--eb-hover-translate))) scale(1.15);
    z-index: 10;
}

/* Invisible helper to prevent jitter */
.block:not(.block--active):hover::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: scale(1) translateY(var(--eb-hover-translate));
}

.block:not(.block--active):active {
    transform: scale(0.95) translateY(calc(-1 * var(--eb-hover-translate)));
}

.block--active {
    position: absolute;
    left: 0 !important;
    top: 0 !important;
    z-index: 50;
    height: 100% !important;
    width: 100% !important;
    border-radius: 24px;
    cursor: default;
    margin: 0 !important;
}

.block--transition {
    transition: transform 0.4s var(--eb-ease);
}

/* Content Styles */
.block-content {
    display: none;
    padding: 48px;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
}

.block--active .block-content {
    display: flex;
    animation: eb-fade-in 0.3s var(--eb-ease-in) forwards 0.2s;
}

.block-content__header {
    margin-bottom: 24px;
}

.block-content__header__text {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1;
    font-family: 'Syne', sans-serif;
    text-transform: uppercase;
    text-align: center;
}

.block-content__body {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 32px;
    opacity: 0.9;
    text-align: center;
}

.block-content__button {
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 18px 36px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    width: max-content;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.block-content__button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Icon in inactive state — absolutely centered */
.block-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 18px));
    width: 4rem;
    height: 4rem;
    transition: opacity 0.2s ease;
    color: white !important;
    stroke: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block--active .block-icon {
    display: none;
}

/* Label under icon — absolutely centered */
.block-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 42px));
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

.block--active .block-label {
    display: none;
}

@keyframes eb-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Colors */
.eb-purple {
    background: linear-gradient(135deg, #A855F7, #7C3AED);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.eb-gold {
    background: linear-gradient(135deg, #FFD700, #B8860B);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.eb-cyan {
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.eb-emerald {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

/* Dark Mode Adjustments */
[class*='dark'] .block-wrap {
    background: rgba(15, 23, 42, 0.3);
}
