/* Finance Story Specific Styles */

.logo-section {
    margin-top: 2rem;
}

.name-byline {
    font-size: 0.9em;
}

.title-subheading {
    margin-bottom:0px;
}

/* Search Section Styles */
.search-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.05) 0%, rgba(106, 90, 205, 0.05) 100%);
}

.search-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.search-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin: auto;
    padding: 0 1rem;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
    z-index: 2;
}

.search-input {
    padding: 15px 15px 15px 45px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 100%;
}

.search-input:focus {
    border-color: #008080;
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.25);
    outline: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.result-type {
    font-size: 0.9rem;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.search-no-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

.search-loading {
    padding: 15px;
    text-align: center;
    color: #666;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #008080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-section {
    background: linear-gradient(135deg, #008080 0%, #6A5ACD 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-date-range {
    margin-top: 1.5rem;
    opacity: 0.9;
}

.date-range-text {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.date-range-text i {
    font-size: 1.2rem;
}

.contribution-count {
    font-size: 0.95rem;
    opacity: 0.6;
    margin-left: 0.5rem;
}

.contribution-count {
    font-size: 0.95rem;
    opacity: 0.6;
    margin-left: 0.5rem;
}

.hero-nav .btn {
    margin: 0.5rem;
    padding: 12px 24px;
    font-size: 1.1rem;
}

.story-section {
    /* padding: 40px 0; */
    position: relative;
}

.money-totals,
.donor-count,
.average-donation,
.conclusion {
    /* background: linear-gradient(0deg, rgb(125 2 186 / 16%) 0%, rgb(198 205 90 / 25%) 100%); */
}

.cta-section {
    background: linear-gradient(135deg, #6A5ACD 0%, #008080 100%);
    color: white;
}


.insight-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 1000px;
}

/* Money Comparison Styles */
.money-comparison {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.money-bar {
    position: relative;
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    min-height: 120px;
}

.money-bar:hover {
    transform: scale(1.02);
}

.republican-bar {
    background: linear-gradient(135deg, #ffd6d6 0%, #ffb3b3 100%);
    border: 3px solid #ff9999;
    flex: 1.6; /* Republicans raise more money */
}

.democrat-bar {
    background: linear-gradient(135deg, #c9e1ff 0%, #a6d0ff 100%);
    border: 3px solid #80bfff;
    flex: 1; /* Democrats raise less money */
}

.money-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.money-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.democrat-bar .money-amount {
    font-size: 1.5rem;
}

/* Donor Visualization Styles */
.donor-visualization {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    text-align: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.donor-group {
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.donor-group:hover {
    transform: scale(1.02);
}

.democrat-donors {
    background: linear-gradient(135deg, #c9e1ff 0%, #a6d0ff 100%);
    border: 3px solid #80bfff;
    flex: 1.4; /* Democrats have more contributions */
}

.republican-donors {
    background: linear-gradient(135deg, #ffd6d6 0%, #ffb3b3 100%);
    border: 3px solid #ff9999;
    flex: 1; /* Republicans have fewer contributions */
}

.donor-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.donor-count-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.donor-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Average Comparison Styles */
.average-comparison {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
}

.avg-circle {
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    border: 4px solid;
}

.avg-circle:hover {
    transform: scale(1.05);
}

.republican-circle {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #ffd6d6 0%, #ffb3b3 100%);
    border-color: #ff9999;
}

.democrat-circle {
    width: 170px;
    height: 170px;
    background: linear-gradient(135deg, #c9e1ff 0%, #a6d0ff 100%);
    border-color: #80bfff;
}

.avg-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.avg-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

/* Insight Text Styles */
.insight-text {
    padding: 1rem;
}

.big-stat {
    font-size: 3rem;
    font-weight: 700;
    color: #008080;
    margin-bottom: 1rem;
    text-align: center;
}

.insight-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

/* Money Sources Styles */
.sources-comparison {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.source-party {
    padding: 1.5rem;
    border-radius: 15px;
    border: 3px solid;
}

.democrat-sources {
    background: linear-gradient(135deg, #c9e1ff 0%, #a6d0ff 100%);
    border-color: #80bfff;
}

.republican-sources {
    background: linear-gradient(135deg, #ffd6d6 0%, #ffb3b3 100%);
    border-color: #ff9999;
}

.source-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.source-name {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 0.95rem;
}

.source-amount {
    font-weight: 700;
    color: #008080;
    margin: 0 1rem;
    font-size: 0.9rem;
}

.source-percentage {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: right;
}

.source-insight {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
}

/* Business Influence Styles */
.business-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.business-party {
    padding: 1.5rem;
    border-radius: 15px;
    border: 3px solid;
}

.republican-business {
    background: linear-gradient(135deg, #ffd6d6 0%, #ffb3b3 100%);
    border-color: #ff9999;
}

.democrat-business {
    background: linear-gradient(135deg, #c9e1ff 0%, #a6d0ff 100%);
    border-color: #80bfff;
}

.business-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.business-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.business-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.7) 100%);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.business-item.top-source {
    font-weight: 600;
    border: 3px solid #0000;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)) padding-box, linear-gradient(var(--angle), #008080, #e4e0ff, #008080) border-box;
    animation: 8s rotate linear infinite;
}

@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.business-name {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 0.95rem;
}

.business-amount {
    font-weight: 700;
    color: #008080;
    font-size: 0.9rem;
}

.business-insight {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
}

/* Individual vs Institutional Funding Styles */
.funding-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.funding-party {
    padding: 1.5rem;
    border-radius: 15px;
    border: 3px solid;
}

.grassroots-funding {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c8 100%);
    border-color: #4caf50;
}

.institutional-funding {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b3 100%);
    border-color: #ff9800;
}

.funding-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.funding-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.funding-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.funding-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.candidate-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.candidate-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.candidate-name.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.candidate-name.clickable:hover {
    color: #008080;
    text-decoration: underline;
}

.candidate-party {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    width: fit-content;
}

.democrat-badge {
    background: #c9e1ff;
    color: #0066cc;
}

.republican-badge {
    background: #ffd6d6;
    color: #cc0000;
}

.nonpartisan-badge {
    background: #e9ecef;
    color: #495057;
}

.funding-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.primary-stat {
    font-weight: 700;
    color: #008080;
    font-size: 1.1rem;
}

.secondary-stat {
    font-weight: 500;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Geographic Funding Styles */
.geographic-overview {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.1) 0%, rgba(106, 90, 205, 0.1) 100%);
    border-radius: 15px;
}

.overview-text {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 0;
}

.geographic-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.geographic-party {
    padding: 1.5rem;
    border-radius: 15px;
    border: 3px solid;
}

.republican-geographic {
    background: linear-gradient(135deg, #ffd6d6 0%, #ffb3b3 100%);
    border-color: #ff9999;
}

.democrat-geographic {
    background: linear-gradient(135deg, #c9e1ff 0%, #a6d0ff 100%);
    border-color: #80bfff;
}

.geographic-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.geographic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.geographic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.primary-source {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #008080 !important;
    font-size: 1.1rem;
}

.secondary-source {
    opacity: 0.8;
}

.geographic-name {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 1rem;
}

.primary-source .geographic-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.geographic-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.geographic-amount {
    font-weight: 700;
    color: #008080;
    font-size: 1rem;
}

.primary-source .geographic-amount {
    font-size: 1.2rem;
}

.geographic-percentage {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.key-insight {
    background: rgba(255, 248, 220, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #ffd700;
}

.key-insight h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.key-insight p {
    margin-bottom: 1rem;
}

.key-insight p:last-child {
    margin-bottom: 0;
}

.geographic-insight {
    font-style: italic;
    color: #666;
    margin-top: 1rem;
}

/* Conclusion Styles */
.conclusion-card {
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.05) 0%, rgba(106, 90, 205, 0.05) 100%);
}

.conclusion-point {
    text-align: center;
    padding: 1.5rem 1rem;
}

.conclusion-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.democrat-color {
    color: #0066cc;
}

.republican-color {
    color: #cc0000;
}

.conclusion-point h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.conclusion-point p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

/* CTA Section */

.cta-content {
    padding: 20px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-content .btn {
    background-color: white;
    color: #008080;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-content .btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .date-range-text {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .contribution-count {
        margin-left: 0;
    }
    
    .search-card {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .search-title {
        font-size: 1.3rem;
    }
    
    .search-container {
        width: 100%;
        max-width: 90%;
        padding: 0 0.5rem;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 12px 12px 12px 40px;
    }
    
    
    .insight-card {
        padding: 2rem 1rem;
    }
    
    
    .money-comparison {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .money-bar {
        padding: 1rem 0.5rem;
        min-height: 100px;
    }
    
    .money-label {
        font-size: 1.1rem;
    }
    
    .money-amount {
        font-size: 1.3rem;
    }
    
    .democrat-bar .money-amount {
        font-size: 1.1rem;
    }
    
    .average-comparison {
        flex-direction: column;
        gap: 1rem;
    }
    
    .republican-circle {
        width: 180px;
        height: 180px;
    }
    
    .democrat-circle {
        width: 140px;
        height: 140px;
    }
    
    .big-stat {
        font-size: 2rem;
    }
    
    .donor-visualization {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .donor-group {
        padding: 1rem 0.5rem;
    }
    
    .donor-label {
        font-size: 1.1rem;
    }
    
    .donor-count-display {
        font-size: 1.8rem;
    }
    
    .donor-subtitle {
        font-size: 1rem;
    }
    
    .story-section {
        padding: 30px 0;
    }
    
    .conclusion-point {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .source-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .source-name {
        margin-bottom: 0.5rem;
    }
    
    .source-amount,
    .source-percentage {
        margin: 0;
    }
    
    
    .geographic-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .geographic-name {
        margin-bottom: 0.5rem;
    }
    
    .geographic-stats {
        align-items: center;
    }
    
    .overview-text {
        font-size: 1.1rem;
    }
    
    .key-insight {
        padding: 1rem;
    }
    
    .funding-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .candidate-info {
        align-items: center;
    }
    
    .funding-stats {
        align-items: center;
    }
    
    .business-party {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    
    .insight-card {
        margin: 0 1rem;
    }
}
