/**
 * Hero Slider Widget Styles
 * 
 * Responsive, elegant hero slider with smooth animations
 * @package Hero_Slider_Widget
 */

/* =============================================
   Base Slider Container
   ============================================= */
.hsw-slider {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    background-color: #1a1a1a;
}

/* Full screen slider */
.hsw-slider.hsw-fullscreen {
    height: 100vh;
}

.hsw-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* =============================================
   Individual Slides
   ============================================= */
.hsw-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.hsw-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Ken Burns Effect */
.hsw-slider[data-ken-burns="true"] .hsw-slide {
    animation: none;
}

.hsw-slider[data-ken-burns="true"] .hsw-slide.active {
    animation: kenBurns 8s ease-out forwards;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Slide Overlay */
.hsw-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* =============================================
   Slide Content
   ============================================= */
.hsw-slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
}

/* Main Heading */
.hsw-heading {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 52px;
    font-weight: 400;
    font-style: italic;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.hsw-slide.active .hsw-heading {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

/* Subheading */
.hsw-subheading {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: #ffffff;
    margin: 0 0 30px 0;
    line-height: 1.5;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(25px);
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.hsw-slide.active .hsw-subheading {
    opacity: 0;
    transform: translateY(25px);
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

/* =============================================
   Decorative Elements
   ============================================= */
.hsw-decorative-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 0 30px 0;
    width: 100%;
    max-width: 600px;
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInScale 0.8s ease-out 0.7s forwards;
}

.hsw-slide.active .hsw-decorative-wrapper {
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInScale 0.8s ease-out 0.7s forwards;
}

/* Horizontal Decorative Lines */
.hsw-decorative-line {
    flex: 0 0 auto;
    width: 180px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.6);
    position: relative;
}

/* Lines only mode - when no icon, lines should stretch */
.hsw-decorative-wrapper:not(:has(.hsw-decorative-icon)) .hsw-decorative-line {
    flex: 1;
}

/* Decorative Icon/Image Container */
.hsw-decorative-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.hsw-decorative-icon i {
    font-size: 60px;
    color: #ffffff;
    line-height: 1;
}

.hsw-decorative-icon svg {
    width: 60px;
    height: 60px;
    fill: #ffffff;
}

.hsw-decorative-icon img {
    width: 60px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    display: block;
}

/* Invert image filter for making dark images white */
.hsw-decorative-icon.invert-image img {
    filter: brightness(0) invert(1);
}

/* Circular border around icon */
.hsw-decorative-icon.has-border::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* =============================================
   Button Styles
   ============================================= */
.hsw-button {
    display: inline-block;
    padding: 15px 35px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    background-color: #a85c32;
    border: 2px solid #a85c32;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.9s forwards;
}

.hsw-slide.active .hsw-button {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.9s forwards;
}

.hsw-button:hover {
    color: #a85c32;
    background-color: transparent;
    border-color: #a85c32;
}

.hsw-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* =============================================
   Navigation Arrows
   ============================================= */
.hsw-arrow {
    position: absolute;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #a85c32;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

/* Default - Middle position */
.hsw-slider .hsw-arrow {
    top: 50%;
    transform: translateY(-50%);
}

/* Top position */
.hsw-slider.arrows-top .hsw-arrow {
    top: 30px;
    bottom: auto;
    transform: none;
}

/* Bottom position */
.hsw-slider.arrows-bottom .hsw-arrow {
    top: auto;
    bottom: 30px;
    transform: none;
}

/* Custom position - uses the custom offset value */
.hsw-slider.arrows-custom .hsw-arrow {
    transform: translateY(-50%);
}

.hsw-arrow:hover {
    background-color: #ffffff;
}

.hsw-arrow svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    transition: fill 0.3s ease;
}

.hsw-arrow:hover svg {
    fill: #a85c32;
}

.hsw-arrow:focus {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.hsw-arrow-prev {
    left: 30px;
}

.hsw-arrow-next {
    right: 30px;
}

/* =============================================
   Dot Pagination
   ============================================= */
.hsw-dots {
    position: absolute;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 10;
}

/* Center position (default) */
.hsw-slider.dots-center .hsw-dots {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

/* Left position */
.hsw-slider.dots-left .hsw-dots {
    left: 30px;
    right: auto;
    transform: none;
}

/* Right position */
.hsw-slider.dots-right .hsw-dots {
    left: auto;
    right: 30px;
    transform: none;
}

.hsw-dot {
    width: 12px;
    height: 12px;
    margin: 0 6px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hsw-dot:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.3);
}

.hsw-dot.active {
    border-color: #ffffff;
    background-color: #ffffff;
}

.hsw-dot:focus {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* =============================================
   Animation Effects
   ============================================= */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Effect Animation */
.hsw-slider[data-effect="slide"] .hsw-slide {
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
    transition: transform 0.8s ease-in-out;
}

.hsw-slider[data-effect="slide"] .hsw-slide.active {
    transform: translateX(0);
}

.hsw-slider[data-effect="slide"] .hsw-slide.prev {
    transform: translateX(-100%);
}

/* Zoom Effect Animation */
.hsw-slider[data-effect="zoom"] .hsw-slide {
    transform: scale(1.2);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.hsw-slider[data-effect="zoom"] .hsw-slide.active {
    transform: scale(1);
}

/* =============================================
   Responsive Styles - Tablet
   ============================================= */
@media screen and (max-width: 1024px) {
    .hsw-slider {
        height: 70vh;
    }
    
    .hsw-heading {
        font-size: 42px;
    }
    
    .hsw-subheading {
        font-size: 20px;
    }
    
    .hsw-decorative-icon i,
    .hsw-decorative-icon svg,
    .hsw-decorative-icon img {
        font-size: 50px;
        width: 50px;
        height: 50px;
        max-height: 50px;
    }
    
    .hsw-decorative-icon.has-border::before {
        width: 70px;
        height: 70px;
    }
    
    .hsw-decorative-line {
        width: 140px;
    }
    
    .hsw-arrow {
        width: 48px;
        height: 48px;
    }
    
    .hsw-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .hsw-arrow-prev {
        left: 20px;
    }
    
    .hsw-arrow-next {
        right: 20px;
    }
    
    .hsw-slide-content {
        padding: 30px;
    }
}

/* =============================================
   Responsive Styles - Mobile
   ============================================= */
@media screen and (max-width: 768px) {
    .hsw-slider {
        height: 60vh;
        min-height: 450px;
    }
    
    .hsw-heading {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .hsw-subheading {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .hsw-decorative-wrapper {
        gap: 15px;
        margin-bottom: 20px;
        max-width: 100%;
    }
    
    .hsw-decorative-icon i,
    .hsw-decorative-icon svg,
    .hsw-decorative-icon img {
        font-size: 40px;
        width: 40px;
        height: 40px;
        max-height: 40px;
    }
    
    .hsw-decorative-icon.has-border::before {
        width: 55px;
        height: 55px;
    }
    
    .hsw-decorative-line {
        width: 80px;
    }
    
    .hsw-button {
        padding: 12px 25px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .hsw-arrow {
        width: 42px;
        height: 42px;
    }
    
    .hsw-arrow svg {
        width: 16px;
        height: 16px;
    }
    
    .hsw-arrow-prev {
        left: 10px;
    }
    
    .hsw-arrow-next {
        right: 10px;
    }
    
    .hsw-dots {
        bottom: 20px;
    }
    
    .hsw-dot {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
    
    .hsw-slide-content {
        padding: 20px;
    }
}

/* =============================================
   Responsive Styles - Small Mobile
   ============================================= */
@media screen and (max-width: 480px) {
    .hsw-slider {
        height: 55vh;
        min-height: 400px;
    }
    
    .hsw-heading {
        font-size: 24px;
        line-height: 1.4;
    }
    
    .hsw-subheading {
        font-size: 14px;
    }
    
    .hsw-decorative-wrapper {
        gap: 10px;
    }
    
    .hsw-decorative-line {
        width: 50px;
    }
    
    .hsw-decorative-icon i,
    .hsw-decorative-icon svg,
    .hsw-decorative-icon img {
        font-size: 30px;
        width: 30px;
        height: 30px;
        max-height: 30px;
    }
    
    .hsw-decorative-icon.has-border::before {
        width: 45px;
        height: 45px;
    }
    
    .hsw-arrow {
        width: 36px;
        height: 36px;
    }
    
    .hsw-arrow svg {
        width: 14px;
        height: 14px;
    }
    
    .hsw-arrow-prev {
        left: 8px;
    }
    
    .hsw-arrow-next {
        right: 8px;
    }
    
    .hsw-button {
        padding: 10px 20px;
        font-size: 11px;
    }
}

/* =============================================
   Accessibility & Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .hsw-slide,
    .hsw-heading,
    .hsw-subheading,
    .hsw-decorative-wrapper,
    .hsw-button,
    .hsw-arrow,
    .hsw-dot {
        transition: none;
        animation: none;
    }
    
    .hsw-slide.active .hsw-heading,
    .hsw-slide.active .hsw-subheading,
    .hsw-slide.active .hsw-decorative-wrapper,
    .hsw-slide.active .hsw-button {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .hsw-slider[data-ken-burns="true"] .hsw-slide.active {
        animation: none;
    }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    .hsw-slider {
        height: auto;
        page-break-inside: avoid;
    }
    
    .hsw-arrow,
    .hsw-dots {
        display: none;
    }
    
    .hsw-slide {
        position: relative;
        opacity: 1;
        visibility: visible;
    }
    
    .hsw-slide:not(:first-child) {
        display: none;
    }
}
