
/* ask_question */
.ask-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.ask-form h1 {
    color: #2c3e50;
    margin-top: 0;
    text-align: center;
}

/* Form Fields */
.ask-form .form-field {
    margin-bottom: 20px;
}

.ask-form .form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.ask-form .form-field input[type="text"],
.ask-form .form-field textarea,
.ask-form .form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.ask-form .form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.ask-form .help-text {
    color: #7f8c8d;
    font-size: 14px;
}

.ask-form .error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.ask-form button[type="submit"] {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.ask-form button[type="submit"]:hover {
    background-color: #2980b9;
}

.ask-form a {
    display: inline-block;
    background-color: #d4ac0d; /* Màu vàng */
    color: #ffffff; /* Text màu trắng */
    padding: 12px 20px;
    text-align: center;
    border-radius: 8px; /* Bo tròn góc */
    font-size: 16px;
    margin-top: 12px; /* Khoảng cách phía trên */
    transition: all 0.3s ease; /* Hiệu ứng mượt */
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Đổ bóng nhẹ */
}

.ask-form a:hover {
    background-color: #d4ac0d; /* Màu vàng đậm hơn khi hover */
    color: #ffffff; /* Giữ text màu trắng */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); /* Tăng đổ bóng khi hover */
    transform: translateY(-2px); /* Hiệu ứng nhấc lên */
}

.ask-form a:active {
    transform: translateY(0); /* Reset khi nhấn giữ */
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.1); /* Giảm đổ bóng khi click */
}


/* Mobile Styles */
@media screen and (max-width: 768px) {
    .ask-form {
        padding: 15px;
        margin: 20px auto;
    }

    .ask-form h1 {
        font-size: 20px;
    }

    .form-field label {
        font-size: 14px;
    }

    .form-field input[type="text"],
    .form-field textarea,
    .form-field select {
        font-size: 14px;
        padding: 8px;
    }

    .ask-form button[type="submit"],
    .ask-form a {
        font-size: 14px;
        padding: 10px 15px;
    }
}

    @media only screen and (max-width: 480px) {
    .ask-form .form-field select {
        height: 40px; /* Tăng chiều cao */
        padding: 12px; /* Điều chỉnh padding để phù hợp */
        font-size: 18px; /* Điều chỉnh font nếu cần */
    }
}


/* question list*/
.layout-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar Styles */
.sidebar1 {
  position: sticky;
  width: 250px;
  top: 1rem;
  height: fit-content;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.sidebar__header {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar__title {
    margin: 0;
    font-size: 18px;
    color: #555;
}

.sidebar__content {
    padding: 15px;
}

.categories-list__item {
    list-style-type: none;
    margin-bottom: 10px;
}

.categories-list__link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.categories-list__link:hover,
.categories-list__item--active .categories-list__link {
    background-color: #e6e6e6;
}

.categories-list__icon {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

.categories-list__count {
    margin-left: auto;
    font-size: 14px;
    color: #777;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin: 0 20px;
}

.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.questions-title {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
}

.btn-ask__icon {
    margin-right: 5px;
}

.filters-section select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 20px;
    height: 40px;
}

/* Question Item */
.question-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 15px;
}

.question-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.question-item__title {
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.question-item__summary {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

.answers-badge {
    background-color: #3498db;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.question-meta {
    display: flex;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 10px;
}

.question-meta__item {
    display: block !important;
    align-items: center;
    max-width: 100px; /* Thử tăng lên để đủ chứa 10 ký tự */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.question-meta__icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/* Pagination */
.btn-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

.pagination {
    margin-top: 20px;
}

/* Users List */
.users-list__item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.users-list__link {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    width: 100%;
}

.users-list__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.users-list__avatar-img {
    width: 100%;
    height: auto;
}

.users-list__avatar-placeholder {
    width: 100%;
    height: 100%;
}

.users-list__info {
    flex: 1;
}

.users-list__username {
    font-weight: bold;
}

.users-list__stats {
    color: #7f8c8d;
    font-size: 12px;
}
.filters-section {
    display: none; /* Ẩn trên desktop */
}


/* Layout adjustments for mobile */
@media screen and (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }

    /* Hide left sidebar */
    .sidebar--left {
        display: none;
    }

    /* Show right sidebar */
    .sidebar--right {
        display: block;
        width: 100%;
        margin-top: 20px;
    }
    .filters-section {
        display: block;
    }
}

/* Adjust main content for full width on mobile */
@media screen and (max-width: 768px) {
    .main-content {
        margin: 0;
    }
    .questions-title {
        margin-left: 5px;

    }
}

   .questions-header {
    display: flex;
    flex-direction: column; /* Giữ nút nằm dưới tiêu đề */
    align-items: center;
    text-align: center;
    padding: 16px;
}

.questions-title {
    font-size: 1.5rem;
    margin-bottom: 16px; /* Tạo khoảng cách giữa h1 và nút */
    color: #333;
}

.btn-ask {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin-top: 12px; /* Khoảng cách giữa h1 và nút */
}

.btn-ask:hover {
    background-color: #f48840;
    color: #fff;
}

.btn-ask__icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

@media (min-width: 768px) {
    .questions-header {
        padding: 32px;
    }

    .questions-title {
        font-size: 2rem;
    }

    .btn-ask {
        font-size: 1.1rem;
        padding: 12px 24px;
    }

    .btn-ask__icon {
        width: 24px;
        height: 24px;
    }
}

    .users-list__avatar {
    width: 40px; /* Kích thước avatar */
    height: 40px;
    border-radius: 50%; /* Làm cho avatar tròn */
    overflow: hidden; /* Ẩn bất kỳ phần nào của hình ảnh vượt quá khung tròn */
    display: inline-block; /* Để avatar nằm cạnh nhau nếu cần */
}

.users-list__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo hình ảnh lấp đầy khung mà không bị vặn vẹo */
}

.btn-answer {
    display: inline-block;
    padding: 5px 10px;
    color: #333; /* Màu chữ mặc định */
    text-decoration: none;
    border: 1px solid #333; /* Thêm viền */
    border-radius: 4px;
    font-weight: 300;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-answer:hover {
    color: #45a049; /* Màu chữ khi hover */
    border-color: #45a049; /* Màu viền khi hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-answer:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* question detail */
    .question-container {
        max-width: 1000px;
        margin: 20px auto;
        padding: 0 15px;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }

    /* Question Header */
    .question-header {
        padding: 20px;
        border-bottom: 1px solid #e0e0e0;
    }

    .question-title {
        font-size: 24px;
        margin: 0 0 10px 0;
        color: #2c3e50;
    }

    .question-content {
        margin-bottom: 15px;
        color: #555;
    }

    .question-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    .question-meta__item {
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #7f8c8d;
    }

    .meta-icon {
        width: 16px;
        height: 16px;
        margin-right: 5px;
    }

    /* Answers Section */
    .answers-section {
        padding: 20px;
        border-bottom: 1px solid #e0e0e0;
    }

    .answers-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .answers-title {
        font-size: 20px;
        margin: 0;
        color: #2c3e50;
    }

    .answers-count {
        color: #3498db;
        font-weight: bold;
    }

    .answer-item {
        margin-bottom: 15px;
        padding: 15px;
        background: #f9f9f9;
        border-radius: 4px;
    }

    .answer-content {
        margin-bottom: 10px;
    }

    .answer-meta {
        display: flex;
        gap: 15px;
    }

    /* Empty Answers */
    .empty-answers {
        text-align: center;
        padding: 20px;
        color: #7f8c8d;
    }

    /* Answer Form */
    .answer-form {
        padding: 20px;
    }

    .answer-form__title {
        font-size: 18px;
        margin: 0 0 10px 0;
        color: #2c3e50;
    }

    .answer-textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 10px;
        min-height: 100px;
        resize: vertical;
    }

    .submit-button {
        background-color: #3498db;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 4px;
        cursor: pointer;
        margin-right: 10px;
    }

    .submit-button:hover {
        background-color: #2980b9;
    }

    .question-container a {
        color: #3498db;
        text-decoration: none;
        padding: 10px 20px;
        border: 1px solid #3498db;
        border-radius: 4px;
        display: inline-block;
    }

    .question-container a:hover {
        background-color: #e6e6e6;
    }

    /* Mobile Responsiveness */
    @media screen and (max-width: 768px) {
        .question-header, .answers-section, .answer-form {
            padding: 15px;
        }

        .question-title {
            font-size: 20px;
        }

        .answers-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .answers-count {
            margin-top: 5px;
        }

        .answer-textarea {
            min-height: 80px;
        }

        .answer-item {
            padding: 10px;
        }
    }

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

/* Hình ảnh bên trong modal */
.modal-content {
    display: block;
    margin: auto;
    max-width: 70%;
    height: auto;
}

/* Nút Close (X) */
.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
}

.close:hover {
    color: #f1c40f;
}
