/* RTL Support and Persian Text Styling for ICS5 */

/* Import Persian Font */
/* @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap'); */

/* Base RTL Styles */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Persian Font Application */
body {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

/* RTL-specific spacing adjustments */
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .mr-3 { margin-right: 0; margin-left: 0.75rem; }
[dir="rtl"] .mr-4 { margin-right: 0; margin-left: 1rem; }
[dir="rtl"] .mr-6 { margin-right: 0; margin-left: 1.5rem; }

[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .ml-3 { margin-left: 0; margin-right: 0.75rem; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .ml-10 { margin-left: 0; margin-right: 2.5rem; }

/* RTL-specific padding adjustments */
[dir="rtl"] .pr-2 { padding-right: 0; padding-left: 0.5rem; }
[dir="rtl"] .pr-3 { padding-right: 0; padding-left: 0.75rem; }
[dir="rtl"] .pr-4 { padding-right: 0; padding-left: 1rem; }

[dir="rtl"] .pl-2 { padding-left: 0; padding-right: 0.5rem; }
[dir="rtl"] .pl-3 { padding-left: 0; padding-right: 0.75rem; }
[dir="rtl"] .pl-4 { padding-left: 0; padding-right: 1rem; }

/* RTL-specific border adjustments */
[dir="rtl"] .border-l-4 { border-left: 0; border-right: 4px solid; }
[dir="rtl"] .border-r-4 { border-right: 0; border-left: 4px solid; }

/* RTL-specific text alignment */
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

/* RTL-specific flexbox adjustments */
[dir="rtl"] .flex-row-reverse { flex-direction: row-reverse; }

/* Persian number styling */
.persian-numbers {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    font-variant-numeric: tabular-nums;
}

/* RTL-specific hover effects */
[dir="rtl"] .hover\:translate-x-1:hover {
    transform: translateX(-0.25rem);
}

[dir="rtl"] .hover\:-translate-x-1:hover {
    transform: translateX(0.25rem);
}

/* RTL-specific animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

[dir="rtl"] .slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

[dir="rtl"] .slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* Persian text optimization */
.persian-text {
    line-height: 1.8;
    letter-spacing: 0.01em;
}

/* RTL-specific shadows */
[dir="rtl"] .shadow-l {
    box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .shadow-r {
    box-shadow: 4px 0 6px -1px rgba(0, 0, 0, 0.1);
}

/* Responsive RTL adjustments */
@media (max-width: 768px) {
    [dir="rtl"] .mobile-rtl {
        direction: rtl;
        text-align: right;
    }
}

/* Persian date and time styling */
.persian-date {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    unicode-bidi: embed;
}

/* RTL-specific grid adjustments */
[dir="rtl"] .grid-cols-1 {
    direction: rtl;
}

/* Persian currency and numbers */
.persian-currency {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
}

/* RTL-specific button groups */
[dir="rtl"] .btn-group > .btn:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

[dir="rtl"] .btn-group > .btn:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* Persian form styling */
.persian-form input,
.persian-form textarea,
.persian-form select {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

/* RTL-specific tooltip positioning */
[dir="rtl"] .tooltip-left {
    right: auto;
    left: 100%;
}

[dir="rtl"] .tooltip-right {
    left: auto;
    right: 100%;
}

/* Persian table styling */
.persian-table {
    direction: rtl;
    text-align: right;
}

.persian-table th,
.persian-table td {
    text-align: right;
    padding-right: 1rem;
    padding-left: 0.5rem;
}

/* RTL-specific modal positioning */
[dir="rtl"] .modal-right {
    right: auto;
    left: 0;
}

[dir="rtl"] .modal-left {
    left: auto;
    right: 0;
}

/* Persian navigation styling */
.persian-nav {
    direction: rtl;
}

.persian-nav .nav-item {
    margin-right: 0;
    margin-left: 1rem;
}

/* RTL-specific breadcrumb */
[dir="rtl"] .breadcrumb-item:not(:last-child)::after {
    content: "←";
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Persian pagination */
.persian-pagination {
    direction: rtl;
}

.persian-pagination .page-item:not(:last-child) {
    margin-right: 0;
    margin-left: 0.25rem;
}

/* RTL-specific progress bar */
[dir="rtl"] .progress-bar {
    direction: rtl;
}

/* Persian alert styling */
.persian-alert {
    direction: rtl;
    text-align: right;
}

/* RTL-specific badge positioning */
[dir="rtl"] .badge-left {
    right: auto;
    left: 0;
}

[dir="rtl"] .badge-right {
    left: auto;
    right: 0;
}

/* Persian card styling */
.persian-card {
    direction: rtl;
}

.persian-card .card-header {
    text-align: right;
}

.persian-card .card-body {
    text-align: right;
}

/* RTL-specific dropdown positioning */
[dir="rtl"] .dropdown-menu-left {
    right: auto;
    left: 0;
}

[dir="rtl"] .dropdown-menu-right {
    left: auto;
    right: 0;
}

/* Persian list styling */
.persian-list {
    direction: rtl;
    text-align: right;
}

.persian-list li {
    margin-right: 0;
    margin-left: 1rem;
}

/* RTL-specific carousel controls */
[dir="rtl"] .carousel-control-prev {
    right: auto;
    left: 0;
}

[dir="rtl"] .carousel-control-next {
    left: auto;
    right: 0;
}

/* Persian accordion styling */
.persian-accordion {
    direction: rtl;
}

.persian-accordion .accordion-header {
    text-align: right;
}

/* RTL-specific tab positioning */
[dir="rtl"] .tab-left {
    border-right: 0;
    border-left: 2px solid;
}

[dir="rtl"] .tab-right {
    border-left: 0;
    border-right: 2px solid;
}

/* PAM Comprehensive Guide Specific Styles */
.pam-guide-container {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.8;
    color: #374151;
}

/* Thread content styling */
.thread-content {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 1024px) {
    .thread-content {
        max-width: 48rem;
    }
}

/* Message container styling */
.message-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.5rem;
    margin: 1rem -16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    contain: inline-size;
}

@media (min-width: 640px) {
    .message-container {
        margin: 1rem -32px;
        border-radius: 28px;
        padding: 2rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .message-container {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
}

/* Markdown content styling */
.markdown-content {
    width: 100%;
    word-break: break-words;
    white-space: normal;
}

.markdown-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.markdown-content h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.markdown-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4b5563;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.markdown-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #4b5563;
}

.markdown-content strong {
    font-weight: 600;
    color: #1f2937;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* Table styling for PAM products */
.pam-table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.pam-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: #ffffff;
}

.pam-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.pam-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #1f2937;
    border-right: 1px solid #e5e7eb;
    font-size: 0.875rem;
    vertical-align: top;
}

.pam-table th:last-child {
    border-right: none;
}

.pam-table td {
    padding: 1rem;
    text-align: right;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.6;
}

.pam-table td:last-child {
    border-right: none;
}

.pam-table tbody tr:hover {
    background: #f9fafb;
}

.pam-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Column sizing */
.pam-table th[data-col-size="md"],
.pam-table td[data-col-size="md"] {
    width: 15%;
    min-width: 120px;
}

.pam-table th[data-col-size="lg"],
.pam-table td[data-col-size="lg"] {
    width: 20%;
    min-width: 150px;
}

.pam-table th[data-col-size="xl"],
.pam-table td[data-col-size="xl"] {
    width: 25%;
    min-width: 200px;
}

/* Citation pill styling */
.citation-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-right: 0.25rem;
    margin-top: -0.094rem;
    animation: show 150ms ease-in;
}

.citation-pill a {
    display: flex;
    height: 1.125rem;
    overflow: hidden;
    border-radius: 0.75rem;
    padding: 0 0.5rem;
    font-size: 0.5625rem;
    font-weight: 500;
    transition: all 150ms ease-in-out;
    text-decoration: none;
    color: #6b7280;
    background: #f4f4f4;
}

@media (prefers-color-scheme: dark) {
    .citation-pill a {
        color: #9ca3af;
        background: #303030;
    }
}

.citation-pill a:hover {
    background: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
    .citation-pill a:hover {
        background: #404040;
    }
}

.citation-pill span {
    position: relative;
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.citation-pill .truncate {
    max-width: 15ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* List styling */
.markdown-content ul {
    margin: 1rem 0;
    padding-right: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

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

/* Rating styling */
.rating-high {
    color: #059669;
    font-weight: 600;
}

.rating-medium {
    color: #d97706;
    font-weight: 600;
}

.rating-low {
    color: #dc2626;
    font-weight: 600;
}

/* Protocol highlighting */
.protocol-modbus {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.protocol-dnp3 {
    background: #dcfce7;
    color: #166534;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.protocol-opcua {
    background: #fef3c7;
    color: #92400e;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Feature badges */
.feature-badge {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
}

.feature-badge.jit {
    background: #dbeafe;
    color: #1e40af;
}

.feature-badge.vault {
    background: #dcfce7;
    color: #166534;
}

.feature-badge.agentless {
    background: #fef3c7;
    color: #92400e;
}

.feature-badge.recording {
    background: #fce7f3;
    color: #be185d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pam-table-container {
        margin: 1rem -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .pam-table th,
    .pam-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .markdown-content h1 {
        font-size: 1.875rem;
    }
    
    .markdown-content h2 {
        font-size: 1.5rem;
    }
    
    .message-container {
        margin: 0.5rem -1rem;
        border-radius: 0;
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .pam-table-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .pam-table th,
    .pam-table td {
        border: 1px solid #000;
    }
    
    .citation-pill {
        display: none;
    }
}

/* Animation keyframes */
@keyframes show {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Focus and accessibility */
.pam-table:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.markdown-content a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pam-table th,
    .pam-table td {
        border-color: #000;
    }
    
    .markdown-content h1,
    .markdown-content h2,
    .markdown-content h3 {
        color: #000;
    }
    
    .markdown-content strong {
        color: #000;
    }
}

/* Open Source / Community Products Section Styles */
.opensource-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.opensource-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #10b981, #059669);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.opensource-section h2 {
    color: #059669;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

.opensource-section h2::before {
    content: '🔓';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.opensource-section h3 {
    color: #047857;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #10b981;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Open Source Table Styling */
.opensource-table-container {
    background: #ffffff;
    border: 2px solid #10b981;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    margin: 2rem 0;
}

.opensource-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.opensource-table thead {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.opensource-table thead th {
    padding: 1.25rem 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.opensource-table thead th:last-child {
    border-right: none;
}

.opensource-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: #ffffff;
    opacity: 0.3;
}

.opensource-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
}

.opensource-table tbody tr:hover {
    background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.opensource-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.opensource-table tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
}

.opensource-table td {
    padding: 1.25rem 1rem;
    text-align: right;
    border-right: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.6;
}

.opensource-table td:last-child {
    border-right: none;
}

/* Open Source Product Names */
.opensource-product-name {
    font-weight: 700;
    color: #059669;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.opensource-developer {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
}

/* Open Source Features */
.opensource-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.opensource-feature-tag {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #bbf7d0;
}

.opensource-feature-tag.recording {
    background: #fce7f3;
    color: #be185d;
    border-color: #f9a8d4;
}

.opensource-feature-tag.rbac {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.opensource-feature-tag.mfa {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.opensource-feature-tag.vault {
    background: #f3e8ff;
    color: #7c3aed;
    border-color: #c4b5fd;
}

/* Open Source Rating Styles */
.opensource-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
}

.opensource-rating.medium {
    background: #fef3c7;
    color: #d97706;
    border: 2px solid #fbbf24;
}

.opensource-rating.low {
    background: #fee2e2;
    color: #dc2626;
    border: 2px solid #fca5a5;
}

.opensource-rating.high {
    background: #dcfce7;
    color: #059669;
    border: 2px solid #10b981;
}

/* Open Source Protocol Support */
.opensource-protocol {
    display: inline-block;
    background: #e0f2fe;
    color: #0277bd;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    border: 1px solid #b3e5fc;
}

.opensource-protocol.modbus {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.opensource-protocol.mqtt {
    background: #fff3e0;
    color: #ef6c00;
    border-color: #ffcc02;
}

.opensource-protocol.tcp {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

/* Open Source Summary Section */
.opensource-summary {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.opensource-summary::before {
    content: '📊';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.opensource-summary h3 {
    color: #047857;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.opensource-summary p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Open Source Comparison Cards */
.opensource-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.opensource-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.opensource-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
}

.opensource-card.teleport {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.opensource-card.jumpserver {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.opensource-card.boundary {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

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

.opensource-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.opensource-card.teleport .opensource-card-icon {
    background: #10b981;
}

.opensource-card.jumpserver .opensource-card-icon {
    background: #f59e0b;
}

.opensource-card.boundary .opensource-card-icon {
    background: #8b5cf6;
}

.opensource-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.opensource-card-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.opensource-card-content {
    margin-bottom: 1rem;
}

.opensource-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.opensource-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Responsive Design for Open Source Section */
@media (max-width: 768px) {
    .opensource-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .opensource-section h2 {
        font-size: 1.5rem;
    }
    
    .opensource-section h2::before {
        display: none;
    }
    
    .opensource-table th,
    .opensource-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .opensource-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .opensource-card {
        padding: 1rem;
    }
}

/* Dark Mode for Open Source Section */
@media (prefers-color-scheme: dark) {
    .opensource-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .opensource-section h2 {
        color: #10b981;
    }
    
    .opensource-table-container {
        background: #1f2937;
        border-color: #10b981;
    }
    
    .opensource-table tbody tr {
        border-bottom-color: #374151;
    }
    
    .opensource-table tbody tr:hover {
        background: linear-gradient(90deg, #064e3b, #065f46);
    }
    
    .opensource-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .opensource-card:hover {
        border-color: #10b981;
    }
    
    .opensource-summary {
        background: linear-gradient(135deg, #064e3b, #065f46);
        border-color: #10b981;
    }
}

/* Commercial Products Section Styles */
.commercial-section {
    background: linear-gradient(135deg, #fef7ff 0%, #f3e8ff 100%);
    border: 2px solid #c084fc;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.commercial-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.commercial-section h2 {
    color: #7c3aed;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

.commercial-section h2::before {
    content: '💼';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.commercial-section h3 {
    color: #6d28d9;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #8b5cf6;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Commercial Table Styling */
.commercial-table-container {
    background: #ffffff;
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
    margin: 2rem 0;
}

.commercial-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.commercial-table thead {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff;
}

.commercial-table thead th {
    padding: 1.25rem 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.commercial-table thead th:last-child {
    border-right: none;
}

.commercial-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: #ffffff;
    opacity: 0.3;
}

.commercial-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
}

.commercial-table tbody tr:hover {
    background: linear-gradient(90deg, #faf5ff, #f3e8ff);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.commercial-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.commercial-table tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #faf5ff, #f3e8ff);
}

.commercial-table td {
    padding: 1.25rem 1rem;
    text-align: right;
    border-right: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.6;
}

.commercial-table td:last-child {
    border-right: none;
}

/* Commercial Product Names */
.commercial-product-name {
    font-weight: 700;
    color: #7c3aed;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.commercial-company {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
}

.commercial-country {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

/* Commercial Features */
.commercial-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.commercial-feature-tag {
    background: #f3e8ff;
    color: #7c3aed;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #c4b5fd;
}

.commercial-feature-tag.recording {
    background: #fce7f3;
    color: #be185d;
    border-color: #f9a8d4;
}

.commercial-feature-tag.jit {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.commercial-feature-tag.vault {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.commercial-feature-tag.ai {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.commercial-feature-tag.agentless {
    background: #e0f2fe;
    color: #0277bd;
    border-color: #b3e5fc;
}

.commercial-feature-tag.dpi {
    background: #fce7f3;
    color: #be185d;
    border-color: #f9a8d4;
}

/* Commercial Rating Styles */
.commercial-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
}

.commercial-rating.very-high {
    background: #dcfce7;
    color: #059669;
    border: 2px solid #10b981;
}

.commercial-rating.high {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.commercial-rating.medium {
    background: #fef3c7;
    color: #d97706;
    border: 2px solid #fbbf24;
}

.commercial-rating.low {
    background: #fee2e2;
    color: #dc2626;
    border: 2px solid #fca5a5;
}

/* Commercial Protocol Support */
.commercial-protocol {
    display: inline-block;
    background: #e0f2fe;
    color: #0277bd;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    border: 1px solid #b3e5fc;
}

.commercial-protocol.modbus {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.commercial-protocol.dnp3 {
    background: #fff3e0;
    color: #ef6c00;
    border-color: #ffcc02;
}

.commercial-protocol.opcua {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

.commercial-protocol.s7 {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #90caf9;
}

/* Commercial Summary Section */
.commercial-summary {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.commercial-summary::before {
    content: '📈';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.commercial-summary h3 {
    color: #6d28d9;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.commercial-summary p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Commercial Product Cards */
.commercial-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.commercial-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.commercial-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.15);
}

.commercial-card.fudo {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.commercial-card.wallix {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.commercial-card.secomea {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.commercial-card.xona {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.commercial-card.armis {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.commercial-card.claroty {
    border-color: #06b6d4;
    background: linear-gradient(135deg, #ecfeff, #ffffff);
}

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

.commercial-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.commercial-card.fudo .commercial-card-icon {
    background: #8b5cf6;
}

.commercial-card.wallix .commercial-card-icon {
    background: #f59e0b;
}

.commercial-card.secomea .commercial-card-icon {
    background: #10b981;
}

.commercial-card.xona .commercial-card-icon {
    background: #ef4444;
}

.commercial-card.armis .commercial-card-icon {
    background: #3b82f6;
}

.commercial-card.claroty .commercial-card-icon {
    background: #06b6d4;
}

.commercial-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.commercial-card-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.commercial-card-content {
    margin-bottom: 1rem;
}

.commercial-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.commercial-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Commercial Product Highlights */
.commercial-highlight {
    background: linear-gradient(135deg, #fef7ff, #f3e8ff);
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
}

.commercial-highlight::before {
    content: '⭐';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
}

.commercial-highlight h4 {
    color: #7c3aed;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.commercial-highlight p {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design for Commercial Section */
@media (max-width: 768px) {
    .commercial-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .commercial-section h2 {
        font-size: 1.5rem;
    }
    
    .commercial-section h2::before {
        display: none;
    }
    
    .commercial-table th,
    .commercial-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .commercial-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .commercial-card {
        padding: 1rem;
    }
}

/* Dark Mode for Commercial Section */
@media (prefers-color-scheme: dark) {
    .commercial-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .commercial-section h2 {
        color: #a78bfa;
    }
    
    .commercial-table-container {
        background: #1f2937;
        border-color: #8b5cf6;
    }
    
    .commercial-table tbody tr {
        border-bottom-color: #374151;
    }
    
    .commercial-table tbody tr:hover {
        background: linear-gradient(90deg, #581c87, #6b21a8);
    }
    
    .commercial-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .commercial-card:hover {
        border-color: #8b5cf6;
    }
    
    .commercial-summary {
        background: linear-gradient(135deg, #581c87, #6b21a8);
        border-color: #8b5cf6;
    }
}

/* Industrial Proxies and Firewalls Section Styles */
.industrial-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.industrial-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #f59e0b, #d97706);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.industrial-section h2 {
    color: #d97706;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

.industrial-section h2::before {
    content: '🛡️';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.industrial-section h3 {
    color: #b45309;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f59e0b;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Industrial Table Styling */
.industrial-table-container {
    background: #ffffff;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
    margin: 2rem 0;
}

.industrial-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.industrial-table thead {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.industrial-table thead th {
    padding: 1.25rem 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.industrial-table thead th:last-child {
    border-right: none;
}

.industrial-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: #ffffff;
    opacity: 0.3;
}

.industrial-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
}

.industrial-table tbody tr:hover {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.industrial-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.industrial-table tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
}

.industrial-table td {
    padding: 1.25rem 1rem;
    text-align: right;
    border-right: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.6;
}

.industrial-table td:last-child {
    border-right: none;
}

/* Industrial Product Names */
.industrial-product-name {
    font-weight: 700;
    color: #d97706;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.industrial-category {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
}

.industrial-type {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

/* Industrial Features */
.industrial-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.industrial-feature-tag {
    background: #fef3c7;
    color: #d97706;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #fde68a;
}

.industrial-feature-tag.dpi {
    background: #fce7f3;
    color: #be185d;
    border-color: #f9a8d4;
}

.industrial-feature-tag.filtering {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.industrial-feature-tag.logging {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.industrial-feature-tag.tunneling {
    background: #f3e8ff;
    color: #7c3aed;
    border-color: #c4b5fd;
}

.industrial-feature-tag.auth {
    background: #e0f2fe;
    color: #0277bd;
    border-color: #b3e5fc;
}

.industrial-feature-tag.session {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

/* Industrial Protocol Support */
.industrial-protocol {
    display: inline-block;
    background: #e0f2fe;
    color: #0277bd;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    border: 1px solid #b3e5fc;
}

.industrial-protocol.modbus {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.industrial-protocol.dnp3 {
    background: #fff3e0;
    color: #ef6c00;
    border-color: #ffcc02;
}

.industrial-protocol.opcua {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}

.industrial-protocol.ssh {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

/* Industrial Summary Section */
.industrial-summary {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.industrial-summary::before {
    content: '🔧';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.industrial-summary h3 {
    color: #b45309;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.industrial-summary p {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Industrial Product Cards */
.industrial-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.industrial-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.industrial-card:hover {
    border-color: #f59e0b;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.15);
}

.industrial-card.firewall {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.industrial-card.proxy {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.industrial-card.custom {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

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

.industrial-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.industrial-card.firewall .industrial-card-icon {
    background: #f59e0b;
}

.industrial-card.proxy .industrial-card-icon {
    background: #8b5cf6;
}

.industrial-card.custom .industrial-card-icon {
    background: #10b981;
}

.industrial-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.industrial-card-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.industrial-card-content {
    margin-bottom: 1rem;
}

.industrial-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Industrial Product Highlights */
.industrial-highlight {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
}

.industrial-highlight::before {
    content: '⚡';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
}

.industrial-highlight h4 {
    color: #d97706;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.industrial-highlight p {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* Industrial Rating Table */
.industrial-rating-table-container {
    background: #ffffff;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
    margin: 2rem 0;
}

.industrial-rating-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.industrial-rating-table thead {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.industrial-rating-table thead th {
    padding: 1.25rem 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.industrial-rating-table thead th:last-child {
    border-right: none;
}

.industrial-rating-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: #ffffff;
    opacity: 0.3;
}

.industrial-rating-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
}

.industrial-rating-table tbody tr:hover {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.industrial-rating-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.industrial-rating-table tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
}

.industrial-rating-table td {
    padding: 1.25rem 1rem;
    text-align: right;
    border-right: 1px solid #e5e7eb;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.6;
}

.industrial-rating-table td:last-child {
    border-right: none;
}

/* Industrial Rating Levels */
.industrial-rating-level {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
}

.industrial-rating-level.very-high {
    background: #dcfce7;
    color: #059669;
    border: 2px solid #10b981;
}

.industrial-rating-level.high {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.industrial-rating-level.medium {
    background: #fef3c7;
    color: #d97706;
    border: 2px solid #fbbf24;
}

.industrial-rating-level.low {
    background: #fee2e2;
    color: #dc2626;
    border: 2px solid #fca5a5;
}

/* Responsive Design for Industrial Section */
@media (max-width: 768px) {
    .industrial-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .industrial-section h2 {
        font-size: 1.5rem;
    }
    
    .industrial-section h2::before {
        display: none;
    }
    
    .industrial-table th,
    .industrial-table td,
    .industrial-rating-table th,
    .industrial-rating-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .industrial-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .industrial-card {
        padding: 1rem;
    }
}

/* Dark Mode for Industrial Section */
@media (prefers-color-scheme: dark) {
    .industrial-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .industrial-section h2 {
        color: #fbbf24;
    }
    
    .industrial-table-container,
    .industrial-rating-table-container {
        background: #1f2937;
        border-color: #f59e0b;
    }
    
    .industrial-table tbody tr,
    .industrial-rating-table tbody tr {
        border-bottom-color: #374151;
    }
    
    .industrial-table tbody tr:hover,
    .industrial-rating-table tbody tr:hover {
        background: linear-gradient(90deg, #92400e, #b45309);
    }
    
    .industrial-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .industrial-card:hover {
        border-color: #f59e0b;
    }
    
    .industrial-summary {
        background: linear-gradient(135deg, #92400e, #b45309);
        border-color: #f59e0b;
    }
}

/* Conclusion Section Styles */
.conclusion-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.conclusion-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #0ea5e9, #0284c7);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.conclusion-section h2 {
    color: #0284c7;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

.conclusion-section h2::before {
    content: '🎯';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.conclusion-section h3 {
    color: #0369a1;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0ea5e9;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Conclusion Content */
.conclusion-content {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.conclusion-content strong {
    color: #0284c7;
    font-weight: 600;
}

/* Conclusion List */
.conclusion-list {
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.conclusion-list li {
    background: #ffffff;
    border: 2px solid #e0f2fe;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.conclusion-list li:hover {
    border-color: #0ea5e9;
    transform: translateX(-4px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.15);
}

.conclusion-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
}

.conclusion-list li p {
    margin: 0;
    line-height: 1.7;
    color: #374151;
}

.conclusion-list li strong {
    color: #0284c7;
    font-weight: 600;
}

/* Conclusion Highlights */
.conclusion-highlight {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.conclusion-highlight::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.conclusion-highlight h4 {
    color: #0284c7;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.conclusion-highlight p {
    color: #374151;
    line-height: 1.8;
    margin: 0;
}

/* Conclusion Recommendations */
.conclusion-recommendations {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.conclusion-recommendations::before {
    content: '⭐';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.conclusion-recommendations h3 {
    color: #d97706;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.conclusion-recommendations ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.conclusion-recommendations li {
    background: #ffffff;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 2.5rem;
}

.conclusion-recommendations li:hover {
    border-color: #f59e0b;
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.conclusion-recommendations li::before {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #f59e0b;
    font-weight: bold;
    font-size: 1.2rem;
}

.conclusion-recommendations li:last-child {
    margin-bottom: 0;
}

/* Conclusion Summary */
.conclusion-summary {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.conclusion-summary::before {
    content: '🎉';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.conclusion-summary h3 {
    color: #059669;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.conclusion-summary p {
    color: #374151;
    line-height: 1.8;
    margin: 0;
    font-size: 1.1rem;
}

/* Conclusion Key Points */
.conclusion-key-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.conclusion-key-point {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.conclusion-key-point:hover {
    border-color: #0ea5e9;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.15);
}

.conclusion-key-point.commercial {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.conclusion-key-point.opensource {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.conclusion-key-point.industrial {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.conclusion-key-point-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.conclusion-key-point-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.conclusion-key-point.commercial .conclusion-key-point-icon {
    background: #8b5cf6;
}

.conclusion-key-point.opensource .conclusion-key-point-icon {
    background: #10b981;
}

.conclusion-key-point.industrial .conclusion-key-point-icon {
    background: #f59e0b;
}

.conclusion-key-point-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.conclusion-key-point-content {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* Conclusion Call to Action */
.conclusion-cta {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.conclusion-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 0 0 0 100px;
}

.conclusion-cta h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.conclusion-cta p {
    color: #e0f2fe;
    line-height: 1.8;
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive Design for Conclusion Section */
@media (max-width: 768px) {
    .conclusion-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .conclusion-section h2 {
        font-size: 1.5rem;
    }
    
    .conclusion-section h2::before {
        display: none;
    }
    
    .conclusion-list li {
        padding: 1rem;
    }
    
    .conclusion-key-points {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .conclusion-key-point {
        padding: 1rem;
    }
    
    .conclusion-highlight,
    .conclusion-recommendations,
    .conclusion-summary,
    .conclusion-cta {
        padding: 1.5rem;
    }
}

/* Dark Mode for Conclusion Section */
@media (prefers-color-scheme: dark) {
    .conclusion-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .conclusion-section h2 {
        color: #60a5fa;
    }
    
    .conclusion-list li {
        background: #1f2937;
        border-color: #374151;
    }
    
    .conclusion-list li:hover {
        border-color: #0ea5e9;
    }
    
    .conclusion-key-point {
        background: #1f2937;
        border-color: #374151;
    }
    
    .conclusion-key-point:hover {
        border-color: #0ea5e9;
    }
    
    .conclusion-highlight {
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        border-color: #0ea5e9;
    }
    
    .conclusion-recommendations {
        background: linear-gradient(135deg, #92400e, #b45309);
        border-color: #f59e0b;
    }
    
    .conclusion-summary {
        background: linear-gradient(135deg, #064e3b, #065f46);
        border-color: #10b981;
    }
}

/* Introduction Section Styles */
.introduction-section {
    background: linear-gradient(135deg, #fef7ff 0%, #f3e8ff 100%);
    border: 2px solid #a855f7;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.introduction-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #a855f7, #9333ea);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.introduction-section h2 {
    color: #7c3aed;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

.introduction-section h2::before {
    content: '📖';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* Introduction Content */
.introduction-content {
    color: #374151;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.introduction-content strong {
    color: #7c3aed;
    font-weight: 600;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
    margin: 0 0.2rem;
}

/* Introduction Paragraphs */
.introduction-paragraph {
    background: #ffffff;
    border: 1px solid #e9d5ff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.introduction-paragraph:hover {
    border-color: #a855f7;
    transform: translateX(-4px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15);
}

.introduction-paragraph::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #a855f7, #7c3aed);
}

.introduction-paragraph p {
    margin: 0;
    line-height: 1.7;
    color: #374151;
}

.introduction-paragraph strong {
    color: #7c3aed;
    font-weight: 600;
}

/* Introduction Highlights */
.introduction-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.introduction-highlight::before {
    content: '⚠️';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.introduction-highlight h3 {
    color: #d97706;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.introduction-highlight p {
    color: #374151;
    line-height: 1.8;
    margin: 0;
}

/* Introduction Key Points */
.introduction-key-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.introduction-key-point {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.introduction-key-point:hover {
    border-color: #a855f7;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(168, 85, 247, 0.15);
}

.introduction-key-point.protocols {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.introduction-key-point.security {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.introduction-key-point.pam {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.introduction-key-point-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.introduction-key-point-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.introduction-key-point.protocols .introduction-key-point-icon {
    background: #10b981;
}

.introduction-key-point.security .introduction-key-point-icon {
    background: #ef4444;
}

.introduction-key-point.pam .introduction-key-point-icon {
    background: #8b5cf6;
}

.introduction-key-point-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.introduction-key-point-content {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

/* Introduction Protocol List */
.introduction-protocols {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.introduction-protocols::before {
    content: '🔌';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.introduction-protocols h3 {
    color: #059669;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.introduction-protocol-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.introduction-protocol-tag {
    background: #ffffff;
    border: 2px solid #10b981;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #059669;
    transition: all 0.3s ease;
}

.introduction-protocol-tag:hover {
    background: #10b981;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.introduction-protocol-tag.modbus {
    border-color: #10b981;
    color: #059669;
}

.introduction-protocol-tag.profinet {
    border-color: #3b82f6;
    color: #1d4ed8;
}

.introduction-protocol-tag.dnp3 {
    border-color: #f59e0b;
    color: #d97706;
}

/* Introduction Security Features */
.introduction-security-features {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.introduction-security-features::before {
    content: '🛡️';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.introduction-security-features h3 {
    color: #dc2626;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.introduction-security-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.introduction-security-item {
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 2.5rem;
}

.introduction-security-item:hover {
    border-color: #ef4444;
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.introduction-security-item::before {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ef4444;
    font-weight: bold;
    font-size: 1.2rem;
}

.introduction-security-item:last-child {
    margin-bottom: 0;
}

/* Introduction PAM Solutions */
.introduction-pam-solutions {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.introduction-pam-solutions::before {
    content: '🔐';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.introduction-pam-solutions h3 {
    color: #7c3aed;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.introduction-pam-solutions p {
    color: #374151;
    line-height: 1.8;
    margin: 0;
}

/* Introduction Report Overview */
.introduction-report-overview {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.introduction-report-overview::before {
    content: '📊';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.introduction-report-overview h3 {
    color: #0284c7;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.introduction-report-overview p {
    color: #374151;
    line-height: 1.8;
    margin: 0;
}

/* Introduction Divider */
.introduction-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    margin: 3rem 0;
    border-radius: 1px;
}

/* Responsive Design for Introduction Section */
@media (max-width: 768px) {
    .introduction-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .introduction-section h2 {
        font-size: 1.5rem;
    }
    
    .introduction-section h2::before {
        display: none;
    }
    
    .introduction-paragraph {
        padding: 1rem;
    }
    
    .introduction-key-points {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .introduction-key-point {
        padding: 1rem;
    }
    
    .introduction-protocol-list {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .introduction-security-list {
        grid-template-columns: 1fr;
    }
    
    .introduction-highlight,
    .introduction-protocols,
    .introduction-security-features,
    .introduction-pam-solutions,
    .introduction-report-overview {
        padding: 1.5rem;
    }
}

/* Dark Mode for Introduction Section */
@media (prefers-color-scheme: dark) {
    .introduction-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .introduction-section h2 {
        color: #a78bfa;
    }
    
    .introduction-paragraph {
        background: #1f2937;
        border-color: #374151;
    }
    
    .introduction-paragraph:hover {
        border-color: #a855f7;
    }
    
    .introduction-key-point {
        background: #1f2937;
        border-color: #374151;
    }
    
    .introduction-key-point:hover {
        border-color: #a855f7;
    }
    
    .introduction-highlight {
        background: linear-gradient(135deg, #92400e, #b45309);
        border-color: #f59e0b;
    }
    
    .introduction-protocols {
        background: linear-gradient(135deg, #064e3b, #065f46);
        border-color: #10b981;
    }
    
    .introduction-security-features {
        background: linear-gradient(135deg, #7f1d1d, #991b1b);
        border-color: #ef4444;
    }
    
    .introduction-pam-solutions {
        background: linear-gradient(135deg, #581c87, #6b21a8);
        border-color: #8b5cf6;
    }
    
    .introduction-report-overview {
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        border-color: #0ea5e9;
    }
}

/* Table of Contents Styles */
.table-of-contents {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #64748b;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.table-of-contents::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #64748b, #475569);
    border-radius: 0 0 0 120px;
    opacity: 0.1;
}

.table-of-contents h2 {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.table-of-contents h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #64748b, #475569);
    border-radius: 2px;
}

.toc-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.toc-section {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toc-section:hover {
    border-color: #64748b;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(100, 116, 139, 0.15);
}

.toc-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #64748b, #475569);
}

.toc-section h3 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.toc-section h3 a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
    border-radius: 6px;
}

.toc-section h3 a:hover {
    color: #475569;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding-right: 1rem;
    transform: translateX(-4px);
}

.toc-section h3 a:focus {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}

.toc-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-section li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.5rem;
}

.toc-section li:last-child {
    margin-bottom: 0;
}

.toc-section li::before {
    content: '→';
    position: absolute;
    right: 0;
    top: 0;
    color: #64748b;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.toc-section li:hover::before {
    color: #475569;
    transform: translateX(-2px);
}

.toc-section a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
    border-radius: 6px;
    position: relative;
}

.toc-section a:hover {
    color: #1e293b;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding-right: 1rem;
    transform: translateX(-4px);
}

.toc-section a:focus {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}

/* Special styling for different sections */
.toc-section:nth-child(1) {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.toc-section:nth-child(1) h3 {
    color: #7c3aed;
    border-bottom-color: #e9d5ff;
}

.toc-section:nth-child(1) h3 a:hover {
    color: #5b21b6;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}

.toc-section:nth-child(1)::before {
    background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}

.toc-section:nth-child(2) {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.toc-section:nth-child(2) h3 {
    color: #7c3aed;
    border-bottom-color: #e9d5ff;
}

.toc-section:nth-child(2) h3 a:hover {
    color: #5b21b6;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}

.toc-section:nth-child(2)::before {
    background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}

.toc-section:nth-child(3) {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.toc-section:nth-child(3) h3 {
    color: #059669;
    border-bottom-color: #dcfce7;
}

.toc-section:nth-child(3) h3 a:hover {
    color: #047857;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.toc-section:nth-child(3)::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

.toc-section:nth-child(4) {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.toc-section:nth-child(4) h3 {
    color: #d97706;
    border-bottom-color: #fde68a;
}

.toc-section:nth-child(4) h3 a:hover {
    color: #b45309;
    background: linear-gradient(135deg, #fde68a, #fcd34d);
}

.toc-section:nth-child(4)::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.toc-section:nth-child(5) {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
}

.toc-section:nth-child(5) h3 {
    color: #0284c7;
    border-bottom-color: #e0f2fe;
}

.toc-section:nth-child(5) h3 a:hover {
    color: #0369a1;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
}

.toc-section:nth-child(5)::before {
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
}

/* Responsive Design for Table of Contents */
@media (max-width: 768px) {
    .table-of-contents {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .table-of-contents h2 {
        font-size: 1.5rem;
    }
    
    .toc-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .toc-section {
        padding: 1rem;
    }
    
    .toc-section h3 {
        font-size: 1.1rem;
    }
}

/* Dark Mode for Table of Contents */
@media (prefers-color-scheme: dark) {
    .table-of-contents {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .table-of-contents h2 {
        color: #f9fafb;
    }
    
    .table-of-contents h2::after {
        background: linear-gradient(90deg, #64748b, #9ca3af);
    }
    
    .toc-section {
        background: #1f2937;
        border-color: #374151;
    }
    
    .toc-section:hover {
        border-color: #64748b;
    }
    
    .toc-section h3 {
        color: #f9fafb;
        border-bottom-color: #374151;
    }
    
    .toc-section h3 a:hover {
        color: #d1d5db;
        background: linear-gradient(135deg, #374151, #4b5563);
    }
    
    .toc-section a {
        color: #d1d5db;
    }
    
    .toc-section a:hover {
        color: #f9fafb;
        background: linear-gradient(135deg, #374151, #4b5563);
    }
    
    .toc-section li::before {
        color: #9ca3af;
    }
    
    .toc-section li:hover::before {
        color: #d1d5db;
    }
}

/* Authentication Pages Styles */
.auth-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.05"%3E%3Ccircle cx="30" cy="30" r="2"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.3;
    z-index: 1;
}

.auth-container {
    position: relative;
    z-index: 10;
}

.auth-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4);
}

.auth-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transition: all 0.3s ease;
}

.auth-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.auth-button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-icon {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.auth-input:focus + .auth-icon {
    color: #3b82f6;
}

/* Password Strength Indicator */
.password-strength-container {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-weak {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    width: 25%;
}

.strength-fair {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    width: 50%;
}

.strength-good {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    width: 75%;
}

.strength-strong {
    background: linear-gradient(90deg, #10b981, #059669);
    width: 100%;
}

/* Form Validation Styles */
.form-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    animation: slideInDown 0.3s ease;
}

.form-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #a7f3d0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    animation: slideInDown 0.3s ease;
}

/* Loading States */
.auth-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease;
}

/* Responsive Design for Auth Pages */
@media (max-width: 640px) {
    .auth-card {
        margin: 16px;
        padding: 24px;
        border-radius: 16px;
    }
    
    .auth-input {
        padding: 12px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .auth-button {
        padding: 12px 24px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        margin: 8px;
        padding: 20px;
    }
    
    .auth-input {
        padding: 10px 14px;
    }
    
    .auth-button {
        padding: 10px 20px;
    }
}

/* High Contrast Mode for Accessibility */
@media (prefers-contrast: high) {
    .auth-input {
        border-width: 2px;
        border-color: #ffffff;
    }
    
    .auth-button {
        border: 2px solid #ffffff;
    }
    
    .form-error {
        border-width: 2px;
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-button,
    .auth-input,
    .password-strength-fill {
        transition: none;
    }
    
    .auth-button::before {
        display: none;
    }
    
    .auth-loading::after {
        animation: none;
    }
}

/* Print Styles for Auth Pages */
@media print {
    .auth-page {
        background: #ffffff;
        color: #000000;
    }
    
    .auth-card {
        background: #ffffff;
        border: 1px solid #000000;
        box-shadow: none;
    }
    
    .auth-input {
        background: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .auth-button {
        background: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
}

/* Header and Navigation Styles */
.nav-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.nav-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.nav-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* User Profile Dropdown */
.user-dropdown {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.user-dropdown:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.user-avatar {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Footer Styles */
.footer-main {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

.footer-pattern {
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.03"%3E%3Ccircle cx="30" cy="30" r="1"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.5;
}

.footer-logo {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.footer-link {
    position: relative;
    transition: all 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-link:hover {
    color: #60a5fa;
    transform: translateX(-4px);
}

.social-link {
    background: #374151;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.social-link:hover {
    background: #3b82f6;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-header {
        padding: 12px 16px;
    }
    
    .nav-logo {
        width: 40px;
        height: 40px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .footer-main {
        padding: 48px 16px;
    }
    
    .footer-logo {
        width: 40px;
        height: 40px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .nav-header {
        background: rgba(15, 23, 42, 0.8);
        border-bottom-color: rgba(59, 130, 246, 0.3);
    }
    
    .nav-header.scrolled {
        background: rgba(15, 23, 42, 0.95);
    }
    
    .user-dropdown {
        background: rgba(15, 23, 42, 0.95);
        border-color: rgba(59, 130, 246, 0.3);
    }
}

/* Animation Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.nav-header {
    animation: fadeInDown 0.6s ease;
}

.footer-main {
    animation: fadeInDown 0.8s ease;
}

.nav-link {
    animation: slideInRight 0.6s ease;
}

/* Accessibility Improvements */
.nav-link:focus,
.user-dropdown:focus,
.footer-link:focus,
.social-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .nav-header {
        border-bottom-width: 2px;
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        border-color: #3b82f6;
    }
    
    .user-dropdown {
        border-width: 2px;
    }
    
    .footer-link {
        text-decoration: underline;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .nav-header,
    .nav-logo,
    .nav-link,
    .user-avatar,
    .footer-logo,
    .footer-link,
    .social-link {
        transition: none;
        animation: none;
    }
    
    .nav-link::before {
        display: none;
    }
}
