/* /referanslar — native scroll + logo reveal */

body.page-referanslar #smooth-wrapper,
body.page-referanslar #smooth-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    position: relative !important;
}

body.page-referanslar,
html:has(body.page-referanslar) {
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
}

body.page-referanslar.loading {
    overflow-y: auto !important;
}

.page-referanslar .tp-blog-title {
    font-size: clamp(2.5rem, 5vw, 4.25rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em;
}

.page-referanslar .tp-blog-heading-wrap {
    padding-bottom: clamp(80px, 11vw, 110px) !important;
}

/* Footer öncesi yükleme tetikleyicisi */
.referans-sentinel {
    width: 100%;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Ayrılmış reklam alanı — üst satır */
.referans-reserved {
    width: 100%;
    margin: 0 0 0.75rem;
}

.referans-reserved__card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 84px;
    padding: 20px 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.referans-reserved__text {
    margin: 0;
    color: rgba(0, 0, 0, 0.72);
    font-size: clamp(13px, 1.6vw, 15px);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .referans-reserved {
        margin-bottom: 0.5rem;
    }

    .referans-reserved__card {
        min-height: 72px;
        padding: 16px 18px;
    }

    .referans-reserved__text {
        font-size: 13px;
    }
}

/* Grid boşlukları — hafif sıkı */
.page-referanslar #referanslar-grid {
    --bs-gutter-x: 0.35rem;
    --bs-gutter-y: 0.35rem;
}

@media (min-width: 768px) {
    .page-referanslar #referanslar-grid {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.45rem;
    }
}

@media (min-width: 992px) {
    .page-referanslar #referanslar-grid {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

.page-referanslar .tp-brand-inner-item {
    margin-bottom: 0 !important;
}

.page-referanslar .referans-item {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

.referans-item.referans-item--in {
    animation: referansItemIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--referans-i, 0) * 36ms);
}

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

/* Logo kutusu — pulse halka */
.referans-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 10px 6px;
    border-radius: 10px;
    isolation: isolate;
}

.referans-logo-wrap--loading::before,
.referans-logo-wrap--loading::after {
    content: "";
    position: absolute;
    inset: 10px 12px;
    border-radius: 8px;
    pointer-events: none;
}

.referans-logo-wrap--loading::before {
    border: 1px solid rgba(255, 188, 0, 0.14);
    animation: referansRingOut 1.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.referans-logo-wrap--loading::after {
    background: radial-gradient(circle at 50% 50%, rgba(255, 188, 0, 0.07) 0%, transparent 68%);
    opacity: 0.55;
    animation: referansGlowPulse 1.6s ease-in-out infinite;
}

@keyframes referansGlowPulse {
    0%, 100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes referansRingOut {
    0% {
        opacity: 0.15;
        transform: scale(0.94);
    }
    45% {
        opacity: 0.75;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.06);
    }
}

.referans-logo-wrap.is-loaded::before,
.referans-logo-wrap.is-loaded::after {
    animation: none;
    opacity: 0;
}

/* Logo görsel — clip reveal */
.referans-logo {
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    display: inline-block;
    opacity: 0;
    transform: scale(0.9);
    clip-path: inset(18% round 4px);
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        clip-path 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.referans-logo.is-loaded {
    opacity: 1;
    transform: scale(1);
    clip-path: inset(0 round 0);
}

/* Alt yükleme — nokta pulse */
.referans-loading {
    margin-top: 1.75rem;
    text-align: center;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.referans-loading.is-active {
    opacity: 1;
    transform: translateY(0);
}

.referans-loading__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.referans-loading__dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffbc00;
    opacity: 0.35;
    animation: referansDotPulse 1s ease-in-out infinite;
}

.referans-loading__dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.referans-loading__dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes referansDotPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.85) translateY(0);
    }
    40% {
        opacity: 1;
        transform: scale(1) translateY(-3px);
    }
}

.referans-loading__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.42);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .referans-item,
    .referans-logo,
    .referans-logo-wrap--loading::before,
    .referans-logo-wrap--loading::after,
    .referans-loading__dots span {
        animation: none !important;
        transition: none !important;
    }

    .referans-item {
        opacity: 1;
        transform: none;
    }

    .referans-logo {
        opacity: 1;
        clip-path: none;
        transform: none;
    }

    .referans-logo-wrap--loading::before,
    .referans-logo-wrap--loading::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .referans-logo-wrap {
        min-height: 54px;
        padding: 8px 4px;
    }

    .referans-item.referans-item--in {
        animation-delay: calc(var(--referans-i, 0) * 24ms);
    }
}
