/* webapps.css - Styles for the SaaS/Webapps gallery page */

/* Ensure the page inherits the global glassmorphic theme */
body {
    background: var(--background, #1a1a2e);
    color: var(--text-dark, #fff);
    font-family: var(--font-family, 'Inter', sans-serif);
    overflow-x: hidden;
}

/* Header already styled globally */

.gallery-section {
    text-align: center;
    padding: 4rem 1rem;
}

.gallery-section h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--cosmic-highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.gallery-section .subtitle {
    font-size: 1.2rem;
    color: var(--text-light, #ddd);
    margin-bottom: 2rem;
}

.cube-wrapper {
    width: 320px;
    height: 320px;
    margin: 0 auto;
    perspective: 1000px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    /* Glassmorphic overlay */
    background-color: rgba(var(--primary-color-rgb, 59, 130, 246), 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--primary-color-rgb, 59, 130, 246), 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Position the six faces of a cube */
.face1 {
    transform: rotateY(0deg) translateZ(160px);
}

.face2 {
    transform: rotateY(90deg) translateZ(160px);
}

.face3 {
    transform: rotateY(180deg) translateZ(160px);
}

.face4 {
    transform: rotateY(-90deg) translateZ(160px);
}

.face5 {
    transform: rotateX(90deg) translateZ(160px);
}

.face6 {
    transform: rotateX(-90deg) translateZ(160px);
}

/* Hover effect – subtle rotation based on mouse position (handled in JS) */

@media (max-width: 600px) {
    .cube-wrapper {
        width: 260px;
        height: 260px;
    }
}