/* Search Bar Styles */
.fund-search-container {
    margin: 20px 0 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.fund-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.fund-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.fund-search-input:focus {
    outline: none;
    border-color: #3498db;
}

.fund-search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fund-search-btn:hover {
    background: #2980b9;
}

.fund-clear-search {
    color: #e74c3c;
    text-decoration: none;
    padding: 12px 20px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.fund-clear-search:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* List Container */
.funds-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

/* List Item */
.fund-list-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.fund-list-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateX(5px);
}

/* Header Section */
.fund-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.fund-list-title {
    color: #2c3e50;
    margin: 0;
    font-size: 1.5em;
    flex: 1;
}

.fund-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-open {
    background: #d4edda;
    color: #27ae60;
}

.status-closed {
    background: #f8d7da;
    color: #e74c3c;
}

.status-upcoming {
    background: #fff3cd;
    color: #f39c12;
}

/* Details Section */
.fund-list-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.fund-detail-row {
    display: flex;
    gap: 8px;
    line-height: 1.6;
}

.fund-label {
    color: #2c3e50;
    font-weight: 600;
    min-width: 140px;
}

.fund-value {
    color: #555;
}

/* Content Section */
.fund-list-content {
    margin: 20px 0;
    color: #666;
    line-height: 1.8;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

/* Apply Button */
.apply-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-block;
}

.apply-btn:hover {
    background: #2980b9;
}

/* Pagination Styles */
.fund-pagination {
    margin: 40px 0 20px;
    text-align: center;
}

.fund-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.fund-pagination li {
    display: inline-block;
}

.fund-pagination a,
.fund-pagination span {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.fund-pagination a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.fund-pagination .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.fund-title-display {
    color: #3498db;
    font-weight: bold;
    margin-bottom: 20px;
}

#fund-application-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 600;
}

#fund-application-form input[type="text"],
#fund-application-form input[type="email"],
#fund-application-form input[type="tel"],
#fund-application-form input[type="date"],
#fund-application-form select,
#fund-application-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

#fund-application-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

#fund-application-form textarea {
    resize: vertical;
    min-height: 100px;
}

#fund-application-form button[type="submit"] {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

#fund-application-form button[type="submit"]:hover {
    background: #229954;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fund-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .fund-list-details {
        grid-template-columns: 1fr;
    }
    
    .fund-search-form {
        flex-direction: column;
    }
    
    .fund-search-input {
        width: 100%;
    }
    
    .fund-search-btn,
    .fund-clear-search {
        width: 100%;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .fund-pagination a,
    .fund-pagination span {
        padding: 8px 12px;
        font-size: 14px;
    }
}