/* ================= RESET & BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ================= CONTAINER ================= */
.hoidap-section {
    padding: 40px 20px;
    min-height: 100vh;
}

.hoidap-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ================= HEADER ================= */
.hoidap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.hoidap-main-title {
    font-size: 28px;
    font-weight: 700;
    color: #0066cc;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hoidap-main-title i {
    font-size: 32px;
}

.hoidap-btn-show-form {
    padding: 12px 28px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hoidap-btn-show-form:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* ================= FORM GỬI CÂU HỎI ================= */
.hoidap-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    border-top: 4px solid #0066cc;
}

.hoidap-form-header {
    margin-bottom: 24px;
}

.hoidap-btn-back {
    padding: 10px 20px;
    background: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hoidap-btn-back:hover {
    background: #0066cc;
    color: #ffffff;
    transform: translateX(-4px);
}

.hoidap-title {
    font-size: 28px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hoidap-title i {
    font-size: 32px;
}

.hoidap-form {
    display: grid;
    gap: 24px;
}

.hoidap-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hoidap-field label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.hoidap-required {
    color: #e74c3c;
    font-weight: 700;
}

.hoidap-input {
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
}

.hoidap-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.hoidap-input::placeholder {
    color: #95a5a6;
}

.hoidap-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* ================= BUTTONS ================= */
.hoidap-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 10px;
}

.hoidap-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hoidap-btn-reset {
    background: #ecf0f1;
    color: #34495e;
}

.hoidap-btn-reset:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hoidap-btn-submit {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
}

.hoidap-btn-submit:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

/* ================= DANH SÁCH CÂU HỎI ================= */
.hoidap-list-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hoidap-list-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #0066cc;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ================= BỘ LỌC TÌM KIẾM (CAO CẤP) ================= */
.hoidap-filter {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.hoidap-search-form {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hoidap-search-form:focus-within {
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.15);
    transform: translateY(-1px);
}

.hoidap-search-input {
    flex: 1;
    padding: 14px 20px 14px 45px!important;
    border: 2px solid #e0e6ed!important;
    border-right: none!important;
    border-radius: 10px 0 0 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 15px center;
}

.hoidap-search-input:focus {
    outline: none;
    border-color: #0066cc;
}

.hoidap-btn-search {
    padding: 0 30px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    border: none;
    border-radius: 0 10px 10px 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.hoidap-btn-search:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
}

.hoidap-btn-search i {
    font-size: 14px;
}

/* ================= DANH SÁCH CÂU HỎI ================= */
.hoidap-question-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hoidap-question-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 24px;
    border-left: 4px solid #0066cc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hoidap-question-item:hover {
    background: #e8f4fd;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.15);
    transform: translateX(4px);
}

.hoidap-question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.hoidap-question-title {
    font-size: 18px;
    font-weight: 700;
    color: #0066cc;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.hoidap-question-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 12px;
}

.hoidap-question-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hoidap-question-meta i {
    color: #95a5a6;
}

.hoidap-question-content {
    color: #34495e;
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 15px;
}

.hoidap-question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e0e6ed;
}

.hoidap-question-author {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

.hoidap-question-author strong {
    color: #2c3e50;
    font-style: normal;
}

.hoidap-toggle-answer {
    background: transparent;
    border: 2px solid #0066cc;
    color: #0066cc;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hoidap-toggle-answer:hover {
    background: #0066cc;
    color: #ffffff;
}

/* ================= PHẦN TRẢ LỜI ================= */
.hoidap-answer {
    margin-top: 20px;
    padding: 20px;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    display: none;
}

.hoidap-answer.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hoidap-answer-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #27ae60;
    font-weight: 700;
    font-size: 16px;
}

.hoidap-answer-content {
    color: #2c3e50;
    line-height: 1.8;
    font-size: 15px;
}

.hoidap-answer-date {
    margin-top: 12px;
    font-size: 13px;
    color: #7f8c8d;
    font-style: italic;
}

/* ================= LOADING ================= */
.hoidap-loading {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hoidap-loading i {
    font-size: 24px;
}

/* ================= EMPTY STATE ================= */
.hoidap-empty {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.hoidap-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.hoidap-empty p {
    font-size: 18px;
    margin: 0;
}

/* ================= PAGINATION ================= */
#pager {
    margin-top: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.pagination .page-link {
    font-size: 13px;
    padding: 6px 10px;
    min-width: 32px;
    text-align: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .hoidap-section {
        padding: 20px 12px;
		width: 100vw;
    }

    .hoidap-header {
        flex-direction: column;
        align-items: stretch;
    }

    .hoidap-main-title {
        font-size: 22px;
        justify-content: center;
    }

    .hoidap-main-title i {
        font-size: 24px;
    }

    .hoidap-btn-show-form {
        width: 100%;
        justify-content: center;
    }

    .hoidap-form-wrapper,
    .hoidap-list-wrapper {
        padding: 24px 20px;
    }

    .hoidap-title {
        font-size: 22px;
    }

    .hoidap-title i {
        font-size: 24px;
    }

    .hoidap-list-title {
        font-size: 20px;
    }

    .hoidap-actions {
        flex-direction: column;
    }

    .hoidap-btn {
        width: 100%;
        justify-content: center;
    }

    .hoidap-filter {
        flex-direction: column;
    }

    .hoidap-btn-search {
        width: 100%;
        justify-content: center;
    }

    .hoidap-question-header {
        flex-direction: column;
    }

    .hoidap-question-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .hoidap-question-meta {
        flex-direction: column;
        gap: 8px;
    }

    .pagination {
        justify-content: center;
    }
	
	.hoidap-search-input {
		background: unset;
		padding: 14px 0px 14px 12px !important;
	}
	
	.hoidap-btn-search {
		padding: 0px;
	}
}

@media (max-width: 480px) {
    .hoidap-title {
        font-size: 18px;
        flex-direction: column;
        gap: 8px;
    }

    .hoidap-question-title {
        font-size: 16px;
    }

    .pagination .page-link {
        padding: 4px 8px;
        min-width: 28px;
        font-size: 12px;
    }
}
