/*
 * AI Security Framework Styles
 * Mobile Responsive Update: July 25, 2025 - Version 2.0
 * Mobile Navigation & Responsive Layout
 */

/* Color Variables */
:root {
  --primary-color: #4b0c7f;
  --secondary-color: #8936de;
  --accent-color: #68abfe;
  --white: #ffffff;
  --text-light: rgba(255, 255, 255, 0.9);
  --background-overlay: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.1);
}

/* Warning pulse animation for ethical use section */
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.framework-card h3 i {
  margin-right: 10px;
  color: var(--primary-color);
  font-size: 1.4em;
  vertical-align: middle;
}

.resource-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}
.resource-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 32px 0 rgba(31,38,135,0.15);
}

.resource-btn {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  outline: none;
}

.resource-btn.primary-btn {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
}

.resource-btn.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(75, 12, 127, 0.3);
}

.resource-btn.secondary-btn {
  background: rgba(75, 12, 127, 0.1);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.resource-btn.secondary-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-1px);
}

.resource-card button {
  background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}
.resource-card button:hover {
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
}

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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #ffffff;
            color: #333333;
            overflow-x: hidden;
        }

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

        /* Header */
        .header {
            padding: 20px 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid rgba(137, 54, 222, 0.1);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
            background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .nav-links {
            display: flex;
            gap: 30px;
        }

        .nav-links a {
            color: #333333;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .nav-links a:hover {
            background: rgba(137, 54, 222, 0.1);
            color: var(--secondary-color);
            transform: translateY(-2px);
        }

        /* Mobile Navigation Toggle - High Priority */
        .nav-toggle {
            display: none !important;
            flex-direction: column;
            cursor: pointer;
            padding: 10px;
            z-index: 1001;
            background: transparent;
            border: none;
            outline: none;
        }

        .nav-toggle span {
            width: 25px;
            height: 3px;
            background: var(--secondary-color);
            margin: 3px 0;
            transition: 0.3s;
            border-radius: 2px;
            display: block;
        }

        .nav-toggle.active span:nth-child(1) {
            transform: rotate(-45deg) translate(-5px, 6px);
        }

        .nav-toggle.active span:nth-child(2) {
            opacity: 0;
        }

        .nav-toggle.active span:nth-child(3) {
            transform: rotate(45deg) translate(-5px, -6px);
        }

        /* Alternative mobile navigation approach */
        @media (max-width: 768px) {
            .nav-toggle {
                display: flex !important;
                background: rgba(137, 54, 222, 0.1) !important;
                border: 2px solid var(--secondary-color) !important;
                border-radius: 5px !important;
            }
            
            .nav-links {
                display: none !important;
            }
            
            .nav-links.active {
                display: flex !important;
                position: absolute !important;
                top: 100% !important;
                left: 0 !important;
                width: 100% !important;
                background: white !important;
                flex-direction: column !important;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
                border-radius: 0 0 15px 15px !important;
                z-index: 999 !important;
                padding: 10px 0 !important;
            }
            
            .nav-links.active a {
                padding: 15px 20px !important;
                border-bottom: 1px solid rgba(137, 54, 222, 0.1) !important;
                margin: 0 !important;
            }
            
            .nav-links.active a:last-child {
                border-bottom: none !important;
            }
        }

        /* Hero Section */
        .hero {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="200" r="2" fill="%23ffffff" opacity="0.1"/><circle cx="800" cy="300" r="1.5" fill="%23ffffff" opacity="0.1"/><circle cx="500" cy="500" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="300" cy="700" r="2" fill="%23ffffff" opacity="0.1"/></svg>');
            animation: float 20s infinite linear;
            pointer-events: none;
        }

        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }

        .hero-content h1 {
            font-size: 4rem;
            margin-bottom: 20px;
            background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }

        .hero-content p {
            font-size: 1.5rem;
            margin-bottom: 30px;
            color: #555555;
            opacity: 0.9;
        }

        .cta-button {
            padding: 15px 40px;
            background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
            border: none;
            border-radius: 50px;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(75, 12, 127, 0.4);
        }

        /* Framework Overview */
        .framework-overview {
            padding: 100px 0;
            background: #f8f9fa;
        }

        .section-title {
            text-align: center;
            font-size: 3rem;
            margin-bottom: 50px;
            background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

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

        .framework-card {
            background: #ffffff;
            border: 1px solid #e9ecef;
            border-radius: 20px;
            padding: 30px;
            transition: all 0.3s ease;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .framework-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(137, 54, 222, 0.2);
            border-color: var(--secondary-color);
        }

        .framework-card h3 {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: var(--secondary-color);
        }

        .framework-card p {
            color: #555555;
            opacity: 0.9;
            line-height: 1.6;
        }

        /* Attack Surface Visualization */
        .attack-surface {
            padding: 100px 0;
            background: #ffffff;
        }

        .attack-diagram {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 50px 0;
            position: relative;
            gap: 30px;
        }

        .attack-layer {
            position: relative;
            width: 280px;
            height: 280px;
            border: 3px solid var(--secondary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(137, 54, 222, 0.1);
            backdrop-filter: blur(5px);
            transition: all 0.3s ease;
            cursor: pointer;
            z-index: 1;
        }

        .attack-layer:hover {
            transform: scale(1.1);
            border-color: var(--accent-color);
            box-shadow: 0 0 30px rgba(137, 54, 222, 0.4);
            z-index: 3;
        }

        .attack-layer h4 {
            color: var(--secondary-color);
            font-size: 1.2rem;
            text-align: center;
        }

        .attack-layer:nth-child(1) {
            background: rgba(255, 107, 107, 0.1);
            border-color: #ff6b6b;
        }

        .attack-layer:nth-child(2) {
            background: rgba(255, 235, 59, 0.1);
            border-color: #ffeb3b;
        }

        .attack-layer:nth-child(3) {
            background: rgba(76, 175, 80, 0.1);
            border-color: #4caf50;
        }

        /* Control Matrix */
        .control-matrix {
            padding: 100px 0;
            background: #f8f9fa;
        }

        .matrix-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin: 50px 0;
        }

        .matrix-item {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .matrix-item:hover {
            border-color: var(--secondary-color);
            background: rgba(79, 172, 254, 0.1);
            transform: translateY(-5px);
        }

        .matrix-item h4 {
            color: var(--secondary-color);
            margin-bottom: 10px;
        }

        .matrix-item p {
            opacity: 0.8;
            font-size: 0.9rem;
        }


        /* Enhanced Risk Matrix */
        .risk-matrix-section {
            padding: 100px 0;
            background: #f8f9fa;
        }

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

        .risk-controls {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .risk-control-btn {
            padding: 12px 25px;
            background: rgba(137, 54, 222, 0.1);
            border: 2px solid var(--secondary-color);
            border-radius: 25px;
            color: var(--secondary-color);
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            font-size: 0.95rem;
        }

        .risk-control-btn:hover,
        .risk-control-btn.active {
            background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
            border-color: transparent;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(137, 54, 222, 0.3);
        }

        .risk-grid {
            display: grid;
            grid-template-columns: 150px repeat(5, 1fr);
            gap: 5px;
            max-width: 900px;
            margin: 0 auto;
            margin-bottom: 40px;
        }

        .risk-header {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            text-align: center;
            border-radius: 5px;
            font-weight: bold;
            font-size: 0.9rem;
        }

        .risk-cell {
            padding: 15px;
            text-align: center;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            position: relative;
        }

        .risk-cell:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .risk-cell.critical { background: rgba(139, 0, 0, 0.8); color: white; font-weight: bold; } /* Much darker red */
        .risk-cell.high { background: rgba(204, 51, 0, 0.7); color: white; font-weight: bold; } /* Darker orange */
        .risk-cell.medium { background: rgba(255, 193, 7, 0.4); }
        .risk-cell.low { background: rgba(139, 195, 74, 0.4); }
        .risk-cell.very-low { background: rgba(76, 175, 80, 0.4); }

        .risk-calculator {
            background: #ffffff;
            border-radius: 15px;
            padding: 30px;
            margin-top: 40px;
            border: 1px solid #e9ecef;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            color: #333333;
        }

        .calculator-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            align-items: center;
            flex-wrap: wrap;
        }

        .calculator-input {
            flex: 1;
            min-width: 200px;
        }

        .calculator-input label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #333333;
        }

        .calculator-input select {
            width: 100%;
            padding: 10px;
            border-radius: 10px;
            border: 1px solid #e9ecef;
            background: #ffffff;
            color: #333333;
            font-size: 1rem;
        }

        /* Risk Scenarios */
        .risk-scenarios {
            background: #ffffff;
            border-radius: 15px;
            padding: 30px;
            margin-top: 40px;
            border: 1px solid #e9ecef;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

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

        .scenario-card {
            background: #ffffff;
            border: 1px solid #e9ecef;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .scenario-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(137, 54, 222, 0.15);
            border-color: var(--secondary-color);
        }

        .scenario-icon {
            font-size: 2.5rem;
            color: var(--secondary-color);
            margin-bottom: 15px;
        }

        .scenario-card h4 {
            color: var(--secondary-color);
            margin-bottom: 10px;
            font-size: 1.2rem;
        }

        .scenario-card p {
            color: #555555;
            margin-bottom: 15px;
            line-height: 1.5;
        }

        .scenario-risk-level {
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: bold;
            text-transform: uppercase;
            display: inline-block;
        }

        .scenario-risk-level.critical {
            background: rgba(244, 67, 54, 0.1);
            color: #b93e35;
            border: 1px solid rgba(244, 67, 54, 0.3);
        }

        .scenario-risk-level.high {
            background: rgba(255, 87, 34, 0.1);
            color: #ff5722;
            border: 1px solid rgba(255, 87, 34, 0.3);
        }

        .scenario-risk-level.medium {
            background: rgba(255, 193, 7, 0.1);
            color: #ffc107;
            border: 1px solid rgba(255, 193, 7, 0.3);
        }

        .risk-result {
            background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            margin-top: 20px;
        }

        .risk-score {
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 10px;
        }

        /* Checklist Integration */
        .checklist-section {
            padding: 100px 0;
            background: #ffffff;
        }

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

        .checklist-phases {
            display: grid;
            gap: 30px;
        }

        .checklist-phase {
            background: #ffffff;
            border-radius: 15px;
            padding: 30px;
            border: 1px solid #e9ecef;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .phase-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            cursor: pointer;
        }

        .phase-title {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--secondary-color);
        }

        .phase-progress {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 5px 15px;
            font-size: 0.9rem;
            color: #555555;
        }

        .checklist-items {
            display: none;
        }

        .checklist-items.expanded {
            display: block;
        }

        .checklist-item {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #e9ecef;
            color: #333333;
        }

        .checklist-item:last-child {
            border-bottom: none;
        }

        .checklist-item input[type="checkbox"] {
            margin-right: 15px;
            transform: scale(1.2);
            cursor: pointer;
        }

        .checklist-item label {
            flex: 1;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .checklist-item.completed label {
            text-decoration: line-through;
            opacity: 0.6;
        }

        /* Architecture Diagram Section */
        .architecture-section {
            padding: 100px 0;
            background: #ffffff;
        }

        .architecture-container {
            max-width: 1400px;
            margin: 0 auto;
            margin-top: 40px;
        }

        .architecture-diagram-frame {
            background: linear-gradient(135deg, rgba(137, 54, 222, 0.05), rgba(23, 162, 184, 0.05));
            border: 2px solid rgba(137, 54, 222, 0.2);
            border-radius: 25px;
            padding: 30px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        .architecture-diagram-frame::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--secondary-color), var(--accent-color), var(--secondary-color));
            border-radius: 25px 25px 0 0;
        }

        .custom-architecture-diagram {
            display: flex;
            flex-direction: row;
            gap: 20px;
            align-items: stretch;
            justify-content: space-between;
            min-height: 400px;
        }

        .architecture-layer {
            background: rgba(255, 255, 255, 0.8);
            border: 2px solid transparent;
            border-radius: 15px;
            padding: 20px;
            transition: all 0.3s ease;
            position: relative;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .architecture-layer.user-layer {
            background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.05));
            border-color: rgba(255, 107, 107, 0.3);
        }

        .architecture-layer.app-layer {
            background: linear-gradient(135deg, rgba(255, 235, 59, 0.1), rgba(255, 235, 59, 0.05));
            border-color: rgba(255, 235, 59, 0.3);
        }

        .architecture-layer.model-layer {
            background: linear-gradient(135deg, rgba(137, 54, 222, 0.1), rgba(137, 54, 222, 0.05));
            border-color: rgba(137, 54, 222, 0.3);
        }

        .architecture-layer.infra-layer {
            background: linear-gradient(135deg, rgba(23, 162, 184, 0.1), rgba(23, 162, 184, 0.05));
            border-color: rgba(23, 162, 184, 0.3);
        }

        .architecture-layer.data-layer {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
            border-color: rgba(76, 175, 80, 0.3);
        }

        .layer-header {
            margin-bottom: 15px;
            text-align: center;
        }

        .layer-title {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--secondary-color);
            margin-bottom: 5px;
        }

        .layer-description {
            font-size: 0.9rem;
            color: #666;
            opacity: 0.8;
        }

        .layer-components {
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1;
        }

        .flow-arrows {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 60px;
        }

        .flow-arrows.horizontal {
            align-self: center;
        }

        .arrow-down i {
            font-size: 1.5rem;
            color: var(--secondary-color);
            opacity: 0.7;
        }

        .arrow-right i {
            font-size: 1.5rem;
            color: var(--secondary-color);
            opacity: 0.7;
        }

        .component-box {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(137, 54, 222, 0.2);
            border-radius: 10px;
            padding: 12px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .component-box:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(137, 54, 222, 0.2);
            border-color: var(--secondary-color);
            background: rgba(137, 54, 222, 0.05);
        }

        .component-box i {
            font-size: 1.3rem;
            color: var(--secondary-color);
            margin-bottom: 6px;
            display: block;
        }

        .component-box span {
            font-size: 0.8rem;
            font-weight: 500;
            color: #333;
            line-height: 1.2;
        }

        .architecture-info {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 30px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            margin-bottom: 30px;
        }

        .architecture-info h3 {
            color: var(--secondary-color);
            margin-bottom: 20px;
            font-size: 1.5rem;
        }

        .architecture-info p {
            margin-bottom: 30px;
            line-height: 1.6;
            opacity: 0.9;
        }

        .architecture-instructions {
            display: grid;
            gap: 20px;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        }

        .instruction-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: rgba(137, 54, 222, 0.1);
            border-radius: 10px;
            border-left: 4px solid var(--secondary-color);
        }

        .instruction-item i {
            color: var(--accent-color);
            font-size: 1.2rem;
            min-width: 20px;
        }

        .instruction-item span {
            font-size: 0.95rem;
            line-height: 1.4;
        }

        .layer-legend {
            display: grid;
            gap: 15px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .legend-item:hover {
            background: rgba(255, 255, 255, 0.08);
            transform: translateX(5px);
        }

        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            flex-shrink: 0;
            border: 2px solid;
        }

        .legend-color.user-layer {
            background: linear-gradient(45deg, #e1f5fe, #b3e5fc);
            border-color: #01579b;
        }

        .legend-color.app-layer {
            background: linear-gradient(45deg, #f3e5f5, #e1bee7);
            border-color: #4a148c;
        }

        .legend-color.model-layer {
            background: linear-gradient(45deg, #e8f5e8, #c8e6c8);
            border-color: #1b5e20;
        }

        .legend-color.infra-layer {
            background: linear-gradient(45deg, #fff3e0, #ffe0b2);
            border-color: #e65100;
        }

        .legend-color.data-layer {
            background: linear-gradient(45deg, #fce4ec, #f8bbd9);
            border-color: #880e4f;
        }

        .legend-item span {
            font-size: 0.95rem;
            line-height: 1.4;
        }

        /* Mobile Navigation Toggle */
        .nav-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            padding: 10px;
        }

        .nav-toggle span {
            width: 25px;
            height: 3px;
            background: var(--secondary-color);
            margin: 3px 0;
            transition: 0.3s;
            border-radius: 2px;
        }

        .nav-toggle.active span:nth-child(1) {
            transform: rotate(-45deg) translate(-5px, 6px);
        }

        .nav-toggle.active span:nth-child(2) {
            opacity: 0;
        }

        .nav-toggle.active span:nth-child(3) {
            transform: rotate(45deg) translate(-5px, -6px);
        }

        /* Comprehensive Responsive Design */
        @media (max-width: 1200px) {
            .container {
                padding: 0 15px;
            }
            
            .hero-content h1 {
                font-size: 3.5rem;
            }
            
            .tour-steps {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
                gap: 20px;
            }
        }

        @media (max-width: 992px) {
            .framework-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px;
            }
            
            .matrix-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }
            
            .risk-grid {
                font-size: 0.8rem;
            }
            
            .architecture-diagram {
                padding: 15px;
            }
        }

        @media (max-width: 768px) {
            /* Navigation - Higher specificity */
            .header .nav .nav-toggle {
                display: flex !important;
            }
            
            .header .nav .nav-links {
                position: absolute !important;
                top: 100% !important;
                left: 0 !important;
                width: 100% !important;
                background: rgba(255, 255, 255, 0.98) !important;
                backdrop-filter: blur(10px) !important;
                flex-direction: column !important;
                gap: 0 !important;
                max-height: 0 !important;
                overflow: hidden !important;
                transition: max-height 0.3s ease !important;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
                border-radius: 0 0 15px 15px !important;
                z-index: 999 !important;
                opacity: 0 !important;
                visibility: hidden !important;
            }
            
            .header .nav .nav-links.active {
                max-height: 500px !important;
                opacity: 1 !important;
                visibility: visible !important;
            }
            
            .header .nav .nav-links a {
                padding: 15px 20px;
                border-radius: 0;
                border-bottom: 1px solid rgba(137, 54, 222, 0.1);
            }
            
            .header .nav .nav-links a:last-child {
                border-bottom: none;
            }

            /* Hero Section */
            .hero {
                height: 80vh;
                padding: 20px;
            }
            
            .hero-content h1 {
                font-size: 2.5rem;
                line-height: 1.2;
            }
            
            .hero-content p {
                font-size: 1.2rem;
                margin-bottom: 25px;
            }
            
            .cta-button {
                padding: 12px 30px;
                font-size: 1rem;
            }

            /* Framework Grid */
            .framework-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .framework-card {
                padding: 20px;
            }
            
            .framework-card h3 {
                font-size: 1.2rem;
            }

            /* Attack Surface */
            .attack-diagram {
                flex-direction: column;
                gap: 15px;
            }
            
            .attack-layer {
                min-height: 120px;
                padding: 20px;
            }

            /* Control Matrix */
            .matrix-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .matrix-item {
                padding: 15px;
            }

            /* Interactive Tour */
            .tour-steps {
                grid-template-columns: 1fr;
                gap: 15px;
                margin: 30px 0;
            }
            
            .tour-step {
                padding: 20px;
            }
            
            .tour-controls {
                flex-direction: column;
                gap: 10px;
            }
            
            .tour-control-btn {
                width: 100%;
                padding: 12px;
            }

            /* Risk Matrix */
            .risk-matrix-container {
                padding: 10px;
            }
            
            .risk-controls {
                flex-direction: column;
                gap: 5px;
            }
            
            .risk-control-btn {
                width: 100%;
                padding: 10px;
                font-size: 0.9rem;
            }
            
            .risk-grid {
                font-size: 0.7rem;
                gap: 2px;
            }
            
            .risk-header {
                padding: 8px 4px;
                font-size: 0.7rem;
            }
            
            .risk-cell {
                padding: 8px 4px;
                font-size: 0.8rem;
            }
            
            .scenario-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .calculator-row {
                flex-direction: column;
                gap: 15px;
            }

            /* Architecture */
            .architecture-container {
                padding: 10px;
            }
            
            .custom-architecture-diagram {
                flex-direction: column;
                gap: 15px;
            }
            
            .architecture-layer {
                min-height: auto;
                padding: 15px;
            }
            
            .layer-components {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .component-box {
                min-width: auto;
                padding: 12px;
                font-size: 0.9rem;
            }
            
            .flow-arrows {
                transform: rotate(90deg);
                margin: 10px 0;
            }

            /* Architecture Info */
            .architecture-instructions {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            
            .instruction-item {
                padding: 10px;
                text-align: center;
            }

            /* Resources */
            .resource-card {
                padding: 20px;
                margin: 10px 0;
            }
            
            .resource-card h3 {
                font-size: 1.1rem;
            }
            
            .resource-card p {
                font-size: 0.9rem;
            }
            
            .resource-card > div {
                flex-direction: column;
                gap: 8px;
            }
            
            .resource-btn {
                width: 100%;
                justify-content: center;
                padding: 10px 16px;
            }

            /* Checklist */
            .checklist-container {
                padding: 10px;
            }
        }

        @media (max-width: 480px) {
            /* Extra small devices */
            .container {
                padding: 0 10px;
            }
            
            .hero-content h1 {
                font-size: 2rem;
            }
            
            .hero-content p {
                font-size: 1rem;
            }
            
            .section-title {
                font-size: 2rem;
                margin-bottom: 20px;
            }
            
            .framework-card {
                padding: 15px;
            }
            
            .tour-step {
                padding: 15px;
            }
            
            .risk-grid {
                font-size: 0.6rem;
            }
            
            .risk-header {
                padding: 6px 2px;
                font-size: 0.6rem;
            }
            
            .risk-cell {
                padding: 6px 2px;
                font-size: 0.7rem;
            }
            
            .component-box {
                padding: 10px;
                font-size: 0.8rem;
            }
            
            .resource-card {
                padding: 15px;
            }
            
            .modal-content {
                margin: 5% auto;
                padding: 15px;
                width: 95%;
            }
        }

        /* Touch-friendly improvements */
        @media (hover: none) and (pointer: coarse) {
            .framework-card,
            .matrix-item,
            .tour-step,
            .component-box,
            .resource-card,
            .scenario-card,
            .risk-cell {
                min-height: 44px; /* Minimum touch target size */
            }
            
            .nav-links a,
            .cta-button,
            .resource-btn,
            .tour-control-btn,
            .risk-control-btn {
                min-height: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            /* Remove hover effects on touch devices */
            .framework-card:hover,
            .matrix-item:hover,
            .component-box:hover,
            .resource-card:hover {
                transform: none;
            }
            
            /* Add touch feedback */
            .framework-card:active,
            .matrix-item:active,
            .component-box:active,
            .resource-card:active,
            .tour-step:active {
                transform: scale(0.98);
                transition: transform 0.1s ease;
            }
        }

        /* Improve text readability on mobile */
        @media (max-width: 768px) {
            body {
                font-size: 16px; /* Prevent zoom on iOS */
                line-height: 1.6;
            }
            
            input, select, textarea {
                font-size: 16px; /* Prevent zoom on iOS */
            }
            
            /* Improve spacing for touch */
            .nav-links a {
                padding: 15px 20px;
                margin: 0;
            }
            
            .framework-card,
            .matrix-item,
            .tour-step {
                margin-bottom: 10px;
            }
        }

        .diagram-tools {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 40px;
        }

        .tool-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 20px;
            text-align: left;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .tool-card h4 {
            color: var(--secondary-color);
            margin-bottom: 10px;
        }

        /* Interactive Tour */
        .interactive-tour {
            padding: 100px 0;
            background: #ffffff;
            text-align: center;
        }

        .tour-steps {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            margin: 50px 0;
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
        }

        .tour-step {
            background: #ffffff;
            border: 2px solid #e9ecef;
            border-radius: 15px;
            padding: 25px;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .tour-step.active {
            border-color: var(--secondary-color);
            background: linear-gradient(135deg, #f8f9fa 0%, #e8f2ff 100%);
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 15px 40px rgba(137, 54, 222, 0.4);
            border-width: 2px;
        }

        .tour-step.completed {
            border-color: var(--accent-color);
            background: linear-gradient(135deg, #f0fcfd 0%, #e0f7fa 100%);
            border-width: 2px;
        }

        .tour-step.locked {
            opacity: 0.6;
            cursor: not-allowed;
            border-color: rgba(255, 255, 255, 0.2);
        }

        .step-icon {
            font-size: 2.5rem;
            color: var(--secondary-color);
            margin-bottom: 15px;
            transition: all 0.3s ease;
        }

        .tour-step:hover .step-icon {
            transform: scale(1.2) rotate(10deg);
            color: var(--accent-color);
        }

        .tour-step-number {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--secondary-color) 0%, #6a2d9f 100%);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1.2rem;
            box-shadow: 0 4px 12px rgba(137, 54, 222, 0.3);
            transition: all 0.3s ease;
        }

        .tour-step.active .tour-step-number {
            background: linear-gradient(135deg, var(--accent-color) 0%, #138496 100%);
            box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
            animation: pulse 2s infinite;
        }

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

        .tour-step.completed .tour-step-number {
            background: linear-gradient(135deg, var(--secondary-color) 0%, #6a2d9f 100%);
            box-shadow: 0 4px 12px rgba(137, 54, 222, 0.3);
        }

        .tour-step-title {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--secondary-color);
            margin-bottom: 10px;
            text-align: left;
        }

        .step-description {
            font-size: 0.95rem;
            color: #555555;
            line-height: 1.4;
            margin-bottom: 15px;
            text-align: left;
        }

        .step-status {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(137, 54, 222, 0.3);
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 500;
            color: #ffffff;
            align-self: flex-start;
        }

        .tour-step.completed .step-status {
            background: rgba(23, 162, 184, 0.3);
        }

        .tour-step.locked .step-status {
            background: rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.6);
        }

        /* Progress Bar */
        .tour-progress-bar {
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
            margin-bottom: 30px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
            width: 0%;
            transition: width 0.5s ease;
            border-radius: 3px;
        }

        /* Tour Controls */
        .tour-controls {
            text-align: center;
            margin-top: 40px;
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .tour-control-btn {
            background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
            border: none;
            padding: 12px 25px;
            border-radius: 30px;
            color: white;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .tour-control-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(137, 54, 222, 0.4);
        }

        /* Animated step entrance */
        .animated-step {
            animation: slideInUp 0.6s ease-out;
        }

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

        /* Pulse animation for active step */
        .tour-step.active::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, var(--secondary-color), var(--accent-color), var(--secondary-color));
            border-radius: 22px;
            z-index: -1;
            animation: pulse-border 2s infinite;
        }

        @keyframes pulse-border {
            0% { opacity: 0.5; }
            50% { opacity: 1; }
            100% { opacity: 0.5; }
        }


        /* Modal overlay */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 30, 60, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Modal content */
.modal-content {
    background: #23234a;
    border-radius: 20px;
    padding: 30px;
    max-width: 95vw;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
}

/* Responsive grid inside modal */
#methodology-guide-content,
#testing-tools-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 10px;
        max-width: 99vw;
    }
    #methodology-guide-content,
    #testing-tools-content {
        padding: 0;
        max-width: 100vw;
    }
}

        /* Footer */
        .footer {
            padding: 50px 0;
            background: #f8f9fa;
            text-align: center;
            border-top: 1px solid #e9ecef;
        }

        .footer p {
            color: #555555;
            opacity: 0.8;
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
        }

        .modal-content {
            background: #ffffff;
            margin: 5% auto;
            padding: 40px;
            border-radius: 15px;
            width: 80%;
            max-width: 600px;
            position: relative;
            border: 1px solid #e9ecef;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            color: #333333;
        }

        .close {
            position: absolute;
            right: 20px;
            top: 20px;
            font-size: 28px;
            font-weight: bold;
            color: var(--secondary-color);
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .close:hover {
            color: var(--accent-color);
        }

        .modal-content h2, .modal-content h3, .modal-content h4 {
            color: var(--secondary-color);
        }

        .modal-content p, .modal-content li {
            color: #333333;
        }

        .modal-content a {
            color: var(--secondary-color);
        }

        .modal-content a:hover {
            color: var(--accent-color);
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .hero-content h1 {
                font-size: 2.5rem;
            }
            
            .hero-content p {
                font-size: 1.2rem;
            }
            
            .framework-grid {
                grid-template-columns: 1fr;
            }
            
            .attack-diagram {
                flex-direction: column;
            }
            
            .attack-layer {
                margin: -20px 0;
            }
            
            .matrix-grid {
                grid-template-columns: 1fr;
            }
            
            .tour-steps {
                flex-direction: column;
                align-items: center;
            }
        }

/* --- Architecture Diagram Interactive Enhancements --- */

/* Architecture Layer Transitions */
.architecture-layer {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.component-box {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.component-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
}

.legend-item {
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.legend-item:hover {
    background-color: rgba(79, 172, 254, 0.2);
    transform: translateX(10px);
}

/* Connection line animations */
.connection-line {
    transition: stroke-width 0.3s ease, opacity 0.3s ease;
}

.connection-line.highlighted {
    stroke-width: 3;
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Modal content styling for architecture details */
.modal-content h3 {
    color: var(--secondary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-content ul {
    margin-left: 20px;
}

.modal-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.modal-content strong {
    color: var(--secondary-color);
}

/* Flow arrows between architecture layers */
.flow-arrows {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.arrow-down {
    color: var(--secondary-color);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-architecture-diagram {
        flex-direction: column;
        gap: 15px;
    }

    .flow-arrows.horizontal {
        display: none;
    }

    .flow-arrows:not(.horizontal) {
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }

    .architecture-diagram-frame {
        padding: 20px;
    }

    .layer-components {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .component-box {
        flex: 1;
        min-width: 120px;
    }

    .attack-diagram {
        flex-direction: column;
        gap: 20px;
    }

    .attack-layer {
        width: 250px;
        height: 250px;
    }
}

/* CRITICAL: Mobile Navigation Fix - Highest Priority */
@media (max-width: 768px) {
    /* Ensure nav-links has id-based specificity */
    nav #nav-links {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background-color: #fff !important;
        border-top: 1px solid #ddd !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
        z-index: 9999 !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Show when active - highest specificity */
    nav #nav-links.active {
        display: flex !important;
        animation: mobileSlideDown 0.3s ease;
    }
    
    nav #nav-links.active li {
        width: 100% !important;
        border-bottom: 1px solid #eee !important;
    }
    
    nav #nav-links.active li a {
        display: block !important;
        padding: 15px 20px !important;
        color: #333 !important;
        text-decoration: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    nav #nav-links.active li a:hover {
        background-color: #f5f5f5 !important;
    }
    
    @keyframes mobileSlideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
