/* AI Warning styles */
.ai-warning {
    position: relative;
    background-color: rgba(255, 160, 122, 0.95);
    padding: 8px 12px;
    font-size: 0.85em;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ai-warning a[href*="patreon"] {
    color: #6A5ACD;
    font-weight: bold;
    transition: color 0.2s;
}

.ai-warning a[href*="patreon"]:hover {
    color: #F96854;
    text-decoration: underline;
}

.bottom-warning {
    background-color: rgba(255, 160, 122, 0.95);
    padding: 8px 12px;
    font-size: 0.85em;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom:10px;

}

@media (min-width: 768px) {
    .ai-warning {
        position: absolute;
        top: 10px;
        right: 10px;
        left: auto;
        margin-bottom:10px;
        max-width: 318px;
        text-align: center;
        border-radius: 4px;
    }
}

[v-cloak] {
    display: none !important;
}

:root {
    --primary-teal: #008080;
    --warm-gray: #A9A9A9;
    --soft-orange: #FFA07A;
    --slate-blue: #6A5ACD;
    --olive-green: #556B2F;
    --ivory: #FFFFF0;
}

body {
    background-color: var(--ivory);
    color: #333;
    font-family: 'Noto Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 0;
}


.container-fluid {
    max-width: 1290px;
    margin: 0 auto;
}

.container {
    max-width: 1290px;
    margin: 10px auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.stats {
    background-color: var(--soft-orange);
    color: var(--ivory);
    padding: 9px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.back-button {
    color: #333;
    text-decoration: none;
    padding: 0 10px;
}

.back-button:hover {
    color: var(--primary-teal);
    text-decoration: none;
}

.stats-content {
    flex-grow: 1;
    text-align: center;
    min-width: 0;
    padding: 0 10px;
}

.stats-content p {
    margin: 0;
}

.stats-content p a {
    white-space: nowrap;
    display: inline-block;
}

.masonry-grid {
    margin-top: 20px;
}

.masonry-grid .col-md-4 {
    margin-bottom: 20px;
    padding: 0 10px;
}

.stats p {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: var(--ivory);
    border: 1px solid var(--warm-gray);
}

.card-header {
    background-color: var(--primary-teal);
    color: var(--ivory);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pin-button {
    background: none;
    border: none;
    color: var(--ivory);
    cursor: pointer;
    padding: 0 5px;
}

.pin-button:hover {
    transform: scale(1.2);
}

.card.pinned {
    border: 2px solid var(--primary-teal);
    order: -1;
}

.pinned .pin-button {
    color: var(--soft-orange);
}

.pin-button {
    font-size: 1.2em;
}

.card-header a {
    color: var(--ivory);
    text-decoration: none;
}

.card-header a:hover {
    color: var(--ivory);
    text-decoration: underline;
}

.bill-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: block;
    text-decoration: none;
    transition: background-color 0.2s;
    color: inherit;
}

/* Preserve original padding for calls page */
.bills-to-watch .bill-item {
    padding: 15px;
}

.bill-item:hover {
    background-color: rgba(106, 90, 205, 0.05);
    text-decoration: none;
}

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

.bill-item h6 {
    color: var(--slate-blue);
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-item.highlighted {
    background-color: rgba(255, 160, 122, 0.1);
    border-left: 3px solid var(--soft-orange);
}

.bill-item.highlighted h6 {
    color: var(--primary-teal);
}

.bill-item:hover h6 {
    color: var(--primary-teal);
}

.bill-item h6 small {
    font-size: 0.75em;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.bill-item h6 small img {
    opacity: 0.6;
}

.bill-item p {
    font-size: 0.9em;
    color: var(--warm-gray);
    margin-bottom: 0;
}

.more-bills-link {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.9em;
}

.more-bills-link a {
    color: var(--slate-blue);
}

/* Bill detail page styles */
.lead {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 2rem;
}

.breadcrumb {
    background-color: var(--warm-gray);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

.breadcrumb a {
    color: var(--primary-teal);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.card-header h5 {
    margin: 0;
}

.search-box-mobile {
    background-color: var(--warm-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-box-mobile h4 {
    color: var(--ivory);
    margin-bottom: 15px;
}

.home-search-box {
    position: sticky;
    top: 20px;
    z-index: 10;
}

.topics-menu {
    background-color: var(--warm-gray);
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 100px;
    color: var(--ivory);
}

.topics-menu h4 {
    color: #333;
    margin-bottom: 15px;
}

.topics-menu ul {
    margin: 0;
    padding: 0;
}

.topics-menu li {
    margin-bottom: 10px;
}

.topics-menu a {
    color: var(--ivory);
    text-decoration: none;
    display: block;
    padding: 5px 0;
}

.topics-menu a:hover {
    color: var(--ivory);
    text-decoration: underline;
    background-color: var(--primary-teal);
    padding: 5px 10px;
    border-radius: 4px;
}

.throbber {
    width: 40px;
    height: 40px;
    margin: 2rem auto;
    border: 3px solid var(--primary-teal);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.bill-text ol{
 margin: 0px;
 display: inline;
 padding: 0px;
}

.bill-text a {
    font-size:10px;
    margin-left:5px;
    text-indent: 0px;
}

.bill-text h1{
    font-size:20px;
}

.btn-primary {
    background-color: var(--primary-teal);
    border-color: var(--primary-teal);
    color: var(--ivory);
}

.btn-primary:hover {
    background-color: var(--slate-blue);
    border-color: var(--slate-blue);
}

.btn-outline-secondary {
    color: var(--primary-teal);
    border-color: var(--primary-teal);
}

.btn-outline-secondary:hover {
    background-color: var(--primary-teal);
    border-color: var(--primary-teal);
    color: var(--ivory);
}

/* Global link styles */
a {
    color: var(--primary-teal);
    text-decoration: none;
}

a:hover {
    color: var(--slate-blue);
    text-decoration: underline;
}

.attribution {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    font-size: 0.9em;
    border-top: 1px solid var(--warm-gray);
}

.call-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--slate-blue);
}

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

.attribution a {
    color: var(--slate-blue);
}

.finance-card {
    height: 100%;
    border: none;
    border-radius: 15px;
    padding: 20px;
}

.democrat {
    background-color: #c9e1ff;
}

.republican {
    background-color: #ffd6d6;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.contribution-icon {
    font-size: 2.2rem;
    color: #666;
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    color: #666;
}

.vs-text {
    font-size: 3rem;
    font-weight: bold;
    color: #666;
}

/* Table styling */
.table {
    background-color: transparent;
    margin-bottom: 0;
}

.democrat .table {
    background-color: rgba(201, 225, 255, 0.3);
}

.republican .table {
    background-color: rgba(255, 214, 214, 0.3);
}

.table thead th {
    background-color: var(--primary-teal);
    color: var(--ivory);
    border-color: rgba(0, 128, 128, 0.2);
}

.table tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 240, 0.7);
}

.table tbody tr:nth-of-type(even) {
    background-color: rgba(169, 169, 169, 0.1);
}

.table tbody tr:hover {
    background-color: rgba(106, 90, 205, 0.1);
    cursor: pointer;
}

.contributor-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
}

.individual-badge {
    background-color: #008080; /* Teal */
}

.committee-badge {
    background-color: #6A5ACD; /* Slate Blue */
}

.lobbying-badge {
    background-color: #556B2F; /* Olive Green */
}

.company-badge {
    background-color: #A9A9A9; /* Gray */
}

.individual-contribution {
    background-color: rgba(0, 128, 128, 0.05) !important; /* Teal */
}

.committee-contribution {
    background-color: rgba(106, 90, 205, 0.05) !important; /* Slate Blue */
}

.lobbying-contribution {
    background-color: rgba(85, 107, 47, 0.05) !important; /* Olive Green */
}

.company-contribution {
    background-color: rgba(169, 169, 169, 0.05) !important; /* Gray */
}

.democrat .table tbody tr:nth-of-type(odd) {
    background-color: rgba(201, 225, 255, 0.2);
}

.democrat .table tbody tr:nth-of-type(even) {
    background-color: rgba(201, 225, 255, 0.4);
}

.republican .table tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 214, 214, 0.2);
}

.republican .table tbody tr:nth-of-type(even) {
    background-color: rgba(255, 214, 214, 0.4);
}

.contact-info .phone-number {
    font-size: 4.5rem;
    font-weight: bold;
    line-height: 1.2;
    color: var(--primary-teal);
}

@media (max-width: 767px) {
    .contact-info .phone-number {
        font-size: 2.5rem;
    }
    
    .chart-container {
        height: 200px !important;
        margin-bottom: 20px;
    }
    
    .contributor-type-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

.contact-info .phone-number:hover {
    color: var(--slate-blue);
    text-decoration: none;
}

.call-matters-alert {
    color: var(--ivory);
    background-color: var(--slate-blue);
    border-color: var(--slate-blue);
}

.call-matters-alert .btn-primary {
    background-color: var(--ivory);
    border-color: var(--ivory);
    color: var(--slate-blue);
}

.call-matters-alert .btn-primary:hover {
    background-color: var(--primary-teal);
    border-color: var(--primary-teal);
    color: var(--ivory);
}

.alert-info {
    color: var(--primary-teal);
    background-color: rgba(0, 128, 128, 0.1);
    border-color: rgba(0, 128, 128, 0.2);
}

.pin-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-teal);
    color: var(--ivory);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.pin-notification.show {
    opacity: 1;
    transform: translateY(0);
}


.districts-results {
    max-width: 600px;
    margin: 0 auto;
}

.search-button {
    background-color: var(--primary-teal);
    color: var(--ivory);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.search-button:disabled {
    background-color: var(--warm-gray);
    cursor: not-allowed;
}

.search-button:hover:not(:disabled) {
    background-color: var(--slate-blue);
}

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

.searchbox {
    background-color: var(--warm-gray);
    border-radius: 8px;
    color: var(--ivory);
}

.bills-to-watch .card-header {
    background-color: var(--slate-blue);
}

.bills-to-watch {
    border: 2px solid var(--slate-blue);
}

@media (max-width: 767px) {
    .order-1-mobile {
        order: 1;
    }
    .order-2-mobile {
        order: 2;
    }
}

.get-involved-card {
    /* margin-top: 1.5rem; */
    font-size: 1.25rem;
}

.get-involved-title {
    line-height: 1.50rem;
}

.get-involved-card .card-body {
    padding: 1.5rem;
}

.get-involved-card p {
    margin-bottom: 0;
}

.get-involved-card h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.get-involved-card .card-text {
    margin-bottom: 10px;
    line-height: 1.6;
}

.get-involved-card .card-header .card-title {
    line-height: 1.4;
}

.funding-headline {
    font-style: italic;
    color: #ededed;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.5;
    background-color: rgba(0, 128, 128, 0.05);
    padding: 1rem;
    border-radius: 8px;
    /* border-left: 4px solid var(--primary-teal); */
}

.text-primary {
    color: var(--primary-teal) !important;
}

.text-democrat {
    color: #0066cc !important;
}

.text-republican {
    color: #cc0000 !important;
}

.logo-header {
    /* display: flex; */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo-header .name-byline {
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .logo-header {
        flex-direction: column;
        gap: 0;
    }
}

.btn-outline-secondary i {
    margin-right: 0.5rem;
}

.call-result-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.call-result-buttons .btn {
    flex: 1;
    min-width: 120px;
    margin: 0 !important;
}

@media (max-width: 767px) {
    .call-result-buttons {
        flex-direction: column;
    }
    
    .call-result-buttons .btn {
        width: 100%;
    }
}

.rep-card .card-body {
    padding: 1rem !important;
}

.rep-card {
    margin: 0.5rem;
}

.rep-card-container {
    margin: 20px 0px;
}

@media (max-width: 767px) {
    .rep-card .d-flex {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .rep-card .d-flex > div:last-child {
        width: 100%;
    }
    
    .rep-card .profile {
        display: none;
    }
}

.card-calls-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: rgba(106, 90, 205, 0.05);
}

.card-calls-icon {
    color: var(--slate-blue);
    flex-shrink: 0;
    width: 48px;
    text-align: center;
    padding-right: 4.5rem;
    display: flex;
    align-items: center;
}

.card-calls-content {
    flex-grow: 1;
    min-width: 0;
}

@media (max-width: 767px) {
    .fa-arrow-left {
        display: none;
    }
}

/* Mobile styles specifically for whycall.html */
@media (max-width: 767px) {
    .whycall .card-calls-body {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }

    .whycall .card-calls-icon {
        padding-right: 0;
        justify-content: center;
    }

    .whycall .card-calls-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .whycall .card-calls-content p {
        font-size: 1rem;
        line-height: 1.4;
    }
}

/* New recipient page organization styles */
.hero-card {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--slate-blue) 100%);
    color: white;
    border: none;
    margin-bottom: 2rem;
}

.hero-card .date-range-text .contribution-count{
    opacity: 0.6;
}

.hero-card .date-range-text {
    font-size: 0.8em;
}

.hero-card .card-body {
    padding: 2rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.hero-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.insight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
    justify-content: start;
}

@media (max-width: 767px) {
    .insight-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.insight-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.insight-card .card-header {
    background: var(--primary-teal);
    color: white;
    font-weight: 600;
    border-bottom: none;
}

.insight-highlight {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-teal);
    text-align: center;
    margin: 1rem 0;
}

.insight-description {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.4;
}

.comparison-bar {
    background: #e9ecef;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
    position: relative;
}

.comparison-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal), var(--slate-blue));
    transition: width 0.8s ease-in-out;
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

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

.quick-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 128, 128, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 128, 0.1);
}

.quick-stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-teal);
    display: block;
}

.quick-stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Contributor-specific styles */
.badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

.bg-primary {
    background-color: var(--primary-teal) !important;
}

.bg-secondary {
    background-color: var(--warm-gray) !important;
}

.bg-info {
    background-color: var(--slate-blue) !important;
}

.anomaly-badge {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-left: 0.5rem;
}

.category-highlight {
    background: rgba(255, 160, 122, 0.1);
    border-left: 4px solid var(--soft-orange);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.funding-item {
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.funding-item:hover {
    background-color: rgba(0, 128, 128, 0.05);
    transform: translateX(2px);
}

.funding-item.clickable {
    cursor: pointer;
}

.about-link {
    font-size: 0.9rem;
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.about-link:hover {
    opacity: 1;
    text-decoration: underline;
    color: white;
}

/* Analysis and People Power Score Styles */
.analysis-text {
    /* white-space: pre-wrap; */
    font-family: inherit;
    font-size: inherit;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    position: relative;
    z-index: 1;
}

.analysis-text h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.analysis-text h5:first-child {
    margin-top: 0;
}

.analysis-text p {
    margin-bottom: 0.5rem;
}

.analysis-text ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.analysis-text hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.ai-analysis-card {
    background: linear-gradient(135deg, #ffdcfb, #ffffff, #e0ddfc);
    background-size: 200% 200%;
    border: 1px solid #d1c4e9;
    animation: gradientShift 5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.ai-analysis-card:hover {
    position: relative;
    overflow: hidden;
}

.ai-analysis-card:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle 550px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(105, 90, 205, 0.228) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    animation: glowFadeIn 0.3s ease-out forwards;
}

.ai-analysis-card:hover a {
    text-decoration: underline;
}

@keyframes glowFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.ai-analysis-card.cursor-pointer {
    cursor: pointer;
}

.people-power-score {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

.score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 0.5rem; */
}

.score-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    opacity: 0.9;
}

.score-stars-container {
    height: 48px; /* Fixed height to prevent layout shift */
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-stars {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-link-container {
    height: 24px; /* Fixed height for the link area */
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-svg {
    margin: 0 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.star-svg.star-animate {
    animation: starAppear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes starAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.score-link {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-out;
}

.score-link.link-fade-in {
    opacity: 1;
    transform: translateY(0);
}

.score-calculation-link {
    font-size: 0.9rem;
    color: white;
    opacity: 0.9;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s;
}

.score-calculation-link:hover {
    opacity: 1;
    color: white;
}

.score-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explanation-content h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #333;
}

.explanation-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    text-align: left;
    display: inline-block;
}

.explanation-content li {
    margin-bottom: 0.5rem;
}

.score-note {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    font-style: italic;
    color: #666;
}

.score-breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 128, 128, 0.05);
    border-radius: 8px;
    border-left: 4px solid #008080;
}

.score-breakdown h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #333;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    border-top: 2px solid #008080;
}

.breakdown-label {
    font-size: 0.9rem;
    color: #555;
}

.breakdown-value {
    font-size: 0.9rem;
    color: #008080;
    font-weight: 500;
}

.breakdown-total .breakdown-label,
.breakdown-total .breakdown-value {
    font-size: 1rem;
}

/* Municipal Analysis Styles */
.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 128, 128, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--primary-teal);
}

.analysis-name {
    font-weight: 500;
    color: #333;
    flex: 1;
    font-size: 0.9rem;
}

.analysis-amount {
    font-weight: 600;
    color: var(--primary-teal);
    font-size: 0.9rem;
}

.funding-breakdown {
    background: rgba(0, 128, 128, 0.02);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 128, 128, 0.1);
}

.funding-breakdown h6 {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.funding-type {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid;
}

.individual-funding {
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.1) 0%, rgba(0, 128, 128, 0.05) 100%);
    border-color: var(--primary-teal);
}

.organizational-funding {
    background: linear-gradient(135deg, rgba(106, 90, 205, 0.1) 0%, rgba(106, 90, 205, 0.05) 100%);
    border-color: var(--slate-blue);
}

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

.funding-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.funding-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-teal);
}

.organizational-funding .funding-amount {
    color: var(--slate-blue);
}

.funding-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}


@media (max-width: 767px) {
    .analysis-item {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .funding-breakdown .row {
        gap: 1rem;
    }
    
    .funding-type {
        margin-bottom: 1rem;
    }
}
