.file-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Grid layout */
.file-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Card styling */
.file-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail styling */
.file-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    padding: 5px;
    font-size: 14px;
}

.file-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.file-details h3 {
    font-size: 18px;
    margin: 0 0 10px;
}

.file-details p {
    font-size: 14px;
    color: #555;
    flex-grow: 1;
}
.download-button-action:hover{
    color: white !important;
}

/* Download button */
.file-download-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
}

.file-download-btn:hover {
    background: #005f8d;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .file-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .file-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.download-form{
    text-align: justify;
}
/* Modal Styling */
.d-none {
    display: none !important;
}
.modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    /* Allows scrolling if modal is too large */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.label {
    display: block;
    margin: 10px 0 5px;
    text-align: left;
    font-weight: bold;
}

.input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
    font-size: 14px;
}

.button {
    background-color: #0073aa;
    color: white;
    padding: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

.button:hover {
    background-color: #005f8d;
}

/* Responsive Fix for Small Screens */
@media (max-width: 500px) {
    .modal {
        align-items: flex-start;
        /* Aligns modal at top so scrolling works */
        padding: 40px 20px;
        /* Adds space around */
    }

    .modal-content {
        max-width: 90%;
        /* Prevents too-wide modal */
        padding: 15px;
    }

    .close {
        font-size: 22px;
        right: 10px;
    }

    .download-form input {
        padding: 8px;
        font-size: 13px;
    }

    .download-form button {
        padding: 10px;
        font-size: 14px;
    }
}