:root {
    --gap: 1.5rem;
    --speed: 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --closed: 12rem;
    --open: 60rem;
    --accent: #667eea;
}

.modern-slider {
    background: #ffffff;
    color: #333333;
    padding: 0;
    margin-top: 4rem; /* Navbar ile arasına boşluk */
    margin-bottom: 5rem;
    width: 100%;
}

.controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 20px 30px;
    margin-top: 20px;
    position: relative;
}

.head h2 {
    font: 400 1.5rem/1.2 Inter, sans-serif;
    color: #333333;
}

@media (min-width: 1024px) {
    .head h2 {
        font-size: 2.5rem;
    }
}

.nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid #667eea;
}

    .nav-btn:hover {
        background: var(--accent);
        color: white;
    }

    .nav-btn:disabled {
        opacity: 0.3;
        cursor: default;
    }

.slider {
    width: 100%;
    overflow: hidden;
}

.controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.track {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
    justify-content: center;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 40px;
}

    .track::-webkit-scrollbar {
        display: none;
    }

.project-card {
    position: relative;
    flex: 0 0 var(--closed);
    height: 45rem;
    border-radius: 1.2rem;
    overflow: hidden;
    cursor: pointer;
    transition: flex-basis var(--speed), transform var(--speed);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

    .project-card[active] {
        flex-basis: var(--open);
        transform: translateY(-10px);
        box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
    }

.project-card__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) saturate(80%);
    transition: filter 0.3s, transform var(--speed);
}

.project-card:hover .project-card__bg {
    filter: brightness(0.9) saturate(100%);
    transform: scale(1.05);
}

.project-card__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    padding: 0;
    background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.project-card__title {
    color: #fff;
    font-weight: 700;
    font-size: 1.7rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.project-card__thumb,
.project-card__desc,
.project-card__btn {
    display: none;
}

.project-card[active] .project-card__content {
    flex-direction: row;
    align-items: center;
    padding: 3rem 4rem;
    gap: 3rem;
}

.project-card[active] .project-card__title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 4rem;
}

.project-card[active] .project-card__thumb,
.project-card[active] .project-card__desc,
.project-card[active] .project-card__btn {
    display: block;
}

.project-card__thumb {
    width: 250px;
    height: 500px;
    border-radius: 0.6rem;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.project-card__desc {
    color: #fff;
    font-size: 1.4rem;
    line-height: 1.6;
    max-width: 30rem;
}

.project-card__btn {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 9999px;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

    .project-card__btn:hover {
        background: #5a6fd8;
    }

.dots {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    padding: 25px 0;
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

    .dot.active {
        background: var(--accent);
        transform: scale(1.3);
    }

@media (max-width: 767px) {
    :root {
        --closed: 100%;
        --open: 100%;
        --gap: 1rem;
    }

    .head {
        padding: 20px 20px 15px;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 1.2rem;
    }

    .slider {
        padding: 0;
    }

    .track {
        flex-direction: column;
        scroll-snap-type: y mandatory;
        gap: 1rem;
        padding-bottom: 20px;
    }

    .project-card {
        height: auto;
        min-height: 120px;
        flex: 0 0 auto;
        width: 100%;
        scroll-snap-align: start;
    }

        .project-card[active] {
            min-height: 500px;
            transform: none;
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
        }

    .project-card__content {
        flex-direction: row;
        justify-content: flex-start;
        padding: 1.2rem;
        align-items: center;
        gap: 1rem;
    }

    .project-card__title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 1.4rem;
        margin-right: auto;
    }

    .project-card__thumb,
    .project-card__desc,
    .project-card__btn {
        display: none;
    }

    .project-card[active] .project-card__content {
        align-items: flex-start;
        padding: 3rem 2rem; /* Mobilde sadece yazılar için padding artırıldı */
        flex-direction: column; /* Dikey düzen */
        text-align: center; /* Yazıları ortala */
    }

    .project-card[active] .project-card__title {
        font-size: 2.5rem; /* Mobilde biraz küçültüldü */
        margin-bottom: 1.5rem;
        margin-top: 0; /* Üst margin kaldırıldı */
        text-align: center; /* Başlığı ortala */
        width: 100%;
    }

    .project-card[active] .project-card__thumb {
        display: none !important; /* Mobilde küçük resmi gizle */
    }

    .project-card[active] .project-card__desc {
        font-size: 1.2rem; /* Mobilde biraz küçültüldü */
        max-width: 100%;
        margin-bottom: 2rem;
        text-align: center; /* Açıklamayı ortala */
        line-height: 1.6; /* Satır aralığı artırıldı */
    }

    .project-card[active] .project-card__btn {
        align-self: center;
        width: 100%;
        text-align: center;
        padding: 0.8rem;
    }

    .dots {
        display: none;
    }

    .controls {
        width: 100%;
        justify-content: flex-end;
        padding: 15px 20px;
        margin-top: 15px;
    }

    .nav-btn {
        position: static;
        transform: none;
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.3rem;
    }
}
