/* Mobile Units Page - Simple Row Layout */

/* Reset and ensure clean slate */
body {
    margin: 0 !important;
    padding: 0 !important;
    background: #00231f !important;
    overflow-x: hidden !important;
}

/* Header positioning */
.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: rgba(0, 35, 31, 0.95) !important;
    backdrop-filter: blur(10px) !important;
}

/* Main container - full viewport minus header */
.mobile-units-container {
    width: 100vw !important;
    height: 100vh !important;
    padding-top: 80px !important; /* Space for fixed header */
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    background: #00231f !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Main row - contains both columns */
.content-wrapper {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    height: calc(100vh - 80px) !important; /* Full height minus header */
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important; /* Allow scaled circles to extend beyond */
}

/* Column 1: Small left column for scroller */
.circular-nav {
    flex: 0 0 80px !important; /* Fixed width column - 20% smaller */
    height: 100% !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important; /* Remove all padding to prevent clipping */
    box-sizing: border-box !important;
    overflow: visible !important; /* Allow content to extend beyond bounds */
}

/* Scroller within the left column */
.circle-container {
    width: 80px !important; /* Match full parent width since no padding */
    height: 80% !important; /* Most of the column height */
    overflow-y: auto !important;
    overflow-x: visible !important; /* Allow horizontal overflow for scaled circles */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important; /* Reduced gap */
    padding: 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-behavior: smooth !important;
    transform: translateX(0px) !important; /* Removed horizontal offset */
    box-sizing: border-box !important;
}

.circle-container::-webkit-scrollbar {
    display: none !important;
}

.circle-loop {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 25px !important;
    padding: 40vh 0 !important; /* Balanced padding - enough to reach all items */
    position: relative !important;
}

/* Column 2: Large right column for content */
.content-display {
    flex: 1 !important; /* Takes remaining width */
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    gap: 15px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.circle-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Navigation circles styling */
.nav-circle {
    position: relative !important;
    width: 45px !important; /* Reduced from 60px */
    height: 45px !important; /* Reduced from 60px */
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important; /* Changed to white background */
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    /* Remove transition to allow JavaScript immediate updates */
    overflow: visible !important; /* Allow content to extend beyond bounds */
    flex-shrink: 0 !important;
    transform-origin: center !important;
    /* Remove default opacity and transform - let JS handle everything */
    box-sizing: border-box !important;
    z-index: 1 !important; /* Base z-index for normal circles */
}

/* Remove static arch positioning - let JavaScript handle dynamic positioning */

.nav-circle img {
    width: 30px !important; /* Reduced from 40px */
    height: 30px !important; /* Reduced from 40px */
    border-radius: 50%;
    object-fit: contain !important; /* Changed from cover to contain to show full image */
    object-position: center !important; /* Center the image */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    user-select: none;
    pointer-events: none;
}

.nav-circle:hover {
    background: rgba(255, 255, 255, 1.0) !important; /* Fully white on hover */
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-circle.active {
    width: 55px !important; /* Reduced from 75px */
    height: 55px !important; /* Reduced from 75px */
    background: rgba(255, 255, 255, 1.0) !important; /* Fully white when active */
    border: 3px solid rgba(255, 255, 255, 0.6);
    transform: translateX(0px) scale(1.15) !important;
    z-index: 100 !important; /* Much higher z-index to appear on top */
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
    opacity: 1 !important;
    position: relative !important; /* Ensure positioning context for z-index */
}

.nav-circle.active img {
    width: 40px !important; /* Reduced from 55px */
    height: 40px !important; /* Reduced from 55px */
    object-fit: contain !important; /* Changed from cover to contain to show full image */
    object-position: center !important; /* Center the image */
}

.content-display {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    padding-left: 10px !important;
}

/* Content area styling within right column */
.unit-image {
    height: 200px !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    background: rgba(255, 255, 255, 1.0) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

.unit-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transition: all 0.3s ease !important;
}

.unit-info {
    flex: 1 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 20px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.unit-content {
    animation: fadeIn 0.5s ease-in-out;
}

.unit-content h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.unit-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-circle.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Ensure footer doesn't interfere with the layout calculations */
.footer {
    position: relative;
    margin-top: 0;
}

/* Prevent shared styles from affecting circle calculations */
.circular-nav * {
    box-sizing: border-box;
}

.content-display * {
    box-sizing: border-box;
}