/* =========================================================
   3D GEOMETRY BOXES — Home Page Selection
   File: boxes-3d-select.css
   ========================================================= */

:root {
    --box-size: clamp(140px, min(15vw, 25vh), 230px);
    --box-half-size: calc(var(--box-size) / 2);

    /* ---- White box (accent: soft violet highlight) ---- */
    --white-front:    #ffffff;
    --white-top:      #f1f5f9;
    --white-right:    #e2e8f0;
    --white-left:     #eef2f7;
    --white-bottom:   #cbd5e1;
    --white-back:     #dde3ec;
    --white-accent:   #8b5cf6;
    --white-glow:     rgba(139, 92, 246, 0.35);

    /* ---- Pink box ---- */
    --pink-front:     linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --pink-top:       linear-gradient(135deg, #fbb6ce 0%, #f093fb 100%);
    --pink-right:     linear-gradient(135deg, #e0457a 0%, #c53668 100%);
    --pink-left:      linear-gradient(135deg, #f5576c 0%, #e0457a 100%);
    --pink-bottom:    #b82e5a;
    --pink-back:      #c53668;
    --pink-glow:      rgba(236, 72, 153, 0.45);

    /* ---- Sea-water box (Indirect) ---- */
    --sea-front:      linear-gradient(135deg, #90E0EF 0%, #00B4D8 100%);
    --sea-top:        linear-gradient(135deg, #CAF0F8 0%, #90E0EF 100%);
    --sea-right:      linear-gradient(135deg, #0077B6 0%, #023E8A 100%);
    --sea-left:       linear-gradient(135deg, #00B4D8 0%, #0077B6 100%);
    --sea-bottom:     #023E8A;
    --sea-back:       #0077B6;
    --sea-glow:       rgba(0, 180, 216, 0.5);

    --text-dark:      #1e293b;
    --text-light:     #64748b;
}

/* ============ GRID CONTAINER ============ */
.box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--box-size) + 90px)), 1fr));
    gap: clamp(2rem, 6vh, 5rem) clamp(1rem, 3vw, 3rem);
    width: 100%;
    max-width: 1300px;
    padding: 2rem 1rem;
    justify-content: center;
    justify-items: center;
}

/* ============ WRAPPER ============ */
.box-3d-wrapper {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    width: 100%;
    display: flex;
    justify-content: center;
}

.box-3d-wrapper:nth-child(1) { animation-delay: 0.15s; }
.box-3d-wrapper:nth-child(2) { animation-delay: 0.35s; }
.box-3d-wrapper:nth-child(3) { animation-delay: 0.55s; }

.box-3d-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    outline: none;
}

/* ============ 3D SCENE ============ */
.box-3d-scene {
    width: var(--box-size);
    height: var(--box-size);
    perspective: calc(var(--box-size) * 4.35);
    margin-bottom: clamp(1.5rem, 4vh, 3rem);
    position: relative;
}

/* Ground shadow */
.box-3d-scene::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--box-size) * 0.78);
    height: clamp(14px, calc(var(--box-size) * 0.096), 22px);
    background: radial-gradient(ellipse, rgba(15, 23, 42, 0.3) 0%, transparent 70%);
    filter: blur(6px);
    animation: shadowPulse 5s ease-in-out infinite;
    z-index: -1;
}

.box-3d-wrapper:nth-child(1) .box-3d-scene::after { animation-delay: 0s; }
.box-3d-wrapper:nth-child(2) .box-3d-scene::after { animation-delay: 0.5s; }
.box-3d-wrapper:nth-child(3) .box-3d-scene::after { animation-delay: 1s; }

.box-3d-link:hover .box-3d-scene::after {
    width: 130px;
    opacity: 0.5;
    filter: blur(10px);
}

/* ============ CUBE ============ */
.box-3d-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(-30deg);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatCube 5s ease-in-out infinite;
    cursor: pointer;
}

.box-3d-wrapper:nth-child(1) .box-3d-cube { animation-delay: 0s; }
.box-3d-wrapper:nth-child(2) .box-3d-cube { animation-delay: 0.5s; }
.box-3d-wrapper:nth-child(3) .box-3d-cube { animation-delay: 1s; }

.box-3d-link:hover .box-3d-cube {
    transform: rotateX(-28deg) rotateY(-60deg) translateY(-12px) scale(1.04);
    animation-play-state: paused;
}

/* ============ FACES ============ */
.box-face {
    position: absolute;
    width: var(--box-size);
    height: var(--box-size);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backface-visibility: visible;
    overflow: hidden;
}

.box-front  { transform: translateZ(var(--box-half-size)); }
.box-back   { transform: rotateY(180deg) translateZ(var(--box-half-size)); }
.box-right  { transform: rotateY(90deg)  translateZ(var(--box-half-size)); }
.box-left   { transform: rotateY(-90deg) translateZ(var(--box-half-size)); }
.box-top    { transform: rotateX(90deg)  translateZ(var(--box-half-size)); }
.box-bottom { transform: rotateX(-90deg) translateZ(var(--box-half-size)); }

/* -------- WHITE CUBE (highlighted with violet accent) -------- */
.white-cube .box-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(139, 92, 246, 0.35);
    box-shadow:
        inset 0 0 40px rgba(139, 92, 246, 0.08),
        0 0 50px var(--white-glow);
        display: flex;
        align-items: center;
        justify-content: center;
}
.white-cube .box-top    { background: var(--white-top);    border-color: rgba(139,92,246,0.15); }
.white-cube .box-right  { background: var(--white-right);  border-color: rgba(139,92,246,0.15); }
.white-cube .box-left   { background: var(--white-left);   border-color: rgba(139,92,246,0.15); }
.white-cube .box-bottom { background: var(--white-bottom); }
.white-cube .box-back   { background: var(--white-back);   }

/* Accent edge highlight */
.white-cube .box-front::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, var(--white-accent), transparent 60%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

/* -------- PINK CUBE -------- */
.pink-cube .box-front  { background: var(--pink-front);  box-shadow: 0 0 50px var(--pink-glow);display: flex;
        align-items: center;
        justify-content: center; }
.pink-cube .box-top    { background: var(--pink-top); }
.pink-cube .box-right  { background: var(--pink-right); }
.pink-cube .box-left   { background: var(--pink-left); }
.pink-cube .box-bottom { background: var(--pink-bottom); }
.pink-cube .box-back   { background: var(--pink-back); }

/* -------- SEA-WATER CUBE (Indirect) -------- */
.sea-cube .box-front  { background: var(--sea-front);  box-shadow: 0 0 50px var(--sea-glow);display: flex;
        align-items: center;
        justify-content: center; }
.sea-cube .box-top    { background: var(--sea-top); }
.sea-cube .box-right  { background: var(--sea-right); }
.sea-cube .box-left   { background: var(--sea-left); }
.sea-cube .box-bottom { background: var(--sea-bottom); }
.sea-cube .box-back   { background: var(--sea-back); }

/* ============ SHINE SWEEP (on front face) ============ */
.box-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 20%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 80%
    );
    transform: skewX(-20deg);
    transition: left 0.9s ease;
    pointer-events: none;
}

.box-3d-link:hover .box-front::after {
    left: 160%;
}

/* ============ ICON ON FRONT FACE ============ */
.cube-icon-wrapper {
    width: clamp(58px, calc(var(--box-size) * 0.413), 95px);
    height: clamp(58px, calc(var(--box-size) * 0.413), 95px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.45);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.white-cube .cube-icon-wrapper {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: #7c3aed;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
}

.box-3d-link:hover .cube-icon-wrapper {
    transform: scale(1.15) rotate(12deg);
    background: rgba(255, 255, 255, 0.4);
}

.box-3d-link:hover .white-cube .cube-icon-wrapper {
    background: rgba(139, 92, 246, 0.25);
    transform: scale(1.15) rotate(-12deg);
}

.cube-icon {
    font-size: clamp(1.7rem, calc(var(--box-size) * 0.188), 2.7rem);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============ LOGIN BADGE (on top face) ============ */
.cube-login-badge {
    position: absolute;
    top: 14px;
    /* right: 14px; */
    background: rgba(15, 23, 42, 0.6);
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.55rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0.3px;
}

.white-cube .cube-login-badge {
    background: rgba(139, 92, 246, 0.9);
    border-color: rgba(139, 92, 246, 0.6);
}

/* ============ NAME & DESCRIPTION BELOW ============ */
.box-name {
    font-size: clamp(1rem, 2.2vw, 1.6rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    margin-top: 20%;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
}

.box-name::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    margin: 0.6rem auto 0;
    border-radius: 3px;
    background: var(--text-light);
    transition: all 0.4s ease;
}

.box-description-below {
    font-size: clamp(0.75rem, 1.3vw, 0.95rem);
    color: var(--text-light);
    line-height: 1.65;
    text-align: center;
    max-width: 315px;
    transition: color 0.3s ease;
}

/* Hover color per box */
.box-3d-wrapper.white-wrap .box-3d-link:hover .box-name { color: #7c3aed; }
.box-3d-wrapper.white-wrap .box-3d-link:hover .box-name::after {
    background: #7c3aed;
    width: 70px;
}

.box-3d-wrapper.pink-wrap .box-3d-link:hover .box-name { color: #ec4899; }
.box-3d-wrapper.pink-wrap .box-3d-link:hover .box-name::after {
    background: #ec4899;
    width: 70px;
}

.box-3d-wrapper.sea-wrap .box-3d-link:hover .box-name { color: #0077B6; }
.box-3d-wrapper.sea-wrap .box-3d-link:hover .box-name::after {
    background: #0077B6;
    width: 70px;
}

.box-3d-link:hover .box-description-below { color: var(--text-dark); }

/* ============ ANIMATIONS ============ */
@keyframes floatCube {
    0%, 100% {
        transform: rotateX(-20deg) rotateY(-30deg) translateY(0);
    }
    50% {
        transform: rotateX(-20deg) rotateY(-30deg) translateY(-14px);
    }
}

@keyframes shadowPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.75;
    }
    50% {
        transform: translateX(-50%) scale(0.82);
        opacity: 0.4;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .box-container {
        gap: clamp(2rem, 6vh, 4rem) clamp(1rem, 3vw, 2rem);
    }
}

/* Tablet & mobile */
@media (max-width: 768px) {
   
}

/* Small phones */
@media (max-width: 480px) {
   
}

/* Short viewports (landscape phones, small laptops) */
@media (max-height: 700px) {
   
}

@media (max-height: 500px) {
   
}

@media (max-height: 420px) and (orientation: landscape) {

}

:root {
    /* ---- Direct box (Green/Teal) ---- */
    --direct-front:     linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --direct-top:       linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
    --direct-right:     linear-gradient(135deg, #059669 0%, #047857 100%);
    --direct-left:      linear-gradient(135deg, #10b981 0%, #059669 100%);
    --direct-bottom:    #047857;
    --direct-back:      #059669;
    --direct-glow:      rgba(16, 185, 129, 0.5);
}

/* ============ SCREEN SYSTEM ============ */
.screen {
    width: 100%;
    max-width: 1300px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: absolute;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: all;
}

.screen.exit-left {
    opacity: 0;
    transform: translateX(-50px);
}

/* ============ BACK BUTTON ============ */
.back-button-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.back-button:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.back-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-4px);
}

/* ============ SUBTITLE ============ */
.screen-subtitle {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

/* ============ GREEN CUBE (Direct Box) ============ */
.direct-cube .box-front  { background: var(--direct-front);  box-shadow: 0 0 50px var(--direct-glow); display: flex; justify-content: center; align-items: center; }
.direct-cube .box-top    { background: var(--direct-top); }
.direct-cube .box-right  { background: var(--direct-right); }
.direct-cube .box-left   { background: var(--direct-left); }
.direct-cube .box-bottom { background: var(--direct-bottom); }
.direct-cube .box-back   { background: var(--direct-back); }

.direct-cube .cube-icon-wrapper {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.box-3d-wrapper.direct-wrap .box-3d-link:hover .box-name { color: #059669; }
.box-3d-wrapper.direct-wrap .box-3d-link:hover .box-name::after {
    background: #059669;
    width: 70px;
}

/* ============ SCREEN CONTAINER ============ */
.screens-container {
    position: relative;
    width: 100%;
    max-width: 1300px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .screen-subtitle {
        font-size: 1.2rem;
    }
    .back-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    .homepage-logo-middle{
        margin: 0 5%;
    }
}


.homepage-logo-container{
    width: 100%;
    display: flex;
    flex-direction: row ;
    justify-content: space-between;
    padding: 0 5%;
    margin-top: 2%;
    margin-bottom: 2%;
    /* gap:50px */
}

.homepage-logo-middle{

}