/* =====================================================
   Stories in Transit Carousel — Main Stylesheet
   ===================================================== */

/* ── Wrapper ── */
.sit-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
}

/* ── Track Container ── */
.sit-carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.sit-carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Item ── */
.sit-carousel-item {
    flex-shrink: 0;
    cursor: pointer;
    padding: 0 8px;
    box-sizing: border-box;
}

.sit-carousel-item-inner {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.sit-carousel-item-inner img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sit-carousel-item:hover .sit-carousel-item-inner img {
    transform: scale(1.04);
}

/* ── Hover Overlay ── */
.sit-carousel-hover-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(224, 90, 90, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

.sit-carousel-item:hover .sit-carousel-hover-overlay {
    opacity: 1;
}

.sit-zoom-icon {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.sit-carousel-item:hover .sit-zoom-icon {
    transform: scale(1);
}

/* ── Item Label ── */
.sit-carousel-item-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    padding: 8px 0 0 2px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Arrows ── */
.sit-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, transform 0.2s ease;
    padding: 0;
    line-height: 0;
}

.sit-arrow:hover {
    background-color: rgba(0, 0, 0, 0.75);
    transform: translateY(-60%) scale(1.08);
}

.sit-arrow-prev { left: 6px; }
.sit-arrow-next { right: 6px; }

.sit-arrow.sit-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Dots ── */
.sit-dots-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.sit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cccccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.25s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.sit-dot.active {
    background-color: #e05a5a;
    transform: scale(1.35);
}

/* =====================================================
   POPUP
   ===================================================== */
.sit-popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sit-popup-overlay.sit-open {
    opacity: 1;
    visibility: visible;
}

.sit-popup-inner {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    max-width: 1100px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    transform: scale(0.94) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sit-popup-overlay.sit-open .sit-popup-inner {
    transform: scale(1) translateY(0);
}

/* ── Close Button ── */
.sit-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.sit-popup-close:hover {
    background: #ffffff;
    transform: scale(1.1) rotate(90deg);
}

/* ── Popup Body ── */
.sit-popup-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

/* ── Image Panel ── */
.sit-popup-image-panel {
    position: relative;
    flex-shrink: 0;
    width: 65%;
    background: #1a1a1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sit-popup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
}

.sit-popup-img.loading {
    opacity: 0.4;
}

/* ── Popup Nav Buttons ── */
.sit-popup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    transition: background-color 0.25s ease;
}

.sit-popup-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.75);
}

.sit-popup-prev { left: 12px; }
.sit-popup-next { right: 12px; }

/* ── Details Panel ── */
.sit-popup-details {
    flex: 1;
    background-color: #f9f5f0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sit-popup-details-inner {
    padding: 48px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sit-popup-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    margin: 0 0 20px 0;
    letter-spacing: -0.3px;
}

.sit-popup-description {
    font-size: 15px;
    color: #555555;
    line-height: 1.7;
    margin: 0;
}

/* ── Counter ── */
.sit-popup-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 12px;
    border-radius: 20px;
    pointer-events: none;
    white-space: nowrap;
}

/* =====================================================
   RESPONSIVE — Tablet
   ===================================================== */
@media (max-width: 1024px) {
    .sit-popup-image-panel {
        width: 55% !important;
    }

    .sit-popup-details-inner {
        padding: 32px 28px;
    }

    .sit-popup-title {
        font-size: 22px;
    }
}

/* =====================================================
   RESPONSIVE — Mobile
   ===================================================== */
@media (max-width: 767px) {
    .sit-popup-body {
        flex-direction: column;
        overflow-y: auto;
    }

    .sit-popup-image-panel {
        width: 100% !important;
        height: 55vw;
        min-height: 200px;
        flex-shrink: 0;
    }

    .sit-popup-details {
        flex: none;
        overflow-y: visible;
    }

    .sit-popup-details-inner {
        padding: 24px 20px;
        justify-content: flex-start;
    }

    .sit-popup-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .sit-popup-description {
        font-size: 14px;
    }

    .sit-popup-inner {
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 10px;
    }

    .sit-arrow {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .sit-popup-overlay {
        padding: 10px;
    }

    .sit-carousel-item {
        padding: 0 4px;
    }

    .sit-popup-counter {
        font-size: 11px;
    }
}
