/* Mutual Fund Page Styles */
.mutual-fund-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mutual-fund-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/static/images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 40px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
}

.mutual-fund-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.mutual-fund-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

/* Fund Search Section */
.fund-search {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.search-container {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #45a049;
}

/* Fund Results Section */
.fund-results {
    margin-bottom: 40px;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.fund-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.fund-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fund-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.fund-details {
    margin-bottom: 15px;
}

.fund-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.view-details-btn {
    display: block;
    width: 100%;
    background-color: #3498db;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.view-details-btn:hover {
    background-color: #2980b9;
}

/* Fund Detail Modal */
.fund-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: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.fund-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.fund-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.fund-header p {
    color: #666;
    font-size: 1rem;
}

.fund-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fund-info-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
}

.performance-chart {
    margin-top: 30px;
    height: 400px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }
    
    .search-input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .search-button {
        border-radius: 4px;
    }
    
    .fund-info-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .fund-info-grid {
        grid-template-columns: 1fr;
    }
}