/* ============================================
 * BaytPet Hero Carousel
 * ============================================ */

/* ---------- Container ---------- */
.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 50%, #9a3412 100%);
}

/* When a background image is uploaded, the gradient is replaced */
.hero-carousel--has-bg {
    background: none; /* remove default orange */
}

/* Overlay: semi-transparent gradient on top of the bg image, behind content */
.hero-carousel--overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(234, 88, 12, 0.80) 0%,
        rgba(234, 88, 12, 0.40) 100%
    );
    pointer-events: none;
}

/* Ensure track sits above the overlay */
.hero-carousel--overlay .hero-carousel__track {
    position: relative;
    z-index: 2;
}
.hero-carousel--overlay .hero-carousel__arrow,
.hero-carousel--overlay .hero-carousel__dots,
.hero-carousel--overlay .hero-carousel__progress {
    z-index: 22;
}

.hero-carousel__track {
    display: flex;
    transition: transform 0.65s cubic-bezier(.77,0,.18,1);
    will-change: transform;
}

.hero-carousel__slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.hero-carousel__slide-inner {
    max-width: 80rem;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 0 2rem;
}

/* ---------- Text column ---------- */
.hero-carousel__text {
    color: #fff;
}

.hero-carousel__text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-carousel__text p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    opacity: 0.9;
    color: #ffedd5;
}

.hero-carousel__text .hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.hero-btn--primary {
    background: #fff;
    color: #ea580c;
}
.hero-btn--primary:hover {
    background: #fff7ed;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.hero-btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.7);
    margin-inline-start: 0.75rem;
}
.hero-btn--outline:hover {
    background: #fff;
    color: #ea580c;
    border-color: #fff;
    transform: translateY(-2px);
}

/* ---------- Image column ---------- */
.hero-carousel__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-carousel__image img,
.hero-carousel__image svg {
    width: 100%;
    max-width: 440px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
    border-radius: 1rem;
}

/* ---------- Full-Image Mode ---------- */
.hero-carousel__slide--fullimage {
    position: relative;
    /* same padding as normal slides */
    padding: 3rem 1rem;
}

.hero-carousel__slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-carousel__slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
    z-index: 2;
}

.hero-carousel__slide-content {
    position: relative;
    z-index: 3;
    max-width: 80rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    color: #fff;
}

.hero-carousel__slide-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-carousel__slide-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    opacity: 0.95;
    color: #ffedd5;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hero-carousel__slide-content .hero-btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Reuse same button styles */
.hero-carousel__slide-content .hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

/* full-image animations */
.hero-carousel__slide--fullimage .hero-carousel__slide-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.hero-carousel__slide--fullimage.is-active .hero-carousel__slide-content {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Navigation Arrows ---------- */
.hero-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-carousel__arrow:hover {
    background: rgba(255,255,255,0.3);
    border-color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.hero-carousel__arrow--prev {
    left: 1.5rem;
}
.hero-carousel__arrow--next {
    right: 1.5rem;
}

/* RTL arrow swap */
[dir="rtl"] .hero-carousel__arrow--prev {
    left: auto;
    right: 1.5rem;
}
[dir="rtl"] .hero-carousel__arrow--next {
    right: auto;
    left: 1.5rem;
}

/* ---------- Dots ---------- */
.hero-carousel__dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.hero-carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-carousel__dot:hover {
    background: rgba(255,255,255,0.5);
}

.hero-carousel__dot--active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.2);
}

/* ---------- Slide Animations ---------- */
.hero-carousel__slide-inner .hero-carousel__text,
.hero-carousel__slide-inner .hero-carousel__image {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.hero-carousel__slide-inner .hero-carousel__image {
    transition-delay: 0.35s;
}

.hero-carousel__slide.is-active .hero-carousel__text,
.hero-carousel__slide.is-active .hero-carousel__image {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Progress bar ---------- */
.hero-carousel__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.15);
    z-index: 20;
}

.hero-carousel__progress-bar {
    height: 100%;
    background: rgba(255,255,255,0.7);
    width: 0%;
    transition: width 0.1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-carousel__slide-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 0 1rem;
    }

    .hero-carousel__text h2 {
        font-size: 1.75rem;
    }

    .hero-carousel__text p {
        font-size: 1rem;
    }

    .hero-carousel__image {
        order: -1;
    }

    .hero-carousel__image img,
    .hero-carousel__image svg {
        max-width: 280px;
    }

    .hero-carousel__arrow {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .hero-carousel__arrow--prev { left: 0.5rem; }
    .hero-carousel__arrow--next { right: 0.5rem; }

    [dir="rtl"] .hero-carousel__arrow--prev { left: auto; right: 0.5rem; }
    [dir="rtl"] .hero-carousel__arrow--next { right: auto; left: 0.5rem; }

    .hero-btn--outline {
        margin-inline-start: 0;
        margin-top: 0.5rem;
    }

    .hero-carousel__text .hero-btn-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    /* full image responsive */
    .hero-carousel__slide--fullimage {
        padding: 2rem 0.5rem;
    }
    .hero-carousel__slide-content h2 {
        font-size: 1.75rem;
    }
    .hero-carousel__slide-content p {
        font-size: 1rem;
    }
    .hero-carousel__slide-content .hero-btn-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-carousel__slide {
        padding: 2rem 0.5rem;
    }

    .hero-carousel__text h2 {
        font-size: 1.4rem;
    }

    .hero-carousel__image img,
    .hero-carousel__image svg {
        max-width: 220px;
    }

    .hero-carousel__slide--fullimage {
        padding: 1.5rem 0.5rem;
    }
    .hero-carousel__slide-content h2 {
        font-size: 1.4rem;
    }
}
