/* Base Styles */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #3a86ff;
    --accent-color: #ff006e;
    --light-color: #f8f9fa;
    --dark-color: #121212;
    --text-color: #e0e0e0;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    
    /* Risk colors */
    --low-risk: #2ecc71;
    --medium-risk: #f39c12;
    --high-risk: #e74c3c;
    --severe-risk: #c0392b;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 2.2rem;
    margin-top: 2rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #80b0ff;
    text-decoration: none;
}

/* Header */
header {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

header h1 {
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Navigation */
nav {
    background-color: rgba(18, 18, 18, 0.95);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
}

nav li {
    flex: 1;
    text-align: center;
}

nav a {
    display: block;
    padding: 1.2rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

nav a.active {
    background-color: var(--secondary-color);
    color: white;
}

/* Main Content */
main {
    padding: 3rem 0;
}

section {
    margin-bottom: 4rem;
}

.intro {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Supply Chain Diagram */
.supply-chain-diagram {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0;
}

.stage {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: 1.8rem;
    box-shadow: var(--box-shadow);
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    background-color: rgba(255, 255, 255, 0.05);
}

.stage-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.arrow {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0.5rem;
}

/* Risk Cards */
.risk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    margin: 2.5rem 0;
}

.risk-card {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.risk-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    background-color: rgba(255, 255, 255, 0.05);
}

.risk-number {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.risk-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.likelihood, .impact {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.low {
    background-color: var(--low-risk);
    color: white;
}

.medium {
    background-color: var(--medium-risk);
    color: white;
}

.high {
    background-color: var(--high-risk);
    color: white;
}

.severe {
    background-color: var(--severe-risk);
    color: white;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.btn:hover {
    background-color: #2a75e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
    color: white;
}

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.view-all {
    text-align: center;
    margin-top: 3rem;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #3a86ff 0%, #4361ee 100%);
    color: white;
    padding: 4rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(58, 134, 255, 0.3);
}

.cta h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.cta .btn {
    background-color: white;
    color: var(--secondary-color);
    margin-top: 1rem;
    font-weight: 600;
}

.cta .btn:hover {
    background-color: var(--light-color);
    color: #2a75e6;
}

/* Risk Matrix Page */
.risk-matrix-container {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.matrix-svg {
    width: 100%;
    height: 600px;
    margin: 2.5rem 0;
}

.matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.8rem;
}

/* Risk Details Page */
.risk-detail {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.risk-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.8rem;
}

.risk-header .risk-number {
    position: static;
    margin-right: 1.2rem;
}

.risk-detail h3 {
    flex: 1;
}

.risk-section {
    margin-bottom: 1.8rem;
}

.risk-section h4 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.risk-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

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

/* Mitigation Strategies Page */
.strategy-card {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    background-color: rgba(255, 255, 255, 0.05);
}

.strategy-card h3 {
    color: var(--secondary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.strategy-card h4 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    color: #e0e0e0;
}

.strategy-card ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

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

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--text-color);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

/* Tooltip for Risk Matrix */
.tooltip {
    position: absolute;
    background-color: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
    font-size: 0.9rem;
    max-width: 250px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

/* Risk explanation section */
.risk-explanation {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.risk-explanation h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    font-size: 1.3rem;
}

.risk-explanation ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.risk-explanation li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    .supply-chain-diagram {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
    
    .stage {
        max-width: 100%;
    }
    
    .cta {
        padding: 2.5rem 1.5rem;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Add a subtle gradient background to the body */
body {
    background: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
    min-height: 100vh;
}

/* Add a subtle animation to the risk cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.risk-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.risk-card:nth-child(1) { animation-delay: 0.1s; }
.risk-card:nth-child(2) { animation-delay: 0.2s; }
.risk-card:nth-child(3) { animation-delay: 0.3s; }