/* Import modern news grid styles */
@import url('../news/news-grid-styles.css');

:root {
    --primary-color: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --secondary-color: #f8fafc;
    --accent-color: #dbeafe;
    --text-color: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
    --radius: 10px;
    --radius-sm: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

body {
    /*background-color: #f1f5f9;*/
    background: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(232, 232, 232, 0.5));
-webkit-background: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(232, 232, 232, 0.5));
-moz-background: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(232, 232, 232, 0.5));
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Navigation */
.main-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Utility classes for new logo */
.flex {
    display: flex;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.font-bold {
    font-weight: 700;
}

.text-blue-600 {
    color: var(--primary-color);
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: var(--text-color);
    font-weight: 500;
    margin-right: 1rem;
}

.auth-btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    align-items: center;
    gap: 0.5rem;
}

.login-btn {
    background: var(--primary-color);
    color: var(--white);
}

.login-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.logout-btn {
    background: var(--accent-color);
    color: var(--primary-color);
}

.logout-btn:hover {
    background: var(--primary-light);
    color: var(--white);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background: var(--accent-color);
}

/* Hamburger Icon */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

a {
    text-decoration: none !important;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 1rem;
    padding: 2rem 1rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.1" d="M0,288L48,272C96,256,192,224,288,197.3C384,171,480,149,576,165.3C672,181,768,235,864,250.7C960,267,1056,245,1152,224C1248,203,1344,181,1392,170.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E') no-repeat bottom center;
    background-size: cover;
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Hero Header */
header {
    padding: 1.5rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(255,255,255,0.1);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    z-index: 1;
}

.header-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Main Container */
main {
    display: flex;
    flex: 1;
    padding: 2.5rem 2rem;
    position: relative;
    margin-top: -20px;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Section 1: Q&A */
.qa-section {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.qa-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.qa-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.qa-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background: var(--primary-light);
    border-radius: 3px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-top: 1.5rem;
}

.userInput {
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.userInput:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    margin-left: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.answerDisplay {
    background-color: var(--accent-color);
    padding: 1.5rem;
    border-radius: 5px;
    min-height: 150px;
}

.markdown-body {
    font-size: 21px;
}

/* News Section */
.news-section {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.news-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.news-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    position: relative;
    padding-bottom: 10px;
}

.news-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background: var(--primary-light);
    border-radius: 3px;
}

/* Scrolling Wrapper */
.scrolling-wrapper {
    position: relative;
    overflow-x: scroll;
    height: auto;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrolling-wrapper::-webkit-scrollbar {
    display: none;
}

.scrolling-content {
    display: flex;
    flex-wrap: nowrap;
    position: relative;
    gap: 20px;
    padding: 10px 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    animation: scroll 60s linear infinite;
    -webkit-animation: scroll 60s linear infinite;
    will-change: transform;
}

.scrolling-content:active {
    cursor: grabbing;
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
}

.scrolling-content:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100%));
    }
}

@-webkit-keyframes scroll {
    0% {
        -webkit-transform: translateX(0);
    }
    100% {
        -webkit-transform: translateX(calc(-100%));
    }
}

/* News Cards */
.news-card {
    flex: 0 0 auto;
    height: fit-content;
    border-radius: var(--radius-sm);background-color: var(--white);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.news-card h2 {
    font-size: 1.2em;
    color: #000;
    margin: 0 0 10px;
}

.news-card p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    line-height: 1.4;
}

.news-card a {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: all 0.3s ease;
}

.news-card a:hover {
    color: yellow;
}

.news-card a:hover::after {
    transform: translateX(4px);
}

.chat-message {
    margin-bottom: 12px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: antiquewhite;
    border-left: 3px solid transparent;
    position: relative;
}

.chat-message:hover {
    background-color: var(--accent-color);
    border-left-color: var(--primary-light);
}

.chat-message strong {
    color: #ff0000;
    padding-right: 10px;
}

.chat-message button {
    position: absolute;
    right: 0;
}

/* What Others Are Asking Section */
.others-asking-section {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.others-asking-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.others-asking-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.others-asking-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background: var(--primary-light);
    border-radius: 3px;
}

.kanban-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.kanban-item {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.kanban-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--white);
}

.kanban-item p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    margin-top: 2rem !important;
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color), var(--primary-dark));
}

.footer-links {
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.footer-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a:hover::after {
    width: 100%;
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .welcome-text {
        display: none;
    }
    
    .auth-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .sidebar {
        width: 80vw;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .input-group .userInput {
        width: 100%;
    }

    .input-group .submit-btn {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .auth-btn {
        padding: 0.3rem 0.75rem;
        font-size: 0.85rem;
    }
    
    header {
        padding: 2rem 1rem 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .qa-section, .news-section {
        padding: 1.5rem;
    }

    .me-3 {display:none;}
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .kanban-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
}

.qhistory {
    float: right;
    margin-top: -20px;
}
.qhistory .fs-3, .qhistory .fs-4 { font-size: 18px !important; }
.qhistory h2 { font-size: 23px; }

/* Bootstrap Icon Overrides */
.bi-person-circle::before {
    content: "\f4d7";
}

.bi-newspaper::before {
    content: "\f4a3";
}
