/* ============================================
   BK Slider - Vanilla CSS Styles
   Fully Isolated Module - No Global Scope
   ============================================ */

/* ============================================
   Font Awesome Pro - Subset (arrow-left, arrow-right only)
   Optimized for slider navigation icons
   ============================================ */

/* Font Awesome Base Variables - Added to root namespace */

/* Font Awesome Base Classes */
.bk-slider-section .fa,
.bk-slider-section .fa-light,
.bk-slider-section .fal {
    font-family: var(--fa-style-family, "Font Awesome 6 Pro");
    font-weight: var(--fa-style, 300);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: var(--fa-display, inline-block);
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
}

/* Font Awesome Pro Light Font Face */
@font-face {
    font-family: "Font Awesome 6 Pro";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../font/fa-light-300.woff2") format("woff2"),
         url("../font/fa-light-300.ttf") format("truetype");
}

/* Arrow Left Icon */
.bk-slider-section .fa-light.fa-arrow-left::before,
.bk-slider-section .fal.fa-arrow-left::before {
    content: "\f060";
}

/* Arrow Right Icon */
.bk-slider-section .fa-light.fa-arrow-right::before,
.bk-slider-section .fal.fa-arrow-right::before {
    content: "\f061";
}

/* ============================================
   BK Slider Styles
   ============================================ */

/* Root Namespace - All CSS Variables Scoped Here */
.bk-slider-section {
    /* Font Awesome Variables */
    --fa-style-family: "Font Awesome 6 Pro";
    --fa-style: 300;
    --fa-display: inline-block;
    
    /* Scoped CSS Variables - Isolated from global scope */
    --bk-container-width: clamp(1024px, calc(1024px + (1560 - 1024) * ((100vw - 1280px) / (1560 - 1280))), 1560px);
    --bk-gap: clamp(24px, calc(24px + (32 - 24) * ((100vw - 780px) / (1560 - 780))), 32px);
    --bk-black: #000000;
    --bk-cinnabar: #DBB800;
    --bk-h6-min: 20;
    --bk-h6-max: 24;
    --bk-h6: clamp(calc(var(--bk-h6-min) * 1px), calc(var(--bk-h6-min) * 1px + (var(--bk-h6-max) - var(--bk-h6-min)) * ((100vw - 1024px) / (1560 - 1024))), calc(var(--bk-h6-max) * 1px));
    
    /* Section Container Styles */
    position: relative;
    display: block;
    padding-left: var(--bk-gap);
    padding-right: var(--bk-gap);
    padding-top: clamp(60px, calc(60px + (144 - 60) * ((100vw - 1024px) / (1560 - 1024))), 144px);
    padding-bottom: clamp(60px, calc(60px + (144 - 60) * ((100vw - 1024px) / (1560 - 1024))), 144px);
    overflow-x: hidden;
    box-sizing: border-box;
}

.bk-slider-section .bk-slider-container {
    position: relative;
    z-index: 10;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: var(--bk-container-width);
    box-sizing: border-box;
}

/* Heading Section */
.bk-slider-section .bk-slider-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(32px, calc(32px + (72 - 32) * ((100vw - 1024px) / (1560 - 1024))), 72px);
}

.bk-slider-section .bk-slider-title h2 {
    font-weight: 400;
    font-size: clamp(34px, calc(34px + (64 - 34) * ((100vw - 1024px) / (1560 - 1024))), 64px);
    line-height: 1.2;
    color: var(--bk-black);
    margin: 0;
}

@media screen and (max-width: 768px) {
    .bk-slider-section .bk-slider-title h2 {
        line-height: 1.2;
    }
}

/* Navigation Container */
.bk-slider-section .bk-slider-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Navigation Button Wrapper */
.bk-slider-section .bk-nav-button-wrapper {
    flex-shrink: 0;
}

/* Navigation Button */
.bk-slider-section .bk-nav-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, calc(36px + (72 - 36) * ((100vw - 1024px) / (1560 - 1024))), 72px);
    height: clamp(36px, calc(36px + (72 - 36) * ((100vw - 1024px) / (1560 - 1024))), 72px);
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.35s ease;
}

.bk-slider-section .bk-nav-button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

/* Navigation Button Background */
.bk-slider-section .bk-nav-button-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: inherit;
    background: transparent;
    transition: border-color 0.35s ease;
    z-index: 1;
}

.bk-slider-section .bk-nav-button:hover:not(:disabled) .bk-nav-button-background {
    border-color: rgba(0, 0, 0, 0.2);
}

/* Navigation Icon Wrapper */
.bk-slider-section .bk-nav-icon-wrapper {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Navigation Icons - Font Awesome Pro */
.bk-slider-section .bk-nav-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(12px, calc(12px + (22 - 12) * ((100vw - 780px) / (1560 - 780))), 22px);
    line-height: 1;
    color: var(--bk-black);
    pointer-events: none;
}

/* Keyframe Animations */
@keyframes bk-icon-outgoing-prev {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateX(-100%);
    }
}

@keyframes bk-icon-incoming-prev {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) translateX(0);
    }
}

@keyframes bk-icon-outgoing-next {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateX(100%);
    }
}

@keyframes bk-icon-incoming-next {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) translateX(0);
    }
}

/* Outgoing Icon - Default State */
.bk-slider-section .bk-nav-icon-outgoing {
    opacity: 1;
    transform: translate(-50%, -50%) translateX(0);
}

/* Incoming Icon - Default State (Hidden, positioned outside) */
.bk-slider-section .bk-nav-icon-incoming {
    opacity: 0;
}

/* Prev Button - Incoming Icon starts from right (button width) */
.bk-slider-section .bk-nav-button-prev .bk-nav-icon-incoming {
    transform: translate(-50%, -50%) translateX(100%);
}

/* Next Button - Incoming Icon starts from left (button width) */
.bk-slider-section .bk-nav-button-next .bk-nav-icon-incoming {
    transform: translate(-50%, -50%) translateX(-100%);
}

/* Hover Animation - Prev Button */
.bk-slider-section .bk-nav-button-prev:hover:not(:disabled) .bk-nav-icon-outgoing {
    animation: bk-icon-outgoing-prev 0.25s ease-out forwards;
}

.bk-slider-section .bk-nav-button-prev:hover:not(:disabled) .bk-nav-icon-incoming {
    animation: bk-icon-incoming-prev 0.3s ease-out 0.2s forwards;
}

/* Hover Animation - Next Button */
.bk-slider-section .bk-nav-button-next:hover:not(:disabled) .bk-nav-icon-outgoing {
    animation: bk-icon-outgoing-next 0.25s ease-out forwards;
}

.bk-slider-section .bk-nav-button-next:hover:not(:disabled) .bk-nav-icon-incoming {
    animation: bk-icon-incoming-next 0.3s ease-out 0.2s forwards;
}

/* Reset on hover end - but only after animation completes */
.bk-slider-section .bk-nav-button:not(:hover):not(:disabled) .bk-nav-icon-outgoing {
    /* Animation will complete even after hover ends */
    opacity: 1;
    transform: translate(-50%, -50%) translateX(0);
}

.bk-slider-section .bk-nav-button:not(:hover):not(:disabled) .bk-nav-icon-incoming {
    opacity: 0;
}

.bk-slider-section .bk-nav-button-prev:not(:hover):not(:disabled) .bk-nav-icon-incoming {
    transform: translate(-50%, -50%) translateX(100%);
}

.bk-slider-section .bk-nav-button-next:not(:hover):not(:disabled) .bk-nav-icon-incoming {
    transform: translate(-50%, -50%) translateX(-100%);
}


/* Progress SVG */
.bk-slider-section .bk-nav-progress {
    position: absolute;
    /* Align SVG stroke with border - border is 2px, so we offset by 1px to center the stroke on border */
    top: 0px;
    left: 0px;
    width: calc(100% + 0px);
    height: calc(100% + 0px);
    /* Rotate to start from left side (9 o'clock position) instead of top (12 o'clock) */
    transform: rotate(0deg);
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.bk-slider-section .bk-nav-progress-path {
    stroke: var(--bk-cinnabar);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 226.08377075195312;
    stroke-dashoffset: 226.08377075195312;
    /* Stroke alignment - ensure stroke is centered on path */
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Transition for smooth rewind animation */
    transition: stroke-dashoffset 0.2s linear;
}

/* Rewind state - fast reverse animation */
.bk-slider-section .bk-nav-progress-path.bk-rewinding {
    transition: stroke-dashoffset 0.2s linear;
}

/* Carousel Wrapper */
.bk-slider-section .bk-slider-carousel-wrapper {
    margin-top: clamp(32px, calc(32px + (72 - 32) * ((100vw - 1024px) / (1560 - 1024))), 72px);
    margin-left: calc(-1 * var(--bk-gap));
    margin-right: calc(-1 * var(--bk-gap));
    padding-left: var(--bk-gap);
    padding-right: var(--bk-gap);
    box-sizing: border-box;
}

/* Swiper Container */
.bk-slider-section .bk-slider {
    height: auto;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .bk-slider-section .bk-slider {
        width: calc(100% + var(--bk-gap));
        max-width: calc(100vw - var(--bk-gap) * 2);
    }
}

@media (min-width: 1024px) {
    .bk-slider-section .bk-slider {
        width: calc(100% + ((100vw - var(--bk-container-width)) / 2));
        max-width: calc(100vw - var(--bk-gap) * 2);
    }
}

/* Swiper Wrapper */
.bk-slider-section .bk-slider .swiper-wrapper {
    height: auto;
}

/* Swiper Slide */
.bk-slider-section .bk-slider .swiper-slide {
    max-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    --bk-slide-gap: clamp(24px, calc(24px + (70 - 24) * ((100vw - 1024px) / (1560 - 1024))), 70px);
    --bk-slides: 1;
    width: calc((100% / var(--bk-slides)) - ((var(--bk-slide-gap) * (var(--bk-slides) - 1)) / var(--bk-slides)));
    margin-right: var(--bk-slide-gap);
}

.bk-slider-section .bk-slider .swiper-slide:last-child {
    margin-right: 0;
}

@media (min-width: 768px) {
    .bk-slider-section .bk-slider .swiper-slide {
        --bk-slides: 1.5;
    }
}

@media (min-width: 1024px) {
    .bk-slider-section .bk-slider .swiper-slide {
        --bk-slides: 3.3;
    }
}

/* Slide Link */
.bk-slider-section .bk-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Slide Image Container */
.bk-slider-section .bk-slide-image {
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 500 / 350;
    margin-bottom: clamp(16px, calc(16px + (24 - 16) * ((100vw - 1024px) / (1560 - 1024))), 24px);
    border-radius: 15px;
}

.bk-slider-section .bk-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.41, 0.41, 0.35, 1.2);
}

.bk-slider-section .bk-slide-link:hover .bk-slide-image img {
    transform: scale(1.1);
}

/* Slide Text */
.bk-slider-section .bk-slide-text {
    margin-top: clamp(16px, calc(16px + (24 - 16) * ((100vw - 1024px) / (1560 - 1024))), 24px);
}

.bk-slider-section .bk-slide-text h6 {
    font-size: var(--bk-h6);
    line-height: 1.4;
    font-weight: 500;
    color: var(--bk-black);
    margin: 0;
    transition: color 0.35s ease;
    /* Multi-line clamp - max 3 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-slider-section  .tp-blog-masonry-content .bk-slide-text {
    font-size: var(--bk-h6);
    line-height: 1.4;
    font-weight: 500;
    min-height: 100px;
    color: var(--bk-black);
    transition: color 0.35s ease;
    /* Multi-line clamp - max 3 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-slider-section .bk-slide-link:hover .bk-slide-text h6 {
    color: var(--bk-cinnabar);
}

/* Responsive Adjustments */
@media screen and (max-width: 767px) {
    .bk-slider-section {
        padding-left: clamp(16px, calc(16px + (24 - 16) * ((100vw - 320px) / (767 - 320))), 24px);
        padding-right: clamp(16px, calc(16px + (24 - 16) * ((100vw - 320px) / (767 - 320))), 24px);
        padding-top: clamp(40px, calc(40px + (60 - 40) * ((100vw - 320px) / (767 - 320))), 60px);
        padding-bottom: clamp(40px, calc(40px + (60 - 40) * ((100vw - 320px) / (767 - 320))), 60px);
    }

    .bk-slider-section .bk-slider-heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .bk-slider-section .bk-slider-title h2 {
        font-size: clamp(28px, calc(28px + (34 - 28) * ((100vw - 320px) / (767 - 320))), 34px);
    }

    .bk-slider-section .bk-slider .swiper-slide {
        margin-right: clamp(16px, calc(16px + (24 - 16) * ((100vw - 320px) / (767 - 320))), 24px);
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .bk-slider-section {
        padding-left: clamp(20px, calc(20px + (24 - 20) * ((100vw - 768px) / (1023 - 768))), 24px);
        padding-right: clamp(20px, calc(20px + (24 - 20) * ((100vw - 768px) / (1023 - 768))), 24px);
    }
}

