/* =====================================================
   Hero Slider Widget - Frontend Styles
   ===================================================== */

/* --- Wrapper & Base --- */
.hsw-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hsw-slider {
    width: 100%;
    height: 80vh;
    min-height: 300px;
}

/* --- Slide --- */
.hsw-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Ken Burns Effect --- */
.hsw-ken-burns {
    animation: hsw-ken-burns 8s ease-out infinite alternate;
}

@keyframes hsw-ken-burns {
    0%   { background-size: 110%; }
    100% { background-size: 120%; }
}

/* --- Overlay --- */
.hsw-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Video Background --- */
.hsw-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* --- Content Positions --- */
.hsw-slide { display: flex; }

.hsw-pos-center        { align-items: center;     justify-content: center; }
.hsw-pos-top-left      { align-items: flex-start; justify-content: flex-start; }
.hsw-pos-top-center    { align-items: flex-start; justify-content: center; }
.hsw-pos-top-right     { align-items: flex-start; justify-content: flex-end; }
.hsw-pos-center-left   { align-items: center;     justify-content: flex-start; }
.hsw-pos-center-right  { align-items: center;     justify-content: flex-end; }
.hsw-pos-bottom-left   { align-items: flex-end;   justify-content: flex-start; }
.hsw-pos-bottom-center { align-items: flex-end;   justify-content: center; }
.hsw-pos-bottom-right  { align-items: flex-end;   justify-content: flex-end; }

/* --- Slide Content --- */
.hsw-slide-content {
    position: relative;
    z-index: 2;
    max-width: 70%;
    padding: 60px 40px;
    width: 100%;
}

/* Glass morphism optional class */
.hsw-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
}

/* --- Tag / Label --- */
.hsw-slide-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}

/* --- Title --- */
.hsw-slide-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 0 20px;
    padding: 0;
}

/* --- Description --- */
.hsw-slide-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 32px;
    padding: 0;
}

/* --- Buttons --- */
.hsw-slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hsw-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.hsw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.hsw-btn-filled:hover {
    filter: brightness(1.1);
}

.hsw-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.hsw-btn-ghost:hover {
    opacity: 0.8;
}

/* --- Navigation Arrows --- */
.hsw-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
}

.hsw-nav-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.hsw-prev { left: 20px; }
.hsw-next { right: 20px; }

.hsw-nav-btn svg {
    fill: currentColor;
    pointer-events: none;
}

/* --- Pagination --- */
.hsw-pagination {
    bottom: 24px !important;
    z-index: 10;
}

.hsw-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
    margin: 0 5px !important;
}

.hsw-pagination .swiper-pagination-bullet-active {
    background: #fff;
    width: 28px;
    border-radius: 5px;
}

/* Fraction pagination */
.swiper-pagination-fraction {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Progress bar pagination */
.swiper-pagination-progressbar {
    height: 4px !important;
    top: auto !important;
    bottom: 0;
    background: rgba(255,255,255,0.2) !important;
}

.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
    background: #fff !important;
}

/* --- Autoplay Progress Bar --- */
.hsw-autoplay-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.15);
}

.hsw-autoplay-progress-bar {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.7);
    transition: width linear;
}

/* --- Scrollbar --- */
.swiper-scrollbar {
    background: rgba(255, 255, 255, 0.15) !important;
}

.swiper-scrollbar-drag {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* =====================================================
   ANIMATION CLASSES
   ===================================================== */

.hsw-animate {
    opacity: 0;
    transition: none;
}

.hsw-animate.hsw-animated {
    opacity: 1;
}

/* fadeIn */
.hsw-animate[data-animation="fadeIn"]      { transform: none; }
.hsw-animate[data-animation="fadeIn"].hsw-animated { opacity: 1; }

/* fadeInUp */
.hsw-animate[data-animation="fadeInUp"]    { transform: translateY(40px); opacity: 0; }
.hsw-animate[data-animation="fadeInUp"].hsw-animated { transform: translateY(0); opacity: 1; }

/* fadeInDown */
.hsw-animate[data-animation="fadeInDown"]  { transform: translateY(-40px); opacity: 0; }
.hsw-animate[data-animation="fadeInDown"].hsw-animated { transform: translateY(0); opacity: 1; }

/* fadeInLeft */
.hsw-animate[data-animation="fadeInLeft"]  { transform: translateX(-60px); opacity: 0; }
.hsw-animate[data-animation="fadeInLeft"].hsw-animated { transform: translateX(0); opacity: 1; }

/* fadeInRight */
.hsw-animate[data-animation="fadeInRight"] { transform: translateX(60px); opacity: 0; }
.hsw-animate[data-animation="fadeInRight"].hsw-animated { transform: translateX(0); opacity: 1; }

/* zoomIn */
.hsw-animate[data-animation="zoomIn"]      { transform: scale(0.7); opacity: 0; }
.hsw-animate[data-animation="zoomIn"].hsw-animated { transform: scale(1); opacity: 1; }

/* zoomInUp */
.hsw-animate[data-animation="zoomInUp"]    { transform: scale(0.7) translateY(40px); opacity: 0; }
.hsw-animate[data-animation="zoomInUp"].hsw-animated { transform: scale(1) translateY(0); opacity: 1; }

/* slideInUp */
.hsw-animate[data-animation="slideInUp"]   { transform: translateY(100%); opacity: 0; }
.hsw-animate[data-animation="slideInUp"].hsw-animated { transform: translateY(0); opacity: 1; }

/* slideInLeft */
.hsw-animate[data-animation="slideInLeft"] { transform: translateX(-100%); opacity: 0; }
.hsw-animate[data-animation="slideInLeft"].hsw-animated { transform: translateX(0); opacity: 1; }

/* slideInRight */
.hsw-animate[data-animation="slideInRight"]{ transform: translateX(100%); opacity: 0; }
.hsw-animate[data-animation="slideInRight"].hsw-animated { transform: translateX(0); opacity: 1; }

/* bounceIn */
.hsw-animate[data-animation="bounceIn"]    { transform: scale(0.4); opacity: 0; }
.hsw-animate[data-animation="bounceIn"].hsw-animated {
    transform: scale(1);
    opacity: 1;
    animation: hsw-bounceIn 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@keyframes hsw-bounceIn {
    0%   { transform: scale(0.4); }
    40%  { transform: scale(1.05); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* flipInX */
.hsw-animate[data-animation="flipInX"]     { transform: perspective(400px) rotateX(90deg); opacity: 0; }
.hsw-animate[data-animation="flipInX"].hsw-animated { transform: perspective(400px) rotateX(0deg); opacity: 1; }

/* lightSpeedIn */
.hsw-animate[data-animation="lightSpeedIn"]{ transform: translateX(100%) skewX(-30deg); opacity: 0; }
.hsw-animate[data-animation="lightSpeedIn"].hsw-animated { transform: translateX(0) skewX(0deg); opacity: 1; }

/* none */
.hsw-animate[data-animation="none"]        { opacity: 0; transform: none; }
.hsw-animate[data-animation="none"].hsw-animated { opacity: 1; }

/* Global transition for animated elements */
.hsw-animated {
    transition: opacity 0.7s ease, transform 0.7s ease !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
    .hsw-slider { height: 60vh; }
    .hsw-slide-content { max-width: 85%; padding: 40px 30px; }
    .hsw-slide-title { font-size: clamp(1.6rem, 4vw, 2.8rem); }
}

@media (max-width: 767px) {
    .hsw-slider { height: 50vh; min-height: 380px; }
    .hsw-slide-content { max-width: 95%; padding: 30px 20px; }
    .hsw-slide-title { font-size: clamp(1.4rem, 5vw, 2rem); margin-bottom: 12px; }
    .hsw-slide-description { font-size: 0.9rem; margin-bottom: 20px; }
    .hsw-btn { padding: 11px 24px; font-size: 14px; }
    .hsw-nav-btn { width: 38px; height: 38px; }
    .hsw-prev { left: 10px; }
    .hsw-next { right: 10px; }
    .hsw-slide-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .hsw-slider { min-height: 340px; }
    .hsw-slide-tag { font-size: 10px; padding: 4px 12px; }
    .hsw-slide-buttons { gap: 8px; }
}

/* =====================================================
   ELEMENTOR EDITOR TWEAKS
   ===================================================== */
.elementor-editor-active .hsw-animate {
    opacity: 1 !important;
    transform: none !important;
}
