﻿/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Main Container */
.help-center {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

/* Header */
.header {
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e5e7eb;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .header-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 0 2rem;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    padding: 0.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 0.75rem;
}

    .logo-icon i {
        width: 2rem;
        height: 2rem;
        color: white;
    }

.logo-text h1 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin: 0;
}

.logo-text p {
    color: #6b7280;
    margin: 0;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .back-button:hover {
        background: #e5e7eb;
    }

    .back-button i {
        width: 1rem;
        height: 1rem;
    }

/* Main Content */
.main-content {
    display: flex;
    min-height: calc(100vh - 140px);
}

/* Left Panel */
.left-panel {
    width: 100%;
    transition: width 0.3s ease;
}

    .left-panel.sidebar-mode {
        width: 50%;
    }

.panel-content {
    padding: 1rem;
}

@media (min-width: 640px) {
    .panel-content {
        padding: 1.5rem;
    }
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1280px;
    margin: 0 auto;
    height: calc(100vh - 200px);
}

@media (min-width: 640px) {
    .category-grid {
        gap: 1.5rem;
    }
}

.category-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .category-card {
        border-radius: 1.5rem;
    }
}

.category-card:hover {
    box-shadow: 0 25px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1.05);
}

.category-card-content {
    padding: 1rem;
    color: white;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .category-card-content {
        padding: 1.5rem;
    }
}

.category-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .category-card-header {
        margin-bottom: 1rem;
    }
}

.category-card-icon {
    width: 2rem;
    height: 2rem;
}

@media (min-width: 640px) {
    .category-card-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.category-card-chevron {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

@media (min-width: 640px) {
    .category-card-chevron {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.category-card:hover .category-card-chevron {
    transform: translateX(0.5rem);
}

.category-card-title {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .category-card-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

.category-card-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 640px) {
    .category-card-description {
        font-size: 1rem;
    }
}

.category-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.category-card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .category-card-stats {
        font-size: 0.875rem;
    }
}

/* Category Colors */
.category-product {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.category-installation {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.category-optimization {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.category-device {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
}

.category-errors {
    background: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);
}

.category-software {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* Category Sidebar */
.category-sidebar {
    padding: 0;
}

    .category-sidebar h2 {
        font-size: 1.25rem;
        font-weight: bold;
        color: #111827;
        margin-bottom: 1.5rem;
    }

.category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-item {
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    background: white;
}

    .category-item:hover {
        background: #f9fafb;
    }

    .category-item.active {
        color: white;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        border: none;
    }

.category-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-item-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.category-item-info {
    flex: 1;
}

.category-item-title {
    font-weight: 600;
    margin: 0;
}

.category-item-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.category-item-chevron {
    width: 1.25rem;
    height: 1.25rem;
}

/* Right Panel */
.right-panel {
    width: 50%;
    background: white;
    border-left: 1px solid #e5e7eb;
}

.tutorial-content {
    padding: 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s;
}

    .search-input:focus {
        outline: none;
        ring: 2px;
        ring-color: #3b82f6;
        border-color: transparent;
    }

/* Category Header */
.category-header {
    margin-bottom: 2rem;
}

.category-header-content {
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.category-header-light-product {
    background: linear-gradient(135deg, #faf5ff 0%, #fce7f3 100%);
}

.category-header-light-installation {
    background: linear-gradient(135deg, #dbeafe 0%, #cffafe 100%);
}

.category-header-light-optimization {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.category-header-light-device {
    background: linear-gradient(135deg, #fed7aa 0%, #fecaca 100%);
}

.category-header-light-errors {
    background: linear-gradient(135deg, #fecaca 0%, #fce7f3 100%);
}

.category-header-light-software {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
}

.category-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-header-icon-wrapper {
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.category-header-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.category-header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    margin: 0;
}

.category-header-subtitle {
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.category-header-stats {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Tutorial List */
.tutorial-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tutorial-item {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .tutorial-item:hover {
        background: #f3f4f6;
    }

.tutorial-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tutorial-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.tutorial-item-icon-wrapper {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #dbeafe;
    color: #2563eb;
}

.tutorial-item-icon {
    width: 1rem;
    height: 1rem;
}

.tutorial-item-title {
    font-weight: 500;
    color: #111827;
    transition: color 0.2s;
    margin: 0;
}

.tutorial-item:hover .tutorial-item-title {
    color: #2563eb;
}

.tutorial-item-chevron {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
    transition: all 0.2s;
}

.tutorial-item:hover .tutorial-item-chevron {
    color: #6b7280;
    transform: translateX(0.25rem);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results-icon {
    width: 3rem;
    height: 3rem;
    color: #d1d5db;
    margin: 0 auto 1rem;
}

.no-results h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.no-results p {
    color: #6b7280;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        flex-direction: column;
    }

    .left-panel.sidebar-mode {
        width: 100%;
    }

    .right-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }

    .tutorial-content {
        padding: 1rem;
    }
}
