/**
 * PSS Mountains & Weather Styles
 */

.pss-mountain-page {
    max-width: 1280px;
    width: 100%;
    margin: 30px auto 60px auto;
    padding: 0 20px;
    font-family: inherit;
    color: #333333;
    box-sizing: border-box;
}

.pss-mountain-header {
    margin-bottom: 25px;
}

.pss-mountain-title {
    font-size: 32px;
    font-weight: 700;
    color: #c90d18;
    margin: 0 0 10px 0;
}

/* Tabs */
.pss-mountain-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    padding: 0;
    list-style: none;
}

.pss-mountain-tab-item {
    margin: 0;
}

.pss-mountain-tab-btn {
    display: block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pss-mountain-tab-btn:hover {
    color: #c90d18;
    background: #f1f5f9;
}

.pss-mountain-tab-item.active .pss-mountain-tab-btn {
    background: #c90d18;
    color: #ffffff !important;
    border-color: #c90d18;
}

.pss-mountain-tab-pane {
    display: none;
    animation: pssFadeIn 0.3s ease;
}

.pss-mountain-tab-pane.active {
    display: block;
}

@keyframes pssFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Weather External Links */
.pss-weather-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.pss-weather-link-card {
    flex: 1;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pss-weather-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pss-weather-link-card a {
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pss-weather-link-card img {
    max-width: 70px;
    height: auto;
}

/* Tables */
.pss-mountain-section-heading {
    font-size: 22px;
    font-weight: 700;
    color: #c90d18;
    margin: 30px 0 15px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #f1f5f9;
}

.pss-table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 25px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eef0f3;
}

.pss-mountain-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
}

.pss-mountain-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 2px solid #e2e8f0;
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pss-mountain-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}

.pss-mountain-table tr:hover td {
    background: #fafafa;
}

.pss-mountain-table td.text-left,
.pss-mountain-table th.text-left {
    text-align: left;
}

/* Weather & Rain Icons */
.pss-weather-cell, .pss-rain-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.weather_1, .weather_2, .weather_3, .weather_4, .weather_5,
.rain_1, .rain_2, .rain_3, .rain_4, .rain_5, .rain_6 {
    display: block;
    width: 40px;
    height: 40px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin: 0 auto 4px auto;
}

.weather_1 { background-image: url('../../images/weather_1.png'); }
.weather_2 { background-image: url('../../images/weather_2.png'); }
.weather_3 { background-image: url('../../images/weather_3.png'); }
.weather_4 { background-image: url('../../images/weather_4.png'); }
.weather_5 { background-image: url('../../images/weather_5.png'); }

.rain_1 { background-image: url('../../images/rain_1.png'); }
.rain_2 { background-image: url('../../images/rain_2.png'); }
.rain_3 { background-image: url('../../images/rain_3.png'); }
.rain_4 { background-image: url('../../images/rain_4.png'); }
.rain_5 { background-image: url('../../images/rain_5.png'); }
.rain_6 { background-image: url('../../images/rain_6.png'); }

.weather_text {
    font-size: 12px;
    color: #475569;
    margin: 0;
    line-height: 1.2;
}

.mountain_avalanche_link img {
    height: 30px;
    width: auto;
    transition: transform 0.2s;
}

.mountain_avalanche_link:hover img {
    transform: scale(1.1);
}

/* Avalanche Tab */
.pss-avalanche-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.pss-avalanche-header-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.pss-avalanche-box h4 {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.pss-avalanche-box .val {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.avalanche_level_1, .avalanche_level_2, .avalanche_level_3, .avalanche_level_4, .avalanche_level_5 {
    width: 48px;
    height: 48px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin: 0 auto 6px auto;
}

.avalanche_level_1 { background-image: url('../../images/avalanche_level_1.png'); }
.avalanche_level_2 { background-image: url('../../images/avalanche_level_2.png'); }
.avalanche_level_3 { background-image: url('../../images/avalanche_level_3.png'); }
.avalanche_level_4 { background-image: url('../../images/avalanche_level_4.png'); }
.avalanche_level_5 { background-image: url('../../images/avalanche_level_5.png'); }

.avalanche_direction_holder {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.avalanche_direction_holder div {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.avalanche_direction_n { background-image: url('../../images/avalanche_n.png'); }
.avalanche_direction_e { background-image: url('../../images/avalanche_e.png'); }
.avalanche_direction_w { background-image: url('../../images/avalanche_w.png'); }
.avalanche_direction_s { background-image: url('../../images/avalanche_s.png'); }
.avalanche_direction_ne { background-image: url('../../images/avalanche_ne.png'); }
.avalanche_direction_nw { background-image: url('../../images/avalanche_nw.png'); }
.avalanche_direction_se { background-image: url('../../images/avalanche_se.png'); }
.avalanche_direction_sw { background-image: url('../../images/avalanche_sw.png'); }

.pss-avalanche-desc-section {
    margin-bottom: 18px;
}

.pss-avalanche-desc-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #c90d18;
    margin: 0 0 6px 0;
}

.pss-avalanche-desc-section p {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    margin: 0;
}

/* Lifts & Slopes */
.pss-lifts-slopes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 768px) {
    .pss-lifts-slopes-grid {
        grid-template-columns: 1fr;
    }
}

.status_open, .status_closed, .open, .closed {
    display: inline-block;
    width: 26px;
    height: 26px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    vertical-align: middle;
}

.status_open, .open { background-image: url('../../images/status_open.png'); }
.status_closed, .closed { background-image: url('../../images/status_closed.png'); }

/* Lift types */
.k-8, .k-6, .кабинков {
    background: transparent url('../../images/lift_cabin.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.s-1 {
    background: transparent url('../../images/lift_1.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.s-2 {
    background: transparent url('../../images/lift_2.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.s-3 {
    background: transparent url('../../images/lift_3.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.s-4 {
    background: transparent url('../../images/lift_4.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.s-6 {
    background: transparent url('../../images/lift_6.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.s-8 {
    background: transparent url('../../images/lift_8.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}
.v-1, .v-2, .влек {
    background: transparent url('../../images/lift_vlek.png') no-repeat center center;
    background-size: contain;
    display: inline-block;
    height: 28px;
    width: 28px;
    vertical-align: middle;
}

.difficulty {
    display: inline-block;
    height: 28px;
    min-width: 28px;
    padding: 0 8px;
    border-radius: 14px;
    line-height: 28px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
}

.difficulty.green { background: #0e9210; }
.difficulty.blue, .difficulty.easy { background: #039de6; }
.difficulty.red, .difficulty.medium { background: #c90d18; }
.difficulty.black, .difficulty.hard { background: #111111; }

/* Cameras */
.pss-cameras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.pss-camera-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pss-camera-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.pss-camera-media {
    width: 100%;
    min-height: 220px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.pss-camera-media a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.pss-camera-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pss-camera-media a:hover img {
    transform: scale(1.03);
}

.pss-camera-zoom-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0.85;
    transition: all 0.25s ease;
    pointer-events: none;
}

.pss-camera-card:hover .pss-camera-zoom-badge {
    opacity: 1;
    transform: scale(1.1);
    background: #c90d18;
    border-color: #c90d18;
}

/* Offline camera fallback */
.pss-camera-media.camera-offline {
    background: #0f172a;
    min-height: 220px;
}
.pss-camera-media.camera-offline img,
.pss-camera-media.camera-offline .pss-camera-zoom-badge {
    display: none !important;
}
.pss-camera-media.camera-offline::after {
    content: "Камерата в момента не предава";
    display: block;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

.pss-camera-media iframe {
    width: 100%;
    height: 280px;
    border: none;
}

/* Video Player in Camera Media */
.pss-camera-video-wrapper {
    position: relative;
    width: 100%;
    min-height: 220px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pss-camera-video {
    width: 100%;
    height: 100%;
    min-height: 220px;
    max-height: 320px;
    object-fit: cover;
    background: #0f172a;
    display: block;
}

.pss-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(201, 13, 24, 0.9);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    padding: 0;
}

.pss-video-play-btn svg {
    margin-left: 3px;
    width: 26px;
    height: 26px;
}

.pss-video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: #c90d18;
    box-shadow: 0 6px 24px rgba(201, 13, 24, 0.6);
}

.pss-video-live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 4;
    pointer-events: none;
    text-transform: uppercase;
}

.pss-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    box-shadow: 0 0 8px #ef4444;
    animation: pssLivePulse 2s infinite ease-in-out;
}

@keyframes pssLivePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

.pss-camera-video-wrapper.is-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #c90d18;
    border-radius: 50%;
    animation: pssSpinner 0.8s linear infinite;
    z-index: 6;
}

@keyframes pssSpinner {
    to { transform: rotate(360deg); }
}

.pss-camera-video-wrapper.is-playing .pss-video-live-badge {
    opacity: 0.85;
}

.pss-camera-title {
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   PSS Camera Lightbox Styles
   ========================================================================== */
body.pss-lightbox-open {
    overflow: hidden !important;
}

.pss-camera-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pss-camera-lightbox.active {
    visibility: visible;
    opacity: 1;
}

.pss-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 25, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pss-lightbox-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Lightbox Header */
.pss-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    color: #ffffff;
    z-index: 10;
}

.pss-lightbox-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pss-lightbox-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.pss-lightbox-counter {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 10px;
    border-radius: 12px;
}

.pss-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pss-lightbox-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 0;
}

.pss-lightbox-btn:hover {
    background: #c90d18;
    border-color: #c90d18;
    color: #ffffff !important;
    transform: scale(1.08);
}

/* Lightbox Body / Stage */
.pss-lightbox-body {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px 24px;
    overflow: hidden;
}

.pss-lightbox-stage {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.pss-lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 0;
}

.pss-lightbox-image.loaded {
    opacity: 1;
}

.pss-lightbox-image.loading {
    opacity: 0;
}

/* Lightbox Spinner */
.pss-lightbox-spinner {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #c90d18;
    border-radius: 50%;
    animation: pssSpin 0.8s linear infinite;
    display: none;
}

@keyframes pssSpin {
    to { transform: rotate(360deg); }
}

/* Navigation arrows */
.pss-lightbox-nav {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
}

.pss-lightbox-nav:hover {
    background: #c90d18;
    border-color: #c90d18;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .pss-lightbox-header {
        padding: 12px 16px;
    }
    .pss-lightbox-title {
        font-size: 15px;
    }
    .pss-lightbox-body {
        padding: 6px 10px 16px;
    }
    .pss-lightbox-nav {
        position: absolute;
        bottom: 20px;
        width: 44px;
        height: 44px;
    }
    .pss-lightbox-nav.prev {
        left: 20px;
    }
    .pss-lightbox-nav.next {
        right: 20px;
    }
    .pss-lightbox-image {
        max-width: 96vw;
        max-height: 72vh;
    }
}

/* Archive List */
.pss-archive-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 25px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.pss-archive-list li a {
    display: block;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pss-archive-list li a:hover {
    background: #c90d18;
    color: #ffffff;
    border-color: #c90d18;
}

.pss-btn-more {
    display: inline-block;
    padding: 12px 28px;
    background: #c90d18;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(201, 13, 24, 0.25);
    transition: all 0.2s ease;
}

.pss-btn-more:hover {
    background: #a80f17;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 13, 24, 0.35);
}

