/* SeaDev Journey Git Graph Styles */

#journey-timeline-container {
    padding: 2rem 0;
    width: 100%;
    position: relative;
}

.journey-vision {
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #6c757d;
    text-align: center;
}

.journey-vision h3 {
    font-size: 1.75rem;
    color: #012970;
    margin-bottom: 1.5rem;
}

.journey-vision blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: #012970;
    margin: 20px auto;
    padding: 30px;
    box-shadow: 0px 0 5px rgba(1, 41, 112, 0.08);
    background: #fff;
    display: inline-block;
    border-radius: 5px;
    text-align: center;
    transition: 0.3s;
}

.journey-vision blockquote:hover {
    box-shadow: 0px 0 30px rgba(1, 41, 112, 0.08);
}

/* Graph Container */
.git-graph-container {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height for the 3 tracks */
    margin-top: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #4154f1 #f1f1f1;
}

.git-graph-container::-webkit-scrollbar {
    height: 8px;
}

.git-graph-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.git-graph-container::-webkit-scrollbar-thumb {
    background: #4154f1;
    border-radius: 4px;
}

.git-graph-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Will be set dynamically by JS */
    height: 100%;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through to nodes */
}

/* Tracks/Rows Labels */
.track-label {
    position: absolute;
    left: 10px;
    font-weight: bold;
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 0;
    pointer-events: none;
}

/* Nodes */
.journey-node {
    position: absolute;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px; /* Fixed width for content centering */
    transform: translateX(-50%); /* Center on the coordinate */
}

.journey-node:hover {
    transform: translateX(-50%) scale(1.05);
    z-index: 10;
}

.node-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #ccc;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
}

.journey-node:hover .node-dot {
    box-shadow: 0 0 0 8px rgba(65, 84, 241, 0.15);
}

.node-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #eee;
    width: 100%;
    transition: all 0.3s ease;
}

.journey-node:hover .node-content {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #d0d0d0;
}

.node-year {
    font-weight: 700;
    font-size: 1rem;
    color: #012970;
    display: block;
    margin-bottom: 6px;
    font-family: "Poppins", sans-serif;
}

.node-title {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Branch Specific Styles */
.branch-gilbert .node-dot {
    border-color: #0dcaf0; /* Cyan/Blue */
    background-color: #fff;
}
.branch-gilbert:hover .node-dot {
    background-color: #0dcaf0;
}
.branch-gilbert .node-year {
    color: #0a98b5;
}

.branch-vincent .node-dot {
    border-color: #fd7e14; /* Orange */
    background-color: #fff;
}
.branch-vincent:hover .node-dot {
    background-color: #fd7e14;
}
.branch-vincent .node-year {
    color: #d66302;
}

.branch-merged .node-dot {
    border-color: #4154f1; /* Main Blue/Purple */
    background-color: #fff;
}
.branch-merged:hover .node-dot {
    background-color: #4154f1;
}
.branch-merged .node-year {
    color: #4154f1;
}

/* Modal Styles */
#journey-modal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#journey-modal .modal-header {
    background: #f6f9ff;
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid #eee;
}

#journey-modal .modal-title {
    color: #012970;
    font-weight: 700;
}

#journey-modal .modal-body {
    padding: 2rem;
    color: #444;
    line-height: 1.6;
}

#journey-modal .modal-body ul {
    padding-left: 1.2rem;
    margin-top: 1rem;
}

#journey-modal .modal-body li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .git-graph-container {
        height: auto;
        overflow-x: hidden;
        margin-top: 20px;
    }
    
    .journey-node {
        position: relative;
        transform: none;
        width: 100%;
        margin-bottom: 20px;
        flex-direction: row;
        left: 0 !important;
        top: 0 !important;
        padding: 0 10px;
    }
    
    .journey-node:hover {
        transform: translateX(5px);
    }
    
    .node-dot {
        margin-right: 20px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .node-content {
        text-align: left;
        width: auto;
        flex: 1;
    }
    
    .git-graph-svg {
        display: none; /* Hide SVG lines on mobile for simple stack */
    }
    
    .track-label {
        display: none;
    }
    
    /* Add a vertical line for mobile view */
    .git-graph-container::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 22px; /* Center of the dot (10px padding + 12px half-width) */
        width: 2px;
        background: #e9ecef;
        z-index: 0;
    }
}
