/* ========================================================================
   AFFILIATE CAROUSEL — "Koli Bandı & Raptiye" Aesthetic
   Two themed strips: Earning (Luxury) & Next Steps (Cyber-AI)
   ======================================================================== */

/* ── Section Container ── */
.aff-section {
    position: relative;
    padding: 2rem 0;
    margin: 2.5rem 0;
    border-radius: 1.25rem;
    overflow: hidden;
}

/* ── EARNING STRIP THEME: Luxury & Prosperity ── */
.aff-section--earning {
    background: linear-gradient(135deg, #022c22 0%, #064e3b 40%, #065f46 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 4px 30px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── NEXT STEPS STRIP THEME: Cyber-AI ── */
.aff-section--nextsteps {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #3730a3 100%);
    border: 1px solid rgba(129, 140, 248, 0.25);
    box-shadow: 0 4px 30px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Duct Tape (Koli Bandı) Decoration ── */
.aff-section::before,
.aff-section::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 32px;
    z-index: 2;
    pointer-events: none;
    border-radius: 2px;
    opacity: 0.7;
}

.aff-section--earning::before {
    top: -8px;
    left: 24px;
    transform: rotate(-3deg);
    background: repeating-linear-gradient(
        90deg,
        rgba(250, 204, 21, 0.45) 0px,
        rgba(250, 204, 21, 0.45) 4px,
        rgba(250, 204, 21, 0.3) 4px,
        rgba(250, 204, 21, 0.3) 8px
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.aff-section--earning::after {
    bottom: -8px;
    right: 24px;
    transform: rotate(2deg);
    background: repeating-linear-gradient(
        90deg,
        rgba(250, 204, 21, 0.45) 0px,
        rgba(250, 204, 21, 0.45) 4px,
        rgba(250, 204, 21, 0.3) 4px,
        rgba(250, 204, 21, 0.3) 8px
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.aff-section--nextsteps::before {
    top: -8px;
    right: 24px;
    left: auto;
    transform: rotate(3deg);
    background: repeating-linear-gradient(
        90deg,
        rgba(165, 180, 252, 0.4) 0px,
        rgba(165, 180, 252, 0.4) 4px,
        rgba(165, 180, 252, 0.28) 4px,
        rgba(165, 180, 252, 0.28) 8px
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.aff-section--nextsteps::after {
    bottom: -8px;
    left: 24px;
    right: auto;
    transform: rotate(-2deg);
    background: repeating-linear-gradient(
        90deg,
        rgba(165, 180, 252, 0.4) 0px,
        rgba(165, 180, 252, 0.4) 4px,
        rgba(165, 180, 252, 0.28) 4px,
        rgba(165, 180, 252, 0.28) 8px
    );
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Section Header with Thumbtack (Raptiye) ── */
.aff-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 3;
}

.aff-header__title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.aff-section--earning .aff-header__title {
    color: #fbbf24;
    text-shadow: 0 0 16px rgba(251, 191, 36, 0.3);
}

.aff-section--nextsteps .aff-header__title {
    color: #a5b4fc;
    text-shadow: 0 0 16px rgba(165, 180, 252, 0.3);
}

/* Thumbtack icon (raptiye) via pseudo */
.aff-header__pin {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.aff-section--earning .aff-header__pin {
    background: radial-gradient(circle at 35% 35%, #fde68a, #b45309);
}

.aff-section--nextsteps .aff-header__pin {
    background: radial-gradient(circle at 35% 35%, #c4b5fd, #4c1d95);
}

.aff-header__pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

/* ── Carousel Track ── */
.aff-track-wrapper {
    position: relative;
    padding: 0 1.5rem;
}

.aff-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
}

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

/* ── Cards ── */
.aff-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-radius: 0.875rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

/* Earning cards: 3.5 visible */
.aff-section--earning .aff-card {
    width: calc((100% - 3rem) / 3.5);
    background: rgba(6, 78, 59, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(8px);
}

/* Next Steps cards: 2.5 visible */
.aff-section--nextsteps .aff-card {
    width: calc((100% - 2rem) / 2.5);
    background: rgba(49, 46, 129, 0.5);
    border: 1px solid rgba(129, 140, 248, 0.2);
    backdrop-filter: blur(8px);
}

.aff-card:hover {
    transform: translateY(-4px);
}

.aff-section--earning .aff-card:hover {
    border-color: rgba(250, 204, 21, 0.6);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.15), 0 0 20px rgba(250, 204, 21, 0.1);
}

.aff-section--nextsteps .aff-card:hover {
    border-color: rgba(165, 180, 252, 0.6);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.15), 0 0 20px rgba(165, 180, 252, 0.1);
}

/* Card internals */
.aff-card__emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.aff-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.aff-section--earning .aff-card__name {
    color: #ecfdf5;
}

.aff-section--nextsteps .aff-card__name {
    color: #eef2ff;
}

.aff-card__arrow {
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.aff-card:hover .aff-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

.aff-section--earning .aff-card__arrow {
    color: #fbbf24;
}

.aff-section--nextsteps .aff-card__arrow {
    color: #a5b4fc;
}

.aff-card__desc {
    font-size: 0.8rem;
    line-height: 1.45;
    flex-grow: 1;
}

.aff-section--earning .aff-card__desc {
    color: #a7f3d0;
    opacity: 0.8;
}

.aff-section--nextsteps .aff-card__desc {
    color: #c7d2fe;
    opacity: 0.8;
}

.aff-card__cta {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    transition: all 0.2s ease;
}

.aff-section--earning .aff-card__cta {
    color: #fbbf24;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.2);
}

.aff-section--earning .aff-card:hover .aff-card__cta {
    background: rgba(250, 204, 21, 0.2);
    border-color: rgba(250, 204, 21, 0.4);
}

.aff-section--nextsteps .aff-card__cta {
    color: #a5b4fc;
    background: rgba(165, 180, 252, 0.1);
    border: 1px solid rgba(165, 180, 252, 0.2);
}

.aff-section--nextsteps .aff-card:hover .aff-card__cta {
    background: rgba(165, 180, 252, 0.2);
    border-color: rgba(165, 180, 252, 0.4);
}

/* ── Glassmorphism Navigation Arrows ── */
.aff-nav {
    display: flex;
    gap: 0.5rem;
}

.aff-nav__btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.9rem;
    padding: 0;
    background: none;
}

.aff-section--earning .aff-nav__btn {
    background: rgba(6, 78, 59, 0.6);
    color: #a7f3d0;
}

.aff-section--earning .aff-nav__btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.aff-section--nextsteps .aff-nav__btn {
    background: rgba(49, 46, 129, 0.6);
    color: #c7d2fe;
}

.aff-section--nextsteps .aff-nav__btn:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .aff-section {
        margin: 1.5rem 0;
        padding: 1.5rem 0;
        border-radius: 1rem;
    }

    .aff-header {
        padding: 0 1rem;
    }

    .aff-track-wrapper {
        padding: 0 1rem;
    }

    .aff-track {
        gap: 0.75rem;
    }

    /* Mobile: 1.5 cards visible for earning, 1.25 for next steps */
    .aff-section--earning .aff-card {
        width: calc((100% - 0.75rem) / 1.5);
        min-height: 130px;
    }

    .aff-section--nextsteps .aff-card {
        width: calc((100% - 0.75rem) / 1.25);
        min-height: 130px;
    }

    .aff-section::before,
    .aff-section::after {
        width: 80px;
        height: 24px;
    }

    .aff-header__title {
        font-size: 0.85rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet: 2.5 earning, 1.5 next steps */
    .aff-section--earning .aff-card {
        width: calc((100% - 2rem) / 2.5);
    }

    .aff-section--nextsteps .aff-card {
        width: calc((100% - 1rem) / 1.5);
    }
}

/* ── Subtle entrance animation ── */
@keyframes affSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aff-section {
    animation: affSlideUp 0.5s ease-out;
}

.aff-card {
    animation: affSlideUp 0.4s ease-out both;
}

.aff-card:nth-child(1) { animation-delay: 0.05s; }
.aff-card:nth-child(2) { animation-delay: 0.1s; }
.aff-card:nth-child(3) { animation-delay: 0.15s; }
.aff-card:nth-child(4) { animation-delay: 0.2s; }
.aff-card:nth-child(5) { animation-delay: 0.25s; }
.aff-card:nth-child(6) { animation-delay: 0.3s; }
.aff-card:nth-child(7) { animation-delay: 0.35s; }
.aff-card:nth-child(8) { animation-delay: 0.4s; }
.aff-card:nth-child(9) { animation-delay: 0.45s; }
.aff-card:nth-child(10) { animation-delay: 0.5s; }
