/* Mobile-First Responsive Design */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px;
    min-height: 100vh;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Header - Mobile First */
.header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.header h1 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.header p {
    font-size: 0.9em;
    color: #7f8c8d;
}

.header > div[style*="background-color"] {
    font-size: 0.85em;
    padding: 10px;
    margin-bottom: 15px;
}

.header a {
    display: inline-block;
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Legend - Mobile First */
.legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
}

.legend-box {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    flex-shrink: 0;
}

/* Path Selector - Mobile First */
.path-selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.path-selector h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    text-align: center;
}

.paths {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.path-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.path-card:hover,
.path-card.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: scale(1.02);
}

.path-card h4 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.path-card p {
    font-size: 0.85em;
    opacity: 0.9;
    margin: 3px 0;
}

/* Markdown Content - Mobile First */
.md-content {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4 {
    color: #2c3e50;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.md-content h1 {
    font-size: 1.5em;
}

.md-content h2 {
    font-size: 1.4em;
}

.md-content h3 {
    font-size: 1.2em;
}

.md-content h4 {
    font-size: 1.1em;
}

.md-content p {
    margin-bottom: 12px;
    font-size: 0.95em;
    color: #555;
}

.md-content ul,
.md-content ol {
    margin-left: 20px;
    margin-bottom: 12px;
    padding-left: 10px;
}

.md-content li {
    margin-bottom: 6px;
    font-size: 0.9em;
}

.md-content pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 12px;
    font-size: 0.85em;
}

.md-content code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85em;
}

/* Stages - Mobile First */
.roadmap {
    position: relative;
}

.stage {
    margin-bottom: 40px;
    position: relative;
}

.stage-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.stage-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.stage-title {
    flex: 1;
}

.stage-title h2 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stage-title p {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Activities - Mobile First */
.activities {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding-left: 0;
}

.activity {
    background: #f8f9fa;
    border-left: 4px solid;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.activity:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.activity.required {
    border-left-color: #e74c3c;
}

.activity.recommended {
    border-left-color: #f39c12;
}

.activity.optional {
    border-left-color: #3498db;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 10px;
}

.activity-title {
    font-size: 1em;
    font-weight: bold;
    color: #2c3e50;
    flex: 1;
}

.activity-badge {
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    text-transform: uppercase;
    font-weight: bold;
    white-space: nowrap;
}

.activity.recommended .activity-badge {
    background: #f39c12;
}

.activity.optional .activity-badge {
    background: #3498db;
}

.activity-description {
    color: #555;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.9em;
}

.activity-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: start;
    gap: 8px;
    font-size: 0.85em;
}

.detail-icon {
    color: #667eea;
    min-width: 18px;
    font-size: 1.1em;
}

.activity-links {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.8em;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1 1 auto;
    min-width: 120px;
}

.link-button:active {
    background: #764ba2;
    transform: translateY(-1px);
}

/* Connector */
.connector {
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 15px;
}

/* Priority Matrix - Mobile First */
.md-content.priority-matrix {
    padding: 15px;
}

.md-content.priority-matrix h2 {
    font-size: 1.3em;
    text-align: center;
    margin-bottom: 15px;
}

.md-content.priority-matrix hr {
    border: none;
    border-top: 2px solid #667eea;
    width: 40px;
    margin: 0 auto 20px auto;
}

.md-content.priority-matrix .tier {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: #333;
}

.md-content.priority-matrix .tier-1 {
    background: #fdecea;
    border-left: 5px solid #e74c3c;
}

.md-content.priority-matrix .tier-2 {
    background: #fff4e5;
    border-left: 5px solid #f39c12;
}

.md-content.priority-matrix .tier-3 {
    background: #e8f0fe;
    border-left: 5px solid #3498db;
}

.md-content.priority-matrix .tier-4 {
    background: #eaeaea;
    border-left: 5px solid #95a5a6;
}

/* ===== TABLET BREAKPOINT (600px+) ===== */
@media (min-width: 600px) {
    body {
        padding: 15px;
    }

    .container {
        border-radius: 15px;
        padding: 25px;
    }

    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1.1em;
    }

    .legend {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .paths {
        grid-template-columns: repeat(2, 1fr);
    }

    .stage-header {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .stage-number {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .stage-title h2 {
        font-size: 1.6em;
    }

    .stage-title p {
        font-size: 1em;
    }

    .activities {
        grid-template-columns: repeat(2, 1fr);
        padding-left: 70px;
    }

    .connector {
        height: 50px;
    }
}

/* ===== DESKTOP BREAKPOINT (900px+) ===== */
@media (min-width: 900px) {
    body {
        padding: 20px;
    }

    .container {
        border-radius: 20px;
        padding: 40px;
    }

    .header {
        margin-bottom: 40px;
        padding-bottom: 30px;
        border-bottom: 4px solid #667eea;
    }

    .header h1 {
        font-size: 3em;
    }

    .header p {
        font-size: 1.3em;
    }

    .legend {
        gap: 30px;
        margin-bottom: 40px;
    }

    .legend-item {
        font-size: 1em;
    }

    .legend-box {
        width: 30px;
        height: 30px;
    }

    .path-selector {
        padding: 30px;
        margin-bottom: 40px;
    }

    .path-selector h3 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .paths {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .path-card {
        padding: 20px;
    }

    .path-card h4 {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .path-card p {
        font-size: 0.9em;
    }

    .path-card:hover {
        transform: scale(1.05);
    }

    .md-content {
        padding: 30px;
        margin-bottom: 40px;
    }

    .md-content h1 {
        font-size: 2em;
    }

    .md-content h2 {
        font-size: 1.8em;
    }

    .md-content h3 {
        font-size: 1.5em;
    }

    .md-content p {
        font-size: 1em;
    }

    .md-content li {
        font-size: 0.95em;
    }

    .stage {
        margin-bottom: 80px;
    }

    .stage-header {
        margin-bottom: 30px;
        gap: 20px;
    }

    .stage-number {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .stage-title h2 {
        font-size: 2em;
    }

    .stage-title p {
        font-size: 1.1em;
    }

    .activities {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 20px;
        padding-left: 80px;
    }

    .activity {
        padding: 20px;
    }

    .activity:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .activity-title {
        font-size: 1.2em;
    }

    .activity-badge {
        font-size: 0.75em;
    }

    .activity-description {
        font-size: 0.95em;
    }

    .detail-row {
        font-size: 0.9em;
    }

    .link-button {
        font-size: 0.9em;
        padding: 8px 15px;
        margin-right: 10px;
        margin-bottom: 10px;
        flex: 0 1 auto;
    }

    .link-button:hover {
        background: #764ba2;
        transform: translateY(-2px);
    }

    .connector {
        width: 4px;
        height: 60px;
        margin-bottom: 20px;
    }

    .md-content.priority-matrix {
        padding: 30px;
    }

    .md-content.priority-matrix h2 {
        font-size: 1.8em;
    }

    .md-content.priority-matrix .tier {
        padding: 20px;
        border-radius: 15px;
        margin-bottom: 20px;
    }

    .md-content.priority-matrix .tier-1 {
        border-left: 6px solid #e74c3c;
    }

    .md-content.priority-matrix .tier-2 {
        border-left: 6px solid #f39c12;
    }

    .md-content.priority-matrix .tier-3 {
        border-left: 6px solid #3498db;
    }

    .md-content.priority-matrix .tier-4 {
        border-left: 6px solid #95a5a6;
    }
}

/* ===== LARGE DESKTOP (1400px+) ===== */
@media (min-width: 1400px) {
    .activities {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .activity:hover {
        transform: none;
    }

    .path-selector,
    .header a {
        display: none;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch-friendly tap targets */
@media (hover: none) {
    .link-button,
    .path-card {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
/**Header top**/
/* Update header-top to handle the spacing */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* New container to group the buttons on the right */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between GitHub icon and Home button */
}

/* GitHub Icon Styling */
.github-btn {
    color: #2c3e50;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.github-btn:hover {
    color: #6e5494; /* GitHub Purple on hover */
    transform: scale(1.1); /* Slight zoom effect */
}

.github-btn svg {
    width: 32px;
    height: 32px;
}

/* Update home-btn to remove margin-top if it exists */
.home-btn {
    /* ... keep your existing styles ... */
    margin-top: 0; /* Ensure it aligns perfectly with the icon */
}

/* Mobile responsiveness adjustment */
@media (max-width: 599px) {
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
}