.primo-hero-carousel {
    position: relative;
    width: 100%;
}

.primo-hero-carousel-bleed {
    width: 100%;
    padding: 0;
    margin: 0;
    max-width: none;
}

.primo-hero-carousel--full {
    width: 100%;
}

/* Full width — picha inaongoza urefu */
.primo-hero-carousel--full .primo-hero-carousel__frame {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    border: none;
    background: #fff;
    box-shadow: none;
}

@media (min-width: 1024px) {
    .primo-hero-carousel--full .primo-hero-carousel__frame {
        border-radius: 0 0 1.25rem 1.25rem;
    }
}

.primo-hero-carousel__frame {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
}

.primo-hero-carousel__slide {
    width: 100%;
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.primo-hero-carousel__slide:not(.is-active) {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.primo-hero-carousel__slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Picha full width — hakuna kukatwa wala nafasi pembeni */
.primo-hero-carousel__media {
    display: block;
    width: 100%;
    line-height: 0;
    background: #fff;
}

.primo-hero-carousel__img,
.primo-hero-carousel__slide img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: none;
    object-fit: unset;
    transform: scale(1);
}

.primo-hero-carousel__slide.is-active .primo-hero-carousel__img,
.primo-hero-carousel__slide.is-active img {
    animation: primo-hero-ken 18s ease-out forwards;
}

@keyframes primo-hero-ken {
    from { transform: scale(1); }
    to { transform: scale(1.01); }
}

.primo-hero-carousel__shade {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 38%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.55) 0%,
        rgba(15, 23, 42, 0.2) 40%,
        transparent 100%
    );
}

.primo-hero-carousel__copy {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 3;
    padding: 1rem 1.25rem 2.75rem;
    max-width: 72rem;
    margin-inline: auto;
}

@media (min-width: 640px) {
    .primo-hero-carousel__copy {
        padding: 1.25rem 2rem 3rem;
    }
}

.primo-hero-carousel__title {
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

@media (min-width: 640px) {
    .primo-hero-carousel__title { font-size: 1.65rem; }
}

@media (min-width: 1024px) {
    .primo-hero-carousel__title { font-size: 1.9rem; }
}

.primo-hero-carousel__caption {
    margin-top: 0.4rem;
    max-width: 42rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 640px) {
    .primo-hero-carousel__caption {
        font-size: 1rem;
        margin-top: 0.5rem;
    }
}

.primo-hero-carousel__btn {
    display: inline-flex;
    align-items: center;
    margin-top: 0.85rem;
    border-radius: 9999px;
    background: #fff;
    color: #0f172a;
    padding: 0.55rem 1.2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}

.primo-hero-carousel__btn:hover {
    transform: translateY(-1px);
    background: #f8fafc;
}

/* Prev / Next — ndani ya picha */
.primo-hero-carousel__controls {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
}

.primo-hero-carousel__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    min-height: 2.5rem;
    min-width: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0 0.55rem;
    transform: translateY(-50%);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, transform 0.2s ease;
}

.primo-hero-carousel__nav:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.88);
    transform: translateY(-50%) scale(1.05);
}

.primo-hero-carousel__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.primo-hero-carousel__nav--prev { left: 0.65rem; }
.primo-hero-carousel__nav--next { right: 0.65rem; }

.primo-hero-carousel__nav-label { display: none; }

@media (min-width: 640px) {
    .primo-hero-carousel__nav {
        min-height: 2.65rem;
        min-width: 2.65rem;
        padding: 0 0.8rem;
        font-size: 0.75rem;
    }
    .primo-hero-carousel__nav-label { display: inline; }
}

.primo-hero-carousel__dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    padding: 0.28rem 0.5rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(6px);
    pointer-events: auto;
}

.primo-hero-carousel__dot {
    height: 0.42rem;
    width: 0.42rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.primo-hero-carousel__dot.is-active {
    width: 1.35rem;
    background: linear-gradient(to right, #c4b5fd, #67e8f9);
}

@media (prefers-reduced-motion: reduce) {
    .primo-hero-carousel__slide img,
    .primo-hero-carousel__dot {
        animation: none !important;
        transition: none !important;
    }
}
