/* 
 * DAMA Wheel - Module 4.2
 * Interactive DAMA Wheel Infographic
 * Minimal black and white aesthetic
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */

:root {
    /* Light Theme Colors */
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-text-secondary: #666666;
    --color-text-light: #999999;
    --color-border: #000000;
    --color-border-light: #cccccc;
    --color-accent: #333333;
    
    /* Typography */
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --color-bg: #1a2332;
    --color-text: #ffffff;
    --color-text-secondary: #b8c4d4;
    --color-text-light: #8a9db3;
    --color-border: #ffffff;
    --color-border-light: #4a5a6e;
    --color-accent: #e0e6ed;
}

/* Legacy color variables for backward compatibility */
:root {
    --color-black: var(--color-text);
    --color-white: var(--color-bg);
    --color-gray-dark: var(--color-accent);
    --color-gray-medium: var(--color-text-secondary);
    --color-gray-light: var(--color-text-light);
    --color-gray-ultralight: var(--color-border-light);
}

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

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: -0.02em;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   BACK LINK
   ============================================ */

.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--color-bg);
    color: var(--color-text);
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--color-border);
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 10000;
    transition: all var(--transition-fast);
    font-weight: 300;
}

.back-link:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.dama-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.dama-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.dama-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--color-gray-medium);
    font-weight: 300;
}

/* ============================================
   WHEEL VISUALIZATION
   ============================================ */

.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-xl) 0;
}

#dama-wheel {
    max-width: 800px;
    width: 100%;
    height: auto;
}

/* Center circle styling */
.center-circle {
    fill: #ffffff;
    stroke: var(--color-border);
    stroke-width: 2;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.center-circle:hover {
    fill: #f5f5f5;
    stroke-width: 3;
}

.center-circle.active {
    fill: #e8e8e8;
    stroke-width: 4;
}

.center-text-top,
.center-text-bottom {
    fill: #000000;
    font-size: 18px;
    font-weight: 700;
    text-anchor: middle;
    font-family: var(--font-primary);
}

.center-text-large {
    fill: #000000;
    font-size: 16px;
    font-weight: 700;
    text-anchor: middle;
    font-family: var(--font-primary);
}

/* Wheel segment styling */
.wheel-segment {
    stroke: #ffffff;
    stroke-width: 2;
    cursor: pointer;
    transition: all var(--transition-medium);
    opacity: 0.9;
}

.wheel-segment:hover {
    opacity: 1;
    filter: brightness(1.1);
    stroke-width: 3;
}

.wheel-segment.active {
    opacity: 1;
    filter: brightness(1.2);
}

.segment-label {
    fill: var(--color-white);
    font-size: 14px;
    font-weight: 400;
    text-anchor: middle;
    pointer-events: none;
    font-family: var(--font-primary);
}

.segment-abbr {
    fill: var(--color-text);
    font-size: 16px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
    font-family: var(--font-primary);
}

/* ============================================
   DETAIL PANEL
   ============================================ */

.detail-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    padding: var(--spacing-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.detail-panel.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-btn:hover {
    color: var(--color-text-secondary);
}

.detail-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    padding-right: 40px;
}

/* Maturity Indicator */
.maturity-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--color-border-light);
}

.maturity-label {
    font-size: 0.9rem;
    color: var(--color-gray-medium);
    font-weight: 300;
}

.maturity-level {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-black);
}

.maturity-arrow {
    font-size: 1.5rem;
    color: var(--color-gray-medium);
}

/* Detail Sections */
.detail-section {
    margin-bottom: var(--spacing-lg);
}

.detail-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-black);
}

.detail-section p {
    font-size: 1rem;
    color: var(--color-gray-dark);
    line-height: 1.8;
    font-weight: 300;
}

#initiatives-list {
    list-style: none;
    padding-left: 0;
}

#initiatives-list li {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    border-left: 3px solid var(--color-border);
    padding-left: var(--spacing-md);
    font-size: 0.95rem;
    color: var(--color-accent);
    font-weight: 300;
}

#initiatives-list li strong {
    color: var(--color-text);
    font-weight: 700;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .dama-header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .detail-panel {
        width: 95%;
        padding: var(--spacing-md);
    }
    
    .detail-content h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   VIDEO MODAL
   ============================================ */

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal.hidden {
    display: none;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 2;
    animation: videoModalSlideIn 0.3s ease-out;
}

@keyframes videoModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--color-bg);
    font-size: 2.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    z-index: 3;
}

.video-modal-close:hover {
    color: var(--color-border-light);
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive video modal */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
    }
    
    .video-modal-close {
        top: -35px;
        font-size: 2rem;
    }
}

/* ============================================
   HAMBURGER MENU & DARK MODE TOGGLE
   ============================================ */

.header-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    z-index: 10001;
}

.dark-mode-toggle {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    border-radius: 4px;
}

.dark-mode-toggle:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.hamburger-menu {
    position: relative;
}

.hamburger-button {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.hamburger-button:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

.hamburger-button.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-button.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-top: var(--spacing-xs);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[data-theme="dark"] .nav-menu {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-menu-item {
    display: block;
    padding: var(--spacing-sm);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    border-bottom: 1px solid var(--color-border-light);
    transition: all var(--transition-fast);
}

.nav-menu-item:hover {
    background: var(--color-border-light);
    padding-left: calc(var(--spacing-sm) + 5px);
}

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