/* Modal Styles - Dual View System */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background:
        linear-gradient(135deg,
            rgba(26, 44, 74, 0.98) 0%,
            rgba(10, 22, 40, 0.98) 100%);
    margin: 5% auto;
    padding: 0;
    border: 2px solid var(--gold);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(212, 175, 55, 0.3);
    animation: modalSlideIn 0.4s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--gold);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
}

.close-btn:hover,
.close-btn:focus {
    color: white;
    background: var(--gold);
    transform: rotate(90deg);
}

/* Modal Views */
.modal-view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-view.active {
    display: block;
    opacity: 1;
}

.modal-header {
    padding: 40px 40px 20px 40px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.modal-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--gold);
    margin: 0;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
}

.modal-body {
    padding: 30px 40px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 10px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
}

.modal-footer {
    padding: 20px 40px 30px 40px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    justify-content: center;
}

/* Program View Styles */
.program-details {
    color: white;
}

.concert-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--light-gold);
    text-align: center;
    margin-bottom: 30px;
    font-style: italic;
}

.piece {
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border-left: 4px solid var(--gold);
}

.composer {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--gold);
    margin: 0 0 10px 0;
    font-weight: 700;
}

.piece-title {
    font-size: 18px;
    color: var(--light-blue);
    margin: 0 0 15px 0;
    font-weight: 600;
}

.movements {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    padding-left: 20px;
}

.movements li {
    padding: 5px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    position: relative;
}

.movements li:before {
    content: '♪';
    position: absolute;
    left: -20px;
    color: var(--gold);
    font-size: 16px;
}

.piece-notes {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin: 15px 0;
    font-style: italic;
}

.duration {
    font-size: 14px;
    color: var(--light-gold);
    margin: 10px 0 0 0;
    text-align: right;
}

.intermission {
    text-align: center;
    padding: 20px;
    color: var(--gold);
    font-style: italic;
    font-size: 18px;
    margin: 20px 0;
}

.total-duration {
    text-align: center;
    font-size: 18px;
    color: white;
    margin: 25px 0 15px 0;
    padding: 15px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
}

.musicologist-note {
    padding: 0;
}

.musicologist-text {
    font-size: 17px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.95);
    margin: 20px 0;
    text-align: justify;
}

.signature {
    text-align: right;
    font-style: italic;
    color: var(--gold);
    margin-top: 25px;
    font-size: 15px;
}

/* Artists View in Modal */
.modal-artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.modal-artist-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.modal-artist-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.modal-artist-photo {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.modal-artist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-artist-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--gold);
    margin: 0 0 8px 0;
}

.theme-blue .modal-artist-name {
    color: var(--light-blue);
}

.modal-artist-role {
    font-size: 14px;
    color: var(--light-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 15px 0;
}

.modal-artist-bio {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.modal-bio-short p,
.modal-bio-full p {
    margin-bottom: 12px;
}

.modal-bio-full {
    margin-top: 12px;
}

.modal-bio-toggle {
    display: inline-block;
    margin-top: 12px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modal-bio-toggle:hover {
    color: var(--light-gold);
    transform: translateX(3px);
}


.no-artists {
    text-align: center;
    font-size: 18px;
    color: var(--light-blue);
    padding: 40px;
    font-style: italic;
}

/* Toggle Button */
.modal-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: linear-gradient(135deg, var(--gold), var(--light-gold));
    color: var(--primary-blue);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(212, 175, 55, 0.4),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.modal-toggle-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 20px rgba(212, 175, 55, 0.6),
        0 0 20px rgba(212, 175, 55, 0.3);
}

.modal-toggle-btn svg {
    transition: transform 0.3s ease;
}

.modal-toggle-btn:hover svg {
    transform: translateX(3px);
}

/* Responsive Modal */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 25px;
        padding-right: 25px;
    }

    .modal-header h3 {
        font-size: 24px;
    }

    .modal-artists-grid {
        grid-template-columns: 1fr;
    }

    .modal-toggle-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* Donation Modal Styles */
#donation-modal {
    z-index: 20000;
    /* Higher than concert modal */
}

.donation-modal-content {
    max-width: 500px;
    /* Smaller width for the widget */
    background: transparent;
    /* Let the widget handle background */
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    height: 700px;
    /* Fixed height for the widget */
}

.donorbox-container {
    width: 100%;
    height: 100%;
    background: white;
    /* Widget needs white background usually */
}

.close-modal-donation {
    position: absolute;
    right: 15px;
    top: 10px;
    color: var(--primary-blue);
    font-size: 28px;
    font-weight: bold;
    z-index: 20001;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal-donation:hover {
    color: #000;
    background: white;
    transform: rotate(90deg);
}

@media screen and (max-width: 768px) {
    .donation-modal-content {
        margin: 10% auto;
        width: 95%;
        height: 600px;
    }
}