/* ==========================================================================
   NW Reviews Slider – Light & Dark Theme
   ========================================================================== */

/* --- FOUC prevention: slider starts hidden (inline style="opacity:0"),
       CSS animation reveals it once stylesheet is loaded --- */
@keyframes nwSliderReveal {
    to { opacity: 1; }
}

/* --- Layout --- */
.nw-slider {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    box-sizing: border-box;
    animation: nwSliderReveal 0.3s ease 0.05s forwards;
}
.nw-slider *, .nw-slider *::before, .nw-slider *::after { box-sizing: border-box; }
.nw-slider {
    --nw-chevron-size: 18px;
}

/* --- Summary (left column) --- */
.nw-slider__summary {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;

}
.nw-slider__logo {
    max-height: 48px;
    max-width: 160px;
    object-fit: contain;
    margin-bottom: 6px;
}
.nw-slider__title {
    font-size: 1.15em;
    font-weight: 700;
    margin: 0 0 2px;
    line-height: 1.3;
}
.nw-slider__subtitle {
    font-size: 0.85em;
    margin: 0 0 12px;
    opacity: 0.7;
}
.nw-slider__stars { margin: 6px 0; letter-spacing: 2px; font-size: 1.2em; }
.nw-slider__stars .nw-star { color: #f5b301; }
.nw-slider__stars .nw-star--empty { color: #ccc; }
.nw-slider__score {
    font-size: 1.6em;
    font-weight: 700;
    margin-top: 4px;
}
.nw-slider__score-suffix { font-weight: 400; font-size: 0.6em; opacity: 0.5; }
.nw-slider__count {
    font-size: 0.82em;
    margin: 8px 0 16px;
    opacity: 0.65;
}
.nw-slider__btn {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.nw-slider__view-link {
    display: inline-block;
    font-size: 0.78em;
    margin-top: 10px;
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.nw-slider__view-link:hover { opacity: 1; text-decoration: underline; }

/* --- Google icon on card --- */
.nw-slider__google-icon {
    flex: 0 0 auto;
    height: 18px;
    width: auto;
    align-self: flex-start;
    margin-top: 2px;
}
.nw-slider__google-icon--g {
    height: 20px;
    width: 20px;
    object-fit: contain;
}

/* --- Track wrapper --- */
.nw-slider__track-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 16px 44px;
}
.nw-slider__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 0;
    -webkit-user-select: none;
    user-select: none;
}
.nw-slider__track::-webkit-scrollbar { display: none; }

/* --- Arrows --- */
.nw-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    font-size: var(--nw-chevron-size, 18px);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nw-slider__arrow:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.nw-slider__arrow--prev { left: 4px; }
.nw-slider__arrow--next { right: 4px; }
.nw-slider__arrow { z-index: 3; }
.nw-slider__arrow[disabled] { opacity: 0.3; pointer-events: none; }

/* --- Card --- */
.nw-slider__card {
    flex: 0 0 calc((100% - (var(--nw-cards-visible, 3) - 1) * 16px) / var(--nw-cards-visible, 3));
    min-width: 200px;
    scroll-snap-align: start;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s ease;
}
.nw-slider__card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.nw-slider__card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nw-slider__avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
}
.nw-slider__author-info { flex: 1; min-width: 0; }
.nw-slider__author {
    display: block;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nw-slider__date {
    display: block;
    font-size: 0.75em;
    opacity: 0.55;
}
.nw-slider__google {
    flex: 0 0 auto;
    font-size: 0.75em;
    font-weight: 500;
    opacity: 0.4;
    align-self: flex-start;
    margin-top: 2px;
}
.nw-slider__card-stars { font-size: 0.95em; letter-spacing: 1px; }
.nw-slider__card-stars .nw-star { color: #f5b301; }
.nw-slider__card-stars .nw-star--empty { color: #ccc; }
.nw-slider__card-text {
    font-size: 0.85em;
    margin: 0;
    line-height: 1.55;
    flex: 1;
}
.nw-slider__card-more {
    font-size: 0.8em;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    cursor: pointer;
}

/* ==========================================================================
   LIGHT THEME
   ========================================================================== */
.nw-slider--light {
    background: #ffffff;
    color: #1a1a1a;
}

.nw-slider--light .nw-slider__btn {
    border: 1.5px solid #1a1a1a;
    color: #1a1a1a;
    background: transparent;
}
.nw-slider--light .nw-slider__btn:hover { background: #1a1a1a; color: #fff; }
.nw-slider--light .nw-slider__arrow { background: #fff; color: #333; }
.nw-slider--light .nw-slider__card {
    background: #fff;
    border: 1px solid #e8e8e8;
}
.nw-slider--light .nw-slider__card-more { color: #1a73e8; }
.nw-slider--light .nw-slider__view-link { color: #555; }

/* ==========================================================================
   DARK THEME
   ========================================================================== */
.nw-slider--dark {
    background: #1a1a1a;
    color: #f1f1f1;
}

.nw-slider--dark .nw-slider__btn {
    border: 1.5px solid #f1f1f1;
    color: #f1f1f1;
    background: transparent;
}
.nw-slider--dark .nw-slider__btn:hover { background: #f1f1f1; color: #1a1a1a; }
.nw-slider--dark .nw-slider__arrow { background: #2d2d2d; color: #eee; }
.nw-slider--dark .nw-slider__card {
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
}
.nw-slider--dark .nw-slider__card-more { color: #8ab4f8; }
.nw-slider--dark .nw-slider__view-link { color: #aaa; }
.nw-slider--dark .nw-slider__date { opacity: 0.45; }
.nw-slider--dark .nw-slider__google { opacity: 0.35; }

/* ==========================================================================
   PEEK MODE – vyčuhující další karta
   ========================================================================== */
.nw-slider--peek .nw-slider__track { padding-left: 8px; padding-right: 24px; }

/* ==========================================================================
   SHADOW MODE – stín pod kartami
   ========================================================================== */
.nw-slider--shadow .nw-slider__track {
    padding-top: 12px;
    padding-bottom: 12px;
}
.nw-slider--shadow .nw-slider__card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.nw-slider--shadow .nw-slider__card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}
.nw-slider--shadow.nw-slider--dark .nw-slider__card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.nw-slider--shadow.nw-slider--dark .nw-slider__card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   FOTKY RECENZÍ — THUMBNAILY
   ========================================================================== */
.nw-slider__card-photos {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
}
.nw-slider__card-photo {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.nw-slider__card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    display: block;
}
.nw-slider__card-photo:hover img {
    transform: scale(1.08);
}
.nw-slider__card-photo--more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
/* Dark mode: jemný border na thumbnailech */
.nw-slider--dark .nw-slider__card-photo {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   NW LIGHTBOX
   ========================================================================== */
.nw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    animation: nwLightboxFadeIn 0.2s ease;
}
@keyframes nwLightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.nw-lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}
.nw-lightbox__close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 2;
}
.nw-lightbox__close:hover {
    opacity: 1;
}
.nw-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.nw-lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.25);
}
.nw-lightbox__arrow--prev { left: 20px; }
.nw-lightbox__arrow--next { right: 20px; }
.nw-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .nw-slider { flex-direction: column; --nw-cards-visible: var(--nw-cards-mobile, 1) !important; }
    .nw-slider__summary {
        flex: 0 0 auto;
        padding: 24px 20px;
    }
    .nw-slider__card-photo {
        width: 48px;
        height: 48px;
    }
    .nw-lightbox__arrow { width: 40px; height: 40px; font-size: 26px; }
    .nw-lightbox__arrow--prev { left: 10px; }
    .nw-lightbox__arrow--next { right: 10px; }
}
