/* ============================================
   Bitrix24 Bling Conector - Help Center CSS
   Modern, Clean, Responsive Design
   ============================================ */

/* CSS Variables */
:root {
    --primary: #00aeef;
    --primary-dark: #008ec4;
    --primary-light: #e6f7fc;
    --secondary: #28a745;
    --secondary-light: #e8f5e9;
    --warning: #f59e0b;
    --warning-light: #fff8e1;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;
    
    --dark: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background: var(--white);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.logo img {
    height: 32px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-link.external {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ============================================
   Page Header (Internal Pages)
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0 2rem 1rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumbs a {
    color: var(--white);
    opacity: 0.8;
}

.breadcrumbs a:hover {
    opacity: 1;
}

.breadcrumbs i {
    font-size: 0.75rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,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"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-box input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    border-radius: var(--radius-xl);
    border: none;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.search-box > i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.25rem;
}

.search-box kbd {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: inherit;
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.stat i {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ============================================
   Content Layout (Internal Pages)
   ============================================ */
.content {
    padding: 3rem 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-nav {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.sidebar-nav h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--gray-700);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.sidebar-nav a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

/* Main Content */
.main-content {
    min-width: 0;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1.5rem 0 0.75rem;
}

.content-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 1.25rem 0 0.5rem;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

.content-section ul,
.content-section ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--gray-600);
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section code {
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875em;
    color: var(--gray-800);
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 5rem 0;
}

.bg-light {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.section-title i {
    color: var(--primary);
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Cards Grid
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card .step-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.card {
    position: relative;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-icon.primary { background: var(--primary-light); color: var(--primary); }
.card-icon.success { background: var(--secondary-light); color: var(--secondary); }
.card-icon.warning { background: var(--warning-light); color: var(--warning); }
.card-icon.info { background: var(--info-light); color: var(--info); }
.card-icon.purple { background: var(--purple-light); color: var(--purple); }
.card-icon.danger { background: var(--danger-light); color: var(--danger); }

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.card p {
    color: var(--gray-600);
    margin-bottom: 1.25rem;
    flex: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
}

.card-link:hover {
    color: var(--primary-dark);
}

/* ============================================
   Doc Section (Internal Pages)
   ============================================ */
.doc-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.doc-section .section-header {
    text-align: left;
    margin-bottom: 2rem;
}

.doc-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.doc-section .section-header h2 i {
    color: var(--primary);
}

.doc-section .section-description {
    text-align: left;
    margin: 0;
    max-width: none;
    color: var(--gray-600);
}

.subsection {
    margin-bottom: 2.5rem;
}

.subsection h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.subsection h3 i {
    color: var(--primary);
}

.subsection p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* ============================================
   Info Boxes
   ============================================ */
.info-box {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.info-box ul,
.info-box ol {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--gray-700);
}

.info-box li {
    margin-bottom: 0.5rem;
}

.tip-box {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.tip-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 0.75rem;
}

.tip-box p {
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.tip-box .image-container {
    margin: 0.75rem 0 0;
}

.alert-box {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.alert-box.alert-info {
    background: var(--info-light);
    border: 1px solid var(--info);
}

.alert-box.alert-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
}

.alert-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.alert-box.alert-info h4 {
    color: var(--info);
}

.alert-box.alert-warning h4 {
    color: var(--warning);
}

.alert-box ol,
.alert-box ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--gray-700);
}

.alert-box li {
    margin-bottom: 0.5rem;
}

/* ============================================
   Image Container
   ============================================ */
.image-container {
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--white);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.image-container.small {
    max-width: 500px;
    margin: 1rem auto;
}

.image-container .image-caption {
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.875rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* ============================================
   Info Grid & Cards
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-card-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.info-card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.info-card p {
    color: var(--gray-600);
    margin: 0;
}

/* ============================================
   Table Styles
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--white);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-800);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table code {
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875em;
    color: var(--gray-800);
}

/* ============================================
   Help Navigation & Layout (Alt)
   ============================================ */
.help-nav {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.nav-brand i {
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-links a {
    color: var(--gray-600);
    font-weight: 500;
}

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

.help-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

.help-sidebar {
    width: 280px;
    background: var(--gray-50);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-header h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--gray-700);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
}

.sidebar-menu a:hover {
    background: var(--white);
    color: var(--primary);
}

.sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-menu a i {
    font-size: 1rem;
}

.help-content {
    flex: 1;
    padding: 1rem 1rem 1rem 1rem;
    max-width: 900px;
    margin-left: 1rem;
}

.help-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.footer-nav .nav-prev i {
    margin-right: 0.25rem;
}

.footer-nav .nav-next i {
    margin-left: 0.25rem;
}

/* ============================================
   Steps & Process
   ============================================ */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.alert p {
    color: var(--gray-700);
    margin: 0;
}

.alert a {
    text-decoration: underline;
    font-weight: 600;
}

.alert.warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
}

.alert.warning .alert-icon {
    color: var(--warning);
}

.alert.info {
    background: var(--info-light);
    border: 1px solid var(--info);
}

.alert.info .alert-icon {
    color: var(--info);
}

.alert.success {
    background: var(--secondary-light);
    border: 1px solid var(--secondary);
}

.alert.success .alert-icon {
    color: var(--secondary);
}

.alert.danger {
    background: var(--danger-light);
    border: 1px solid var(--danger);
}

.alert.danger .alert-icon {
    color: var(--danger);
}

/* ============================================
   Mapping Specific
   ============================================ */
.mapping-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin: 1.5rem 0;
}

.diagram-item {
    text-align: center;
}

.diagram-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.diagram-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.diagram-item p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.diagram-arrow {
    color: var(--gray-400);
}

.diagram-arrow i {
    font-size: 1.5rem;
}

.mapping-example {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.mapping-example h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.mapping-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mapping-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.mapping-from {
    font-family: monospace;
    color: var(--primary);
    font-weight: 600;
    min-width: 150px;
}

.mapping-to {
    font-family: monospace;
    color: var(--secondary);
    font-weight: 600;
}

/* ============================================
   Error Cards (Troubleshooting)
   ============================================ */
.errors-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.error-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.error-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.error-icon.warning { background: var(--warning-light); color: var(--warning); }
.error-icon.danger { background: var(--danger-light); color: var(--danger); }
.error-icon.info { background: var(--info-light); color: var(--info); }

.error-title h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.error-title code {
    font-size: 0.8rem;
    color: var(--gray-500);
    background: none;
    padding: 0;
}

.error-content {
    padding: 1.25rem;
}

.error-message,
.error-cause,
.error-solution {
    margin-bottom: 1rem;
}

.error-content strong {
    color: var(--gray-800);
    display: block;
    margin-bottom: 0.25rem;
}

.error-content p,
.error-content ul,
.error-content ol {
    color: var(--gray-600);
    margin: 0;
}

.error-image-placeholder {
    padding: 2rem;
    margin: 0 1.25rem 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--gray-400);
    border: 2px dashed var(--border);
}

/* ============================================
   Webhook Diagram
   ============================================ */
.webhook-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.flow-step {
    text-align: center;
}

.step-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    margin: 0 auto 1rem;
}

.flow-step h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.flow-step p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.flow-arrow {
    color: var(--gray-400);
}

.flow-arrow i {
    font-size: 1.5rem;
}

/* ============================================
   Benefits Grid
   ============================================ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.benefit-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.benefit-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
}

/* ============================================
   Troubleshooting Search
   ============================================ */
.troubleshooting-search {
    margin-bottom: 2rem;
}

.troubleshooting-search .search-box {
    margin: 0;
}

/* ============================================
   Next Steps / Navigation Cards
   ============================================ */
.next-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.next-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.next-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.next-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.next-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.next-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* ============================================
   Notes Grid
   ============================================ */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.note-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.note-icon.warning { background: var(--warning-light); color: var(--warning); }
.note-icon.info { background: var(--info-light); color: var(--info); }
.note-icon.success { background: var(--secondary-light); color: var(--secondary); }
.note-icon.danger { background: var(--danger-light); color: var(--danger); }

.note-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.note-card p {
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.note-card ul,
.note-card ol {
    padding-left: 1.25rem;
    color: var(--gray-700);
}

.note-card li {
    margin-bottom: 0.5rem;
}

.note-image-placeholder {
    margin-top: 1rem;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--gray-400);
    border: 2px dashed var(--border);
}

/* ============================================
   Webhooks Section
   ============================================ */
.webhooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.webhook-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.webhook-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.webhook-header i {
    font-size: 1.5rem;
}

.webhook-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.webhook-body {
    padding: 1.25rem;
}

.webhook-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.webhook-option:last-child {
    border-bottom: none;
}

.webhook-option i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.webhook-option strong {
    display: block;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.webhook-option p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.webhook-image-placeholder {
    padding: 2rem;
    margin: 0 1.25rem 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--gray-400);
    border: 2px dashed var(--border);
}

.webhook-image-placeholder i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--gray-50);
}

.faq-question i {
    color: var(--gray-400);
    transition: var(--transition);
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.faq-answer ol,
.faq-answer ul {
    padding-left: 1.5rem;
    color: var(--gray-600);
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

/* ============================================
   Support Card
   ============================================ */
.support-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.support-content {
    flex: 1;
}

.support-content h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.support-content p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.support-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.support-image-placeholder {
    flex: 0 0 300px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.support-image-placeholder i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 4rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--gray-400);
    max-width: 300px;
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-800);
    color: var(--gray-500);
}

/* ============================================
   Utilities
   ============================================ */
.text-success { color: var(--secondary); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-primary { color: var(--primary); }

.hidden {
    display: none !important;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-required {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        order: 2;
    }
    
    .support-card {
        flex-direction: column;
        text-align: center;
    }
    
    .support-actions {
        justify-content: center;
    }
    
    .support-image-placeholder {
        flex: 1;
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .mapping-diagram,
    .webhook-diagram {
        flex-direction: column;
    }
    
    .diagram-arrow,
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .help-sidebar {
        display: none;
    }
    
    .help-content {
        padding: 2rem 2rem 2rem 2.5rem;
        margin-left: 0.5rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero h1,
    .page-header h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .step-item {
        flex-direction: column;
    }
    
    .mapping-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-nav a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1,
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .cards-grid,
    .next-steps {
        grid-template-columns: 1fr;
    }
    
    .support-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .support-card {
        padding: 2rem;
    }
    
    .help-content {
        padding: 1.5rem 1.5rem 1.5rem 2rem;
        margin-left: 0;
    }
    
    .info-grid,
    .notes-grid,
    .webhooks-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Real Image Styles
   ============================================ */

/* Content Images (for internal pages) */
.content-image {
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--white);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content-image.large {
    margin: 2rem 0;
}

.image-caption {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.875rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Card Images (for index.html cards) */
.card-image {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mapping Images */
.mapping-image {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
}

.mapping-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Webhook Images */
.webhook-image {
    padding: 0 1.25rem 1.25rem;
}

.webhook-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

/* Note Images */
.note-image {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
}

.note-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Support Image */
.support-image {
    flex: 0 0 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.support-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive adjustments for images */
@media (max-width: 992px) {
    .support-image {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .content-image,
    .card-image,
    .mapping-image,
    .note-image {
        margin: 1rem 0;
    }
    
    .image-caption {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}
