/* Common Styles for Documentation Site */

:root {
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --sidebar-bg: #2c3e50;
    --sidebar-hover: #34495e;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    scroll-behavior: smooth;
    background: #f5f7fa;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: var(--sidebar-bg);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.sidebar-hidden {
    transform: translateX(-100%);
}

.content {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: #f5f7fa;
}

.content-expanded {
    margin-left: 0;
}

.menu-item {
    transition: all 0.2s ease;
    border-radius: 0;
    margin: 0;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
    display: block;
}

.menu-item:hover {
    background-color: var(--sidebar-hover);
    border-left-color: var(--secondary-color);
    padding-left: 23px;
    color: #ffffff;
}

.menu-item.active {
    background-color: var(--sidebar-hover);
    border-left: 3px solid var(--secondary-color);
    font-weight: 500;
    color: #ffffff;
}

/* Menu category (parent menu) */
.menu-category {
    padding: 12px 20px;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 3px solid transparent;
}

.menu-category:hover {
    background-color: var(--sidebar-hover);
    border-left-color: var(--secondary-color);
}

.menu-category i.fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-category.open i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Submenu container */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.2);
}

.submenu.open {
    max-height: 500px;
}

.submenu .menu-item {
    padding-left: 45px;
    font-size: 13px;
}

.submenu .menu-item:hover {
    padding-left: 48px;
}

.feature-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: white;
    border: 1px solid #e1e8ed;
    padding: 1.5rem;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.15);
    border-color: var(--secondary-color);
}

/* Feature card icon container */
.feature-card .w-16.h-16 {
    margin-bottom: 1rem;
}

/* Feature card title */
.feature-card h3 {
    margin-bottom: 0.75rem;
}

/* Feature card description */
.feature-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
}

/* Video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Screenshot gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.screenshot-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

.screenshot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Lightbox for screenshots */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

/* Code blocks */
code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Keyboard keys */
kbd {
    display: inline-block;
    padding: 3px 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #1f2937;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
}

/* Print styles */
@media print {
    .sidebar,
    #mobile-menu-toggle,
    footer {
        display: none;
    }
    
    .content {
        margin-left: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Alert boxes */
.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.alert:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 5px solid #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    color: #92400e;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 5px solid #10b981;
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 5px solid #ef4444;
    color: #991b1b;
}

/* Table of contents */
.toc {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.toc-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.toc-link:hover {
    color: #667eea;
    border-left-color: #667eea;
    background-color: #f3f4f6;
}

.toc-link.active {
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

/* Step indicators */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transition: all 0.3s ease;
}

.step-indicator:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2980b9 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    font-size: 1.25rem;
}

.step-content {
    flex: 1;
}

/* Image zoom */
.zoomable {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.zoomable:hover {
    transform: scale(1.02);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.badge:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.badge-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Card enhancements */
.bg-white {
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.bg-white:hover {
    box-shadow: var(--shadow-xl);
}

/* Rounded corners for cards */
.rounded-lg {
    border-radius: 1rem !important;
}

.rounded-xl {
    border-radius: 1.5rem !important;
}

/* Enhanced buttons */
button, .btn, a.bg-white {
    transition: all 0.3s ease;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Page header styling */
.bg-white.border-b {
    background: white !important;
    border-bottom: 1px solid #e1e8ed !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem !important;
    margin: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e1e8ed;
}

/* Header content container */
.bg-white.border-b .max-w-5xl {
    padding: 0;
}

/* Card styling */
.bg-white.rounded-lg {
    background: white;
    border: 1px solid #e1e8ed;
    padding: 1.5rem;
}

/* Ensure all white background sections have proper padding */
.bg-white:not(.border-b) {
    padding: 1.5rem;
}

/* Override for sections that already have padding classes */
.bg-white.p-6,
.bg-white.p-4,
.bg-white.p-8 {
    padding: 1.5rem !important;
}

/* Exclude gradient sections from white background padding */
.bg-gradient-to-r.text-white {
    padding: 2rem 1.5rem !important;
}

/* Fix button links in CTA sections */
.bg-gradient-to-r a.bg-white,
.bg-gradient-to-r a {
    padding: 0.75rem 1.5rem !important;
    display: inline-flex;
    align-items: center;
    margin: 0.25rem;
    white-space: nowrap;
}

/* Ensure buttons don't inherit excessive padding */
a.px-6,
a.px-8 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Button container spacing */
.bg-gradient-to-r .flex {
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Content spacing */
.max-w-5xl > section,
.max-w-7xl > section {
    margin-bottom: 2rem;
}

.max-w-5xl .bg-white,
.max-w-7xl .bg-white {
    margin-bottom: 1.5rem;
}

/* Grid spacing */
.grid {
    gap: 1.5rem;
}

/* Page content padding */
.content > div:not(.bg-white) {
    padding: 1.5rem;
}

/* Call-to-action section spacing */
.bg-gradient-to-r {
    margin-bottom: 3rem;
    clear: both;
}

/* Footer styling */
footer {
    text-align: center;
}

footer .max-w-7xl {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

footer p {
    text-align: center;
}

/* Mobile menu button */
#mobile-menu-toggle {
    background: var(--sidebar-bg);
}

#mobile-menu-toggle:hover {
    background: var(--sidebar-hover);
}

/* Category headers in sidebar */
.sidebar .text-purple-200 {
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 16px 20px 8px 20px;
    margin-top: 0;
    font-size: 11px;
    text-transform: uppercase;
    color: #95a5a6 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .text-purple-200:first-of-type {
    border-top: none;
    margin-top: 0;
}

/* Sidebar header */
.sidebar > div:first-child {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.sidebar p {
    font-size: 12px;
    opacity: 0.8;
    color: #ffffff;
}

/* Sidebar icons */
.menu-item i {
    width: 20px;
    text-align: center;
    margin-right: 12px;
    font-size: 16px;
    opacity: 0.9;
}

.menu-item:hover i,
.menu-item.active i {
    opacity: 1;
}

/* Sidebar menu category icons */
.menu-category i:not(.fa-chevron-down) {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Sidebar header icon */
.sidebar h1 i {
    margin-right: 8px;
}
