/**
 * Slider style for Lubinik 
 */



.lubinik-list-slider {
    width: 100%;
    max-width: var(--lubinik-container-width-lg);
    margin: 0 auto;
    padding: var(--lubinik-spacing-lg) 0;
    background-color: var(--lubinik-plugin-list-slider-bg-color);
}

/* Header section */
.lubinik-slider-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.lubinik-slider-title {
    font-size: 28px;
    margin: 0;
    color: var(--lubinik-plugin-list-slider-title-color);
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.lubinik-slider-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--lubinik-plugin-list-slider-title-after-color);
}

.lubinik-slider-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.lubinik-slider-filter {
    display: flex;
    align-items: center;
}

.lubinik-filter-label {
    font-weight: 600;
    margin-right: 10px;
    color: var(--lubinik-plugin-list-slider-filter-text-color);
}

.lubinik-slider-filter-select {
    padding: 8px 15px;
    border: 1px solid var(--lubinik-plugin-list-slider-filter-border-color);
    border-radius: 4px;
    background-color: var(--lubinik-plugin-list-slider-filter-bg-color);
    color: var(--lubinik-plugin-list-slider-filter-text-color);
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('../../img/arrow-down.svg');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}

.lubinik-slider-filter-select:focus {
    outline: none;
    border-color: var(--lubinik-plugin-list-slider-filter-focus-color);
}

/* Slider container */
.lubinik-slider-container {
    position: relative;
    margin-bottom: 40px;
    overflow: visible; /* allow arrows to sit outside */
}

.lubinik-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 15px 0;
}

.lubinik-slider-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* Slider items */
.lubinik-slider-item {
    flex: 0 0 calc(100% / 3);
    padding: 0 15px;
    box-sizing: border-box;
}






.lubinik-slider-card {
    /* Remove outer card visuals; inner content will render the card */
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    transition: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 0;
}

/* Hover elevation will be applied to the inner content card below */

/* Image section */
.lubinik-slider-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin-top: 50px;
    background: transparent;
    margin-bottom: var(--lubinik-spacing-sm);
}

.lubinik-slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.lubinik-slider-card:hover .lubinik-slider-image img { transform: none; }

.lubinik-no-image {
    height: 100%;
    background-color: var(--lubinik-plugin-list-slider-no-image-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lubinik-plugin-list-slider-no-image-text-color);
}

/* Price tag */
.lubinik-slider-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--lubinik-plugin-list-slider-price-bg-color);
    color: var(--lubinik-plugin-list-slider-price-text-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
}

/* Type tag */
.lubinik-slider-type {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--lubinik-plugin-list-slider-type-bg-color);
    color: var(--lubinik-plugin-list-slider-type-text-color);
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* Content section */
.lubinik-slider-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
    background: var(--lubinik-plugin-list-slider-card-bg-color);
    border: 1px solid var(--lubinik-plugin-list-slider-border-color);
    border-radius: 8px;
    box-shadow: 0 2px 15px var(--lubinik-plugin-list-slider-shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Elevate inner content card on hover */
.lubinik-slider-card:hover .lubinik-slider-content {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--lubinik-plugin-list-slider-shadow-hover-color);
}

/* Status pill (in content, above title) */
.lubinik-slider-status {
    position: static;
    display: inline-block;
    align-self: flex-start;
    background-color: var(--lubinik-plugin-list-slider-type-bg-color);
    color: var(--lubinik-plugin-list-slider-type-text-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lubinik-slider-content h3.lubinik-slider-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px;
    color: var(--lubinik-plugin-list-slider-title-color);
    padding-bottom: 0;
}

.lubinik-slider-content h3.lubinik-slider-title:after {
    display: none;
}

/* Meta information */
.lubinik-slider-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--lubinik-plugin-list-slider-border-color);
}

.lubinik-slider-meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--lubinik-plugin-list-slider-text-color);
}

.lubinik-meta-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(46%) sepia(99%) saturate(1%) hue-rotate(314deg) brightness(90%) contrast(95%);
}

.capacity-icon {
    background-image: url('../../img/person.svg');
}

.bedroom-icon {
    background-image: url('../../img/bedroom.svg');
}

.bathroom-icon {
    background-image: url('../../img/bathroom.svg');
}

/* Excerpt */
.lubinik-slider-excerpt {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--lubinik-plugin-list-slider-excerpt-color);
    line-height: 1.5;
    opacity: 0.85;
}

.lubinik-slider-excerpt p {
    margin: 0;
}

/* Skills */
.lubinik-slider-skills-container {
    margin-bottom: 15px;
    overflow: hidden;
}

.lubinik-slider-skills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.lubinik-slider-skills::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.lubinik-skill-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
}

.lubinik-skill-tag.primary {
    background-color: var(--lubinik-plugin-list-slider-skills-tag-bg-primary-color);
    color: var(--lubinik-plugin-list-slider-skills-tag-text-primary-color);
}

.lubinik-skill-tag.secondary {
    background-color: var(--lubinik-plugin-list-slider-skills-tag-bg-secondary-color);
    color: var(--lubinik-plugin-list-slider-skills-tag-text-secondary-color);
}

.lubinik-more-skills {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    background-color: var(--lubinik-plugin-list-slider-border-color);
    color: var(--lubinik-plugin-list-slider-text-more-color);
}

/* Footer with button */
.lubinik-slider-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}

.lubinik-slider-view-details {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.lubinik-slider-btn {
    display: inline-flex;
    align-items: center;
    color: var(--lubinik-plugin-list-slider-view-detail-text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.lubinik-slider-btn:hover {
    color: var(--lubinik-plugin-list-slider-view-detail-text-hover-color);
    text-decoration: none;
}

.lubinik-arrow-icon {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.lubinik-slider-btn:hover .lubinik-arrow-icon {
    transform: translateX(5px);
}

/* Navigation */
.lubinik-slider-nav {
    position: absolute;
    inset: 0; /* overlay entire slider container */
    display: block; /* not flex; children positioned individually */
    margin: 0;
    pointer-events: none; /* only buttons/dots receive events */
    z-index: 15;
}

.lubinik-slider-prev,
.lubinik-slider-next {
    background-color: var(--lubinik-plugin-list-slider-nav-bg-color);
    color: var(--lubinik-plugin-list-slider-nav-text-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    position: absolute; /* place on sides */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
}

.lubinik-slider-prev:before,
.lubinik-slider-next:before {
    content: '';
    border: solid var(--lubinik-plugin-list-slider-nav-text-color);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    position: absolute;
}

.lubinik-slider-prev { left: 0; transform: translate(calc(-100% - var(--lubinik-slider-nav-outside, 0px)), -50%); }
.lubinik-slider-prev:before { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(135deg); }

.lubinik-slider-next { right: 0; transform: translate(calc(100% + var(--lubinik-slider-nav-outside, 0px)), -50%); }
.lubinik-slider-next:before { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); }

.lubinik-slider-prev:hover,
.lubinik-slider-next:hover {
    background-color: var(--lubinik-plugin-list-slider-nav-hover-bg-color);
}

.lubinik-slider-dots {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0;
    pointer-events: auto;
}

.lubinik-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--lubinik-plugin-list-slider-dot-bg-color);
    border: none;
    padding: 0;
    cursor: pointer;
}

.lubinik-slider-dot.active {
    background-color: var(--lubinik-plugin-list-slider-dot-active-bg-color);
}

/* Flip card — no template changes needed */
.lubinik-slider-card {
  position: relative;
  perspective: 1000px;
  height: var(--flip-card-h, 320px);
}

.lubinik-slider-image,
.lubinik-slider-content {
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(.2,.7,.3,1);
  border-radius: 12px;
  overflow: hidden;
}

/* Front face = image */
.lubinik-slider-image {
  z-index: 1;
  transform: rotateY(0deg);
  background: transparent;
}
.lubinik-slider-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #fff; /* letterbox background so full image is visible */
}

/* Back face = content */
.lubinik-slider-content {
  z-index: 2;
  transform: rotateY(180deg);
}

/* Flip on hover/focus */
.lubinik-slider-card:hover .lubinik-slider-image,
.lubinik-slider-card:focus-within .lubinik-slider-image {
  transform: rotateY(-180deg);
}
.lubinik-slider-card:hover .lubinik-slider-content,
.lubinik-slider-card:focus-within .lubinik-slider-content {
  transform: rotateY(0deg);
}

/* Neutralize previous hover elevate so rotate rules */
.lubinik-slider-card:hover .lubinik-slider-content {
  transform: rotateY(0deg) !important;
}

/* Touch devices: keep single-face card (image only) and avoid stacking text */
@media (pointer: coarse) {
  .lubinik-slider-card { height: var(--flip-card-h, 320px); }
  .lubinik-slider-image,
  .lubinik-slider-content {
    position: absolute; inset: 0;
  }
  .lubinik-slider-image { transform: none !important; z-index: 2; }
  .lubinik-slider-content { transform: rotateY(180deg) !important; z-index: 1; pointer-events: none; visibility: hidden; }
  /* When tapped, reveal the back face */
  .lubinik-slider-card.is-flipped .lubinik-slider-image { transform: rotateY(-180deg) !important; z-index: 1; }
  .lubinik-slider-card.is-flipped .lubinik-slider-content { transform: rotateY(0deg) !important; z-index: 2; pointer-events: auto; visibility: visible; }

  /* Neutralize sticky :hover on touch so reset shows the image */
  .lubinik-slider-card:hover .lubinik-slider-image,
  .lubinik-slider-card:focus-within .lubinik-slider-image { transform: none !important; }
  .lubinik-slider-card:hover .lubinik-slider-content,
  .lubinik-slider-card:focus-within .lubinik-slider-content { transform: rotateY(180deg) !important; }

  /* Preserve flipped state even if :hover sticks */
  .lubinik-slider-card.is-flipped:hover .lubinik-slider-image,
  .lubinik-slider-card.is-flipped:focus-within .lubinik-slider-image { transform: rotateY(-180deg) !important; }
  .lubinik-slider-card.is-flipped:hover .lubinik-slider-content,
  .lubinik-slider-card.is-flipped:focus-within .lubinik-slider-content { transform: rotateY(0deg) !important; }

  /* Explicit default state */
  .lubinik-slider-card:not(.is-flipped) .lubinik-slider-image { transform: none !important; z-index: 2; visibility: visible; }
  .lubinik-slider-card:not(.is-flipped) .lubinik-slider-content { transform: rotateY(180deg) !important; z-index: 1; visibility: hidden; pointer-events: none; }
}

/* Fallback for devices that don't report pointer:coarse but have no hover (iOS edge cases) */
@media (hover: none) {
  .lubinik-slider-card { height: var(--flip-card-h, 320px); }
  .lubinik-slider-image,
  .lubinik-slider-content { position: absolute; inset: 0; }
  .lubinik-slider-image { transform: none !important; z-index: 2; }
  .lubinik-slider-content { transform: rotateY(180deg) !important; z-index: 1; pointer-events: none; visibility: hidden; }
  .lubinik-slider-card.is-flipped .lubinik-slider-image { transform: rotateY(-180deg) !important; z-index: 1; }
  .lubinik-slider-card.is-flipped .lubinik-slider-content { transform: rotateY(0deg) !important; z-index: 2; pointer-events: auto; visibility: visible; }

  .lubinik-slider-card:hover .lubinik-slider-image,
  .lubinik-slider-card:focus-within .lubinik-slider-image { transform: none !important; }
  .lubinik-slider-card:hover .lubinik-slider-content,
  .lubinik-slider-card:focus-within .lubinik-slider-content { transform: rotateY(180deg) !important; }

  .lubinik-slider-card.is-flipped:hover .lubinik-slider-image,
  .lubinik-slider-card.is-flipped:focus-within .lubinik-slider-image { transform: rotateY(-180deg) !important; }
  .lubinik-slider-card.is-flipped:hover .lubinik-slider-content,
  .lubinik-slider-card.is-flipped:focus-within .lubinik-slider-content { transform: rotateY(0deg) !important; }
}

@media (min-width: 1281px) and (max-width: 1536px) {
    .lubinik-slider-prev { left: 8px;  transform: translateY(-50%); }
    .lubinik-slider-next { right: 8px; transform: translateY(-50%); }
    /* keep pointer-events working because we’re no longer outside */

    /* Flip card — no template changes needed */
    .lubinik-slider-card {
    position: relative;
    perspective: 1000px;
    height: var(--flip-card-h, 320px);
    width: 80%;
    margin: 0 auto;
  }
  }


@media (max-width: 1280px) {
    .lubinik-slider-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lubinik-slider-controls {
        width: 100%;
        margin-top: 15px;
    }
    
    .lubinik-slider-filter {
        width: 100%;
    }
    
    .lubinik-slider-filter-select {
        width: 100%;
    }
    
    .lubinik-slider-item {
        flex: 0 0 50%;
        padding: 0 15px; /* use inner padding for spacing to keep transforms aligned */
    }

    /* Preserve intended spacing on mobile */
    .lubinik-slider-wrapper {
        padding: 15px 0;
    }
    .lubinik-slider-content {
        padding-bottom: 50px;
    }
    /* Ensure the card fills its item; spacing provided by item padding */
    .lubinik-slider-card {
        margin: 0;
    }
    
    /* Place nav arrows on each side of the visible card */
    .lubinik-slider-nav {
        position: absolute;
        inset: 0; /* cover the slider container */
        display: block; /* override flex */
        z-index: 20;
        pointer-events: none; /* only buttons receive events */
    }
    .lubinik-slider-prev,
    .lubinik-slider-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        margin: 0;
        pointer-events: auto;
    }
    .lubinik-slider-prev { left: var(--lubinik-slider-nav-offset, 8px); }
    .lubinik-slider-next { right: var(--lubinik-slider-nav-offset, 8px); }
    
    .lubinik-slider-meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .lubinik-slider-nav {
        position: static;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-lg);
        margin-top: var(--spacing-md);
        pointer-events: auto;
    }

    .lubinik-slider-prev,
    .lubinik-slider-next {
        position: relative;
        transform: none;
    }

    .lubinik-slider-dots {
        display: none;
    }

    .lubinik-slider-item {
        flex: 0 0 100%;
    }

    .lubinik-slider-skills {
        flex-wrap: wrap;
        overflow: visible;
        row-gap: 8px;
        column-gap: 8px;
        justify-content: flex-start;
    }

    .lubinik-skill-tag,
    .lubinik-more-skills {
        white-space: normal;
    }
}

/* 2 items per row between 1281px and 1920px */
@media (min-width: 1281px) and (max-width: 1920px) {
    .lubinik-slider-item {
        flex: 0 0 calc(100% / 2);
    }
}
