/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Theme Colors - Per Requirements */
    --header-bg: #000000;
    /* Black header */
    --body-bg: #ffffff;
    /* White body */
    --form-bg: #e0f7fa;
    /* Light Sky Blue forms */
    --footer-bg: #1a1a1a;
    /* Dark footer */

    /* Brand Colors */
    --primary-color: #000000;
    --accent-color: #007bff;

    /* Category Colors */
    --case-study-color: #6f42c1;
    /* Purple */
    --case-study-bg: #f3e5f5;

    --accelerator-color: #e83e8c;
    /* Pink */
    --accelerator-bg: #fce4ec;

    --product-color: #20c997;
    /* Teal */
    --product-bg: #e0f2f1;

    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --text-muted: #adb5bd;

    /* Spacing & Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER (BLACK) ===== */
.header-section {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--text-light) !important;
    transition: opacity 0.3s;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.logo-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1.5rem;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.brand-tagline {
    font-size: 0.75rem;
    opacity: 0.7;
    color: var(--text-light);
}

/* ===== SEARCH BOX (WHITE ON BLACK HEADER) ===== */
.search-container {
    max-width: 550px;
    width: 100%;
    position: relative;
}

.search-form-modern {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.search-input-modern {
    width: 100%;
    padding: 14px 50px 14px 50px;
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: #212529;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-input-modern::placeholder {
    color: #adb5bd;
}

.search-input-modern:focus {
    outline: none;
    background: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-clear {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s;
    z-index: 2;
}

.search-clear:hover {
    color: #dc3545;
}

/* Autocomplete Results */
.autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 2000;
    display: none;
    border: 1px solid #e0e0e0;
}

.autocomplete-item {
    padding: 14px 20px;
    cursor: pointer;
    color: #212529;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.autocomplete-item:first-child {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.autocomplete-item:hover {
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    padding-left: 24px;
}

.autocomplete-item.no-results {
    color: #6c757d;
    cursor: default;
    text-align: center;
    font-style: italic;
}

.autocomplete-item.no-results:hover {
    background: white;
    padding-left: 20px;
}

/* ===== USER DROPDOWN (BLACK HEADER THEME) ===== */
.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-toggle {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 16px !important;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white !important;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 8px 0;
    margin-top: 8px !important;
    min-width: 220px;
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: #212529;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    color: #212529;
    padding-left: 24px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-item.text-danger:hover {
    background: linear-gradient(90deg, #fff5f5, #ffe5e5);
    color: #dc3545;
}

.dropdown-divider {
    margin: 8px 0;
    border-top-color: #e0e0e0;
}

/* Navigation Links */
.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    padding: 2rem 0;
    background-color: var(--body-bg);
}

.main-content {
    flex: 1;
    padding: 2rem 0;
    background-color: var(--body-bg);
}

/* ===== FORMS (LIGHT SKY BLUE) ===== */
.auth-card,
.modern-form-card,
.admin-card,
.filter-section,
.login-card,
.register-card {
    background-color: var(--form-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #333;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* ===== DASHBOARD SECTIONS ===== */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h3 {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

/* ===== CONTENT CARDS (DIFFERENT COLORS) ===== */
.content-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 100%;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.content-card:hover::before {
    opacity: 1;
}

.card-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== CATEGORY STYLES (DIFFERENT COLORS) ===== */

/* Case Study - Purple */
.icon-case-study {
    background: linear-gradient(135deg, var(--case-study-color), #9c27b0);
    color: white;
}

.category-case-study {
    background-color: var(--case-study-bg);
    color: var(--case-study-color);
}

.badge-case-study {
    background-color: rgba(111, 66, 193, 0.15);
    color: var(--case-study-color);
}

.pill-case-study {
    background: linear-gradient(135deg, var(--case-study-color), #9c27b0);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
}

/* Accelerators - Pink */
.icon-accelerators {
    background: linear-gradient(135deg, var(--accelerator-color), #d81b60);
    color: white;
}

.category-accelerators {
    background-color: var(--accelerator-bg);
    color: var(--accelerator-color);
}

.badge-accelerators {
    background-color: rgba(232, 62, 140, 0.15);
    color: var(--accelerator-color);
}

.pill-accelerators {
    background: linear-gradient(135deg, var(--accelerator-color), #d81b60);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
}

/* Product - Teal */
.icon-product {
    background: linear-gradient(135deg, var(--product-color), #00897b);
    color: white;
}

.category-product {
    background-color: var(--product-bg);
    color: var(--product-color);
}

.badge-product {
    background-color: rgba(32, 201, 151, 0.15);
    color: var(--product-color);
}

.pill-product {
    background: linear-gradient(135deg, var(--product-color), #00897b);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
}

/* ===== FOOTER (DARK) ===== */
footer,
.footer-section {
    background-color: var(--footer-bg);
    color: #888;
    padding: 2.5rem 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid #333;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
    }

    .search-input-modern {
        font-size: 0.9rem;
        padding: 12px 45px 12px 45px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.no-content-div {
    text-align: center;
    border: 1px solid #d3ded3;
    border-radius: 5px;
    padding: 1%;
    width: 50%;
}

.no-content-div i {
    font-size: 4rem;
    color: #ee8181;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-icon i {
    color: #7451aa;
    font-size: 4rem;
}

/* ===== VIEW ALL BUTTON ===== */
.view-all-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.view-all-btn i {
    transition: transform 0.3s;
}

.view-all-btn:hover i {
    transform: translateX(4px);
}


/* ===== REGISTRATION PAGE STYLES ===== */
.auth-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.auth-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header .auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.auth-header .auth-icon i {
    color: white;
    font-size: 2.5rem;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #212529;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.auth-card .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.auth-card .form-control {
    padding: 0.875rem 1.125rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f8f9fa;
}

.auth-card .form-control:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.auth-card .form-control::placeholder {
    color: #adb5bd;
}

.auth-card .btn-primary {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.auth-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-card .alert {
    border-radius: 12px;
    border: none;
    background: #fff3cd;
    color: #856404;
    padding: 1rem 1.25rem;
}

.auth-card .alert i {
    font-size: 1.125rem;
}

.auth-card .border-top {
    border-color: #e2e8f0 !important;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ===== CHATBOT WIDGET ===== */
.chatbot-widget {
    position: fixed;
    bottom: 10px;
    right: 30px;
    z-index: 1000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.chatbot-window {
    position: fixed;
    bottom: 65px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-header-content i {
    font-size: 1.75rem;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
}

.chatbot-subtitle {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.125rem;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.chatbot-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chatbot-message.bot {
    align-items: flex-start;
}

.chatbot-message.user {
    align-items: flex-end;
}

.message-bubble {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-message.bot .message-bubble {
    background: white;
    color: #212529;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.card-suggestion {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.875rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.card-suggestion:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.card-suggestion-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    margin-bottom: 0.25rem;
}

.card-suggestion-category {
    font-size: 0.75rem;
    color: #6c757d;
}

.chatbot-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: #667eea;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-send:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Typing indicator animation */
.typing-indicator .dots {
    animation: typingDots 1.4s infinite;
}

@keyframes typingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 90px;
        height: 500px;
    }

    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
    }
}