/**
 * Timeline Module - Clean Minimal Design Matching Reference Image
 */

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

: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;
}

/* 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;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    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: 8px 16px;
    border: 1px solid var(--color-border-light);
    text-decoration: none;
    font-size: 14px;
    z-index: 10000;
    border-radius: 4px;
    transition: all 0.2s;
}

.back-link:hover {
    border-color: var(--color-border);
    opacity: 0.8;
}

/* Timeline Page Container */
.timeline-page {
    padding: 40px 60px;
    min-height: 100vh;
}

/* Header */
.timeline-header {
    text-align: center;
    margin-bottom: 200px;
    padding-bottom: 20px;
    padding-top: 20px;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 100;
    background-color: var(--color-bg);
}

.timeline-header h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--color-text);
}

.template-badge {
    display: none;
}

/* Timeline Visual Container */
.timeline-visual {
    position: relative;
    width: 100%;
    height: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Timeline Horizontal Line */
.timeline-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background-color: var(--color-border);
    transform: translateY(-50%);
    z-index: 1;
}

/* Year Boxes Container */
.years-container {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

/* Individual Year Box */
.year-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
}

/* Year Box */
.year-box {
    background-color: var(--color-bg);
    border: 3px solid var(--color-border);
    border-radius: 12px;
    padding: 16px 28px;
    min-width: 140px;
    text-align: center;
    position: relative;
    z-index: 3;
    margin-top: 0;
}

.year-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
}

/* Year Label Below Box - Hidden */
.year-label {
    display: none;
}

/* Connection Dot - Hidden */
.connection-dot {
    display: none;
}

/* Color Classes - All colors removed */

/* Callout Boxes */
.callout-box {
    position: absolute;
    background-color: transparent;
    border: none;
    padding: 16px;
    width: 240px;
    z-index: 5;
}

.callout-top {
    bottom: calc(100% + 60px);
    left: 50%;
    transform: translateX(-50%);
}

.callout-bottom {
    top: calc(100% + 60px);
    left: 50%;
    transform: translateX(-50%);
}

/* Callout Connector Line */
.callout-connector {
    position: absolute;
    width: 2px;
    background-color: var(--color-border);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.callout-top .callout-connector {
    top: 100%;
    height: 60px;
}

.callout-bottom .callout-connector {
    bottom: 100%;
    height: 60px;
}

/* Callout Header - Hidden */
.callout-header {
    display: none;
}

/* Initiatives List */
.initiatives-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.initiative-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    transition: transform 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

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

.initiative-item:hover {
    transform: translateX(2px);
}

.initiative-badge {
    flex-shrink: 0;
    width: 28px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
    margin-top: 2px;
}

.initiative-badge.p1 {
    background-color: #3498db;
}

.initiative-badge.p2 {
    background-color: #27ae60;
}

.initiative-badge.p3 {
    background-color: #9b59b6;
}

.initiative-title {
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-accent);
}

.initiative-placeholder {
    font-size: 12px;
    color: var(--color-text-light);
    font-style: italic;
    text-align: center;
    padding: 8px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--color-bg);
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.modal-header {
    padding: 32px;
    padding-right: 60px;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
    color: var(--color-text);
}

.modal-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-badge {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    color: #fff;
}

.modal-badge.p1 {
    background-color: #3498db;
}

.modal-badge.p2 {
    background-color: #27ae60;
}

.modal-badge.p3 {
    background-color: #9b59b6;
}

.modal-year {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--color-border-light);
    color: var(--color-accent);
    border-radius: 4px;
}

.modal-priority {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    border-radius: 4px;
}

.modal-priority.critical {
    background-color: #e74c3c;
}

.modal-priority.high {
    background-color: #f39c12;
}

.modal-priority.medium {
    background-color: #3498db;
}

.modal-priority.low {
    background-color: #95a5a6;
}

.modal-body {
    padding: 32px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.modal-section p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-accent);
}

.budget-amount {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
}

/* Timeline Legend */
.timeline-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 100px;
    padding-top: 40px;
    padding-bottom: 40px;
    border-top: 1px solid #e0e0e0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
}

.legend-badge.p1 {
    background-color: #3498db;
}

.legend-badge.p2 {
    background-color: #27ae60;
}

.legend-badge.p3 {
    background-color: #9b59b6;
}

.legend-text {
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 400;
}

/* Responsive */
@media (max-width: 1400px) {
    .timeline-visual {
        height: 600px;
    }
    
    .callout-box {
        width: 200px;
        font-size: 11px;
    }
    
    .year-box {
        min-width: 120px;
        padding: 12px 20px;
    }
    
    .year-text {
        font-size: 28px;
    }
}

@media (max-width: 1024px) {
    .timeline-page {
        padding: 20px;
    }
    
    .timeline-visual {
        height: auto;
        min-height: 800px;
    }
    
    .timeline-line {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        height: auto;
        transform: translateX(-50%);
    }
    
    .years-container {
        position: relative;
        flex-direction: column;
        gap: 120px;
        left: 0;
        right: 0;
        transform: none;
        padding: 40px 0;
    }
    
    .callout-box {
        position: relative;
        margin: 16px 0;
    }
    
    .callout-top,
    .callout-bottom {
        position: relative;
        transform: none;
        left: 0;
        top: 0;
        bottom: 0;
    }
    
    .callout-connector {
        display: none;
    }
}

/* ============================================
   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: 1rem;
    z-index: 10001;
}

.dark-mode-toggle {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    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: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    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 0.15s ease;
}

.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: 0.5rem;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.15s ease;
}

.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: 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    border-bottom: 1px solid var(--color-border-light);
    transition: all 0.15s ease;
}

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

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