/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Main Content */
main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.section {
    display: none;
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

.section.active {
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 3rem;
    border-radius: 15px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 5px solid;
}

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

.stat-card.critical {
    border-left-color: #dc3545;
}

.stat-card.high {
    border-left-color: #fd7e14;
}

.stat-card.medium {
    border-left-color: #ffc107;
}

.stat-card.info {
    border-left-color: #0dcaf0;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-card span {
    font-size: 0.9rem;
    color: #666;
}

/* Summary Section */
.summary-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.summary-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.summary-section p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.key-findings h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2a5298;
}

.key-findings ul {
    list-style: none;
    padding-left: 0;
}

.key-findings li {
    padding: 0.5rem 0;
    border-left: 3px solid #667eea;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Risk Matrix */
.matrix-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

#risk-matrix {
    width: 100%;
    height: 600px;
}

.matrix-legend {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.matrix-legend h4 {
    margin-bottom: 1rem;
    color: #1e3c72;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.legend-item.critical .legend-color {
    background-color: #dc3545;
}

.legend-item.high .legend-color {
    background-color: #fd7e14;
}

.legend-item.medium .legend-color {
    background-color: #ffc107;
}

.legend-item.low .legend-color {
    background-color: #28a745;
}

/* Risk Details */
.risk-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    background-color: #e9ecef;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #1e3c72;
    color: white;
    transform: translateY(-2px);
}

.risks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.risk-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 5px solid;
}

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

.risk-card.critical {
    border-left-color: #dc3545;
}

.risk-card.high {
    border-left-color: #fd7e14;
}

.risk-card.medium {
    border-left-color: #ffc107;
}

.risk-card.low {
    border-left-color: #28a745;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.risk-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3c72;
    flex: 1;
}

.risk-score {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.risk-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3c72;
}

.risk-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mitigation-strategies {
    margin-top: 1rem;
}

.mitigation-strategies h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2a5298;
}

.mitigation-strategies ul {
    list-style: none;
    padding-left: 0;
}

.mitigation-strategies li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.mitigation-strategies li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Methodology */
.methodology-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.method-section {
    margin-bottom: 2rem;
}

.method-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e3c72;
}

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

.framework-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.framework-item h4 {
    margin-bottom: 1rem;
    color: #2a5298;
}

.framework-item ul {
    list-style: none;
    padding-left: 0;
}

.framework-item li {
    padding: 0.5rem 0;
    border-left: 3px solid #667eea;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .risks-grid {
        grid-template-columns: 1fr;
    }

    .framework-grid {
        grid-template-columns: 1fr;
    }

    .risk-filter {
        flex-direction: column;
        align-items: center;
    }
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
}

/* Matrix Grid Lines */
.grid-line {
    stroke: #e0e0e0;
    stroke-width: 1;
}

.axis-label {
    font-size: 14px;
    font-weight: 600;
    fill: #333;
}

.risk-point {
    cursor: pointer;
    transition: all 0.3s ease;
}

.risk-point:hover {
    stroke-width: 3;
    stroke: #333;
}