/* FOSS.city D3.js-style Map View */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* MAP-VIEW: D3.js-style fullscreen hexagonal grid */
.foss-city-map-view {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    position: relative;
    overflow: hidden;
}

.map-header {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    color: white;
}

.city-title {
    font-size: 3rem;
    margin: 0;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    font-weight: bold;
}

.city-subtitle {
    font-size: 1.2rem;
    margin: 0.5rem 0 0 0;
    color: #88ddff;
    text-shadow: 0 0 10px rgba(136, 221, 255, 0.3);
}

/* Hexagonal Grid Container */
.hexagon-grid-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hexagon-grid {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 8rem 2rem 2rem 2rem;
}

/* Hexagon Items */
.hex-item {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.hex-item:hover {
    z-index: 10;
    transform: translateY(-20px) scale(1.1);
}

/* Hexagon Shape */
.hexagon {
    width: 140px;
    height: 140px;
    position: relative;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.9) 0%, rgba(26, 26, 26, 0.9) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(68, 68, 68, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.hex-item:hover .hexagon {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(136, 221, 255, 0.1) 100%);
    border-color: #00ff88;
    box-shadow: 
        0 20px 40px rgba(0, 255, 136, 0.3),
        0 0 30px rgba(0, 255, 136, 0.2),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
    transform: rotateX(5deg) rotateY(5deg);
}

/* Hexagon Content */
.hex-content {
    text-align: center;
    color: white;
    padding: 1rem;
    transition: all 0.3s ease;
}

.hex-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.hex-content h3 {
    font-size: 1rem;
    margin: 0.5rem 0 0.3rem 0;
    color: #88ddff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(136, 221, 255, 0.5);
}

.hex-content p {
    font-size: 0.8rem;
    margin: 0;
    color: #aaa;
    opacity: 0.8;
}

.hex-item:hover .hex-content p {
    color: #ccc;
    opacity: 1;
}

/* Map Controls */
.map-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: rgba(42, 42, 42, 0.9);
    border: 2px solid #444;
    color: #88ddff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    color: #00ff88;
    transform: scale(1.1);
}

/* PROJECT-VIEW: Individual project with navigator */
.project-view {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
}

/* Navigator Panel */
.navigator-panel {
    width: 350px;
    background: rgba(26, 26, 26, 0.95);
    border-right: 2px solid #333;
    transition: transform 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.nav-header {
    padding: 1.5rem;
    border-bottom: 2px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-header h2 {
    color: #00ff88;
    margin: 0;
    font-size: 1.3rem;
}

.nav-toggle, .nav-trigger {
    background: transparent;
    border: 2px solid #444;
    color: #88ddff;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.nav-toggle:hover, .nav-trigger:hover {
    border-color: #00ff88;
    color: #00ff88;
}

.nav-content {
    padding: 1.5rem;
}

.current-location h3,
.district-nav h3,
.quick-actions h3 {
    color: #88ddff;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 2rem;
}

.location-name {
    color: #00ff88;
    font-size: 1.1rem;
    font-weight: bold;
}

.location-coords {
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.district-links,
.action-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.district-link,
.action-link {
    padding: 0.8rem 1rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #88ddff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.district-link:hover,
.action-link:hover {
    background: #333;
    border-color: #00ff88;
    color: #00ff88;
    transform: translateX(5px);
}

/* Project Content */
.project-content {
    flex: 1;
    margin-left: 350px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #88ddff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #00ff88;
}

.separator {
    color: #666;
}

.current {
    color: #00ff88;
    font-weight: bold;
    font-size: 1.2rem;
}

.coordinates {
    background: #2a2a2a;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.project-body {
    line-height: 1.7;
    font-size: 1rem;
    color: #ddd;
}

/* Project Navigation */
.project-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #333;
}

.project-navigation h3 {
    color: #88ddff;
    text-align: center;
    margin-bottom: 1.5rem;
}

.neighbor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.neighbor-link {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: #88ddff;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
}

.neighbor-link:hover {
    border-color: #00ff88;
    background: linear-gradient(135deg, #333 0%, #2a2a2a 100%);
    transform: translateY(-3px);
}

.neighbor-direction {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #88ddff;
}

.neighbor-coords {
    font-size: 0.8rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .city-title {
        font-size: 2.5rem;
    }
    
    .hexagon {
        width: 120px;
        height: 120px;
    }
    
    .hex-icon {
        font-size: 1.8rem;
    }
    
    .hex-content h3 {
        font-size: 0.9rem;
    }
    
    .hex-content p {
        font-size: 0.7rem;
    }
}

@media (max-width: 968px) {
    .navigator-panel {
        transform: translateX(-100%);
    }
    
    .navigator-panel.active {
        transform: translateX(0);
    }
    
    .project-content {
        margin-left: 0;
    }
    
    .hexagon-grid {
        padding: 6rem 1rem 2rem 1rem;
    }
    
    .city-title {
        font-size: 2rem;
    }
    
    .city-subtitle {
        font-size: 1rem;
    }
    
    .hexagon {
        width: 100px;
        height: 100px;
    }
    
    .hex-icon {
        font-size: 1.5rem;
    }
    
    .hex-content h3 {
        font-size: 0.8rem;
    }
    
    .hex-content p {
        font-size: 0.6rem;
    }
}

@media (max-width: 640px) {
    .navigator-panel {
        width: 300px;
    }
    
    .map-header {
        top: 1rem;
    }
    
    .city-title {
        font-size: 1.8rem;
    }
    
    .city-subtitle {
        font-size: 0.9rem;
    }
    
    .hexagon-grid {
        padding: 5rem 0.5rem 2rem 0.5rem;
        gap: 0.5rem;
    }
    
    .hexagon {
        width: 80px;
        height: 80px;
    }
    
    .hex-icon {
        font-size: 1.3rem;
    }
    
    .hex-content h3 {
        font-size: 0.7rem;
    }
    
    .hex-content p {
        font-size: 0.5rem;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .map-controls {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hex-item:nth-child(odd) {
    animation: float 6s ease-in-out infinite;
}

.hex-item:nth-child(even) {
    animation: float 6s ease-in-out infinite reverse;
}

.hex-item:hover {
    animation: none;
}