.gp-study-path {
    font-family: inherit;
    padding: 20px 0;
}
.gp-study-path .gp-timeline {
    position: relative;
    padding-right: 60px;
}
.gp-study-path .gp-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    right: 18px;
    width: 3px;
    background: linear-gradient(to bottom, #5e72e4, #16a34a);
    opacity: 0.25;
    border-radius: 3px;
}
.gp-study-path .gp-timeline-item {
    position: relative;
    margin-bottom: 36px;
    cursor: pointer;
    opacity: 0;
    transform: translateX(30px);
    animation: gpSlideInRight 0.5s ease-out forwards;
    animation-delay: calc(0.1s * var(--i));
}
@keyframes gpSlideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gp-timeline-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 960px;
    max-height: 85vh;
    background: white;
    border-radius: 18px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    overflow: hidden;
    animation: gpTimelineFadeIn 0.4s ease-out;
}

@keyframes gpTimelineFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.gp-timeline-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    z-index: -1;
}

.gp-timeline-header {
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    color: white;
    padding: 20px 32px;
    font-weight: 600;
    font-size: 1.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gp-timeline-header h3 {
    margin: 0;
}

.gp-timeline-close {
    cursor: pointer;
    font-size: 32px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.gp-timeline-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.15);
}

.gp-timeline-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.gp-timeline {
    position: relative;
    padding-right: 60px;
}

.gp-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    right: 18px;
    width: 3px;
    background: linear-gradient(to bottom, #5e72e4, #16a34a);
    opacity: 0.25;
    border-radius: 3px;
}

.gp-timeline-item {
    position: relative;
    margin-bottom: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gp-timeline-item:last-child {
    margin-bottom: 0;
}

.gp-circle {
    position: absolute;
    right: -60px;
    top: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.gp-timeline-content {
    background: #fff;
    padding: 18px 24px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    margin-right: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.gp-timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    width: 30px;
    height: 3px;
    background: #e2e8f0;
    transform: translateY(-50%);
    border-radius: 2px;
}

.gp-main-title {
    font-weight: 600;
    color: #1e40af;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 6px;
}

.gp-children {
    margin-top: 16px;
    padding-right: 35px;
    position: relative;
}

.gp-children::before {
    content: '';
    position: absolute;
    top: -12px;
    bottom: 12px;
    right: 17px;
    width: 2px;
    background: #cbd5e1;
    opacity: 0.6;
}

.gp-child-item {
    margin-bottom: 12px;
    position: relative;
    padding-right: 25px;
    cursor: pointer;
    transition: all 0.25s;
}

.gp-child-item::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -18px;
    width: 18px;
    height: 2px;
    background: #cbd5e1;
    transform: translateY(-50%);
}

.gp-child-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -21px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #fff;
    transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gp-timeline-item.visited .gp-circle,
.gp-child-item.visited::after {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #16a34a;
}

.gp-timeline-item.visited .gp-main-title,
.gp-child-item.visited a {
    color: #16a34a;
    font-weight: 600;
}

.gp-timeline-item.active .gp-circle {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.25);
}

.gp-timeline-item.active .gp-main-title {
    color: #1d4ed8;
    font-weight: 700;
}

.gp-timeline-item.unvisited .gp-circle,
.gp-child-item.unvisited::after {
    background: #fff;
    border-color: #e2e8f0;
    color: #64748b;
}

.gp-timeline-item.unvisited .gp-main-title,
.gp-child-item.unvisited a {
    color: #64748b;
}

.gp-child-item.active a {
    color: #1d4ed8;
    font-weight: 600;
}

.gp-timeline-item:hover .gp-timeline-content,
.gp-child-item:hover {
    transform: translateX(-4px);
}

.gp-timeline-item:hover .gp-circle {
    transform: scale(1.1);
}

.gp-timeline-body::-webkit-scrollbar {
    width: 8px;
}
.gp-timeline-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.gp-timeline-body::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}
.gp-timeline-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

@keyframes gpTimelineFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes gpTimelineFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -55%) scale(0.95);
    }
}

.gp-timeline-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 960px;
    max-height: 85vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.32);
    z-index: 99999;
    overflow: hidden;
    animation: gpTimelineFadeIn 0.42s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.gp-timeline-modal.closing {
    animation: gpTimelineFadeOut 0.35s ease-out forwards;
}

.gp-timeline-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(14px);
    z-index: -1;
    transition: background 0.4s ease;
}

.gp-timeline-item {
    opacity: 0;
    transform: translateX(30px);
    animation: gpSlideInRight 0.5s ease-out forwards;
    animation-delay: calc(0.1s * var(--i));
}

@keyframes gpSlideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gp-post-item.moving {
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.4, 1);
    transform: scale(0.98);
    box-shadow: 0 8px 20px rgba(94, 114, 228, 0.2);
    z-index: 1000;
}

.gp-post-item.moving ~ .gp-post-item {
    transition: all 0.35s ease;
}

.gp-timeline-header {
    background: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    color: white;
    padding: 22px 36px;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
}

.gp-timeline-header h3 {
    margin: 0;
}

.gp-timeline-close {
    cursor: pointer;
    font-size: 34px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.gp-timeline-close:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: scale(1.18) rotate(90deg);
}

.gp-timeline-body {
    padding: 36px;
    overflow-y: auto;
    max-height: calc(85vh - 130px);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.gp-timeline-body::-webkit-scrollbar {
    width: 10px;
}
.gp-timeline-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 12px;
}
.gp-timeline-body::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 12px;
}
.gp-timeline-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.gp-main-title,
.gp-child-link {
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.gp-main-title:hover,
.gp-child-link:hover {
    color: #16a34a !important;
}

.gp-main-title.active,
.gp-child-link.active {
    color: #16a34a !important;
    font-weight: 700;
}

.gp-timeline-item.active .gp-circle {
    background: #16a34a !important;
    color: white !important;
    border-color: #16a34a !important;
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.25);
}

.gp-child-item.active::after {
    background: #16a34a !important;
    border-color: #16a34a !important;
}
