/* ============================================
   HomePhoto Slider - Main Container
   ============================================ */
.homephoto-main {
    position: relative;
    width: 100%;
    margin-bottom:48px !important;
}

.home-photos-container {
    width: 100%;
    --ratio-desktop: 2 / 1;
    --ratio-mobile: 1.3 / 1;
}

/* ============================================
   Viewport - contains slides + nav arrows
   ============================================ */
.photos-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius:32px;
}

.photos-wrapper {
    display: flex;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: grab;
}

.photos-wrapper:active {
    cursor: grabbing;
}

/* ============================================
   Slides
   ============================================ */
.home-photo-container {
    min-width: 100%;
    max-width: 100%;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    cursor: default;
    aspect-ratio: var(--ratio-desktop);
    overflow: hidden;
}

.home-photo-container.dragging {
    cursor: grabbing;
}

.home-photo-container a {
    cursor: pointer;
}

.home-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
}

.photo-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ============================================
   Navigation Arrows - centered on sides
   ============================================ */
.photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    color: #232323;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
    opacity: 1;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-nav.prev {
    left: 12px;
}

.photo-nav.next {
    right: 12px;
}

.photo-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.photo-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Hide nav for single photo */
.home-photos-container[data-count="1"] .photo-nav {
    display: none;
}

/* ============================================
   Indicators - below the image
   ============================================ */
.photo-indicators {
    display: flex;
    width: 100%;
    gap: 8px;
    justify-content: center;
    margin-top: 2px;
}

.photo-indicator {
    flex: 1;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0.45;
    max-width: 200px;
}

.photo-indicator.active {
    opacity: 1;
}

.photo-indicator:hover {
    opacity: 0.8;
}

.photo-indicator.active:hover {
    opacity: 1;
}

/* Timer bar above each title */
.indicator-timer {
    width: 100%;
    height: 5px;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
    border-radius: 100px;
}

.indicator-timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: hsl(0, 0%, 78%);
    transition: none;
    border-radius: 100px;
}

.photo-indicator.active .indicator-timer-progress {
    /* color managed dynamically by JS */
}

/* Title below the bar */
.indicator-title {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    padding: 10px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.photo-indicator.active .indicator-title {
    color: #232323;
    font-weight: 500;
}

/* Hide indicators for single photo */
.home-photos-container[data-count="1"] .photo-indicators {
    display: none;
}

/* ============================================
   Link indicator (top-right icon)
   ============================================ */
.link-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    mix-blend-mode: difference;
}

.link-indicator img {
    width: 100%;
    height: 100%;
    filter: invert(1);
    mix-blend-mode: difference;
    pointer-events: auto;
}

.link-indicator:hover {
    opacity: 0.8;
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    .home-photo-container {
        aspect-ratio: var(--ratio-mobile);
    }

    /* Hide arrow navigation on mobile */
    .photo-nav {
        display: none;
    }

    /* Indicators become dots */
    .photo-indicators {
        gap: 6px;
        padding: 12px 0;
        justify-content: center;
    }

    .photo-indicator {
        flex: 0 0 auto;
        max-width: none;
        width: 8px;
        height: 8px;
        opacity: 1;
    }

    .indicator-timer {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #d0d0d0;
    }

    .indicator-timer-progress {
        border-radius: 50%;
    }

    .photo-indicator.active .indicator-timer {
        background: #d0d0d0;
    }

    /* Hide titles on mobile */
    .indicator-title {
        display: none;
    }
}

/* ============================================
   Touch: keep nav hidden on touch devices
   ============================================ */
@media (hover: none) {
    .photo-nav {
        display: none;
    }
}
