/* Modal Base Styles */
.experience-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.experience-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 3rem;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f5f5f5;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch; /* Makes all cards equal height */
}

.experience-card {
    background: #9caf9e;
    padding: 2.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Takes full grid cell height */
}
.experience-card h3 {
    color: #f7e190;
}

.experience-card p {
    flex-grow: 1; /* Expands to fill space */
    margin-bottom: 2rem; /* Space before button */
}

.read-more-btn {
    margin-top: auto;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    max-width: 150px;
    align-self: center;
    border: none !important;
}

.read-more-btn:hover {
    background: white;
    color: #333;
}

/* Modal Body Content Styles */
.modal-body h2 {
    font-size: 1.8rem !important;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: #333;
}

.modal-body h3 {
    font-size: 1.4rem !important;
    margin: 1.2rem 0 0.8rem 0;
    color: #555;
}

.modal-body h4 {
    font-size: 1.2rem !important;
    margin: 1rem 0 0.6rem 0;
    color: #666;
}

.modal-body p {
    font-size: 1rem !important;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    color: #444;
}

.modal-body ul, .modal-body ol {
    font-size: 1rem !important;
    line-height: 1.5;
    margin: 0.8rem 0;
    padding-left: 1.2rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: #666;
}

.error-message {
    color: #ff6b6b;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 2rem;
        border-radius: 10px;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .read-more-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }

    .modal-body h2 {
        font-size: 1.5rem !important;
    }
    
    .modal-body h3 {
        font-size: 1.2rem !important;
    }
    
    .modal-body p, .modal-body ul, .modal-body ol {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        width: 98%;
    }
    
    .modal-body h2 {
        font-size: 1.3rem !important;
    }
}