/* ========================================
   3D CUBIC STATS - ENHANCED 3D EFFECT
   ======================================== */

.stats-cubic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
    padding: 2rem;
    perspective: 1200px;
}

.stat-cube {
    position: relative;
    width: 100%;
    height: 200px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.stat-cube:hover {
    transform: translateY(-20px) rotateX(15deg) rotateY(15deg) scale(1.05);
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.cube-front {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 245, 0.98) 100%);
    border: 2px solid rgba(201, 169, 97, 0.5);
    border-radius: 15px;
    box-shadow: 
        0 15px 40px rgba(201, 169, 97, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 0 rgba(201, 169, 97, 0.2);
    transform: translateZ(30px);
}

.cube-top {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.4) 0%, rgba(155, 126, 60, 0.4) 100%);
    border-radius: 15px 15px 0 0;
    transform: rotateX(90deg) translateZ(100px);
    height: 30px;
    box-shadow: 0 5px 15px rgba(201, 169, 97, 0.3);
}

.cube-right {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.3) 0%, rgba(155, 126, 60, 0.3) 100%);
    border-radius: 0 15px 15px 0;
    transform: rotateY(90deg) translateZ(calc(50% - 15px));
    width: 30px;
    right: -15px;
    box-shadow: 5px 0 15px rgba(201, 169, 97, 0.3);
}

.cube-icon {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    animation: none;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.cube-number {
    font-family: var(--font-luxury);
    font-size: 2.8rem;
    font-weight: 600;
    color: #0D3520;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cube-label {
    font-size: 0.9rem;
    color: rgba(10, 40, 24, 0.85);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* ========================================
   MOBILE FIXES FOR HEXAGONS
   ======================================== */

@media (max-width: 768px) {
    .stats-cubic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1rem;
        justify-items: center;
    }
    
    .stat-cube {
        height: 160px;
        width: 100%;
        max-width: 150px;
    }
    
    .cube-icon {
        font-size: 2rem;
    }
    
    .cube-number {
        font-size: 2rem;
    }
    
    .cube-label {
        font-size: 0.75rem;
    }
    
    /* Fix Hexagon Mobile Visibility */
    .executives-hexagon {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem;
        padding: 1rem 0;
    }
    
    .hexagon-card {
        width: 150px !important;
        max-width: 150px !important;
        flex: 0 0 150px !important;
        margin: 0 !important;
    }
    
    .hexagon-shape {
        width: 150px !important;
        height: 173px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        padding: 0.5rem !important;
    }
    
    .hexagon-content {
        padding: 1rem 0.5rem !important;
        width: 100% !important;
    }
    
    .exec-avatar {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem;
    }
    
    .exec-role {
        font-size: 0.65rem;
        margin-bottom: 0.5rem;
        color: #C9A961;
        font-weight: 800;
    }
    
    .exec-name {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        color: #0D3520;
        font-weight: 600;
        line-height: 1.3;
    }
    
    .exec-title {
        font-size: 0.75rem;
        color: rgba(10, 40, 24, 0.85);
        line-height: 1.4;
        font-weight: 500;
    }
    
    /* Fix Diamond Mobile */
    .diamond-shape {
        padding: 3rem 2rem;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .leader-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .leader-badge-gold {
        font-size: 0.75rem;
        padding: 0.5rem 1.25rem;
    }
    
    .leader-name-large {
        font-size: 1.6rem;
    }
    
    .leader-tagline {
        font-size: 0.9rem;
    }
    
    .linkedin-btn {
        padding: 0.65rem 1.75rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   TEXT CONTRAST FIXES
   ======================================== */

/* Ensure all text is readable */
.cube-front,
.hexagon-content,
.diamond-content,
.timeline-card,
.mission-glass-card,
.bubble-item {
    color: #0A2818;
}

.cube-number,
.exec-name,
.leader-name-large,
.timeline-card h5,
.mission-content h4 {
    color: #0D3520 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.cube-label,
.exec-role,
.exec-title,
.leader-tagline,
.timeline-card p,
.mission-content p {
    color: rgba(10, 40, 24, 0.85) !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Ensure backgrounds are light enough */
.hexagon-shape,
.diamond-shape {
    background: rgba(255, 255, 255, 0.98) !important;
}

.cube-front {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 245, 0.98) 100%) !important;
}

/* ========================================
   EXTRA SMALL MOBILE (< 400px)
   ======================================== */

@media (max-width: 400px) {
    .stats-cubic-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-cube {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .hexagon-card {
        max-width: 160px;
    }
    
    .hexagon-shape {
        height: 200px;
    }
    
    .exec-name {
        font-size: 1rem;
    }
    
    .exec-title {
        font-size: 0.7rem;
    }
}

/* ========================================
   LANDSCAPE MOBILE FIX
   ======================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .stats-cubic-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .stat-cube {
        height: 140px;
    }
    
    .executives-hexagon {
        flex-direction: row;
        justify-content: center;
    }
    
    .hexagon-shape {
        height: 180px;
    }
}


/* ========================================
   OVERRIDE CIRCULAR WITH CUBIC - ENHANCED
   ======================================== */

/* Force cubic display */
.stats-circular-grid {
    display: none !important;
}

.stat-circle {
    position: relative !important;
    width: 100% !important;
    height: 200px !important;
    transform-style: preserve-3d !important;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    cursor: pointer !important;
    animation: none !important;
}

.stat-circle:hover {
    transform: translateY(-20px) rotateX(15deg) rotateY(15deg) scale(1.05) !important;
}

/* Hide SVG circles completely */
.circle-progress svg,
.circle-bg,
.circle-fill {
    display: none !important;
    visibility: hidden !important;
}

/* Style circle-content as 3D cube front face */
.circle-content {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 245, 0.98) 100%) !important;
    border: 2px solid rgba(201, 169, 97, 0.5) !important;
    border-radius: 15px !important;
    box-shadow: 
        0 15px 40px rgba(201, 169, 97, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 0 rgba(201, 169, 97, 0.2) !important;
    transform: translateZ(30px) !important;
    backface-visibility: hidden !important;
}

.circle-icon {
    font-size: 2.8rem !important;
    margin-bottom: 0.75rem !important;
    animation: none !important;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15)) !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

/* Fallback for missing emojis */
.circle-icon:empty::before {
    content: "📊";
}

.circle-number {
    font-family: var(--font-luxury) !important;
    font-size: 2.8rem !important;
    font-weight: 600 !important;
    color: #0D3520 !important;
    line-height: 1 !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.circle-label {
    font-size: 0.9rem !important;
    color: rgba(10, 40, 24, 0.85) !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    font-weight: 700 !important;
}

/* Add 3D cube top face */
.circle-progress::before {
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 30px !important;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.4) 0%, rgba(155, 126, 60, 0.4) 100%) !important;
    border-radius: 15px 15px 0 0 !important;
    transform: rotateX(90deg) translateZ(100px) !important;
    top: 0 !important;
    box-shadow: 0 5px 15px rgba(201, 169, 97, 0.3) !important;
}

/* Add 3D cube right face */
.circle-progress::after {
    content: '' !important;
    position: absolute !important;
    width: 30px !important;
    height: 100% !important;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.3) 0%, rgba(155, 126, 60, 0.3) 100%) !important;
    border-radius: 0 15px 15px 0 !important;
    transform: rotateY(90deg) translateZ(calc(50% - 15px)) !important;
    right: -15px !important;
    box-shadow: 5px 0 15px rgba(201, 169, 97, 0.3) !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .stats-circular-grid {
        display: none !important;
    }
    
    .stat-circle {
        height: 160px !important;
        width: 100% !important;
        max-width: 130px !important;
        margin: 0 auto !important;
    }
    
    .circle-icon {
        font-size: 2rem !important;
    }
    
    .circle-number {
        font-size: 2rem !important;
    }
    
    .circle-label {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 400px) {
    .stats-circular-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-circle {
        max-width: 280px !important;
        margin: 0 auto !important;
    }
}
