/* Learning Paths page specific styles */
:root {
    scroll-padding-top: 0px; /* Reset - we'll handle header with ignore mode */
}


.paths-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.paths-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.paths-intro p {
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: start;
}

.path-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    border-top: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.path-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.path-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* 3D Map emoji styling */
.map-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-18deg) rotateY(12deg) rotateZ(-6deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

/* Activated state matches hover state */
.path-card.active .map-3d {
    transform: perspective(100px) rotateX(-27deg) rotateY(22deg) rotateZ(-17deg);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Rocket emoji styling - upward tilt */
.rocket-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-25deg) rotateY(-8deg) rotateZ(12deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(1px 3px 5px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card.active .rocket-3d {
    transform: perspective(100px) rotateX(-17deg) rotateY(7deg) rotateZ(-9deg);
    filter: drop-shadow(4px 8px 15px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Compass emoji styling - slight rotation */
.compass-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-10deg) rotateY(15deg) rotateZ(-8deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .compass-3d {
    transform: perspective(100px) rotateX(-22deg) rotateY(35deg) rotateZ(-25deg);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

.path-card.active .compass-3d {
    transform: perspective(100px) rotateX(-22deg) rotateY(35deg) rotateZ(-25deg);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* DNA emoji styling - helical twist */
.dna-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-12deg) rotateY(-5deg) rotateZ(20deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .dna-3d {
    transform: perspective(100px) rotateX(-25deg) rotateY(-17deg) rotateZ(60deg);
    filter: drop-shadow(5px 10px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

.path-card.active .dna-3d {
    transform: perspective(100px) rotateX(-25deg) rotateY(-17deg) rotateZ(60deg);
    filter: drop-shadow(5px 10px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Stethoscope emoji styling - gentle curve */
.stethoscope-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-8deg) rotateY(12deg) rotateZ(-5deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .stethoscope-3d {
    transform: perspective(100px) rotateX(-22deg) rotateY(30deg) rotateZ(-17deg);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

.path-card.active .stethoscope-3d {
    transform: perspective(100px) rotateX(-22deg) rotateY(30deg) rotateZ(-17deg);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Scales emoji styling - balanced tilt */
.scales-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-10deg) rotateY(-8deg) rotateZ(3deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .scales-3d {
    transform: perspective(100px) rotateX(-15deg) rotateY(12deg) rotateZ(-8deg);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

.path-card.active .scales-3d {
    transform: perspective(100px) rotateX(-15deg) rotateY(12deg) rotateZ(-8deg);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Artist palette emoji styling - creative tilt */
.palette-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-15deg) rotateY(20deg) rotateZ(-12deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .palette-3d,
.path-card.active .palette-3d {
    transform: perspective(100px) rotateX(-20deg) rotateY(55deg) rotateZ(-40deg);
    filter: drop-shadow(7px 14px 22px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Telescope emoji styling - focused tilt */
.telescope-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-20deg) rotateY(-15deg) rotateZ(8deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .telescope-3d,
.path-card.active .telescope-3d {
    transform: perspective(100px) rotateX(-35deg) rotateY(-32deg) rotateZ(22deg);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Hard hat emoji styling - construction tilt */
.hardhat-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-12deg) rotateY(8deg) rotateZ(-3deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .hardhat-3d,
.path-card.active .hardhat-3d {
    transform: perspective(100px) rotateX(-25deg) rotateY(20deg) rotateZ(-12deg);
    filter: drop-shadow(5px 10px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Briefcase emoji styling - professional tilt */
.briefcase-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-8deg) rotateY(10deg) rotateZ(-2deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .briefcase-3d,
.path-card.active .briefcase-3d {
    transform: perspective(100px) rotateX(-22deg) rotateY(27deg) rotateZ(-10deg);
    filter: drop-shadow(5px 10px 16px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* House emoji styling - stable foundation */
.house-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-5deg) rotateY(8deg) rotateZ(-1deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .house-3d,
.path-card.active .house-3d {
    transform: perspective(100px) rotateX(-17deg) rotateY(22deg) rotateZ(-7deg);
    filter: drop-shadow(5px 10px 15px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Gear emoji styling - mechanical precision */
.gear-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-10deg) rotateY(6deg) rotateZ(15deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .gear-3d,
.path-card.active .gear-3d {
    transform: perspective(100px) rotateX(-22deg) rotateY(15deg) rotateZ(90deg);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Government building emoji styling - institutional stability */
.landmark-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-6deg) rotateY(4deg) rotateZ(-1deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .landmark-3d,
.path-card.active .landmark-3d {
    transform: perspective(100px) rotateX(-17deg) rotateY(12deg) rotateZ(-7deg);
    filter: drop-shadow(5px 10px 16px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Microchip emoji styling - tech precision */
.chip-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-12deg) rotateY(-8deg) rotateZ(5deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .chip-3d,
.path-card.active .chip-3d {
    transform: perspective(100px) rotateX(-27deg) rotateY(-22deg) rotateZ(17deg);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Chalkboard emoji styling - educational tilt */
.chalkboard-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-15deg) rotateY(12deg) rotateZ(-3deg) scale(1);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .chalkboard-3d,
.path-card.active .chalkboard-3d {
    transform: perspective(100px) rotateX(32deg) rotateY(-25deg) rotateZ(12deg) scale(1.15);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Route/planning emoji styling - navigation focus */
.route-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-14deg) rotateY(10deg) rotateZ(-7deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .route-3d,
.path-card.active .route-3d {
    transform: perspective(100px) rotateX(-30deg) rotateY(27deg) rotateZ(-20deg);
    filter: drop-shadow(6px 12px 18px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

/* Terminal emoji styling - developer angle */
.terminal-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-16deg) rotateY(-6deg) rotateZ(4deg);
    transform-style: preserve-3d;
    transition: transform 1.2s ease-in-out;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .terminal-3d,
.path-card.active .terminal-3d {
    transform: perspective(100px) rotateX(-25deg) rotateY(-10deg) rotateZ(8deg);
    filter: drop-shadow(6px 12px 20px rgba(0,0,0,0.6));
    transition: transform 1.5s ease-in-out;
}

.paths-intro {
    text-align: left;
    margin-bottom: 4rem;
}

.paths-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.paths-intro p {
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: start;
}

.path-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    border-top: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.path-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.path-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* 3D Map emoji styling */
.map-3d {
    display: inline-block;
    font-size: 2.5rem;
    transform: perspective(100px) rotateX(-18deg) rotateY(12deg) rotateZ(-6deg);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    vertical-align: baseline;
    margin-right: 0.5rem;
}

.path-card:hover .map-3d {
    transform: perspective(100px) rotateX(-24deg) rotateY(18deg) rotateZ(-10deg);
    filter: drop-shadow(3px 6px 8px rgba(0,0,0,0.4));
}

.path-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.path-description {
    text-align: left;
    color: #6c757d;
    margin-bottom: 2.5rem;
    min-height: 60px;
}

/* Mobile accordion behavior */
@media (max-width: 768px){
    .paths-grid { display:block; }
    /* keep a little horizontal padding so text doesn't touch the card edge */
    .path-card { margin-bottom:1rem; padding:0.9rem 1rem; }
    /* Show a short teaser description when collapsed; animate steps open/close */
    .path-card .path-steps {
        max-height: 0;
        opacity: 0;
        transition: max-height 0.5s cubic-bezier(.2,.9,.3,1), opacity 0.35s ease;
    }
    .path-card:not(.collapsed) .path-steps {
        max-height: 1200px; /* large enough to fit content */
        opacity: 1;
    }
    .path-card .path-description{
        transition: max-height 0.5s cubic-bezier(.2,.9,.3,1), opacity 0.35s ease;
    }
    .path-card.collapsed .path-description {
        display:block;
        color: #6c757d;
        max-height: 3.6em; /* ~2 lines teaser */
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0.95;
        margin-bottom: 0.6rem;
        font-size: 0.98rem;
    }
    .path-card:not(.collapsed) .path-description{
        max-height: 800px; /* allow full expansion */
        opacity: 1;
    }
    .path-card.collapsed { cursor:pointer; }
    .path-card .path-title { position:relative; padding-right:1.5rem; }
    .path-card .path-title:after { content:'+'; position:absolute; right:0; top:0; font-size:1.2rem; color:#667eea; transition:transform 0.25s ease; }
    .path-card:not(.collapsed) .path-title:after { content:'−'; }
    .path-card:not(.collapsed) { box-shadow:0 14px 40px rgba(0,0,0,0.15); }
    /* Hide sidebar entirely on mobile to avoid clutter */
    .paths-sidebar { display:none !important; }
    /* Subtle stacked card look */
    .path-card { border:1px solid #e4e7ef; border-top:3px solid #667eea; box-shadow:0 4px 16px rgba(0,0,0,0.06); }
    .path-card.collapsed { box-shadow:0 2px 8px rgba(0,0,0,0.05); }
    .path-card .path-title { font-size:1.25rem; margin:0.25rem 0 0.5rem; }
    .path-card .path-description { margin:0 0 1.25rem 0; }
    /* Ensure anchor jumps land below header on mobile */
    .path-card { scroll-margin-top: 72px; }
    /* Mobile: inherits base styles - numbers positioned safely inside padding */
}

/* Desktop sidebar category list */
@media (min-width: 769px){
    .paths-layout { display:grid; grid-template-columns:240px 1fr; gap:2.5rem; align-items:start; }
    .paths-sidebar { position:sticky; top:110px; display:flex; flex-direction:column; gap:0.4rem; }
    .paths-sidebar-button { background:#ffffff; border:1px solid #e1e5eb; padding:0.55rem 0.75rem; border-radius:8px; font-size:0.75rem; font-weight:600; text-align:left; cursor:pointer; color:#334; display:flex; align-items:center; gap:0.5rem; position:relative; transition: all 1s ease; }
    .paths-sidebar-button:before { 
        content:""; 
        position:absolute; 
        right:8px; 
        top:50%; 
        transform:translateY(-50%); 
        width:8px; 
        height:8px; 
        border-radius:50%; 
        background:transparent; 
        border:2px solid transparent; 
        /* Remove transition to prevent layout shifts during scroll */
        /* transition:all 0.25s ease; */
        will-change: background, border-color; /* Optimize for property changes */
    }
    .paths-sidebar-button.transitioning { background:#a5b4f7; color:#fff; transition: all 1s ease; }
    .paths-sidebar-button.active { background:#667eea; color:#fff; box-shadow:0 4px 14px rgba(102,126,234,0.4); transition: all 0.25s ease; }
    .paths-sidebar-button.active:before { 
        background:#ffd700; 
        border-color:#fff; 
        /* No transition - instant appearance to prevent layout shifts */
    }
    .paths-cards-column { display:flex; flex-direction:column; align-items:center; gap:2rem; }
    .paths-grid { display:flex; flex-direction:column; align-items:center; gap:2rem; }
    .path-card { min-width:340px; width:80%; max-width:90em; }
    .path-card.highlighted { outline:2px solid #667eea; outline-offset:2px; }
    /* Desktop: inherits base styles that work properly */
}

.path-steps {
    position: relative;
    /* Consistent padding that works on all screen sizes */
    padding-left: 25px;
    margin-left: 6px;
    border-left: 2px solid #e9ecef;
}

.path-step {
    position: relative;
    margin-bottom: 2rem;
}

.path-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    /* Always position inside the padded area so it's never clipped */
    left: -40px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #667eea;
    z-index: 10;
}

.step-content h4 {
    margin-bottom: 0.25rem;
    line-height: 1.8em;
    font-size: 1.2em;
    color: #34495e;
}

/* Small horizontal nudge so the numbered circle doesn't sit flush with the heading */
.step-content {
    margin-left: 10px; /* tiny gap between number and inline title */
}

/* Slightly reduce indent for descriptions so they align nicely under the title */
.step-desc {
    margin-top: 0.4rem;
    margin-left: 8px;
}

.step-content a {
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.step-content a:hover {
    color: #5a67d8;
}

.step-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}
