
/* =====================================================
   TIE DeKUT Q&A - FOREST GREEN REDESIGN
   CSS only: preserves existing JavaScript functionality
===================================================== */

.qna-page {
    --qna-green: #075c43;
    --qna-dark: #063b2d;
    --qna-emerald: #087f5b;
    --qna-light: #e9f5ef;
    --qna-bg: #f4f8f5;
    --qna-text: #20352c;
    --qna-muted: #718078;
    --qna-border: #dce9e1;

    background: var(--qna-bg);
    color: var(--qna-text);
}

.qna-page [hidden] {
    display: none !important;
}

/* NAVIGATION */

.qna-page header {
    background: #fff;
    box-shadow: 0 3px 16px rgba(0, 50, 30, .07);
    position: relative;
    z-index: 20;
}

.qna-page .navbar {
    max-width: 1200px;
    margin: auto;
    padding: 15px 5%;
}

.qna-page .logo {
    color: var(--qna-dark);
    font-weight: 800;
}

.qna-page .logo span {
    color: var(--qna-emerald);
}

.qna-page #navLinks a {
    color: #33483d;
    transition: .25s ease;
}

.qna-page #navLinks a:hover,
.qna-page #navLinks a.active {
    color: var(--qna-emerald);
}

.qna-page #navLinks .login-btn {
    background: var(--qna-green);
    color: white;
    border-radius: 8px;
    padding: 10px 18px;
}

.qna-page .menu-btn {
    color: var(--qna-green);
}

/* HERO SLIDESHOW */

.qna-page .page-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 270px;
    padding: 75px 7%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: var(--qna-dark);
}

.qna-page .page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: qnaImages 25s infinite;
    transform: scale(1.02);
}

.qna-page .page-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        110deg,
        rgba(2, 39, 27, .88),
        rgba(3, 75, 51, .65)
    );
}

@keyframes qnaImages {
    0%, 18% {
        background-image: url("../assets/images/engineer 2.jpg");
    }

    20%, 38% {
        background-image: url("../assets/images/engineer.jpg");
    }

    40%, 58% {
        background-image: url("../assets/images/satelite.jpg");
    }

    60%, 78% {
        background-image: url("../assets/images/telecoms-masts-2000759.webp");
    }

    80%, 100% {
        background-image: url("../assets/images/Cell-phone.webp");
    }
}

.qna-page .page-header h1 {
    color: white;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin: 0 0 15px;
}

.qna-page .page-header p {
    color: rgba(255, 255, 255, .92);
    max-width: 700px;
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

/* MAIN SECTION */

.qna-page .qna-section {
    max-width: 1100px;
    width: 90%;
    margin: 45px auto 65px;
}

/* ASK QUESTION CARD */

.qna-page .ask-question {
    background: white;
    border: 1px solid var(--qna-border);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 42px;
    box-shadow: 0 8px 28px rgba(15, 65, 42, .07);
}

.qna-page .ask-question h2 {
    color: var(--qna-dark);
    font-size: 1.5rem;
    margin: 0 0 8px;
}

.qna-page .ask-question > p {
    color: var(--qna-muted);
    line-height: 1.7;
    margin-bottom: 22px;
}

.qna-page #questionForm {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.qna-page #questionInput {
    width: 100%;
    min-height: 110px;
    padding: 15px;
    border: 1px solid var(--qna-border);
    border-radius: 10px;
    background: #fbfdfb;
    color: var(--qna-text);
    font: inherit;
    outline: none;
    transition: .2s ease;
}

.qna-page #questionInput:focus {
    border-color: var(--qna-emerald);
    box-shadow: 0 0 0 3px rgba(8, 127, 91, .11);
    background: white;
}

.qna-page #questionForm button {
    align-self: flex-start;
    border: none;
    border-radius: 9px;
    background: var(--qna-green);
    color: white;
    padding: 13px 24px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: .25s ease;
}

.qna-page #questionForm button:hover {
    background: var(--qna-dark);
    transform: translateY(-2px);
}

.qna-page #questionForm button:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.qna-page #questionStatus {
    color: var(--qna-emerald);
    font-weight: 600;
    line-height: 1.5;
    margin: 5px 0 0;
}

/* QUESTIONS HEADING */

.qna-page .questions > h2 {
    color: var(--qna-dark);
    font-size: 1.7rem;
    margin: 0 0 23px;
}

.qna-page .qna-empty {
    background: white;
    border: 1px solid var(--qna-border);
    border-radius: 12px;
    padding: 25px;
    color: var(--qna-muted);
}

/* QUESTION CARD */

.qna-page .question-card {
    background: white;
    border: 1px solid var(--qna-border);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 22px;
    box-shadow: 0 5px 18px rgba(15, 65, 42, .045);
    transition: transform .25s ease, box-shadow .25s ease;
}

.qna-page .question-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 65, 42, .09);
}

/* QUESTION HEADER */

.qna-page .question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 17px;
}

.qna-page .question-label {
    display: inline-block;
    background: var(--qna-light);
    color: var(--qna-green);
    border-radius: 30px;
    padding: 6px 12px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .5px;
}

.qna-page .question-date {
    color: var(--qna-muted);
    font-size: .82rem;
}

.qna-page .question-card h3 {
    color: var(--qna-dark);
    font-size: 1.25rem;
    line-height: 1.5;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}

.qna-page .question-author {
    color: var(--qna-muted);
    font-size: .85rem;
    margin: 0 0 22px;
}

/* ANSWERS SECTION */

.qna-page .answers-section {
    border-top: 1px solid var(--qna-border);
    padding-top: 20px;
}

.qna-page .answers-section h4 {
    color: var(--qna-green);
    font-size: 1rem;
    margin: 0 0 14px;
}

.qna-page .answers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qna-page .answers-list:empty {
    display: none;
}

.qna-page .answers-list:not(:has(.answer)) {
    color: var(--qna-muted);
    font-size: .9rem;
    line-height: 1.7;
}

/* INDIVIDUAL ANSWER */

.qna-page .answer {
    background: #f1f8f3;
    border-left: 4px solid var(--qna-emerald);
    border-radius: 8px;
    padding: 17px 18px;
}

.qna-page .answer-author {
    display: block;
    color: var(--qna-dark);
    font-size: .9rem;
    margin-bottom: 9px;
}

.qna-page .answer p {
    color: #53665b;
    font-size: .95rem;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0 0 10px;
}

.qna-page .answer-date {
    color: var(--qna-muted);
    font-size: .77rem;
}

/* ANSWER FORM - REPRESENTATIVES AND ADMINS */

.qna-page .answer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.qna-page .answer-input {
    width: 100%;
    min-height: 95px;
    padding: 13px 15px;
    border: 1px solid var(--qna-border);
    border-radius: 9px;
    background: #fbfdfb;
    color: var(--qna-text);
    font: inherit;
    resize: vertical;
    outline: none;
    transition: .2s ease;
}

.qna-page .answer-input:focus {
    border-color: var(--qna-emerald);
    box-shadow: 0 0 0 3px rgba(8, 127, 91, .11);
    background: white;
}

.qna-page .answer-button {
    align-self: flex-start;
    background: var(--qna-green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 11px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.qna-page .answer-button:hover {
    background: var(--qna-dark);
}

.qna-page .answer-button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.qna-page .answer-status {
    color: var(--qna-emerald);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.5;
}

.qna-page .answer-permission-note {
    color: var(--qna-muted);
    font-size: .85rem;
    line-height: 1.6;
    background: #f5f8f5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 17px;
}

/* FOOTER */

.qna-page footer {
    background: #063b2d;
    color: white;
    padding: 38px 20px;
    text-align: center;
}

.qna-page .footer-content h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.qna-page .footer-content p {
    color: rgba(255, 255, 255, .78);
    line-height: 1.7;
}

.qna-page .copyright {
    margin-top: 18px;
    font-size: .85rem;
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 700px) {
    .qna-page .page-header {
        min-height: 230px;
        padding: 55px 6%;
    }

    .qna-page .page-header p {
        font-size: .93rem;
    }

    .qna-page .qna-section {
        width: 92%;
        margin: 30px auto 45px;
    }

    .qna-page .ask-question {
        padding: 21px;
        margin-bottom: 32px;
    }

    .qna-page .question-card {
        padding: 19px;
    }

    .qna-page .question-card h3 {
        font-size: 1.1rem;
    }

    .qna-page #questionForm button,
    .qna-page .answer-button {
        width: 100%;
    }

    .qna-page .question-header {
        align-items: flex-start;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    .qna-page .page-header::before {
        animation: none;
        background-image: url("../assets/images/engineer 2.jpg");
    }

    .qna-page .question-card {
        transition: none;
    }
}
