/* Enhanced Dashboard Styles 

@font-face {
    font-family: 'PP Editorial New';
    src: url('path/to/pp-editorial-new.woff2') format('woff2'),
         url('path/to/pp-editorial-new.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
  
@font-face {
    font-family: 'Aeonik Regular';
    src: url('Aeonik-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Aeonik Regular', Arial, sans-serif;
    background-color: #fff;
    color: #000;
    transition: background-color 0.3s ease;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'PP Editorial New', Georgia, serif;
    margin-left: 16px;
}

/* Enhanced Container Spacing 
.container {
    padding: 0 32px;
}

.row {
    margin: 0 -12px;
}

.col, [class*="col-"] {
    padding: 0 12px;
}

/* Enhanced Navbar Styles 
.navbar {
    background-color: #000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 12px 32px;
}

.navbar:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-size: 0.8rem;
    font-weight: bold;
    transition: transform 0.2s ease;
    margin-left: 16px;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    margin: 0 8px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    border-bottom: 2px solid #fff;
    transform: translateY(-2px);
}

/* Enhanced Dropdown Styles 
[id$="-dropdown"] {
    margin: 16px;
}

[id$="-dropdown"] .Select-control {
    background-color: black;
    border-color: white;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 8px 0;
    padding: 8px 12px;
}

[id$="-dropdown"] .Select-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

[id$="-dropdown"] .Select-menu-outer {
    background-color: black;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 8px 0;
}

[id$="-dropdown"] .Select-value-label {
    color: white !important;
    padding: 0 8px;
}

[id$="-dropdown"] .Select-menu-outer .Select-option {
    background-color: black;
    color: white;
    transition: all 0.2s ease;
    padding: 12px 20px;
}

[id$="-dropdown"] .Select-menu-outer .Select-option:hover {
    background-color: #333;
    transform: translateX(5px);
}

/* Enhanced Tab Styles 
.custom-tabs {
    padding: 0 16px;
    margin: 24px 0;
}

.custom-tabs .nav-link {
    border-bottom: 1px solid #d6d6d6;
    padding: 12px 24px;
    font-weight: bold;
    color: white;
    background-color: #222;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0 4px;
}

.custom-tabs .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.custom-tabs .nav-link:hover::before {
    left: 0;
}

.custom-tabs .nav-link.active {
    border-top: 1px solid #d6d6d6;
    border-bottom: 1px solid #d6d6d6;
    background-color: #222;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Enhanced Content Box Styles 
.content-box {
    padding: 24px 32px;
    border-radius: 8px;
    margin: 16px;
    opacity: 0.9;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.content-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Enhanced Text Spacing 
.description {
    line-height: 1.6;
    font-size: 16px;
    padding: 0 24px;
    margin: 16px 0;
}

.impact-text {
    font-size: 1.2rem;
    font-weight: normal;
    margin: 20px 24px;
}

.insights-text {
    font-size: 5rem;
    font-weight: bold;
    margin: 30px 24px;
}

.description-text {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 24px auto;
    padding: 0 24px;
}

/* Enhanced Chart Container 
.chart-container {
    background: white;
    padding: 24px;
    margin: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Enhanced Cluster Button Styles 
.cluster-button {
    transition: all 0.3s ease;
    margin: 12px 16px;
    padding: 16px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    flex: 1;
    text-align: left;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.cluster-button::after {
    content: '→';
    position: absolute;
    right: 24px;
    opacity: 0;
    transition: all 0.3s ease;
}

.cluster-button:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    padding-right: 48px;
}

.cluster-button:hover::after {
    opacity: 1;
}

/* Enhanced Main Content Spacing 
.main-content {
    position: relative;
    z-index: 2;
    padding: 100px 32px;
    text-align: center;
}

/* Party List Spacing 
.party-list {
    padding: 20px 32px;
    border-radius: 8px;
    opacity: 0.9;
    margin: 16px;
}

.help-button {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px solid #6c757d;
    border-radius: 20px;
    font-size: 14px;
    padding: 4px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    transition: all 0.2s ease-in-out;
}

.help-button:hover {
    background-color: #6c757d;
    color: #ffffff;
}

.help-container {
    position: relative;
    display: inline-block;
}

.explanation-popover {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    width: 800px;
    min-height: fit-content;  /* Allow height to expand 
    height: auto;  /* Allow height to expand 
    font-size: 1.5rem !important;
    line-height: 1.6 !important;
    padding: 32px 40px !important;
    background-color: #f5f5f5 !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    margin-top: 15px;
    overflow: visible;  /* Ensure content isn't cut off 
    white-space: normal;  /* Allow text to wrap 
    word-wrap: break-word;  /* Handle long words 
}
