@font-face {
    font-family: 'Rage';
    src: url('assets/fonts/RAGE_1.woff2') format('woff2'),
        url('rage_1.ttf') format('truetype');
    font-style: italic;
}

:root {
    --transition-speed: 0.8s;
    --ease: cubic-bezier(0.77, 0, 0.175, 1);
    --bg-image: url('assets/img/architecture-1868667_1920.jpg');
    --menu-bg: #050a15;
    --accent-blue: rgb(28, 117, 188); /* R28 G117 B188 */
    --soft-blue: rgb(42, 169, 224);   /* R42 G169 B224 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--menu-bg);
    overflow: hidden;
    color: white;
}

.btn-kontakt-formularz {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
    padding: 14px 32px;
    border: none;
    border-radius: 999px;
    background: var(--accent-blue);
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: lowercase;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.btn-kontakt-formularz:hover {
    background: var(--soft-blue);
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.6);
    transform: translateY(-2px);
}

/* EKRAN POWITALNY */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

#intro-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.intro-text {
    font-family: 'Rage', cursive;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(4rem, 16vw, 10rem);
    color: white;
    text-transform: lowercase;
    letter-spacing: 8px;
    position: absolute;
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
    text-align: center;
    width: 100%;
}

/* Stały napis waldemar wojdyła na ekranie startowym */
.permanent-name {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 250;
    /* Widoczny nad kurtyną, ale pod menu */
    font-family: 'Rage', cursive;
    font-style: italic;
    font-size: clamp(4rem, 16vw, 10rem);
    font-weight: 400;
    letter-spacing: 8px;
    text-align: center;
    width: 100%;
    pointer-events: none;
    color: white;
    text-transform: lowercase;
    opacity: 0;
    /* Dodano płynność ruchu dla transformacji (ślizgu) */
    transition: opacity 0.8s ease, transform var(--transition-speed) var(--ease);
    animation: softPulse 5s infinite ease-in-out;
}

.split-active~* .permanent-name,
#main-container:has(.split-active) .permanent-name {
    /* Zatrzymujemy znikanie - napis pozostaje w pełni widoczny podczas ruchu */
    opacity: 1 !important;
    /* Wypychamy go całkowicie poza prawy ekran (100vw to cała szerokość ekranu) */
    transform: translate(100vw, -50%) !important;
    /* Animujemy tylko sam ruch ślizgu, bez zmian przezroczystości */
    transition: transform var(--transition-speed) var(--ease) !important;
}

@keyframes zoomPulse {
    0% {
        opacity: 0;
        transform: scale(0.7);
        filter: blur(15px);
        text-shadow: 0 0 10px var(--accent-blue);
    }

    25% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
        text-shadow: 0 0 20px var(--accent-blue);
    }

    50% {
        text-shadow: 0 0 45px var(--accent-blue), 0 0 70px rgba(0, 210, 255, 0.5);
    }

    75% {
        opacity: 1;
        transform: scale(1.02);
        text-shadow: 0 0 20px var(--accent-blue);
    }

    100% {
        opacity: 0;
        transform: scale(1.1);
        filter: blur(10px);
    }
}

@keyframes softPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.2));
        opacity: 0.8;
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.6));
        opacity: 1;
    }
}

.animate-text {
    animation: zoomPulse 2.2s forwards;
}

/* GŁÓWNY KONTENER */
#main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
}

/* WARSTWY TREŚCI */
.page-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    z-index: 500;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-speed) var(--ease), opacity 0s var(--transition-speed), visibility 0s var(--transition-speed);
}

.active-layer {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition: transform var(--transition-speed) var(--ease);
}

.content-side {
    flex: 1;
    background: var(--menu-bg);
    padding: 5% 8% 5% 10%;
    overflow-y: auto;
    z-index: 501;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.content-side::-webkit-scrollbar {
    display: none;
}

.image-side {
    flex: 1;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    position: relative;
}

.image-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--menu-bg), transparent);
}

.menu-list {
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.menu-list li {
    list-style: none;
    margin: 15px 0;
}

.menu-item-btn {
    display: block;
    width: 100%;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--soft-blue);
    cursor: pointer;
    transition: color 0.3s;
    text-transform: lowercase;
    text-align: inherit;
}

.menu-item-btn:hover {
    animation: menuPulse 2s infinite ease-in-out;
}
@keyframes menuPulse {

    0%,
    100% {
        text-shadow: 0 0 5px var(--accent-blue);
    }

    50% {
        text-shadow: 0 0 20px var(--accent-blue);
        color: #fff;
    }
}

.text-container {
    max-width: 750px;
    color: #f0f0f0;
    line-height: 1.7;
    margin: auto 0;
    position: relative;
}

.text-container h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    text-transform: lowercase;
}

.text-container h2 {
    font-size: 1.4rem;
    color: var(--soft-blue);
    margin: 2rem 0 1rem;
    border-left: 3px solid var(--accent-blue);
    padding-left: 15px;
}

.text-container summary {
    font-size: 1.4rem;
    color: var(--soft-blue);
    margin: 2rem 0 1rem;
    cursor: pointer;
    list-style: none;
    outline: none;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

/* Stylizacja trójkąta przed nagłówkiem */
.text-container summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 15px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--accent-blue); /* R28 G117 B188 */
    transition: transform 0.3s var(--ease);
    transform-origin: center;
}

/* Obrót trójkąta po otwarciu sekcji */
details[open] summary::before {
    transform: rotate(90deg);
    border-left-color: var(--soft-blue); /* Zmiana koloru przy otwarciu na R42 G169 B224 */
}

/* Usunięcie domyślnego trójkąta w przeglądarkach Safari/Chrome */
.text-container summary::-webkit-details-marker {
    display: none;
}
.text-container details {
    margin-bottom: 1rem;
}
.text-container details[open] summary {
    margin-bottom: 1rem;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(28, 117, 188, 0.6), transparent);
    margin: 3rem 0 2rem 0;
}

/* DYNAMICZNE PANELE BOCZNE */
.dynamic-info-box {
    --bg-opacity: 0.0;
    position: absolute;
    top: 50%;
    /* ustawienie logo i napisu oraz projektów */
    left: 45%;
    transform: translate(-50%, -50%);
    width: 70%;
    padding: 40px;
    background: rgba(5, 10, 21, var(--bg-opacity));
    display: none; 
    text-align: center;
    z-index: 600;
}

/* SPECYFICZNY STYL OKRĘGU DLA LOGO KSIĘGOWOŚCI */
.ksi-info {
    --bg-opacity: 0.5; /* TUTAJ USTAWISZ PRZEZROCZYSTOŚĆ OKRĘGU (0.0 - 1.0) */
    width: 450px; /* Średnica okręgu - dopasuj do wielkości logo/nazwy */
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: rgba(5, 10, 21, var(--bg-opacity)) !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

@media (min-width: 769px) {
    #layer-about .image-side, 
    #layer-projects .image-side { 
        display: block !important; 
        flex: 1;
        position: relative;
        background: transparent !important;
        min-height: 100vh;
    }
    /* Usunięcie wszelkich filtrów i nakładek z prawej strony */
    .page-layer .image-side::before {
        display: none !important;
    }
    
    /* Dodanie czytelności dla logo na jasnym tle */
    .side-logo, .side-brand {
        filter: drop-shadow(0 0 10px rgba(5, 10, 21, 0.8));
    }

    /* Logika wyświetlania */
    #layer-about:has(details:nth-of-type(1)[open]) .ksi-info { display: block; }
    
    /* Priorytet dla Projektów: jeśli sekcja 2 jest otwarta, ukrywamy info z sekcji 1 */
    #layer-about:has(details:nth-of-type(2)[open]) .ksi-info { display: none !important; }
    #layer-about:has(details:nth-of-type(2)[open]) .projects-info { display: block; }
}

.side-logo { max-width: 120px; display: block; margin: 0 auto 20px; }
.side-brand { max-width: 250px; }

.projects-title {
    display: inline-block;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 2.5rem;
    color: var(--soft-blue);
    cursor: pointer;
    text-transform: lowercase;
    text-decoration: underline;
}

.projects-mini-list { margin-top: 30px; display: flex; flex-direction: column; gap: 15px; }
.mini-project { display: flex; align-items: center; justify-content: center; gap: 10px; color: rgb(42, 169, 224); }
.mini-project img { width: 24px; }

/* Wersja Mobile - Widoczna wewnątrz tekstu */
.mobile-only-info { 
    display: none; 
    padding: 20px 0; 
    border-top: 1px solid rgba(42, 169, 224, 0.2); 
    margin-top: 15px;
    text-align: center; /* Centrowanie tekstu i obrazków */
}
/* Upewnienie się, że obrazki w wersji mobile są wyśrodkowane */
.mobile-only-info img {
    margin: 0 auto 10px auto;
    display: block;
}
@media (max-width: 768px) {
    .mobile-only-info { display: block; }
}

.text-container p {
    margin-bottom: 1.2rem;
    font-weight: 300;
}

.text-container ul {
    margin-bottom: 1.5rem;
    list-style: none;
}

.text-container li {
    margin-bottom: 0.8rem;
    padding-left: 1.8rem;
    position: relative;
}

.text-container li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

.contact-link {
    display: block;
    width: 100%;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    text-align: inherit;
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}

.menu-button {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    color: #050a15;
    font-weight: 600;
    font-size: 0.7rem;
    animation: pulseGlow 3s infinite ease-in-out;
    transition: opacity 0.5s, transform 0.3s, visibility 0.5s;
    opacity: 0;
    visibility: hidden;
    touch-action: manipulation;
}

.menu-button.visible {
    opacity: 1;
    visibility: visible;
}

.menu-button.hidden-scroll {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -100%) scale(0.5);
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 35px rgba(0, 210, 255, 0.7);
    }
}

.hero-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 200;
    pointer-events: none;
    transition: transform var(--transition-speed) var(--ease);
}

.panel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
}

@media (min-width: 769px) {
    #layer-menu {
        /* Ciemne tło dla samego menu */
        background: linear-gradient(to right, var(--menu-bg) 5%, transparent 75%);
    }
    #layer-about, #layer-contact, #layer-projects {
        /* Ciemne tło kończy się na 42% szerokości tekstu, potem następuje szybkie przejście do pełnej przezroczystości */
        background: linear-gradient(to right, 
            var(--menu-bg) 42%, 
            transparent 58%
        );
    }
    /* Wymuszenie widoczności panelu bocznego - logo i nazwa dla księgowość*/
    #layer-about .image-side, 
    #layer-projects .image-side { 
        display: block !important; 
        flex: 1;
        position: relative;
        background: transparent !important;
    }

    /* Logika wyświetlania: Otwarcie sekcji 1 (Księgowość) */
    #layer-about:has(details:nth-of-type(1)[open]) .ksi-info { 
        display: flex; /* Flex zamiast block dla centrowania w okręgu */
    }
    
    /* Logika wyświetlania: Otwarcie sekcji 2 (Projekty) - Ukrywamy logo firmy */
    #layer-about:has(details:nth-of-type(2)[open]) .ksi-info { 
        display: none !important; 
    }
    
    /* Logika wyświetlania: Otwarcie sekcji 2 (Projekty) - Pokazujemy projekty */
    #layer-about:has(details:nth-of-type(2)[open]) .projects-info { 
        display: block; 
    }
    #layer-projects .projects-info {
        display: block !important;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
    }
    .content-side {
        background: transparent;
        flex: 0 0 60%;
        max-width: 60%;
        padding-top: 0; 
        /* Nałożenie maski zanikania*/
        -webkit-mask-image: linear-gradient(to bottom, transparent 15%, black 28%, black 95%, transparent 80%);
        mask-image: linear-gradient(to bottom, transparent 15%, black 28%, black 95%, transparent 80%);
    }
    .text-container {
        margin: 0;
        /* Wyrównanie do 22% wysokości ekranu (pozycja przycisku) z korektą na środek litery */
        margin-top: calc(22vh - 1.5rem);
    }
    .image-side {
        display: none;
    }
    #layer-projects .image-side {
        display: block !important;
        flex: 1;
        position: relative;
        background: transparent !important;
        min-height: 100vh;
    }
}

@media (max-width: 768px) {
    .hero-wrapper {
        transform: none !important;
    }

    .image-side {
        display: none;
    }

    .content-side {
        display: block;
        padding: 35% 10% 20% 10%;
    }

    .text-container {
        margin: 0;
    }

    .menu-list {
        position: static;
        transform: none;
        text-align: center;
        margin-top: 15vh;
    }

    .menu-button {
        top: 18%;
    }
}

/* STYL OKRĘGU DLA LOGO KSIĘGOWOŚCI - TYLKO DESKTOP */
@media (min-width: 769px) {
    .ksi-info {
        --bg-opacity: 1.2; /* Zwiększono bazową moc "chmury" */
        width: 275px; /* Większy obszar dla łagodniejszego zanikania */
        height: 275px;
        /* Usunięcie border-radius i zastąpienie tła gradientem mglistym */
        background: radial-gradient(circle, 
            rgba(5, 10, 21, var(--bg-opacity)) 0%, 
            rgba(5, 10, 21, calc(var(--bg-opacity) * 0.5)) 40%, 
            transparent 75%
        ) !important;
        
        /* Centrowanie wewnątrz okręgu */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 30px;

        /* Pozycjonowanie okręgu na środku panelu bocznego */
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        
        border: 0px solid rgba(42, 169, 224, 0.2); /*ramka okręgu*/
    }

    .ksi-info a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
    }
}

/* STYL DLA CHMURY PROJEKTÓW */
.projects-info {
    position: relative;
    width: 100%;
    height: 100%;
}

.cloud-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px; /* Większe pole ułatwia trafienie myszką */
    height: 220px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 700;
    /* KLUCZ: Stałe centrowanie i skala bazowa */
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.2s ease-out, opacity 0.5s ease;
    background: radial-gradient(circle, 
        rgba(5, 10, 21, 0.95) 0%, 
        rgba(5, 10, 21, 0.4) 45%, 
        transparent 70%
    ) !important;
    opacity: 0;
    animation: fadeInCloud 0.8s forwards ease-out;
}

.cloud-item:hover {
    /* Powiększenie przy zachowaniu idealnego środka */
    transform: translate(-50%, -50%) scale(1.1) !important;
}

.cloud-item img, .cloud-item span {
    /* Myszka ignoruje te elementy i "widzi" tylko chmurę pod nimi */
    pointer-events: none; 
}

.cloud-item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(42, 169, 224, 0.4));
}

.cloud-item span {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    text-shadow: 2px 2px 5px #000;
}

.proj-mini-icon {
    width: 28px;  /* To zmienia szerokość ikon w Projektach */
    height: 28px; /* To zmienia wysokość ikon w Projektach */
    vertical-align: middle;
    margin-right: 10px;
}

.proj-buttons { /*przycisk DOWNOLAND i MANUAL w projektach*/
    padding: 0 0 20px 34px;
    display: flex;
    gap: 12px;
}

.proj-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.proj-btn:hover { opacity: 0.8; }

.proj-btn-url {
    background: var(--accent-blue);
    color: #fff;
}

.proj-btn-download {
    background: var(--accent-blue);
    color: #fff;
}

.proj-btn-manual {
    background: transparent;
    border: 1px solid var(--soft-blue);
    color: var(--soft-blue);
}

/* PRZYCISKI NAWIGACJI MINIATURKI */
.thumb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
    z-index: 10;
}

.thumb-nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.thumb-prev { left: 0.4rem; }
.thumb-next { right: 0.4rem; }

/* POJEDYNCZA GALERIA PROJEKTÓW */
.proj-single-container {
    position: absolute;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* poświata obrazu po prawej stronie */
.proj-single-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 55px rgba(28, 117, 188, 0.5);
    border: 1px solid rgba(28, 117, 188, 0.3);
}

/*poświata obrazu po najechaniu kursorem */
.proj-single-image:hover {
    transform: scale(1.02);
    box-shadow: 0 0 70px rgba(28, 117, 188, 0.9);
    border-color: var(--soft-blue);
}

/* PODGLĄD PEŁNEGO OBRAZU */
#image-preview-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.preview-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.2s;
    z-index: 3001;
}

.preview-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.preview-close {
    top: 1.2rem;
    right: 1.4rem;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1rem;
}

.preview-prev,
.preview-next {
    top: 50%;
    transform: translateY(-50%);
    width: 4.5rem;
    height: 4.5rem;
    font-size: 2.8rem;
}

.preview-prev { left: 2rem; }
.preview-next { right: 2rem; }

#image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#image-preview-overlay img {
    max-width: 85%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

#image-preview-overlay button {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#image-preview-overlay button:hover { opacity: 1; }

/* PANEL INSTRUKCJI */
#manual-panel {
    position: absolute;
    top: 20%;
    left: 74%;
    transform: translateX(-50%);
    width: 34%;
    height: 76vh;
    background: rgba(5, 10, 21, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    transition: opacity var(--transition-speed) var(--ease);
    border-radius: 20px;
    border: 1px solid rgba(28, 117, 188, 0.4);
    box-shadow: 0 0 45px rgba(28, 117, 188, 0.3);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

#manual-panel.panel-open {
    opacity: 1;
    pointer-events: all;
}

@media (max-width: 768px) {
    #manual-panel {
        top: 22%;
        left: 50%;
        width: 92%;
        height: 72vh;
        border-radius: 20px;
        transform: translateX(-50%);
        transition: opacity var(--transition-speed) var(--ease);
    }

    #manual-panel.panel-open {
        opacity: 1;
    }
}

#manual-panel-header {
    display: none;
}

#manual-panel-title {
    color: var(--soft-blue);
    font-size: 1rem;
    font-weight: 600;
    text-transform: lowercase;
}

#manual-panel-close {
    background: none;
    border: none;
    color: var(--soft-blue);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

#manual-panel-close:hover {
    color: #fff;
}

#manual-panel-frame {
    flex: 1;
    width: 100%;
    border: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(42, 169, 224, 0.3) transparent;
}

@media (max-width: 768px) {
    #manual-panel {
        width: 100%;
    }
}

@keyframes fadeInCloud {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* PŁYWAJĄCY PRZYCISK ZAMKNIĘCIA PANELU */
#manual-panel-close-float {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 9999;
    background: rgba(5, 10, 21, 0.85);
    border: 1px solid rgba(42, 169, 224, 0.4);
    color: var(--soft-blue);
    font-size: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
}
#manual-panel-close-float:hover {
    color: #fff;
    border-color: var(--soft-blue);
}



