/* Page Header Section */
.pg-header {
    background-image: url('images/Slider-ODOC.jpg');
}

/* Contributors Section */
.contributors-section {
    background-image: url('images/odoc-background2.jpg');
    background-size: cover;
    padding: 5rem 0;
}

.contributors-section h2 {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 5rem;
    color: #14428c;
    font-size: 2rem;
    text-align: center;
}

.contributors-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5rem;
}

.contributors-wrapper {
    background-image: url('images/ODOC-1110x258H-21082020--.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
}

.contributor-box {
    flex: 1;
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.contributor-box h3 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.counter-display {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 1.5rem;
    padding: 4px;
    border-radius: 6px;
    width: 100%;
}

.digit {
    position: relative;
    background-color: #000;
    color: white;
    font-size: 2.8rem;
    font-weight: bold;
    padding: 0.3rem 0.2rem;
    max-width: 2.8rem;
    font-family: 'Arial', sans-serif;
    text-align: center;
    border-radius: 4px;
    overflow: hidden;
    flex: 1;
    
    /* Add 3D effect */
    background: linear-gradient(180deg, 
        #000000 0%,
        #1a1a1a 47%,
        #2a2a2a 50%,
        #000000 51%,
        #1a1a1a 100%
    );
    
    /* Add shadow effects */
    box-shadow: 
        inset 0 -1px 3px rgba(255,255,255,0.1),
        inset 0 1px 3px rgba(0,0,0,0.9),
        0 1px 2px rgba(0,0,0,0.2);
}

.digit::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(255,255,255,0.25);
    z-index: 1;
    border-radius: 4px 4px 0 0;
}

.digit::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(0deg,
        rgba(0,0,0,0.2) 0%,
        rgba(0,0,0,0) 100%
    );
    border-radius: 0 0 4px 4px;
}

.view-more {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.view-more:hover {
    background-color: #c0392b;
}

.view-more.outline {
    background-color: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.view-more.outline:hover {
    background-color: #e74c3c;
    color: white;
}

.odoc-description {
    padding: 2rem 2rem 1rem;
    backdrop-filter: blur(15px);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

.odoc-description p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Modal Styles */
#totalContributorModal.modal, #top10ContributorModal.modal, #usdContributorModal.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

#totalContributorModal .modal-content, #top10ContributorModal .modal-content, #usdContributorModal .modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 992px) {
    /* Update modal styles for mobile */
    #totalContributorModal .modal-content, #top10ContributorModal .modal-content, #usdContributorModal .modal-content {
        max-width: calc(100% - 4rem);
        margin: 0 2rem;
        padding: 1.5rem;
    }
}

#totalContributorModal .close-modal, #top10ContributorModal .close-modal, #usdContributorModal .close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

#totalContributorModal .close-modal:hover, #top10ContributorModal .close-modal:hover, #usdContributorModal .close-modal:hover {
    color: #000;
}

.contributors-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.contributors-table th,
.contributors-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.contributors-table th {
    background: #1F2B3A;
    color: #fff;
    font-weight: bold;
}

.contributors-table tr:nth-of-type(2n+1) {
    background: #f5f5f5;
}

.contributors-table tr:hover {
    background-color: #deebff;
}

/* Accordion Styles */
.accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item:first-child {
    margin-top: 20px;
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f0f0f0;
}

.contributor-flag {
    width: 40px;
    height: 30px;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.contributor-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contributor-info {
    flex: 1;
}

.contributor-name {
    font-weight: bold;
    color: #333;
}

.contributor-country {
    font-size: 0.9em;
    color: #666;
}

.contributor-amount {
    font-weight: bold;
    color: #14428c;
    margin: 0 20px;
}

.accordion-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

.accordion-item.active .accordion-content {
    display: block;
}

.contributor-details {
    width: 100%;
    border-collapse: collapse;
}

.contributor-details th,
.contributor-details td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.contributor-details th {
    width: 200px;
    text-align: left;
    color: #666;
    font-weight: normal;
}

.contributor-details td {
    font-weight: 500;
    color: #333;
}

/* Add debug styles to check visibility */
#totalContributorModal[style*="display: block"], #top10ContributorModal[style*="display: block"], #usdContributorModal[style*="display: block"] {
    opacity: 1;
    visibility: visible;
}

.odoc-remark {
    padding-top: 1rem;
}

.odoc-remark p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Design for Contributors Section */
@media (max-width: 1200px) {
    .contributors-container {
        padding: 0 3rem;
    }

    .contributors-section h2 {
        padding: 0 3rem;
    }

    .contributors-wrapper {
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .contributors-wrapper {
        flex-direction: column;
        padding: 1.5rem;
    }

    .contributor-box {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .contributors-section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .contributors-container {
        padding: 0 2rem;
    }

    .contributors-section {
        padding: 3rem 0;
    }

    .contributors-section h2 {
        font-size: 1.5rem;
        padding: 0 2rem;
        margin-bottom: 2rem;
    }

    .counter-display {
        gap: 1px;
    }

    .digit {
        font-size: 2.2rem;
        min-width: 2.2rem;
        padding: 0.2rem 0.15rem;
    }
}

@media (max-width: 576px) {
    .contributors-container {
        padding: 0 1rem;
    }

    .contributors-section {
        padding: 2rem 0;
    }

    .contributors-section h2 {
        font-size: 1.3rem;
        padding: 0 1rem;
    }

    .contributors-wrapper {
        padding: 1rem;
    }

    .contributor-box h3 {
        font-size: 1.6rem;
    }

    .digit {
        font-size: 2rem;
        min-width: 2rem;
    }

    .view-more {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Update table styles for mobile */
    .contributors-table {
        font-size: 0.8rem;
    }

    .contributors-table th,
    .contributors-table td {
        padding: 0.5rem;
    }

    .close-modal {
        right: 1rem;
        top: 0.75rem;
        font-size: 1.5rem;
    }

    .contributor-info {
        flex-basis: calc(100% - 65px);
    }
}


/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .accordion-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .contributor-amount {
        margin: 10px 0;
    }

    .contributor-details th {
        width: 140px;
    }
}