/* Forums Styles */
.forum-container {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 80vh;
}

.forum-header {
    text-align: center;
    margin-bottom: 40px;
}

.forum-header h1 {
    color: var(--primary-color, #6b46c1);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.forum-header p {
    color: #666;
    margin-bottom: 30px;
}

.header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex-grow: 1;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    color: #2d3748;
}

.search-box input:focus {
    border-color: var(--primary-color, #6b46c1);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.btn-primary {
    background: var(--primary-color, #6b46c1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
    background: #553c9a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

/* Form Styles */
.forum-form-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    animation: slideDown 0.3s ease-out;
    color: #2d3748;
    /* Dark text for visibility on white bg */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    color: #2d3748;
    /* Dark text for inputs */
    background: white;
}

.form-actions {
    display: flex;
    gap: 10px;
}

/* Feed Styles */
.forum-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

.post-meta {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 15px;
}

.post-excerpt {
    color: #4a5568;
    line-height: 1.6;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 16px;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    color: #2d3748;
    /* Dark text for visibility on white bg */
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #a0aec0;
}

/* Comments */
.comments-section {
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #f7fafc;
}

.comment-meta {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 5px;
}

.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-form-footer {
    display: flex;
    gap: 10px;
}

.comment-form-footer input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #2d3748;
    background: white;
}

.loader {
    text-align: center;
    padding: 40px;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-container {
        padding-top: 100px;
    }

    .modal-content {
        padding: 20px;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}