/* =========================================================
   ABOUT PAGE - RIYADAH DIGITAL PLATFORM
   Version: 2.0
   Last Updated: 2026-02-07
   ========================================================= */

/* =========================================================
   1. CSS VARIABLES
   ========================================================= */
:root {
    /* من style.css الحالي - تم الوراثة */
    /* --primary: #0693AD; */
    /* --secondary: #BE9427; */
    /* --bg: #f4f6f9; */
    /* --white: #ffffff; */

    /* ألوان إضافية للأقسام */
    --about-blue: #3b82f6;
    --about-indigo: #6366f1;
    --about-purple: #8b5cf6;
    --about-amber: #f59e0b;
    --about-cyan: #06b6d4;
    --about-rose: #f43f5e;
    --about-teal: #14b8a6;
    --about-slate: #64748b;

    /* ألوان الحالة */
    --about-success: #22c55e;
    --about-danger: #ef4444;
}

[data-theme="dark"] {
    /* Dark mode لألوان About */
    --about-blue: #60a5fa;
    --about-indigo: #818cf8;
    --about-purple: #a78bfa;
    --about-amber: #fbbf24;
    --about-cyan: #22d3ee;
    --about-rose: #fb7185;
    --about-teal: #2dd4bf;
    --about-slate: #94a3b8;
    --about-success: #4ade80;
    --about-danger: #f87171;
}

/* =========================================================
   2. HEADER
   ========================================================= */
.about-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
}

.about-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .about-header.scrolled {
    background: rgba(36, 36, 36, 0.95);
}

.about-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s, opacity 0.3s;
}

.back-link:hover {
    color: white;
    opacity: 1;
}

.about-header.scrolled .back-link {
    color: var(--text-light);
}

.about-header.scrolled .back-link:hover {
    color: var(--primary);
}

/* =========================================================
   3. HERO SECTION
   ========================================================= */
.about-hero {
    background: linear-gradient(135deg, #0693AD 0%, #057a91 50%, #2c3e50 100%);
    color: white;
    padding: 6rem 1.5rem 5rem;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
    background-image: 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='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-logo-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-logo-wrapper {
    width: 85px;
    height: 85px;
    background: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-logo-wrapper img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-text p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.25rem 0 0;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 850px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 5;
}

.hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* =========================================================
   4. MAIN CONTENT
   ========================================================= */
.about-main {
    max-width: 1200px;
    margin: -2rem auto 3rem;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

/* =========================================================
   5. COLLAPSIBLE SECTIONS
   ========================================================= */
.about-section {
    margin-bottom: 2rem;
    scroll-margin-top: 6rem;
}

.section-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.section-card.open {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.section-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: right;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ألوان الـ Accent لكل قسم */
.section-header.accent-primary {
    background: linear-gradient(to left, rgba(6, 147, 173, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--primary);
}

.section-header.accent-blue {
    background: linear-gradient(to left, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-blue);
}

.section-header.accent-indigo {
    background: linear-gradient(to left, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-indigo);
}

.section-header.accent-purple {
    background: linear-gradient(to left, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-purple);
}

.section-header.accent-amber {
    background: linear-gradient(to left, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-amber);
}

.section-header.accent-cyan {
    background: linear-gradient(to left, rgba(6, 182, 212, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-cyan);
}

.section-header.accent-rose {
    background: linear-gradient(to left, rgba(244, 63, 94, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-rose);
}

.section-header.accent-teal {
    background: linear-gradient(to left, rgba(20, 184, 166, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-teal);
}

.section-header.accent-slate {
    background: linear-gradient(to left, rgba(100, 116, 139, 0.1) 0%, transparent 100%);
    border-right: 4px solid var(--about-slate);
}

.section-header:hover {
    opacity: 0.9;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-icon i {
    font-size: 1.4rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-dark);
    margin: 0;
}

.section-chevron {
    font-size: 1.2rem;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.section-card.open .section-chevron {
    transform: rotate(180deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.section-card.open .section-content {
    max-height: 10000px;
    opacity: 1;
}

.section-body {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

/* =========================================================
   6. TABLE COMPONENT
   ========================================================= */
.about-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin: 1.5rem 0;
}

.about-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.about-table thead {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06));
}

.about-table th {
    padding: 0.875rem 1.25rem;
    text-align: right;
    font-weight: bold;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border);
}

.about-table tbody tr {
    transition: background-color 0.2s;
}

.about-table tbody tr:nth-child(odd) {
    background: var(--white);
}

.about-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.about-table tbody tr:hover {
    background: rgba(6, 147, 173, 0.05);
}

.about-table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-light);
}

.about-table td:first-child {
    font-weight: 500;
    color: var(--text-dark);
}

.about-table code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* =========================================================
   7. FEATURE CARDS
   ========================================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.feature-card {
    padding: 1.75rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-card.color-blue {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.feature-card.color-purple {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
}

.feature-card.color-amber {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.feature-card.color-cyan {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-card.color-blue .feature-icon {
    background: var(--about-blue);
    color: white;
}

.feature-card.color-purple .feature-icon {
    background: var(--about-purple);
    color: white;
}

.feature-card.color-amber .feature-icon {
    background: var(--about-amber);
    color: white;
}

.feature-card.color-cyan .feature-icon {
    background: var(--about-cyan);
    color: white;
}

.feature-icon i {
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 0.65rem;
}

.feature-card.color-blue h3 {
    color: var(--about-blue);
}

.feature-card.color-purple h3 {
    color: var(--about-purple);
}

.feature-card.color-amber h3 {
    color: var(--about-amber);
}

.feature-card.color-cyan h3 {
    color: var(--about-cyan);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* =========================================================
   8. INFO CARDS
   ========================================================= */
.info-card {
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid;
    display: flex;
    align-items: start;
    gap: 0.85rem;
    margin: 1rem 0;
}

.info-card.type-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
    color: #1e40af;
}

.info-card.type-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.info-card.type-success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
    color: #166534;
}

[data-theme="dark"] .info-card.type-info {
    color: #93c5fd;
}

[data-theme="dark"] .info-card.type-warning {
    color: #fcd34d;
}

[data-theme="dark"] .info-card.type-success {
    color: #86efac;
}

.info-card-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-card-icon i {
    font-size: 1.3rem;
}

.info-card-body h4 {
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.info-card-body p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0;
}

/* =========================================================
   9. STATUS BADGES
   ========================================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid;
}

.status-badge.status-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #166534;
}

.status-badge.status-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #92400e;
}

.status-badge.status-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

.status-badge.status-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

[data-theme="dark"] .status-badge.status-success {
    color: #86efac;
}

[data-theme="dark"] .status-badge.status-warning {
    color: #fcd34d;
}

[data-theme="dark"] .status-badge.status-danger {
    color: #fca5a5;
}

[data-theme="dark"] .status-badge.status-info {
    color: #93c5fd;
}

/* =========================================================
   10. FEATURES LIST
   ========================================================= */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 0.75rem;
    background: rgba(6, 147, 173, 0.04);
    margin-bottom: 0.6rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s;
}

.features-list li:hover {
    background: rgba(6, 147, 173, 0.08);
}

.features-list li i {
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.features-list li span {
    color: var(--text-light);
}

/* =========================================================
   11. FOOTER
   ========================================================= */
.about-footer {
    background: var(--white);
    padding: 2.5rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.about-footer-content p {
    margin: 0;
    color: var(--text-light);
}

.about-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.about-footer a:hover {
    opacity: 0.8;
}

/* =========================================================
   12. SECTION INTRO PARAGRAPH
   ========================================================= */
.section-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* =========================================================
   13. FLOW TITLE (Sub-heading within sections)
   ========================================================= */
.flow-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flow-title i {
    color: var(--primary);
    font-size: 1rem;
}

/* =========================================================
   14. ROLES DIAGRAM
   ========================================================= */
.roles-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 0;
}

/* Role Node */
.role-node {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid;
    background: var(--white);
    max-width: 400px;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Role Color Variants */
.role-beneficiary {
    border-color: var(--about-blue);
}

.role-admin {
    border-color: var(--about-indigo);
}

.role-dataentry {
    border-color: var(--about-amber);
}

.role-superadmin {
    border-color: var(--about-purple);
}

/* Role Icon */
.role-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    color: white;
}

.role-beneficiary .role-icon {
    background: var(--about-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.role-admin .role-icon {
    background: var(--about-indigo);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.role-dataentry .role-icon {
    background: var(--about-amber);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.role-superadmin .role-icon {
    background: var(--about-purple);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Role Info */
.role-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.role-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Role Connectors */
.role-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.role-connector.vertical {
    height: 40px;
    width: 2px;
    background: #cbd5e1;
    position: relative;
}

.role-connector.vertical::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #cbd5e1;
}

.role-connector.horizontal {
    width: 60px;
    height: 2px;
    background: #cbd5e1;
    position: relative;
    flex-shrink: 0;
}

/* RTL: horizontal arrow points left */
.role-connector.horizontal::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #cbd5e1;
}

[dir="ltr"] .role-connector.horizontal::after {
    right: auto;
    left: -5px;
    border-right: none;
    border-left: 8px solid #cbd5e1;
}

/* Connector Label */
.connector-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    border-radius: 4px;
    z-index: 1;
}

/* Role Row (admin + connector + dataentry side by side) */
.role-row {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
    width: 100%;
    max-width: 700px;
}

.role-row .role-node {
    flex: 1;
    max-width: 300px;
}

/* Dark Mode - Roles */
[data-theme="dark"] .role-node {
    background: var(--card-bg, #2a2a2a);
}

[data-theme="dark"] .role-connector.vertical,
[data-theme="dark"] .role-connector.horizontal {
    background: #475569;
}

[data-theme="dark"] .role-connector.vertical::after {
    border-top-color: #475569;
}

[data-theme="dark"] .role-connector.horizontal::after {
    border-right-color: #475569;
}

[dir="ltr"][data-theme="dark"] .role-connector.horizontal::after {
    border-left-color: #475569;
}

[data-theme="dark"] .connector-label {
    background: var(--card-bg, #2a2a2a);
    color: var(--about-slate);
}

/* =========================================================
   15. AUTO SYSTEM BOX
   ========================================================= */
.auto-system-box {
    border: 2px dashed var(--about-purple);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    background: rgba(139, 92, 246, 0.04);
}

.auto-system-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.auto-system-header i {
    font-size: 1.5rem;
    color: var(--about-purple);
}

.auto-system-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--about-purple);
}

.auto-system-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.auto-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: background 0.2s ease;
}

.auto-item:hover {
    background: rgba(139, 92, 246, 0.06);
}

.auto-item i {
    font-size: 1.2rem;
    color: var(--about-purple);
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.auto-item span {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Dark Mode - Auto System */
[data-theme="dark"] .auto-system-box {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(167, 139, 250, 0.4);
}

[data-theme="dark"] .auto-item {
    background: var(--card-bg, #2a2a2a);
    border-color: rgba(167, 139, 250, 0.2);
}

[data-theme="dark"] .auto-item:hover {
    background: rgba(139, 92, 246, 0.12);
}

/* =========================================================
   16. FLOW DIAGRAMS
   ========================================================= */
.flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 0;
}

/* --- Flow Step --- */
.flow-step {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--white);
    max-width: 500px;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.flow-step:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.flow-step.compact {
    padding: 0.7rem 1rem;
}

/* --- Flow Step Type Variants --- */
.flow-step.type-start {
    border-color: var(--primary);
    background: rgba(6, 147, 173, 0.06);
}

.flow-step.type-action {
    border-color: var(--about-blue);
    background: rgba(59, 130, 246, 0.04);
}

.flow-step.type-auto {
    border-color: var(--about-purple);
    border-style: dashed;
    background: rgba(139, 92, 246, 0.06);
}

.flow-step.type-wait {
    border-color: var(--about-amber);
    background: rgba(245, 158, 11, 0.06);
}

.flow-step.type-decision {
    border-color: var(--about-amber);
    background: rgba(245, 158, 11, 0.08);
}

.flow-step.type-success {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
}

.flow-step.type-danger {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

.flow-step.type-lock {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

/* --- Flow Number Circle --- */
.flow-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.flow-step.type-start .flow-num {
    background: var(--primary);
}

.flow-step.type-action .flow-num {
    background: var(--about-blue);
}

.flow-step.type-auto .flow-num {
    background: var(--about-purple);
}

.flow-step.type-wait .flow-num {
    background: var(--about-amber);
}

.flow-step.type-decision .flow-num {
    background: var(--about-amber);
}

.flow-step.type-success .flow-num {
    background: #22c55e;
}

.flow-step.type-danger .flow-num {
    background: #ef4444;
}

.flow-step.type-lock .flow-num {
    background: #ef4444;
}

/* --- Flow Step Content --- */
.flow-step-content {
    flex: 1;
    min-width: 0;
}

.flow-step-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.flow-step-content span {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
}

/* --- Flow Step Icon (on the left side since RTL) --- */
.flow-step-icon {
    font-size: 1.5rem;
    opacity: 0.4;
    flex-shrink: 0;
    margin-right: 0;
    margin-left: auto;
}

[dir="ltr"] .flow-step-icon {
    margin-left: 0;
    margin-right: auto;
}

.flow-step.type-start .flow-step-icon { color: var(--primary); }
.flow-step.type-action .flow-step-icon { color: var(--about-blue); }
.flow-step.type-auto .flow-step-icon { color: var(--about-purple); }
.flow-step.type-wait .flow-step-icon { color: var(--about-amber); }
.flow-step.type-decision .flow-step-icon { color: var(--about-amber); }
.flow-step.type-success .flow-step-icon { color: #22c55e; }
.flow-step.type-danger .flow-step-icon { color: #ef4444; }
.flow-step.type-lock .flow-step-icon { color: #ef4444; }

/* --- Flow Arrow --- */
.flow-arrow {
    height: 36px;
    width: 2px;
    position: relative;
    background: #cbd5e1;
}

.flow-arrow::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #cbd5e1;
}

/* --- Flow Branches --- */
.flow-branches {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    max-width: 600px;
    width: 100%;
    justify-content: center;
}

.flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 0;
}

/* --- Branch Arrow (short colored) --- */
.flow-branch-arrow {
    height: 28px;
    width: 2px;
    position: relative;
}

.flow-branch-arrow.success {
    background: #22c55e;
}

.flow-branch-arrow.success::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #22c55e;
}

.flow-branch-arrow.danger {
    background: #ef4444;
}

.flow-branch-arrow.danger::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #ef4444;
}

/* --- Branch Label (pill badge) --- */
.flow-branch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.flow-branch-label.success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.flow-branch-label.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Flow Parallel --- */
.flow-parallel {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    max-width: 600px;
    width: 100%;
    justify-content: center;
}

.flow-parallel-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
    position: relative;
    min-width: 40px;
}

.flow-parallel-label::before,
.flow-parallel-label::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: #cbd5e1;
}

.flow-parallel-label::before {
    top: 0;
    height: 30%;
}

.flow-parallel-label::after {
    bottom: 0;
    height: 30%;
}

/* --- Dark Mode - Flow Diagrams --- */
[data-theme="dark"] .flow-step {
    background: var(--card-bg, #2a2a2a);
    border-color: #475569;
}

[data-theme="dark"] .flow-step.type-start {
    border-color: var(--primary);
    background: rgba(6, 147, 173, 0.12);
}

[data-theme="dark"] .flow-step.type-action {
    border-color: var(--about-blue);
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .flow-step.type-auto {
    border-color: var(--about-purple);
    background: rgba(167, 139, 250, 0.1);
}

[data-theme="dark"] .flow-step.type-wait {
    border-color: var(--about-amber);
    background: rgba(251, 191, 36, 0.1);
}

[data-theme="dark"] .flow-step.type-decision {
    border-color: var(--about-amber);
    background: rgba(251, 191, 36, 0.12);
}

[data-theme="dark"] .flow-step.type-success {
    border-color: var(--about-success);
    background: rgba(74, 222, 128, 0.1);
}

[data-theme="dark"] .flow-step.type-danger {
    border-color: var(--about-danger);
    background: rgba(248, 113, 113, 0.1);
}

[data-theme="dark"] .flow-step.type-lock {
    border-color: var(--about-danger);
    background: rgba(248, 113, 113, 0.1);
}

[data-theme="dark"] .flow-arrow {
    background: #475569;
}

[data-theme="dark"] .flow-arrow::after {
    border-top-color: #475569;
}

[data-theme="dark"] .flow-branch-label.success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
}

[data-theme="dark"] .flow-branch-label.danger {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .flow-parallel-label::before,
[data-theme="dark"] .flow-parallel-label::after {
    background: #475569;
}

/* =========================================================
   17. LOCK DIAGRAM
   ========================================================= */
.lock-diagram {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.lock-scenario {
    flex: 1;
    min-width: 280px;
}

/* Lock Actor */
.lock-actor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lock-actor-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.lock-actor-icon.success {
    background: #22c55e;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.lock-actor-icon.danger {
    background: #ef4444;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

.lock-actor h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.lock-actor p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Lock Timeline */
.lock-timeline {
    border-right: 2px solid var(--border);
    padding-right: 1.25rem;
    margin-right: 0.5rem;
}

[dir="ltr"] .lock-timeline {
    border-right: none;
    border-left: 2px solid var(--border);
    padding-right: 0;
    padding-left: 1.25rem;
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Lock Event */
.lock-event {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    border-right: 3px solid transparent;
    transition: background 0.2s ease;
}

.lock-event:hover {
    background: rgba(0, 0, 0, 0.04);
}

.lock-event:last-child {
    margin-bottom: 0;
}

.lock-event.success {
    border-right-color: #22c55e;
    background: rgba(34, 197, 94, 0.04);
}

.lock-event.danger {
    border-right-color: #ef4444;
    background: rgba(239, 68, 68, 0.04);
}

.lock-event.warning {
    border-right-color: #f59e0b;
    background: rgba(245, 158, 11, 0.04);
}

/* LTR lock event borders */
[dir="ltr"] .lock-event {
    border-right: none;
    border-left: 3px solid transparent;
}

[dir="ltr"] .lock-event.success {
    border-left-color: #22c55e;
}

[dir="ltr"] .lock-event.danger {
    border-left-color: #ef4444;
}

[dir="ltr"] .lock-event.warning {
    border-left-color: #f59e0b;
}

.lock-event i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.lock-event.success i { color: #22c55e; }
.lock-event.danger i { color: #ef4444; }
.lock-event.warning i { color: #f59e0b; }

.lock-event span {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Lock Divider */
.lock-divider {
    width: 1px;
    background: var(--border);
    align-self: stretch;
    min-height: 100px;
    flex-shrink: 0;
}

/* Dark Mode - Lock Diagram */
[data-theme="dark"] .lock-event {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .lock-event:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .lock-event.success {
    background: rgba(34, 197, 94, 0.08);
}

[data-theme="dark"] .lock-event.danger {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .lock-event.warning {
    background: rgba(245, 158, 11, 0.08);
}

[data-theme="dark"] .lock-event.success i { color: var(--about-success); }
[data-theme="dark"] .lock-event.danger i { color: var(--about-danger); }
[data-theme="dark"] .lock-event.warning i { color: var(--about-amber); }

[data-theme="dark"] .lock-timeline {
    border-right-color: #475569;
}

[dir="ltr"][data-theme="dark"] .lock-timeline {
    border-left-color: #475569;
}

[data-theme="dark"] .lock-divider {
    background: #475569;
}

[data-theme="dark"] .lock-actor-icon.success {
    background: var(--about-success);
}

[data-theme="dark"] .lock-actor-icon.danger {
    background: var(--about-danger);
}

/* =========================================================
   18. QUEUE DIAGRAM
   ========================================================= */
.queue-diagram {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.queue-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.queue-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Queue Header */
.queue-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: white;
    border-radius: 12px 12px 0 0;
}

.queue-header i {
    font-size: 1.25rem;
}

.queue-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Queue Header Color Variants */
.queue-header.bg-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.queue-header.bg-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.queue-header.bg-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.queue-header.bg-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.queue-header.bg-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.queue-header.bg-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.queue-header.bg-rose {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.queue-header.bg-slate {
    background: linear-gradient(135deg, #64748b, #475569);
}

/* Queue Body */
.queue-body {
    padding: 1.25rem;
}

.queue-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.queue-body ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.queue-body ul li i {
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

/* Queue Frequency Badge */
.queue-frequency {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(6, 147, 173, 0.08);
    color: var(--primary);
    border: 1px solid rgba(6, 147, 173, 0.2);
    margin-top: 0.75rem;
}

/* Dark Mode - Queue */
[data-theme="dark"] .queue-card {
    border-color: #475569;
    background: var(--card-bg, #2a2a2a);
}

[data-theme="dark"] .queue-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .queue-frequency {
    background: rgba(6, 147, 173, 0.15);
}

/* =========================================================
   19. PERMISSIONS COMPARE
   ========================================================= */
.permissions-compare {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.permission-card {
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--white);
    transition: box-shadow 0.2s ease;
}

.permission-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.permission-card.highlight {
    border-color: var(--primary);
    background: rgba(6, 147, 173, 0.03);
}

.permission-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.permission-card h4 i {
    font-size: 1.1rem;
    color: var(--primary);
}

.permission-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.permission-card ul li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.permission-card ul li:last-child {
    border-bottom: none;
}

/* Permission Yes / No */
.perm-yes i {
    color: #22c55e;
    font-size: 0.95rem;
}

.perm-no i {
    color: #ef4444;
    font-size: 0.95rem;
}

.perm-no span {
    opacity: 0.55;
    text-decoration: line-through;
}

/* Dark Mode - Permissions */
[data-theme="dark"] .permission-card {
    background: var(--card-bg, #2a2a2a);
    border-color: #475569;
}

[data-theme="dark"] .permission-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .permission-card.highlight {
    background: rgba(6, 147, 173, 0.08);
    border-color: var(--primary);
}

[data-theme="dark"] .permission-card ul li {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .perm-yes i {
    color: var(--about-success);
}

[data-theme="dark"] .perm-no i {
    color: var(--about-danger);
}

/* =========================================================
   20. SW STRATEGIES (Service Worker)
   ========================================================= */
.sw-strategies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.sw-card {
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* SW Header */
.sw-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 2px solid var(--border);
}

.sw-header i {
    font-size: 1.3rem;
    color: var(--primary);
}

.sw-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Color variants for each SW card header */
.sw-card:nth-child(1) .sw-header { border-bottom-color: var(--about-blue); }
.sw-card:nth-child(1) .sw-header i { color: var(--about-blue); }

.sw-card:nth-child(2) .sw-header { border-bottom-color: var(--about-purple); }
.sw-card:nth-child(2) .sw-header i { color: var(--about-purple); }

.sw-card:nth-child(3) .sw-header { border-bottom-color: var(--about-amber); }
.sw-card:nth-child(3) .sw-header i { color: var(--about-amber); }

.sw-card:nth-child(4) .sw-header { border-bottom-color: var(--about-teal); }
.sw-card:nth-child(4) .sw-header i { color: var(--about-teal); }

.sw-card:nth-child(5) .sw-header { border-bottom-color: var(--about-rose); }
.sw-card:nth-child(5) .sw-header i { color: var(--about-rose); }

.sw-card:nth-child(6) .sw-header { border-bottom-color: var(--about-cyan); }
.sw-card:nth-child(6) .sw-header i { color: var(--about-cyan); }

/* SW Strategy Badge */
.sw-strategy {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(6, 147, 173, 0.1);
    color: var(--primary);
    border: 1px solid rgba(6, 147, 173, 0.2);
    margin-bottom: 0.75rem;
}

.sw-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Dark Mode - SW Strategies */
[data-theme="dark"] .sw-card {
    background: var(--card-bg, #2a2a2a);
    border-color: #475569;
}

[data-theme="dark"] .sw-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .sw-header {
    border-bottom-color: #475569;
}

/* Preserve nth-child border colors in dark mode */
[data-theme="dark"] .sw-card:nth-child(1) .sw-header { border-bottom-color: var(--about-blue); }
[data-theme="dark"] .sw-card:nth-child(2) .sw-header { border-bottom-color: var(--about-purple); }
[data-theme="dark"] .sw-card:nth-child(3) .sw-header { border-bottom-color: var(--about-amber); }
[data-theme="dark"] .sw-card:nth-child(4) .sw-header { border-bottom-color: var(--about-teal); }
[data-theme="dark"] .sw-card:nth-child(5) .sw-header { border-bottom-color: var(--about-rose); }
[data-theme="dark"] .sw-card:nth-child(6) .sw-header { border-bottom-color: var(--about-cyan); }

[data-theme="dark"] .sw-strategy {
    background: rgba(6, 147, 173, 0.15);
}

/* =========================================================
   21. RESPONSIVE DESIGN
   ========================================================= */

/* Tablets */
@media (max-width: 768px) {
    /* Existing responsive */
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-logo-wrapper {
        width: 70px;
        height: 70px;
    }

    .hero-logo-wrapper img {
        width: 52px;
        height: 52px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .section-icon {
        width: 42px;
        height: 42px;
    }

    .section-icon i {
        font-size: 1.2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* Roles diagram - stack the row */
    .role-row {
        flex-direction: column;
        gap: 0;
        align-items: center;
    }

    .role-row .role-node {
        max-width: 100%;
    }

    .role-connector.horizontal {
        width: 2px;
        height: 40px;
    }

    .role-connector.horizontal::after {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -5px;
        transform: translateX(-50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #cbd5e1;
        border-bottom: none;
    }

    [dir="ltr"] .role-connector.horizontal::after {
        right: auto;
        left: 50%;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #cbd5e1;
    }

    /* Auto system grid to single column */
    .auto-system-grid {
        grid-template-columns: 1fr;
    }

    /* Flow branches stack vertically */
    .flow-branches {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .flow-branch {
        width: 100%;
        max-width: 400px;
    }

    /* Flow parallel stack vertically */
    .flow-parallel {
        flex-direction: column;
        align-items: center;
    }

    .flow-parallel-label::before,
    .flow-parallel-label::after {
        display: none;
    }

    /* Lock diagram stack vertically */
    .lock-diagram {
        flex-direction: column;
        gap: 1.5rem;
    }

    .lock-divider {
        width: 100%;
        height: 1px;
        min-height: 0;
    }

    .lock-scenario {
        min-width: 0;
    }

    /* Queue diagram to single column */
    .queue-diagram {
        grid-template-columns: 1fr;
    }

    /* Permissions compare to single column */
    .permissions-compare {
        grid-template-columns: 1fr;
    }

    /* SW strategies to single column */
    .sw-strategies {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    /* Existing responsive */
    .about-hero {
        padding: 5rem 1rem 3.5rem;
    }

    .hero-logo-area {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        text-align: center;
    }

    .hero-badges {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-badge {
        justify-content: center;
    }

    .section-header {
        padding: 1rem;
    }

    .section-body {
        padding: 1rem;
    }

    .about-table {
        font-size: 0.85rem;
    }

    .about-table th,
    .about-table td {
        padding: 0.6rem 0.75rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    /* Section intro on mobile */
    .section-intro {
        font-size: 0.95rem;
    }

    /* Flow steps compact on mobile */
    .flow-step {
        padding: 0.85rem 1rem;
        gap: 0.65rem;
    }

    .flow-step.compact {
        padding: 0.6rem 0.85rem;
    }

    .flow-num {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.8rem;
    }

    .flow-step-content strong {
        font-size: 0.9rem;
    }

    .flow-step-content span {
        font-size: 0.85rem;
    }

    .flow-step-icon {
        font-size: 1.25rem;
    }

    /* Role nodes compact on mobile */
    .role-node {
        padding: 0.85rem 1rem;
        gap: 0.75rem;
    }

    .role-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .role-info h4 {
        font-size: 0.9rem;
    }

    .role-info p {
        font-size: 0.85rem;
    }

    /* Queue card mobile */
    .queue-header {
        padding: 0.75rem 1rem;
    }

    .queue-body {
        padding: 1rem;
    }

    /* Permission card mobile */
    .permission-card {
        padding: 1rem;
    }

    /* SW card mobile */
    .sw-card {
        padding: 1rem;
    }

    /* Lock diagram mobile */
    .lock-event {
        padding: 0.5rem 0.75rem;
    }

    .lock-timeline {
        padding-right: 1rem;
    }

    [dir="ltr"] .lock-timeline {
        padding-left: 1rem;
    }

    /* Auto system items mobile */
    .auto-item {
        padding: 0.7rem;
    }

    .auto-item i {
        font-size: 1.1rem;
    }

    .auto-item span {
        font-size: 0.9rem;
    }
}

/* =========================================================
   22. FOCUS & ACCESSIBILITY
   ========================================================= */
.section-header:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.back-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.about-header.scrolled .back-link:focus-visible {
    outline-color: var(--primary);
}

/* Additional focus styles for new interactive elements */
.flow-step:focus-visible,
.role-node:focus-visible,
.queue-card:focus-visible,
.sw-card:focus-visible,
.permission-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* =========================================================
   23. SMOOTH SCROLLING
   ========================================================= */
html {
    scroll-behavior: smooth;
}

/* =========================================================
   24. PRINT STYLES
   ========================================================= */
@media print {
    .about-header,
    .about-footer,
    .hero-badges,
    .back-link {
        display: none;
    }

    .about-hero {
        background: #0693AD;
        padding: 2rem;
    }

    .section-card {
        page-break-inside: avoid;
    }

    .section-content {
        max-height: none !important;
        opacity: 1 !important;
    }

    /* Print: flatten borders and shadows */
    .flow-step,
    .role-node,
    .queue-card,
    .sw-card,
    .permission-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }

    /* Print: ensure arrows are visible */
    .flow-arrow,
    .role-connector.vertical,
    .role-connector.horizontal {
        background: #999;
    }

    .flow-arrow::after,
    .role-connector.vertical::after {
        border-top-color: #999;
    }

    /* Print: single column grids */
    .queue-diagram,
    .permissions-compare,
    .sw-strategies {
        grid-template-columns: 1fr;
    }

    .lock-diagram {
        flex-direction: column;
    }

    .flow-branches {
        flex-direction: column;
    }

    .role-row {
        flex-direction: column;
    }

    /* Print: disable hover transforms */
    .flow-step:hover,
    .role-node:hover,
    .feature-card:hover,
    .sw-card:hover,
    .queue-card:hover,
    .permission-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Print: auto system box */
    .auto-system-box {
        border-style: solid;
    }

    .auto-system-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================
   25. REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .flow-step,
    .role-node,
    .feature-card,
    .section-card,
    .sw-card,
    .queue-card,
    .permission-card,
    .auto-item,
    .lock-event {
        transition: none;
    }

    .section-content {
        transition: none;
    }

    .section-chevron {
        transition: none;
    }

    .section-header {
        transition: none;
    }

    .about-header {
        transition: none;
    }

    .back-link {
        transition: none;
    }
}
