/* Diamond 3D Component - OCTAGONAL CON MESA PLANA (CORONA Y PABELLÓN) */
.diamond-scene {
    perspective: 2000px;
    width: 100%;
    height: 450px;
    margin: 0px auto 100px auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.diamond-3d {
    width: 400px;
    height: 500px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateDiamond 30s infinite linear;
    transform-origin: 50% 250px;
    will-change: transform;
}

@keyframes rotateDiamond {
    0% {
        transform: scale3d(1.4, 1.4, 1.4) rotateX(-8deg) rotateY(0deg);
    }

    100% {
        transform: scale3d(1.4, 1.4, 1.4) rotateX(-8deg) rotateY(-360deg);
    }
}

.d-face {
    position: absolute;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    opacity: 0.85;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(0, 168, 255, 0.3);
    backface-visibility: hidden;
    transform: translateZ(0);
    overflow: hidden;
}

.d-face::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 45%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0) 55%,
            rgba(255, 255, 255, 0) 100%);
    transition: none;
    pointer-events: none;
}

.diamond-3d:hover .d-face::after {
    animation: faceShine 3s infinite linear;
}

@keyframes faceShine {
    0% {
        transform: translate(-20%, -20%);
    }

    100% {
        transform: translate(20%, 20%);
    }
}

.d-face:hover {
    opacity: 1;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(100, 200, 255, 0.4) 100%) !important;
    border-color: rgba(0, 168, 255, 0.8);
    box-shadow: 0 0 30px rgba(0, 168, 255, 0.4), inset 0 0 20px rgba(0, 168, 255, 0.3);
}

.d-face span {
    font-size: 1.1rem;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0, 168, 255, 1);
    display: block;
    margin-bottom: 2px;
}

.d-face small {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--gold);
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.d-bottom small {
    font-size: 0.675rem;
}

/* 1. MESA (Table) */
.d-table {
    width: 200px;
    height: 200px;
    top: 150px;
    left: 100px;
    clip-path: polygon(29.3% 0%, 70.7% 0%, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0% 70.7%, 0% 29.3%);
    background: rgba(0, 168, 255, 0.15);
    transform: rotateX(90deg) translateZ(100px);
}

/* 2. CORONA (Top Faces) */
.d-top {
    width: 166px;
    height: 142px;
    top: 108px;
    left: 117px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    transform-origin: 50% 100%;
    justify-content: flex-end;
    padding-bottom: 20px;
    background: linear-gradient(180deg, rgba(0, 168, 255, 0.1) 0%, rgba(0, 168, 255, 0.3) 100%);
}

.d-top.face-0 {
    transform: rotateY(0deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-1 {
    transform: rotateY(45deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-2 {
    transform: rotateY(90deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-3 {
    transform: rotateY(135deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-4 {
    transform: rotateY(180deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-5 {
    transform: rotateY(225deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-6 {
    transform: rotateY(270deg) translateZ(200px) rotateX(45deg);
}

.d-top.face-7 {
    transform: rotateY(315deg) translateZ(200px) rotateX(45deg);
}

/* 3. PABELLÓN (Bottom Faces) */
.d-bottom {
    width: 166px;
    height: 320px;
    top: 250px;
    left: 117px;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
    transform-origin: 50% 0%;
    justify-content: flex-start;
    padding-top: 50px;
    background: linear-gradient(0deg, rgba(0, 168, 255, 0.05) 0%, rgba(0, 168, 255, 0.25) 100%);
}

.d-bottom.face-0 {
    transform: rotateY(0deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-1 {
    transform: rotateY(45deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-2 {
    transform: rotateY(90deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-3 {
    transform: rotateY(135deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-4 {
    transform: rotateY(180deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-5 {
    transform: rotateY(225deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-6 {
    transform: rotateY(270deg) translateZ(200px) rotateX(-38.66deg);
}

.d-bottom.face-7 {
    transform: rotateY(315deg) translateZ(200px) rotateX(-38.66deg);
}

/* RESPONSIVE DIAMOND - EL QUE FUNCIONABA */
@media (max-width: 768px) {
    .diamond-scene {
        height: 350px;
        margin-bottom: 60px;
        perspective: 1000px;
        /* Reducida la perspectiva para móvil */
    }

    .diamond-3d {
        transform-origin: 50% 150px;
        animation-duration: 40s;
        will-change: transform;
    }

    .d-face {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        /* Color sólido vibrante, sin degradados ni sombras que matan el rendimiento */
        background: rgba(0, 160, 255, 0.7) !important;
        border: 1px solid rgba(255, 255, 255, 0.8) !important;
        box-shadow: none !important;
        transition: none !important;
    }

    @keyframes rotateDiamond {
        0% {
            transform: scale3d(0.7, 0.7, 0.7) rotateX(-8deg) rotateY(0deg);
        }

        100% {
            transform: scale3d(0.7, 0.7, 0.7) rotateX(-8deg) rotateY(-360deg);
        }
    }
}