:root {
    --bg-dark: #0a0f1a;
    --bg-darker: #050811;
    --bg-card: #111827;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-glow: rgba(14, 165, 233, 0.15);
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #8b5cf6;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border: #374151;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-dark)!important;
    padding: 20px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

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

/* Download Controls */
.download-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.download-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.print-btn {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.brochure-container {
    background-color: var(--bg-darker) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.brochure-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    padding: 60px 40px;
    text-align: center;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

.brochure-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 3rem;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}

.logo span {
    color: var(--primary);
}

.logo i {
    margin-right: 15px;
    font-size: 3.2rem;
    color: var(--primary);
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.brochure-content {
    padding: 40px;
}

section {
    margin-bottom: 60px;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

h3 {
    font-size: 1.6rem;
    margin: 25px 0 15px;
    color: var(--text-primary);
}

h4 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
    color: var(--text-secondary);
}

p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.card-secondary {
    border-left-color: var(--secondary);
}

.card-accent {
    border-left-color: var(--accent);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.metric-box {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.metric-box:hover {
    transform: translateY(-5px);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 10px 0;
}

.metric-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.chart-container {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow);
    height: 350px;
}
.transperent {
    background-color: transparent;
    box-shadow: none;
}
.horizontal-flow {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.flow-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}

.flow-step {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-card), rgba(14, 165, 233, 0.1));
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    position: relative;
    margin: 0 10px;
    border: 2px solid rgba(14, 165, 233, 0.3);
    z-index: 1;
}

.flow-step:first-child {
    margin-left: 0;
}

.flow-step:last-child {
    margin-right: 0;
}

.flow-step::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
    z-index: 2;
}

.flow-step:last-child::after {
    display: none;
}

.flow-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 auto 15px;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.flow-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.flow-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.engine-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    transition: transform 0.3s;
}

.engine-card:hover {
    transform: translateY(-5px);
}

.engine-card:nth-child(2) {
    border-top-color: var(--secondary);
}

.engine-card:nth-child(3) {
    border-top-color: var(--accent);
}

.engine-card:nth-child(4) {
    border-top-color: #f59e0b;
}

.engine-card:nth-child(5) {
    border-top-color: #ef4444;
}

.engine-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: white;
}

.engine-card:nth-child(2) .engine-icon {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.engine-card:nth-child(3) .engine-icon {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
}

.engine-card:nth-child(4) .engine-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.engine-card:nth-child(5) .engine-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.table-container {
    overflow-x: auto;
    margin: 25px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th {
    background-color: rgba(14, 165, 233, 0.2);
    color: var(--text-primary);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.framework-item {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.framework-item:hover {
    transform: translateY(-5px);
}

.framework-name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.framework-name i {
    font-size: 1.2rem;
}

.compliance-badge {
    display: inline-block;
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
}

.roi-section {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.1));
    border-radius: var(--radius);
    padding: 30px;
    margin: 40px 0;
}

.roi-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.roi-metric {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

.roi-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.roi-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.brochure-footer {
    background-color: var(--bg-card);
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-logo i {
    margin-right: 12px;
    font-size: 2rem;
    color: var(--primary);
}

.footer-text {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .flow-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flow-step {
        margin: 10px 0;
    }
    
    .flow-step::after {
        content: '↓';
        right: 50%;
        top: auto;
        bottom: -20px;
        transform: translateX(50%);
    }
    
    .engine-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .brochure-header {
        padding: 40px 20px;
    }
    
    .brochure-content {
        padding: 20px;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .download-controls {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }
}

/* Print styles */
@media print {
    canvas { display: none !important; }
    .chart-image { display: block !important; }
    .download-controls { display: none !important; }
    .page-break {
        page-break-after: always !important;
        break-after: page !important;
    }
}

/* Ensure page breaks work in PDF generation */
.page-break {
    display: block;
    height: 0;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
}

/* Ensure charts are properly sized for PDF */
.chart-container canvas,
.chart-image {
    max-width: 100% !important;
    height: auto !important;
}

/* Risk Matrix Chart */
.orrs-matrix-container {
    background: #111827;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #374151;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-left: auto;
}

.chart-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #f9fafb;
    margin-top: 0 !important;
}

.matrix-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
}

.risk-matrix-wrapper {
    position: relative;
    width: 440px;
    max-width: 440px;
    height: 330px;
    max-height: 330px;
}

#orrsRiskMatrix {
    width: 100%;
    height: 100%;
}

.matrix-legend {
    min-width: 160px;
    text-align: left;
    background: rgba(30, 41, 59, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(55, 65, 81, 0.3);
}

.legend-title {
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 12px;
    font-size: 14px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #d1d5db;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.low-risk { background: rgba(0, 163, 140, 1); }
.medium-risk { background: rgba(207, 168, 11, 1); }
.high-risk { background: rgba(236, 145, 9, 1); }
.critical-risk { background: rgba(222, 60, 42, 1); }



/* COM-B horizontal layout */
.comb-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: relative;
}

/* Base circle styling */
.comb-item {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    padding: 15px;
    text-align: center;
    background: var(--bg-card);
    border: 3px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.25s ease;
}

/* Hover glow */
.comb-item:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 8px 25px var(--primary-glow);
}

/* CAPABILITY — Primary Blue */
.comb-item.capability {
    background: rgba(14, 165, 233, 0.12);
    border-color: var(--primary);
}
.comb-item.capability:hover {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.35);
}

/* OPPORTUNITY — Accent Purple */
.comb-item.opportunity {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--accent);
}
.comb-item.opportunity:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

/* MOTIVATION — Secondary Green */
.comb-item.motivation {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--secondary);
}
.comb-item.motivation:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

/* BEHAVIOUR — Success Green */
.comb-item.behavior {
    background: rgba(16, 185, 129, 0.18);
    border-color: var(--success);
}
.comb-item.behavior:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

/* Icons */
.comb-icon {
    font-size: 2rem;
    color: var(--primary);
}
.comb-item.opportunity .comb-icon { color: var(--accent); }
.comb-item.motivation .comb-icon { color: var(--secondary); }
.comb-item.behavior .comb-icon { color: var(--success); }

/* Titles */
.comb-item h3 {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Descriptions */
.comb-item p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0 8px;
    font-weight: 500;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Horizontal arrow connector */
.comb-connector {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    position: relative;
    border-radius: 2px;
}

/* Arrowhead */
.comb-connector::after {
    content: "";
    position: absolute;
    right: -12px;
    top: -5px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--accent);
}

/* Plus connector */
.plus-connector {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
