/* Style strony realizacje---galeria-zdjec – przeniesione z treści w CMS (30.10.2026) */
/* --- KONTENER GŁÓWNY --- */
.reiter-media-section {
    max-width: 100%;

    color: #333;
    box-sizing: border-box;
    position: relative;
    padding-bottom: 10px; 
}
.reiter-media-section * {
    box-sizing: border-box;
}

/* --- SEKCJA 1: GŁÓWNE WIDEO --- */
.main-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 40px 0 60px 0;

    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: #000;
}

.video-container-16-9 {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container-16-9 iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* --- SEKCJA 2: NAGŁÓWEK (STATYCZNY) --- */
.stories-header {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 10px;
    padding-left: 5px;
}

/* --- SEKCJA 3: STORIES (PASEK STICKY) --- */
.stories-placeholder {
    width: 100%;
    height: auto;
    min-height: 90px; /* Rezerwacja miejsca */
}

.sticky-stories-wrapper {
    width: 100%;
    background: transparent; /* Domyślnie przezroczyste */
    padding: 0px 0;
    z-index: 990;
    transition: all 0.3s ease;
    position: relative;
   /* border-bottom: 1px solid transparent; */
}

/* Stan PRZYKLEJONY (Fixed) */
.sticky-stories-wrapper.is-fixed {
    position: fixed;
    top: 115px; /* PC Header */
    left: 0;
    right: 0;
    background: rgba(43, 44, 47, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0 0;
    /* Rozciągamy na full, żeby kółka dotykały krawędzi */
    width: 100%;
    margin: 0;
	color: #fff;
}

/* Dopasowanie top dla Mobile */
@media (max-width: 768px) {
    .sticky-stories-wrapper.is-fixed {
        top: 104px; /* Mobile Header */
    }
}

.stories-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 5px 10px 5px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Domyślnie dopasowane do kontenera */
    max-width: 100%;
}
.stories-container::-webkit-scrollbar { display: none; }

/* Modyfikacja kontenera, gdy jest przyklejony - EFEKT UCIĘCIA */
.sticky-stories-wrapper.is-fixed .stories-container {
    /* Usuwamy ewentualne max-width i marginesy, żeby lista wylała się na boki */
    max-width: 100%;
    padding-left: 15px; /* Lekki odstęp od lewej */
    padding-right: 0;   /* Brak odstępu z prawej, żeby uciąć kółko */
    margin: 0;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 72px;
    transition: transform 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Ważne: Flex-shrink 0 zapobiega zgniataniu kółek */
    flex-shrink: 0; 
}
.story-item:active { transform: scale(0.95); }

.story-circle {
    width: 68px; height: 68px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #222 0%, #a61a1a 100%);
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 6px;
    position: relative;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.story-item:hover .story-circle { transform: rotate(3deg) scale(1.05); }

.story-circle img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background-color: #000;
    display: block;
}

.story-name {
    font-size: 0.8em;
    text-align: center;
    /*color: #444;*/
    max-width: 75px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* --- SEKCJA 4: SOCIAL MEDIA --- */
.social-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.social-label { font-weight: 600; margin-right: 5px; color: #555; font-size: 0.95em; }

.social-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: 8px;
    text-decoration: none !important;
    font-size: 0.9em; font-weight: 600;
    transition: all 0.2s ease;
    background: #fff; border: 1px solid #e0e0e0; color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-fb:hover { border-color: #1877F2; color: #1877F2; background: #f5f9ff; }
.btn-ig:hover { border-color: #C13584; color: #C13584; background: #fff5fa; }
.btn-yt:hover { border-color: #FF0000; color: #FF0000; background: #fff5f5; }

/* --- NOWY PRZYCISK: FLOATING CTA BUTTON (Twój CSS) --- */
.floating-cta-button {
    all: unset; box-sizing: border-box; pointer-events: auto; 
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: fixed; left: 0; right: 0; margin: 0 auto;
    width: fit-content; max-width: 90vw; z-index: 1000;
    background: rgba(255, 255, 255, 0.7); 
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: #313733 !important; padding: 12px 30px; border-radius: 50px; 
    font-weight: 700; font-size: 1.2rem; cursor: pointer; text-decoration: none !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0,0,0,0.2); 
    border: 2px solid rgba(255, 255, 255, 0.8);
    
    /* Startowy stan: ukryty pod ekranem */
    bottom: -100px;
    opacity: 0; 
    visibility: hidden;
    
    transition: bottom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease-out, visibility 0s 0.5s, box-shadow 0.3s ease-out;
    will-change: bottom, opacity;
}

/* Klasa dodawana przez JS gdy przycisk ma się pokazać */
.floating-cta-button.is-visible {
    opacity: 1; visibility: visible; bottom: 20px;

    bottom: 10px; 
    bottom: calc(5px + env(safe-area-inset-bottom));
	
    transition: bottom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease-out, visibility 0s 0s, box-shadow 0.3s ease-out;
}

/* Klasa dodawana gdy dojedziemy do stopki (koniec sekcji) - wymuszamy ukrycie */
.floating-cta-button.force-hide {
    bottom: -100px !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.floating-cta-button:hover {
    background: #fff; 
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0,0,0,0.25);
    bottom: 23px; 
    bottom: calc(18px + env(safe-area-inset-bottom));
}

.cta-icon-img {
    width: 1.3rem; height: 1.3rem; margin-right: 0; vertical-align: middle;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .floating-cta-button { 
        font-size: 1rem; 
        padding: 10px 20px; 
        width: 90%; 
        max-width: 300px;
        gap: 8px;
    }
}


/* --- MODAL (ODTWARZACZ) --- */
.video-modal {
    display: none; position: fixed; z-index: 2147483647; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
    justify-content: center; align-items: center; flex-direction: column;
}
.modal-content-wrapper {
    position: relative; width: 100%; max-width: 450px;
    height: 85vh; max-height: 800px;
    display: flex; justify-content: center; align-items: center;
}
.modal-video-frame {
    width: 100%; height: 100%; background: #000;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.5); position: relative;
}
.modal-video-frame iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border: 0; opacity: 0; transition: opacity 0.4s ease-in; z-index: 2;
}
.video-loader {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border: 4px solid #333; border-top: 4px solid #fff; border-radius: 50%;
    width: 40px; height: 40px; animation: spin 1s linear infinite; z-index: 1;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.3); color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.3); width: 48px; height: 48px;
    border-radius: 50%; font-size: 22px; cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    transition: all 0.2s; z-index: 100002; backdrop-filter: blur(4px);
}
.nav-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 15px; } .next-btn { right: 15px; }
.close-btn {
    position: absolute; top: 15px; right: 15px; color: white;
    font-size: 28px; font-weight: 300; cursor: pointer; z-index: 100003;
    background: rgba(0,0,0,0.6); width: 40px; height: 40px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    border: 1px solid rgba(255,255,255,0.1); transition: transform 0.2s;
}
.close-btn:hover { transform: scale(1.1); background: rgba(200, 0, 0, 0.6); }
.swipe-hint {
    color: rgba(255,255,255,0.5); font-size: 0.8em;
    margin-top: 15px; text-align: center; pointer-events: none;
}
