/* ========================================
   CURVED LEARNING PATH STYLES
   Green to Gold Achievement Journey
   With Mathematical Grid Pattern
   ======================================== */

/* Map Container - The main path area */
.map-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 3000px;
    overflow-x: hidden;
    /* Mathematical grid pattern background */
    background-image:
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: -1px -1px;
}

/* Add glowing grid effect */
.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255,215,0,0.05) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255,215,0,0.05) 2px, transparent 2px);
    background-size: 100px 100px;
    pointer-events: none;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* The SVG curved path */
.path-svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    animation: pathShimmer 3s ease-in-out infinite;
}

@keyframes pathShimmer {
    0% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8)) brightness(1.2);
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) brightness(1);
    }
}

/* Level Transition Headers */
.level-transition {
    position: relative;
    z-index: 10;
    margin: 60px 0;
    display: flex;
    justify-content: center;
}

.transition-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 500px;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.transition-box:hover {
    transform: scale(1.05);
}

.transition-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.transition-box h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.transition-box p {
    opacity: 0.95;
    font-size: 1rem;
}

/* Station - Each class level - LARGER BOXES */
.station {
    position: relative;
    z-index: 5;
    margin: 100px auto;
    width: 90%;
    max-width: 400px; /* Increased from 350px */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Alternating left-right positioning for S-curve effect */
.station:nth-child(4n+1) { /* Classes 1, 5, 9, 13 */
    transform: translateX(-35%);
}

.station:nth-child(4n+2) { /* Classes 2, 6, 10 */
    transform: translateX(35%);
}

.station:nth-child(4n+3) { /* Classes 3, 7, 11 */
    transform: translateX(-35%);
}

.station:nth-child(4n) { /* Classes 4, 8, 12 */
    transform: translateX(35%);
}

/* Station Marker - The circular number/badge */
.station-marker {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), 0 0 20px rgba(255, 215, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
    overflow: visible;
}

/* Sparkle effect around markers */
.station-marker::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.2rem;
    opacity: 0;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

.station-marker.available {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3), 0 0 30px rgba(255, 215, 0, 0.8);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(0,0,0,0.3), 0 0 30px rgba(255, 215, 0, 0.8);
        transform: translateX(-50%) scale(1);
    }
    50% {
        box-shadow: 0 5px 15px rgba(0,0,0,0.3), 0 0 45px rgba(255, 215, 0, 1);
        transform: translateX(-50%) scale(1.1);
    }
}

.station-content-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Station Content - The card - LARGER PADDING */
.station-content {
    background: white;
    border-radius: 20px;
    padding: 35px 25px 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    opacity: 0.7;
    filter: grayscale(50%);
}

.station-content.available {
    opacity: 1;
    filter: grayscale(0%);
}

.station:hover .station-content {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    opacity: 1;
    filter: grayscale(0%);
}

.station:hover .station-marker {
    transform: translateX(-50%) scale(1.15);
}

.station-header {
    margin-bottom: 15px;
}

.class-label {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.station-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #2d3748;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.topic-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

.topic-box:hover {
    background: linear-gradient(135deg, #667eea30 0%, #764ba230 100%);
    transform: scale(1.05);
}

/* Connecting dots on the path */
.station::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 4px solid white;
    border-radius: 50%;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 15px rgba(255, 215, 0, 0.6);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 15px rgba(255, 215, 0, 0.6);
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 25px rgba(255, 215, 0, 0.9);
    }
}

/* Goal - Final destination */
.goal {
    position: relative;
    z-index: 10;
    margin: 80px auto;
    text-align: center;
    max-width: 500px;
}

.goal-marker {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.goal-content {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.goal-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.goal-content p {
    font-size: 1.2rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet - medium curves */
@media (min-width: 769px) and (max-width: 1023px) {
    .station {
        max-width: 340px;
    }

    .station:nth-child(4n+1),
    .station:nth-child(4n+3) {
        transform: translateX(-30%);
    }

    .station:nth-child(4n+2),
    .station:nth-child(4n) {
        transform: translateX(30%);
    }
}

/* Mobile - subtle but visible curves */
@media (max-width: 768px) {
    .station {
        max-width: 280px;
    }

    .station:nth-child(4n+1),
    .station:nth-child(4n+3) {
        transform: translateX(-20%);
    }

    .station:nth-child(4n+2),
    .station:nth-child(4n) {
        transform: translateX(20%);
    }

    .station-marker {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }

    .transition-box {
        padding: 20px 25px;
    }

    .transition-icon {
        font-size: 2rem;
    }

    .transition-box h2 {
        font-size: 1.4rem;
    }
}

/* Very small screens - keep path visible */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .station {
        max-width: 90%;
        margin: 80px auto;
    }

    .station:nth-child(4n+1),
    .station:nth-child(4n+3) {
        transform: translateX(-8%);
    }

    .station:nth-child(4n+2),
    .station:nth-child(4n) {
        transform: translateX(8%);
    }

    .map-container {
        padding: 40px 5px;
    }

    .station-content {
        padding: 30px 15px 20px;
    }

    .station-marker {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Desktop - dramatic curves with larger boxes */
@media (min-width: 1024px) {
    .station {
        max-width: 400px;
    }

    .station:nth-child(4n+1),
    .station:nth-child(4n+3) {
        transform: translateX(-45%);
    }

    .station:nth-child(4n+2),
    .station:nth-child(4n) {
        transform: translateX(45%);
    }
}