/* Community Forum - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
    min-height: calc(100vh - 140px);
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #4e73df, #224abe);
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.navbar .logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-bar {
    display: flex;
}

.search-bar input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 200px;
}

.icon-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Mobile Navigation */
.navbar .icon {
    display: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
}

@media screen and (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .navbar .icon {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 20px 0;
        margin-top: 10px;
    }
    
    .navbar.open .nav-links {
        display: flex;
    }
    
    .search-container.desktop-only {
        
        margin-left: auto;
        margin-right: 10px;
    }
    
    .search-bar input {
        width: 150px;
    }
}

/* Buttons */
.button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.button.primary, .btn-primary {
    background: linear-gradient(135deg, #4e73df, #224abe);
}

.button.success, .btn-success {
    background: #28a745;
}

.button.warning, .btn-warning {
    background: #ffc107;
    color: #212529;
}

.button.danger, .btn-danger {
    background: #dc3545;
}

.button-link {
    background: none;
    color: #4e73df;
    padding: 5px 10px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.button-link:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: none;
    box-shadow: none;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-weight: 600;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4e73df;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group.checkbox input {
    width: auto;
    margin: 0;
}

.form-group.checkbox label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Messages */
.alert, .error-message, .success-message, .info-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success, .success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error, .error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info, .info-message {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #abd5ff;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Widgets */
.widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #f1f3f4;
    padding-bottom: 10px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #4e73df;
    text-decoration: none;
}

.widget a:hover {
    text-decoration: underline;
}

/* Stats */
.stats-list {
    list-style: none;
    padding: 0;
}

.stats-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

.stats-list li:last-child {
    border-bottom: none;
}

.stats-list i {
    color: #4e73df;
    width: 20px;
    text-align: center;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #6c757d;
}

.breadcrumbs a {
    color: #4e73df;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 5px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 44px;
}

.page-link:hover {
    background: #e9ecef;
    color: #495057;
}

.page-link.active {
    background: #4e73df;
    color: white;
    box-shadow: 0 2px 4px rgba(78, 115, 223, 0.3);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    color: #000;
    background: #f1f3f4;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        order: -1;
    }
    
    .form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .pagination {
        gap: 2px;
    }
    
    .page-link {
        padding: 8px 12px;
        min-width: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .button, .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .widget {
        padding: 15px;
    }
    
    .main-content {
        padding: 15px;
    }
}
/* Notification Bell Styles */
.notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
}

.notification-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    display: none;
}

.notification-badge.has-notifications {
    display: block;
}

/* Mobile/Desktop search visibility */
.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

@media screen and (max-width: 768px) {
    .mobile-only {
        display: flex;
        width: 100%;
        margin-top: 10px;
    }
    
    .desktop-only {
        display: none;
    }
    
    /* Style the mobile search inside dropdown */
    .nav-links .search-container.desktop-only {
        padding: 10px;
    }
    
    .nav-links .search-bar input {
        width: 100%;
        border-radius: 20px 0 0 20px;
    }
}

/* Fix search bar gap - button inside form */
.search-bar {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.search-bar input {
    margin: 0;
    border-right: none;
}

.search-bar .icon-btn {
    margin: 0;
    margin-left: -1px;
}

/* Make search bar full width on mobile */
@media (max-width: 768px) {
    .search-bar {
        width: 100%;
    }
    
    .search-bar input {
        flex: 1;
        width: 100%;
    }
    
    .search-container {
        width: 100%;
        padding: 10px 20px;
    }
}

/* Fix profile card width on mobile */
@media (max-width: 768px) {
    .post {
        display: block !important;
        width: 100% !important;
    }
    
    .post-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
    }
    
    .user-info,
    .user-stats,
    .user-avatar {
        width: 100% !important;
    }
    
    .post-main {
        width: 100% !important;
    }
}
