/* Haiti Skills Academy - Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    height: 70px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--dark);
}

.logo-icon {
    font-size: 1.5rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.admin-link {
    background: var(--warning);
    color: white !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-google {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: var(--light);
}

/* Pages */
.page {
    display: none;
    padding-top: 70px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

.page-content {
    padding: 40px 0;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-intro {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: white;
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    color: #94a3b8;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
}

.section-intro {
    text-align: center;
    color: var(--gray);
    margin-bottom: 50px;
}

.section-dark {
    background: white;
}

/* Pipeline Visual */
.pipeline-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.pipeline-stage {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stage-number {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
}

.stage-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.pipeline-arrow {
    color: var(--gray);
    font-size: 1.5rem;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.course-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 30px;
    color: white;
}

.course-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.course-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.course-body {
    padding: 25px;
}

.course-description {
    color: var(--gray);
    margin-bottom: 20px;
}

.course-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--gray);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Course Detail */
.course-detail-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 60px 0;
    margin: -40px -20px 40px;
}

.course-detail-header h1 {
    color: white;
}

.course-requirements {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.requirement-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.requirement-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.requirement-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.modules-list {
    margin-top: 40px;
}

.module-item {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border);
}

.module-number {
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
}

.module-info h4 {
    margin-bottom: 5px;
}

.module-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Jobs Grid */
.jobs-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.jobs-filters select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.job-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.job-card h3 {
    margin-bottom: 10px;
}

.job-company {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 15px;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
}

.job-salary {
    color: var(--success);
    font-weight: 600;
}

/* Companies Grid */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.company-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.company-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.company-card h3 {
    margin-bottom: 5px;
}

.company-tagline {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 15px;
}

.company-services {
    list-style: none;
    margin-bottom: 20px;
}

.company-services li {
    padding: 5px 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.company-services li::before {
    content: '✓';
    color: var(--success);
    margin-right: 10px;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.credits-badge {
    background: var(--success);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.dashboard-card h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
}

.login-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.login-card > p {
    color: var(--gray);
    margin-bottom: 30px;
}

.login-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--gray);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Inbox / AI Tutor */
.inbox-link {
    position: relative;
}

.inbox-icon {
    font-size: 1.3rem;
}

.inbox-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* ==================== LEARN PAGE ==================== */
.learn-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    height: calc(100vh - 110px);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.learn-sidebar {
    border-right: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    background: var(--light);
}

.learn-sidebar h3 {
    margin: 15px 0;
    font-size: 1.1rem;
}

.modules-list {
    margin: 15px 0;
}

.module-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: white;
    transition: all 0.2s;
}

.module-item:hover {
    border-color: var(--primary);
}

.module-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.module-item.completed {
    background: #d4edda;
    border-color: #28a745;
}

.module-item.completed::after {
    content: ' ✓';
    color: #28a745;
}

.module-item.active.completed {
    background: var(--primary);
    color: white;
}

.module-item .module-order {
    font-size: 0.75rem;
    color: var(--gray);
    display: block;
    margin-bottom: 4px;
}

.module-item.active .module-order {
    color: rgba(255,255,255,0.8);
}

.learn-progress {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.learn-progress span {
    font-size: 0.85rem;
    color: var(--gray);
}

.learn-content {
    padding: 30px;
    overflow-y: auto;
}

.module-welcome {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.module-welcome h2 {
    margin-bottom: 10px;
}

.module-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.module-header h2 {
    margin-bottom: 10px;
}

.module-meta {
    font-size: 0.9rem;
    color: var(--gray);
}

.module-body {
    line-height: 1.7;
}

.module-body h1, .module-body h2, .module-body h3 {
    margin: 20px 0 10px;
}

.module-body ul, .module-body ol {
    margin: 15px 0;
    padding-left: 25px;
}

.module-body li {
    margin: 8px 0;
}

/* Quiz Section */
.quiz-section {
    margin-top: 40px;
    padding: 25px;
    background: var(--light);
    border-radius: 12px;
}

.quiz-section h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-question {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.quiz-question p {
    font-weight: 600;
    margin-bottom: 15px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(26, 115, 232, 0.05);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(26, 115, 232, 0.1);
}

.quiz-option.correct {
    border-color: #28a745;
    background: #d4edda;
}

.quiz-option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

.quiz-option input[type="radio"] {
    margin-right: 12px;
}

.quiz-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.quiz-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.quiz-result.passed {
    background: #d4edda;
    color: #155724;
}

.quiz-result.failed {
    background: #f8d7da;
    color: #721c24;
}

.quiz-result h4 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.inbox-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    height: calc(100vh - 110px);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.inbox-sidebar {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.inbox-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inbox-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: var(--light);
}

.conversation-item.active {
    background: #e0e7ff;
}

.conversation-avatar {
    font-size: 1.5rem;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.conversation-preview {
    color: var(--gray);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.empty-conversations {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray);
}

.inbox-chat {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    font-size: 2.5rem;
}

.chat-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-subtitle {
    color: var(--gray);
    font-size: 0.85rem;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9fafb;
}

.chat-welcome {
    text-align: center;
    padding: 60px 20px;
}

.welcome-avatar {
    font-size: 4rem;
    margin-bottom: 20px;
}

.chat-welcome h3 {
    margin-bottom: 10px;
}

.chat-welcome p {
    color: var(--gray);
    margin-bottom: 30px;
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.quick-question {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-question:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.message-text {
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
}

.ai-message .message-text {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px 16px 16px 4px;
}

.user-message .message-text {
    background: var(--primary);
    color: white;
    border-radius: 16px 16px 4px 16px;
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
}

.user-message .message-time {
    text-align: right;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: white;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.course-select {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--light);
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px 18px;
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    font-family: inherit;
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.send-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.send-btn:hover {
    background: var(--primary-dark);
}

.send-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
}

/* Communities */
.communities-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.communities-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    width: 250px;
}

.communities-section {
    margin-bottom: 40px;
}

.communities-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.communities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.community-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.community-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.community-cover {
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    position: relative;
}

.community-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-avatar {
    position: absolute;
    bottom: -25px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.community-content {
    padding: 35px 20px 20px;
}

.community-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.community-owner {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.community-description {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.community-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.community-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.community-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--light);
    color: var(--secondary);
}

.community-badge.member {
    background: #dcfce7;
    color: #166534;
}

.community-badge.owner {
    background: #dbeafe;
    color: #1e40af;
}

/* Community Detail Page */
.community-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 60px 0;
    margin: -30px -30px 30px;
    position: relative;
}

.community-hero-content {
    display: flex;
    gap: 30px;
    align-items: flex-end;
}

.community-hero-avatar {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.community-hero-info h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.community-hero-owner {
    opacity: 0.9;
    font-size: 1rem;
}

.community-hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.community-hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.community-hero-actions {
    margin-left: auto;
}

.community-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.community-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gray);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.community-tab:hover {
    color: var(--dark);
}

.community-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.empty-community {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-community-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: var(--darker);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    text-align: center;
}

.footer a {
    color: white;
}

/* Responsive */
/* Community Posts */
.community-content-area {
    min-height: 400px;
}

.community-about {
    max-width: 800px;
}

.about-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.about-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.about-section p {
    color: var(--gray);
    line-height: 1.7;
}

.linked-course-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.linked-course-card:hover {
    background: #e2e8f0;
}

.community-rules {
    list-style: none;
}

.community-rules li {
    padding: 8px 0;
    color: var(--gray);
}

.community-rules li::before {
    content: '✓';
    color: var(--success);
    margin-right: 10px;
}

/* Posts Section */
.create-post-section {
    margin-bottom: 20px;
}

.create-post-btn {
    width: 100%;
    padding: 20px;
    background: white;
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--gray);
    transition: all 0.2s;
}

.create-post-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f5ff;
}

.create-post-icon {
    font-size: 1.5rem;
}

.posts-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.posts-filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.posts-filter-btn:hover {
    border-color: var(--primary);
}

.posts-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.post-card:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.post-card.pinned {
    border-color: var(--warning);
    background: #fffbeb;
}

.post-pinned-badge {
    font-size: 0.8rem;
    color: var(--warning);
    margin-bottom: 10px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.post-type-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    background: var(--light);
    border-radius: 12px;
    color: var(--gray);
}

.post-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.post-preview {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-footer {
    display: flex;
    gap: 20px;
    align-items: center;
}

.post-stat {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-stat.liked {
    color: #e11d48;
}

.post-answered {
    font-size: 0.8rem;
    color: var(--success);
    margin-left: auto;
}

.empty-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-posts-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Post Detail */
.post-detail {
    max-width: 800px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.post-full {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.post-full .post-title {
    font-size: 1.8rem;
    margin: 20px 0;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--dark);
}

.post-content code {
    background: var(--light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.post-interactions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--light);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.interaction-btn:hover {
    background: #e2e8f0;
}

.interaction-btn.liked {
    background: #fecdd3;
    color: #e11d48;
}

.interaction-stat {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Comments Section */
.comments-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.comments-section h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.add-comment {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.add-comment textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    resize: none;
    font-family: inherit;
}

.add-comment textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.no-comments {
    text-align: center;
    color: var(--gray);
    padding: 30px;
}

.comment {
    padding: 15px;
    background: var(--light);
    border-radius: 12px;
}

.comment.reply {
    margin-left: 30px;
    background: white;
    border: 1px solid var(--border);
}

.comment.accepted-answer {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.accepted-badge {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--gray);
    margin-left: 8px;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-action {
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-action:hover {
    background: rgba(0,0,0,0.05);
}

.comment-action.liked {
    color: #e11d48;
}

.comment-action.accept {
    color: var(--success);
}

.comment-action.delete {
    color: var(--danger);
}

.reply-form {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: inherit;
    resize: none;
}

.reply-form div {
    display: flex;
    gap: 10px;
}

.replies {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Members List */
.members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    display: block;
}

.member-role {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--light);
    color: var(--gray);
}

.member-role.owner {
    background: #dbeafe;
    color: #1e40af;
}

.member-role.admin {
    background: #fef3c7;
    color: #b45309;
}

.member-role.moderator {
    background: #e0e7ff;
    color: #4338ca;
}

.member-stats {
    font-size: 0.8rem;
    color: var(--gray);
}

.member-stats span {
    display: block;
}

/* Community Settings */
.community-settings {
    max-width: 600px;
}

.settings-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.settings-section h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.danger-zone {
    border-color: #fecaca;
    background: #fef2f2;
}

.danger-zone h4 {
    color: var(--danger);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    padding: 5px;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .pipeline-visual {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }

    .courses-grid,
    .jobs-grid,
    .companies-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .course-requirements {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .inbox-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .inbox-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 200px;
    }

    .chat-messages {
        min-height: 300px;
    }

    .chat-input-area {
        flex-direction: column;
    }

    .course-select {
        width: 100%;
    }

    .posts-filter {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .post-full {
        padding: 20px;
    }

    .post-full .post-title {
        font-size: 1.4rem;
    }

    .members-list {
        grid-template-columns: 1fr;
    }

    .community-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .community-hero-actions {
        margin-left: 0;
    }
}

/* ==================== AI Community & Teacher Styles ==================== */

/* AI Community Badge */
.ai-community-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 10px;
    font-weight: 500;
}

.ai-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 5px;
}

/* AI Community Hero Styling */
.community-hero.ai-community {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
}

.community-hero.ai-community .community-hero-owner {
    color: rgba(255, 255, 255, 0.9);
}

/* AI Teacher Avatar in Community */
.ai-teacher-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* AI Teacher Chat Modal */
.ai-teacher-modal {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ai-teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    padding: 15px 20px;
}

.ai-teacher-header h2 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.ai-teacher-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-teacher-chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.ai-avatar-icon {
    font-size: 2.5rem;
}

.ai-teacher-expertise {
    font-size: 0.85rem;
    opacity: 0.9;
}

.ai-chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    background: #f8fafc;
}

.ai-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.ai-message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message.ai-teacher-message {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-teacher-message .message-avatar {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.user-message .message-avatar {
    background: var(--secondary);
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ai-teacher-message .message-content {
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.message-content code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

.message-content pre code {
    background: none;
    padding: 0;
}

.error-message .message-content {
    background: #fef2f2;
    color: #dc2626;
}

/* Typing indicator */
.typing-indicator .typing-dots {
    display: inline-block;
    animation: typing 1.4s infinite;
}

@keyframes typing {
    0%, 20% { opacity: 0.3; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0.3; }
}

/* Chat input area */
.ai-chat-input-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid var(--border);
}

.ai-chat-input-area textarea {
    flex: 1;
    resize: none;
    border-radius: 20px;
    padding: 10px 15px;
}

.ai-chat-input-area .btn {
    border-radius: 20px;
    padding: 10px 20px;
}

/* AI Teacher Card on Community List */
.community-card.ai-community {
    border: 2px solid #8b5cf6;
    position: relative;
}

.community-card.ai-community::before {
    content: '🤖 AI';
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Responsive AI Chat */
@media (max-width: 768px) {
    .ai-teacher-modal {
        width: 95%;
        max-height: 90vh;
    }

    .ai-chat-messages {
        max-height: 50vh;
    }

    .ai-message {
        max-width: 95%;
    }
}
