/**
 * Ana sayfa — kutu üretim süreci özeti
 */

.ks-home {
    --ks-red: #cc0000;
    --ks-red-dark: #990000;
    --ks-ink: #2c3e50;
    --ks-muted: #6b7280;
    --ks-line: #e5e7eb;
    --ks-soft: #f8f9fa;
    padding: 3.25rem 0;
    background:
        linear-gradient(180deg, #fff 0%, #fafafa 48%, #fff 100%);
}

.ks-home-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.ks-home-brand {
    margin: 0 0 0.3rem;
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--ks-red);
    letter-spacing: 0.02em;
}

.ks-home-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.45rem, 2.6vw, 1.9rem);
    font-weight: 700;
    color: var(--ks-ink);
    line-height: 1.2;
}

.ks-home-lead {
    margin: 0;
    max-width: 36rem;
    font-size: 0.98rem;
    color: var(--ks-muted);
}

.ks-home-more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    background: var(--ks-red);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ks-home-more:hover {
    background: var(--ks-red-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* Akış şeridi: 6 görsel + aralarda ok */
.ks-home-flow {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ks-home-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    min-height: 190px;
    padding: 1.4rem 0.75rem 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    border: 1px solid var(--ks-line);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.05);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease,
                border-color 0.2s ease, box-shadow 0.2s ease;
}

.ks-home-item.is-visible {
    opacity: 1;
    transform: none;
}

.ks-home-item:hover {
    border-color: rgba(204, 0, 0, 0.35);
    box-shadow: 0 8px 22px rgba(204, 0, 0, 0.1);
}

.ks-home-icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(204, 0, 0, 0.08);
    color: var(--ks-red);
    font-size: 2.45rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    animation: ks-step-pulse 5.6s ease-in-out infinite;
}

.ks-home-item:nth-of-type(1) .ks-home-icon { animation-delay: 0s; }
.ks-home-item:nth-of-type(2) .ks-home-icon { animation-delay: 0.8s; }
.ks-home-item:nth-of-type(3) .ks-home-icon { animation-delay: 1.6s; }
.ks-home-item:nth-of-type(4) .ks-home-icon { animation-delay: 2.4s; }
.ks-home-item:nth-of-type(5) .ks-home-icon { animation-delay: 3.2s; }
.ks-home-item:nth-of-type(6) .ks-home-icon { animation-delay: 4s; }
.ks-home-item:nth-of-type(7) .ks-home-icon { animation-delay: 4.8s; }

.ks-home-item:hover .ks-home-icon {
    color: #fff;
    background: var(--ks-red);
    transform: translateY(-3px);
}

.ks-home-step-title {
    margin: 0;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ks-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.ks-home-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 -0.15rem;
    border: 2px solid var(--ks-red);
    border-radius: 50%;
    background: var(--ks-red);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.25);
    position: relative;
    z-index: 2;
    animation: ks-arrow-pulse 5.6s ease-in-out infinite;
}

.ks-home-arrow:nth-of-type(1) { animation-delay: 0.4s; }
.ks-home-arrow:nth-of-type(2) { animation-delay: 1.2s; }
.ks-home-arrow:nth-of-type(3) { animation-delay: 2s; }
.ks-home-arrow:nth-of-type(4) { animation-delay: 2.8s; }
.ks-home-arrow:nth-of-type(5) { animation-delay: 3.6s; }
.ks-home-arrow:nth-of-type(6) { animation-delay: 4.4s; }

@keyframes ks-step-pulse {
    0%, 16%, 100% {
        color: var(--ks-red);
        background: rgba(204, 0, 0, 0.08);
        transform: scale(1);
        box-shadow: none;
    }
    7%, 10% {
        color: #fff;
        background: var(--ks-red);
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(204, 0, 0, 0.1), 0 8px 20px rgba(204, 0, 0, 0.22);
    }
}

@keyframes ks-arrow-pulse {
    0%, 16%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(204, 0, 0, 0.25);
    }
    7%, 10% {
        transform: scale(1.18);
        box-shadow: 0 0 0 7px rgba(204, 0, 0, 0.12), 0 6px 18px rgba(204, 0, 0, 0.38);
    }
}

/* Küçük ekranda tek sıra korunur, yatay kaydırılır — oklar akışta kalır */
@media (max-width: 991.98px) {
    .ks-home-flow {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .ks-home-item {
        flex: 0 0 38%;
        min-height: 180px;
        scroll-snap-align: center;
    }
}

@media (max-width: 767.98px) {
    .ks-home {
        padding: 2.5rem 0;
    }

    .ks-home-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ks-home-more {
        justify-content: center;
        width: 100%;
    }

    .ks-home-item {
        flex: 0 0 58%;
    }
}

@media (max-width: 479.98px) {
    .ks-home-item {
        flex: 0 0 76%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ks-home-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .ks-home-icon,
    .ks-home-arrow {
        animation: none !important;
    }
}
