/* Modal Style */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal.show .modal-content {
    transform: translateY(-50%) scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
}

.close-modal:hover,
.close-modal:focus {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 20px 0;
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* View larger button  */
.view-larger-btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-larger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}


.unit-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.unit-card .p-5 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.unit-card .p-5 p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.unit-card .mt-4 {
    margin-top: auto !important;
}


@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .close-modal {
        top: 15px;
        right: 20px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-caption {
        font-size: 16px;
        padding: 15px 0;
    }
}
