/* Sub Navigation Styles */
.subnav-container {
    position: fixed;
    top: 80px; /* Navbar height */
    left: 0;
    right: 0;
    z-index: 999; /* Below navbar (1000) but above content */
    background: #ffffff;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    margin-top: -1px; /* Overlap with navbar border to remove double border */
}


.subnav-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Match navbar padding */
}

.subnav-links {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align links to the left */
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.75rem 0;
}

.subnav-label {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #9ca3af;
    margin-right: 0.25rem;
    flex-shrink: 0;
    opacity: 0.5;
}

.subnav-label i {
    font-size: 0.625rem;
}

@media (max-width: 768px) {
    .subnav-label {
        display: none; /* Hide on mobile for space */
    }
}

.subnav-links::-webkit-scrollbar {
    display: none;
}

.subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.subnav-link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.subnav-link.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    font-weight: 600;
}

.subnav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #2563eb;
    border-radius: 2px 2px 0 0;
}

/* Icon wrapper for project pages */
.subnav-icon-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.subnav-link i {
    font-size: 0.75rem;
}

.subnav-link:hover .subnav-icon-wrapper {
    transform: scale(1.05);
}

.subnav-link.active .subnav-icon-wrapper {
    transform: scale(1.05);
}

/* Colorful Icons for Project Pages */
.subnav-link[data-section="overview"] .subnav-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
}
.subnav-link[data-section="overview"] i {
    color: #3b82f6; /* Blue */
}
.subnav-link[data-section="overview"]:hover .subnav-icon-wrapper {
    background: rgba(59, 130, 246, 0.2);
}
.subnav-link[data-section="overview"].active .subnav-icon-wrapper {
    background: rgba(59, 130, 246, 0.2);
}

.subnav-link[data-section="metrics"] .subnav-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
}
.subnav-link[data-section="metrics"] i {
    color: #10b981; /* Green */
}
.subnav-link[data-section="metrics"]:hover .subnav-icon-wrapper {
    background: rgba(16, 185, 129, 0.2);
}
.subnav-link[data-section="metrics"].active .subnav-icon-wrapper {
    background: rgba(16, 185, 129, 0.2);
}

.subnav-link[data-section="challenge"] .subnav-icon-wrapper {
    background: rgba(239, 68, 68, 0.1);
}
.subnav-link[data-section="challenge"] i {
    color: #ef4444; /* Red */
}
.subnav-link[data-section="challenge"]:hover .subnav-icon-wrapper {
    background: rgba(239, 68, 68, 0.2);
}
.subnav-link[data-section="challenge"].active .subnav-icon-wrapper {
    background: rgba(239, 68, 68, 0.2);
}

.subnav-link[data-section="solution"] .subnav-icon-wrapper {
    background: rgba(245, 158, 11, 0.1);
}
.subnav-link[data-section="solution"] i {
    color: #f59e0b; /* Amber */
}
.subnav-link[data-section="solution"]:hover .subnav-icon-wrapper {
    background: rgba(245, 158, 11, 0.2);
}
.subnav-link[data-section="solution"].active .subnav-icon-wrapper {
    background: rgba(245, 158, 11, 0.2);
}

.subnav-link[data-section="impact"] .subnav-icon-wrapper {
    background: rgba(139, 92, 246, 0.1);
}
.subnav-link[data-section="impact"] i {
    color: #8b5cf6; /* Purple */
}
.subnav-link[data-section="impact"]:hover .subnav-icon-wrapper {
    background: rgba(139, 92, 246, 0.2);
}
.subnav-link[data-section="impact"].active .subnav-icon-wrapper {
    background: rgba(139, 92, 246, 0.2);
}

.subnav-link[data-section="tech-stack"] .subnav-icon-wrapper {
    background: rgba(6, 182, 212, 0.1);
}
.subnav-link[data-section="tech-stack"] i {
    color: #06b6d4; /* Cyan */
}
.subnav-link[data-section="tech-stack"]:hover .subnav-icon-wrapper {
    background: rgba(6, 182, 212, 0.2);
}
.subnav-link[data-section="tech-stack"].active .subnav-icon-wrapper {
    background: rgba(6, 182, 212, 0.2);
}

.subnav-link[data-section="links"] .subnav-icon-wrapper {
    background: rgba(236, 72, 153, 0.1);
}
.subnav-link[data-section="links"] i {
    color: #ec4899; /* Pink */
}
.subnav-link[data-section="links"]:hover .subnav-icon-wrapper {
    background: rgba(236, 72, 153, 0.2);
}
.subnav-link[data-section="links"].active .subnav-icon-wrapper {
    background: rgba(236, 72, 153, 0.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .subnav-content {
        padding: 0 1.5rem; /* Keep consistent padding */
    }
    
    .subnav-links {
        gap: 0.75rem;
        padding: 0.875rem 0;
    }
    
    .subnav-link {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
        gap: 0.5rem;
    }
}

