/* ========================================
   Horizon 2026 - Advanced Features Styling
   3D Timeline, World Map, Newsletter Modal
   ======================================== */

/* ========================================
   3D Interactive Timeline
   ======================================== */

#timeline3d-container {
    padding: 4rem 0;
    background: linear-gradient(135deg, 
        rgba(26, 35, 126, 0.05) 0%, 
        rgba(0, 188, 212, 0.05) 100%);
}

.timeline-3d-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
    position: relative;
    transition: transform 0.1s ease;
}

.timeline-3d-track {
    position: relative;
    height: 8px;
    background: rgba(0, 188, 212, 0.2);
    border-radius: 10px;
    margin: 4rem 0;
    overflow: visible;
}

.timeline-3d-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-bright-cyan), var(--color-golden));
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.5);
}

.timeline-3d-glow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--color-golden);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    transition: left 1s ease;
}

.timeline-3d-glow.glow-pulse {
    animation: glowPulse 2s ease-in-out;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
    50% { box-shadow: 0 0 60px rgba(255, 215, 0, 1); transform: translateY(-50%) scale(1.5); }
}

.timeline-3d-milestones {
    position: relative;
}

.timeline-milestone {
    position: absolute;
    transform: translateX(-50%) translateY(0);
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.timeline-milestone:hover {
    z-index: 10;
}

.milestone-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-milestone:hover .milestone-marker {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.milestone-content {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.timeline-milestone:hover .milestone-content,
.timeline-milestone.expanded .milestone-content {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(10px);
}

.timeline-milestone.current .milestone-content {
    border-color: var(--color-golden);
}

.milestone-date {
    font-size: 0.85rem;
    color: var(--color-medium-gray);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.milestone-title {
    font-size: 1.1rem;
    color: var(--color-deep-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.milestone-description {
    font-size: 0.9rem;
    color: var(--color-dark-gray);
    line-height: 1.5;
}

.milestone-badge {
    margin-top: 0.5rem;
    padding: 0.3rem 0.8rem;
    background: var(--color-success);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.milestone-badge.current-badge {
    background: var(--color-golden);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.milestone-beam {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-bright-cyan), transparent);
    opacity: 0.5;
}

.timeline-milestone.pulse .milestone-marker {
    animation: markerPulse 1s ease;
}

@keyframes markerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.timeline-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-medium-gray);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-deep-blue), var(--color-bright-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Animated World Map
   ======================================== */

#world-map-container {
    padding: 4rem 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(26, 35, 126, 0.9) 100%);
    color: white;
}

.world-map-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.map-header {
    text-align: center;
    margin-bottom: 2rem;
}

.map-header h3 {
    font-size: 2.5rem;
    color: var(--color-golden);
    margin-bottom: 1rem;
}

.map-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.map-stat {
    text-align: center;
}

.map-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-golden);
    margin-bottom: 0.25rem;
}

.map-stat .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.world-map-svg {
    background: radial-gradient(circle at center, rgba(0, 188, 212, 0.1), transparent);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.map-canvas {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 188, 212, 0.3));
}

.marker-group {
    cursor: pointer;
    transition: all 0.3s ease;
}

.marker-group:hover {
    transform: scale(1.1);
}

.marker-group.active .marker-circle {
    filter: url(#glow) drop-shadow(0 0 10px currentColor);
}

.marker-glow.ping {
    animation: pingAnimation 2s ease-out;
}

@keyframes pingAnimation {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

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

@keyframes lineFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 10; }
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

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

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

.region-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 120px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.region-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.region-info h4 {
    color: var(--color-golden);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.info-value {
    color: var(--color-bright-cyan);
    font-weight: 700;
}

.special-note {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.2);
    border-left: 3px solid var(--color-golden);
    border-radius: 4px;
}

/* ========================================
   Newsletter Modal
   ======================================== */

.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.newsletter-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.newsletter-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: var(--color-dark-gray);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--color-deep-blue), var(--color-bright-cyan));
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-body {
    padding: 2rem;
}

.email-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 188, 212, 0.1);
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-bright-cyan);
}

.email-display i {
    font-size: 1.5rem;
    color: var(--color-bright-cyan);
}

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

.preference-section h4 {
    color: var(--color-deep-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.preference-options,
.preference-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preference-option,
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preference-option:hover,
.checkbox-option:hover {
    background: rgba(0, 188, 212, 0.05);
    border-color: var(--color-bright-cyan);
}

.preference-option input:checked ~ .option-label,
.checkbox-option input:checked ~ span {
    color: var(--color-deep-blue);
    font-weight: 600;
}

.option-label {
    flex: 1;
}

.option-label strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.option-label small {
    color: var(--color-medium-gray);
}

.checked-animation {
    animation: checkPulse 0.3s ease;
}

@keyframes checkPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
}

.modal-footer button {
    flex: 1;
}

.modal-privacy {
    padding: 0 2rem 2rem;
    text-align: center;
    color: var(--color-medium-gray);
}

/* ========================================
   Validation States
   ======================================== */

input.error {
    border-color: var(--color-error) !important;
    background: rgba(244, 67, 54, 0.05);
}

.validation-error {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-error::before {
    content: '⚠';
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ========================================
   Success Notification
   ======================================== */

.success-notification {
    position: fixed;
    bottom: -200px;
    right: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    max-width: 400px;
    z-index: 10001;
    transition: bottom 0.3s ease;
    border-left: 4px solid var(--color-golden);
}

.success-notification.show {
    bottom: 2rem;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.notification-icon {
    font-size: 2rem;
    color: var(--color-golden);
    animation: notificationSpin 0.6s ease;
}

@keyframes notificationSpin {
    from { transform: rotate(0deg) scale(0); }
    to { transform: rotate(360deg) scale(1); }
}

.notification-text h4 {
    color: var(--color-deep-blue);
    margin-bottom: 0.5rem;
}

.notification-text p {
    color: var(--color-dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.pledge-note {
    color: var(--color-golden);
    font-weight: 600;
}

.notification-close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    .timeline-3d-wrapper {
        padding: 1.5rem;
    }
    
    .milestone-content {
        min-width: 150px;
        font-size: 0.9rem;
    }
    
    .timeline-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .map-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .map-legend {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .success-notification {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}
