/**
* Project and Campaign page styles
*/

.usm-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;;
}

/**
* Section styles
*/

.usm-side-by-side-wrapper .usm-section-wrapper {
    padding-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-block-end: 0;
    margin-block-start: 0;
    margin-bottom: 10px;
    color: unset;
}

/**
* Banner styles
*/

/* Make the banner height 1/2 the width */
.usm-project-banner {
    aspect-ratio: 2 / 1;
    display: flex;
    width: 100%;
    position: relative;
    container-type: inline-size;
}

.usm-project-banner img {
    width: 100%;
}

/* Overlay wavy lines on the banner */
.usm-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 2 / 1;
    background-image: url(data:image/svg+xml;base64,PHN2ZyAgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjA0KSIgaGVpZ2h0PSIyNnB4IiB3aWR0aD0iMjAwcHgiIHZpZXdCb3g9IjAgMCAyMDAgMjYiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMzLjc3LDBDMjUuMDksMy44MSwxNC41Nyw2LjUsMCw2LjVWMFpNMjAwLDYuNVYwSDE2Ni4yM0MxNzQuOTEsMy44MSwxODUuNDMsNi41LDIwMCw2LjVaTTEzMy43NywwSDEwMGMyNCwwLDM1Ljc5LDcuNjQsNDguMjMsMTUuNzNhMTI1LDEyNSwwLDAsMCwxOCwxMC4yN0gyMDBjLTI0LDAtMzUuNzktNy42NC00OC4yMy0xNS43M0ExMjUsMTI1LDAsMCwwLDEzMy43NywwWk0xMDAsMEg2Ni4yM2ExMjUsMTI1LDAsMCwwLTE4LDEwLjI3QzM1Ljc5LDE4LjM2LDI0LDI2LDAsMjZIMzMuNzdhMTI1LDEyNSwwLDAsMCwxOC0xMC4yN0M2NC4yMSw3LjY0LDc2LDAsMTAwLDBaTTY2LjIzLDI2aDY3LjU0Yy04LjY4LTMuODEtMTkuMi02LjUtMzMuNzctNi41Uzc0LjkxLDIyLjE5LDY2LjIzLDI2WiIvPjwvc3ZnPg==);
    background-size: 80px auto;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-content: center;
    flex-wrap: wrap;
    color: white;
}

/* Center the text in the banner */
.usm-banner-content {
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    font-family: Hind, Helvetica, Arial;
    font-weight: 400;
    letter-spacing: normal;
    width: 66%;
}

.usm-banner-content h2{
    line-height: 1.3;
}

.usm-banner-content p{
    line-height: 1.4;
}

/**
* Side by Side styles
*/

.usm-side-by-side-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 max(20px, 5%) 50px max(20px, 5%);
}

.usm-side-by-side-wrapper > * {
    flex: 1 1 300px;
}

/**
* Impact Scroller styles
*/

.usm-impact-block {
    display: flex;
    position: relative;
    overflow: hidden;
    padding: 10px 40px; /* Make room for arrows */
    margin-bottom: 30px;
    background-color: #1e1731;
}

/* Container for the scrollable items */
.usm-impact-items-container {
    display: flex;
    flex-wrap: nowrap;
    overflow: visible;
    width: 100%;
    position: relative;
}

/* Navigation arrows */
.usm-impact-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    font-size: 24px;
    transition: background-color 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
}

.usm-impact-nav.usm-impact-nav-visible {
    opacity: 1;
    visibility: visible;
}

.usm-impact-nav:hover {
    background-color: rgba(255, 255, 255, 1);
}

.usm-impact-nav-prev {
    left: 0;
}

.usm-impact-nav-next {
    right: 0;
}

/* The item in the scroller */
.usm-impact-item {
    display: flex;
    position: relative;
    font-size: 14px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 340px;
    min-width: 340px;
    margin: 0 10px; /* Reduced margin for better spacing */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    gap: 10px;
}

/* Clone specific style - ensure they're visible */
.usm-impact-item-clone {
    opacity: 1;
    visibility: visible;
}

.usm-impact-item:hover {
    transform: scale(1.05);
}

/* The text Content */
.usm-impact-item .usm-impact-content {
    padding: 10px;
    text-align: center;
}

/* A quoted person */
.usm-impact-item .usm-impact-quote-who {
    display: flex;
    gap: 5px;
    padding: 10px;
    border-radius: 5px;
    font-style: italic;
    align-items: center;
}

/* The quote image headshot in a small circle */
.usm-impact-quote-who .usm-impact-image img {
    width: 40px;
    height: 40px;
    padding: 0px;
    display: block;
    border-radius: 30px;
    min-width: initial;
    max-width: initial;
    object-fit: cover;
    object-position: top;
}

.usm-impact-quote-who .usm-impact-who{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.usm-impact-who .usm-impact-author {
    font-weight: bold;
    color: #333;

    margin-top: 5px;
    font-style: normal;
    font-size: 12px;
    text-align: left;
    margin: 0;
}

.usm-impact-who .usm-impact-job {
    color: #777;
    margin-top: 5px;
    font-size: 10px;
    text-align: left;
    margin: 0;
}

.usm-impact-item .usm-impact-quote {
    display: flex;
    gap: 5px;
    padding: 20px 15px 15px;  /* Increased top padding to make room for quote mark */
    border-radius: 5px;
    font-style: italic;
    color: #555;
    position: relative;  /* Added for positioning the pseudo-element */
}

/* Add the large quotation mark */
.usm-impact-item .usm-impact-quote::before {
    content: '\201C';  /* Opening quotation mark */
    position: absolute;
    top: 0px;
    left: -6px;
    font-size: 60px;
    font-family: Georgia, serif;
    color: rgba(0, 0, 0, 0.1);
    line-height: 1;
    z-index: 1;
}

/* Style the quote text to appear above the quotation mark */
.usm-impact-item .usm-impact-quote p {
    position: relative;
    z-index: 2;
}

/* Just text no quote */
.usm-impact-item .usm-impact-text {
    display: flex;
    gap: 5px;
    flex-direction: column;
    align-items: center;
    border-radius: 5px;
    color: #555;
}

/* Show the full image */
.usm-impact-text .usm-impact-image {
    width: 100%;
    border-radius: 10px;
}

.usm-impact-text p {
    text-align: center;
    margin: 0;
    padding: 0 10px;
}

/**
* Text block styles
*/
.usm-text-block {
    margin: 0 max(20px, 10%);
}

.usm-side-by-side-wrapper .usm-text-block {
    margin: 0;
}

.usm-text-block img.usm-section-image {
    width: 90%;
}

/**
* Solicitor search and cards styles
*/
.usm-search-participants {
    margin-top: 20px;
}

.usm-search-participants input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

.usm-search-participants input[type="text"]:focus {
    outline: none;
    border-color: #1e1731;
}

.usm-campaign-search-results {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding: 25px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.1),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
    position: relative;
    min-height: 200px;
}

.usm-hidden-results {
    display: none;
}

.campaign-grid-item {
    width: 235px;
    height: 275px;
    margin-top: 30px;
    font-family: "Roboto", sans-serif;
}

.campaign-simple-card {
    width: 235px;
    height: 235px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    color: #f0f0f0;
    box-shadow: 0 10px 30px 5px rgba(0, 0, 0, 0.2);
    border-radius: 10px 10px 0 0;
}

.campaign-simple-card img {
    object-fit: cover;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.campaign-card-overlay {
    position: absolute;
    top: 0;
    width: 235px;
    height: 235px;
    background-color: rgba(0, 0, 0, .6);
}

.campaign-simple-card h2 {
    position: absolute;
    height: 40px;
    inset: auto auto 15px 15px;
    margin: 0;
    transition: top 0.3s ease-out;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 18px !important;
    color: #FEBF0E;
    top: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.campaign-simple-card p {
    position: absolute;
    inset: auto auto 15px 15px;
    margin: 0;
    transition: top 0.3s ease-out;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px !important;
    color: white;
    top: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.campaign-simple-card p.usm-campaign-name {
    max-height: 65px;
    text-overflow: ellipsis;
}

.campaign-simple-card .campaign-simple-card-detail {
    position: absolute;
    height: 10px;
    width: 100%;
    margin: 0;
    transition: top 0.3s ease-out, height 0.3s ease-out;
    background-color: #00909A88;
    top: 225px;
    overflow: hidden;
}

.campaign-simple-card .campaign-simple-card-detail p {
    display: none;
    color: white;
    margin: 10px 15px;
    max-height: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.campaign-grid-item .campaign-button-area {
    width: 235px;
    height: 40px;
    background-color: rgb(20, 49, 85);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.campaign-grid-item .campaign-button-area a {
    line-height: 0;
}

.campaign-grid-item .campaign-small-button input[type="button"] {
    font-size: 10px;
    padding: 2px 4px;
}

.campaign-grid-item .campaign-small-button input[type="button"]:hover {
    background-color: #00909A;
    color: rgb(20, 49, 85);
}

.campaign-simple-card:hover h2 {
    top: 20px;
}

.campaign-simple-card:hover p.usm-campaign-name {
    top: 45px;
}

.campaign-simple-card:hover .campaign-simple-card-detail{
    height: 115px;
    top: 120px;
}

.campaign-simple-card:hover .campaign-simple-card-detail p{
    position: unset;
}

.campaign-simple-card:hover p {
    display: block;
}

.usm-cmp-search-block h2 {
    text-align: left;
}

/**
 * Solicitor feature section styles
 */

 .usm-feature-campaign {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding: 25px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 
        inset 2px 2px 5px rgba(0, 0, 0, 0.1),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
    position: relative;
    justify-content: space-evenly;
}

/**
* Campaign progress section styles
*/

.usm-cmp-progress-block {
    margin: 20px auto;
    width: 80%;
    min-width: 350px;
}

.usm-progress-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.usm-progress-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(30, 23, 49, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.usm-progress-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Progress Bar Wrapper */
.usm-progress-bar-wrapper {
    margin-bottom: 20px;
}

/* Remove bottom margin when no stats are present - use container approach */
.usm-progress-container:not(:has(.usm-progress-stat)) .usm-progress-bar-wrapper {
    margin-bottom: 0;
}

.usm-progress-bar {
    width: 100%;
    height: 12px;
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.usm-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: 25px 25px 0 0;
}

.usm-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #1e1731 0%, #2d2548 50%, #1e1731 100%);
    border-radius: 25px;
    width: 0%;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.usm-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.usm-progress-fill::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
    border-radius: 25px;
}

/* Progress Stats */
.usm-progress-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    overflow: visible;
    height: auto;
    min-height: 60px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

/* When hover is enabled, allow container to grow dynamically */
.usm-progress-hover-enabled .usm-progress-stats {
    min-height: 70px; /* Minimum height to accommodate stats */
}

/* When no stats are visible, collapse the stats container */
.usm-progress-stats:empty,
.usm-progress-stats:not(:has(.usm-progress-stat)) {
    min-height: 0;
    height: 0;
    padding: 0;
    margin: 0;
    gap: 0;
}

.usm-progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 80px;
    max-width: 200px;
    flex-shrink: 0;
}

.usm-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #1e1731;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.usm-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Primary stat (always visible) */
.usm-stat-primary {
    background: linear-gradient(135deg, #1e1731 0%, #2d2548 100%);
    color: white;
    transform: scale(1.05);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Make primary stat grow when it's the only item OR when hover is enabled */
.usm-stat-primary,
.usm-progress-hover-enabled .usm-stat-primary {
    flex: 1;
    max-width: 300px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.usm-stat-primary .usm-stat-value {
    color: #FEBF0E;
    font-size: 24px;
}

.usm-stat-primary .usm-stat-label {
    color: #e0e0e0;
}

/* Secondary stats - hidden by default when hover is enabled */
.usm-progress-hover-enabled .usm-stat-secondary {
    display: none;
}

/* On hover, reveal all secondary stats smoothly and adjust layout */
.usm-progress-hover-enabled:hover .usm-progress-stats {
    justify-content: space-evenly;
    transition: justify-content 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.usm-progress-hover-enabled:hover .usm-stat-secondary {
    display: flex;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    width: auto;
    min-width: 80px;
    padding: 10px;
    margin: 0;
    flex: 1;
    animation: statSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes statSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateX(20px);
        min-width: 0;
        width: 0;
        padding: 10px 0;
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9) translateX(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
        min-width: 80px;
        width: auto;
        padding: 10px;
    }
}

/* On hover, make all stats grow to fill available space equally */
.usm-progress-hover-enabled:hover .usm-progress-stat {
    flex: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Special handling for 1-2 items: ensure equal distribution */
.usm-progress-hover-enabled:hover .usm-progress-stats:has(.usm-progress-stat:nth-child(2):last-child) .usm-progress-stat,
.usm-progress-hover-enabled:hover .usm-progress-stats:has(.usm-progress-stat:first-child:last-child) .usm-progress-stat {
    flex: 1 1 0;
    max-width: none;
}

/* Ensure primary stat also gets proper flex on hover */
.usm-progress-hover-enabled:hover .usm-stat-primary {
    flex: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override primary stat sizing for 1-2 items only */
.usm-progress-hover-enabled:hover .usm-progress-stats:has(.usm-progress-stat:nth-child(2):last-child) .usm-stat-primary,
.usm-progress-hover-enabled:hover .usm-progress-stats:has(.usm-progress-stat:first-child:last-child) .usm-stat-primary {
    flex: 1 1 0;
    max-width: none;
}

.usm-progress-stat:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.usm-stat-primary:hover {
    transform: translateY(-3px) scale(1.08);
}

.usm-progress-hover-enabled:hover .usm-stat-primary:hover {
    transform: translateY(-3px) scale(1.08);
}

/* Animation delays for staggered effect */
.usm-progress-hover-enabled:hover .usm-stat-secondary:nth-child(2) {
    transition-delay: 0.1s;
}

.usm-progress-hover-enabled:hover .usm-stat-secondary:nth-child(3) {
    transition-delay: 0.2s;
}

.usm-progress-hover-enabled:hover .usm-stat-secondary:nth-child(4) {
    transition-delay: 0.3s;
}

/**
* Donation block styles
*/
.usm-donation-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}
