/* ============================================
   HOME PAGE HERO IMAGE SLIDER
   ============================================ */

.home-hero-slider {
    position: relative;
    width: 100%;
    margin: 25px auto;
}

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(102, 126, 234, 0.15),
        0 8px 40px rgba(118, 75, 162, 0.1);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.slider-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.slider-image.active {
    opacity: 1;
    z-index: 1;
}

/* Link wrapper */
.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    z-index: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-slide .slider-image {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: none;
}

/* Slider Text Overlay */
.slider-text-overlay {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    max-height: calc(85% - 20px);
    padding: 0 8%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    overflow: hidden;
    box-sizing: border-box;
}

.slider-title,
.slider-subtitle {
    opacity: 0;
    margin: 0;
    padding: 0;
    will-change: transform, opacity, clip-path, width;
}

.slider-title {
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.slider-subtitle {
    font-size: clamp(0.85rem, 1.8vw, 1.3rem);
    font-weight: 400;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Slider Font Settings - Responsive */
.slider-slide[data-font-settings] .slider-title {
    font-size: calc(clamp(1.2rem, 3vw, 2.4rem) * var(--title-font-scale, 1));
}
.slider-slide[data-font-settings] .slider-subtitle {
    font-size: calc(clamp(0.85rem, 1.8vw, 1.3rem) * var(--content-font-scale, 1));
}

/* Animation active state */
.slider-title.animated,
.slider-subtitle.animated {
    opacity: 1;
}

/* ---- ANIMATION: Fade In ---- */
.slider-title.anim-fade_in,
.slider-subtitle.anim-fade_in {
    animation-name: sliderFadeIn;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---- ANIMATION: Slide from Left ---- */
.slider-title.anim-slide_left,
.slider-subtitle.anim-slide_left {
    animation-name: sliderSlideLeft;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderSlideLeft {
    from { opacity: 0; transform: translateX(-80px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- ANIMATION: Slide from Right ---- */
.slider-title.anim-slide_right,
.slider-subtitle.anim-slide_right {
    animation-name: sliderSlideRight;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderSlideRight {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- ANIMATION: Slide from Bottom ---- */
.slider-title.anim-slide_bottom,
.slider-subtitle.anim-slide_bottom {
    animation-name: sliderSlideBottom;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderSlideBottom {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- ANIMATION: Zoom In ---- */
.slider-title.anim-zoom_in,
.slider-subtitle.anim-zoom_in {
    animation-name: sliderZoomIn;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderZoomIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* ---- ANIMATION: Typewriter ---- */
.slider-title.anim-typewriter,
.slider-subtitle.anim-typewriter {
    overflow: visible;
    white-space: pre-wrap;
    display: inline-block;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Typewriter cursor - controlled by JS */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.3em;
    background-color: currentColor;
    margin-left: 3px;
    vertical-align: text-bottom;
    animation: sliderCursorBlink 0.7s step-end infinite;
}

.typewriter-cursor.blink-off {
    animation: none;
    opacity: 1;
}

@keyframes sliderCursorBlink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* ---- ANIMATION: Clip/Reveal Left to Right ---- */
.slider-title.anim-clip_reveal_lr,
.slider-subtitle.anim-clip_reveal_lr {
    animation-name: sliderClipLR;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderClipLR {
    from { clip-path: inset(0 100% 0 0); opacity: 1; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

/* ---- ANIMATION: Clip/Reveal Right to Left ---- */
.slider-title.anim-clip_reveal_rl,
.slider-subtitle.anim-clip_reveal_rl {
    animation-name: sliderClipRL;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
}

@keyframes sliderClipRL {
    from { clip-path: inset(0 0 0 100%); opacity: 1; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
}

/* Delay for subtitle animations */
.slider-text-overlay .slider-subtitle.animated {
    animation-delay: 0.3s;
}

/* Typewriter reset (used by JS) */
.slider-title.anim-typewriter.reset,
.slider-subtitle.anim-typewriter.reset {
    animation: none;
    opacity: 0;
}

/* Progress Bar */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.slider-progress .progress-bar {
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.slider-progress .progress-bar.animating {
    animation: progressFill 4s linear forwards;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
    opacity: 0;
    outline: none;
}

.slider-container:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-nav-prev {
    left: 16px;
}

.slider-nav-next {
    right: 16px;
}

.slider-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dark Mode Navigation Arrows */
html[data-bs-theme="dark"] .slider-nav {
    background: rgba(0, 0, 0, 0.35);
}

html[data-bs-theme="dark"] .slider-nav:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* Dark Mode Slider Styles */
html[data-bs-theme="dark"] .slider-container {
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 8px 40px rgba(102, 126, 234, 0.2);
}

html[data-bs-theme="dark"] .slider-indicators {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Slider */
@media (max-width: 992px) {

    .slider-indicators {
        bottom: 15px;
        padding: 6px 12px;
        gap: 8px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    .indicator.active {
        width: 22px;
    }

    .slider-nav {
        width: 38px;
        height: 38px;
        opacity: 1;
    }

    .slider-nav svg {
        width: 18px;
        height: 18px;
    }

    .slider-nav-prev {
        left: 10px;
    }

    .slider-nav-next {
        right: 10px;
    }
}

@media (max-width: 576px) {

    .slider-indicators {
        bottom: 12px;
        padding: 5px 10px;
        gap: 6px;
    }

    .indicator {
        width: 7px;
        height: 7px;
    }

    .indicator.active {
        width: 18px;
    }

    .slider-progress {
        height: 2px;
    }

    .slider-nav {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .slider-nav svg {
        width: 16px;
        height: 16px;
    }

    .slider-nav-prev {
        left: 6px;
    }

    .slider-nav-next {
        right: 6px;
    }

    .slider-text-overlay {
        bottom: 10%;
        padding: 0 5%;
        gap: 8px;
    }

    .slider-title {
        font-size: 1rem;
    }

    .slider-subtitle {
        font-size: 0.8rem;
    }
}
