* {
    -webkit-tap-highlight-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 3rem;
    margin-top: 3rem;
    position: relative;
    padding-left: 0.5rem;
}

    .section-title::after {
        content: '';
        position: absolute;
        left: 0.5rem;
        bottom: -10px;
        width: 60px;
        height: 4px;
        background-color: var(--accent);
        border-radius: 2px;
    }

.timeline-section {
    max-width: 1600px;
    padding: 4rem 5%;
    margin: 0 auto;
}

.timeline-container {
    position: relative;
    padding: 1rem 0;
}

    .timeline-container::before {
        content: '';
        position: absolute;
        left: 10px;
        top: 0;
        bottom: 0;
        width: 4px;
        background-color: var(--secondary);
        border-radius: 2px;
    }

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 4rem;
    scroll-margin-top: 12rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.6;
}

    .timeline-item.active {
        opacity: 1;
    }

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

    .timeline-item.active .timeline-content {
        border-left: 4px solid var(--accent);
        box-shadow: 0 8px 20px var(--accent20);
    }

.timeline-dot {
    position: absolute;
    left: 4px;
    top: 0;
    width: 16px;
    height: 16px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-soft);
}

.timeline-content {
    background-color: var(--bg-soft);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 4px 10px rgba(45, 31, 45, 0.08);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

    .timeline-content:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 15px rgba(45, 31, 45, 0.12);
    }

    .timeline-content p {
        color: var(--text-muted);
    }

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    flex-direction: column;
}

    .timeline-header h3 {
        color: var(--text-main);
        font-size: 1.5rem;
        margin-top: -0.3rem;
    }

.timeline-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.classes-layout {
    display: grid;
    align-items: start;
    grid-template-columns: 30em 1fr;
    gap: 4rem;
}

.details-panel {
    background-color: var(--bg-soft);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--secondary);
    width: 100%;
    display: block;
    position: sticky;
    top: 8rem;
    margin-top: 1rem;
    min-height: 450px;
}

.detail-text {
    display: none;
    border-left: 3px solid transparent;
    transition: none;
    overflow: hidden;
}

    .detail-text.active {
        display: block;
        animation: slideUp 0.4s ease forwards;
    }

    .detail-text h3 {
        color: var(--accent);
        margin-bottom: 1.5rem;
        font-size: 1.8rem;
    }

    .detail-text p {
        font-size: 1.1rem;
        color: var(--text-dim);
        padding-bottom: 2rem;
    }

    .detail-text ul {
        font-size: 1.1rem;
        color: var(--text-dim);
        list-style-type: disc;
        list-style-position: inside;
    }

    .detail-text img {
        max-height: 150px;
        border-radius: 8px;
    }

    .detail-text .intro-text {
        font-size: 0.95rem;
        border-bottom: 1px solid var(--secondary);
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }

.intro-text a {
    color: var(--accent);
    text-decoration: underline;
    transition: var(--transition);
}

    .intro-text a:hover {
        color: var(--accent-light);
    }

.class-feature {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--white);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

    .class-feature:hover {
        border-color: var(--accent);
        box-shadow: 0 4px 12px var(--accent20);
    }

.feature-content {
    flex: 1;
}

    .feature-content h4 {
        color: var(--text-main);
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }

    .feature-content p {
        padding-bottom: 0;
        font-size: 0.9rem;
        line-height: 1.4;
        color: var(--text-muted);
    }

.feature-image {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.example-image {
    width: 80px;
    height: auto;
    max-height: 180px !important;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(45, 31, 45, 0.15);
}

.calculator-images {
    display: flex;
    flex-wrap: wrap;
}

    .calculator-images img {
        margin: 0.5rem;
        border: 1px solid var(--secondary);
    }

.class-feature.reverse {
    flex-direction: row-reverse;
}

    .class-feature.reverse .feature-content {
        text-align: right;
    }

footer {
    background-color: var(--primary);
    padding: 3rem 10%;
    text-align: center;
    color: var(--secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {

    .classes-layout {
        grid-template-columns: 1fr;
    }

    .details-panel {
        position: static;
        margin-top: 2rem;
        display: none;
    }

    .timeline-item {
        scroll-margin-top: 10rem;
    }

        .timeline-item .detail-text.active {
            display: block;
            margin-top: 1.5rem;
            padding: 1.5rem;
            background-color: var(--secondary40);
            border-left: 3px solid var(--accent);
            border-radius: 0 8px 8px 0;
            animation: slideDown 0.4s ease forwards;
        }

        .timeline-item .detail-text h3 {
            font-size: 1.4rem;
            margin-bottom: 0.5rem;
        }

    .class-feature {
        flex-direction: row;
        text-align: left;
        padding: 0.8rem;
    }

        .class-feature.reverse {
            flex-direction: row-reverse;
        }

    .example-image {
        width: 65px;
        max-height: 140px !important;
    }

    .feature-content h4 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1.0rem;
        padding: 1.5rem 10%;
    }
}
