/* UBK Slider Styles */
.ubk-slider-container {
    position: relative;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: var(--radius-lg, 10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ubk-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.ubk-slide {
    min-width: 100%;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ubk-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

/* Navigation Buttons */
.ubk-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: background 0.3s;
    opacity: 0;
}

.ubk-slider-container:hover .ubk-slider-btn {
    opacity: 1;
}

.ubk-slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ubk-slider-prev {
    left: 10px;
}

.ubk-slider-next {
    right: 10px;
}

/* Dots */
.ubk-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.ubk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.ubk-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Manual Grid Mode (for < 3 images) */
.ubk-gallery-grid {
    display: flex;
    gap: 35px;
    /* Increased gap to prevent overlap */
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 0;
}

.ubk-gallery-item {
    flex: 1 1 600px;
    /* Allow to grow for landscape */
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: visible;
    transition: transform 0.3s ease;
}

.ubk-gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.ubk-gallery-item:hover {
    transform: translateY(-5px);
}

.ubk-gallery-item:hover img {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Caption Header (Floating Capsule Style - Above Image) */
.ubk-caption-header {
    align-self: flex-start;
    position: relative;
    padding: 5px 14px;
    /* Slightly tighter padding */
    background: var(--primary-green, #2D7A3E);
    color: #fff;
    border-radius: 50px;
    margin-bottom: 15px;
    /* More space between label and image */
    margin-left: 0;
    border-left: 3px solid var(--gold, #D4AF37);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    transition: all 0.3s ease;
}

.ubk-caption-text {
    font-size: 0.85rem;
    /* Slightly smaller to fit better */
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    display: block;
    white-space: nowrap;
    /* Prevent title wrapping */
}

.ubk-caption-number {
    display: none;
}

.ubk-gallery-item:hover .ubk-caption-header {
    background: var(--primary-dark, #1A5028);
    transform: translateY(-2px);
}

/* Slider Specific Adjustments */
.ubk-slide {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 15px;
    /* Padding for the capsule to breathe in track */
}

.ubk-slider-container {
    overflow: hidden;
    /* Back to hidden for slider track safety */
}

/* Responsive */
@media (max-width: 768px) {
    .ubk-gallery-grid {
        gap: 20px;
    }

    .ubk-slide img,
    .ubk-gallery-item img {
        height: 250px;
    }

    .ubk-slider-btn {
        opacity: 1;
    }
}