/*
Theme Name: CMMS Light Aurora - WWW
Author: Łukasz Dziubiński
Description: Nowoczesny motyw Glassmorphism dla systemu CMMS Light z interaktywnym bohaterem i komiksami.
Version: 1.2 (Fix strzałek nawigacji)
*/

:root {
    --primary: #4f46e5;
    --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --red-grad: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    --dark-glass: rgba(30, 41, 59, 0.9);
    --glass: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.75);
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

/* 1. RESET I GLOBALNA STABILIZACJA */
html, body { 
    margin: 0; 
    padding: 0; 
    width: 100%; 
    max-width: 100%;
    overflow-x: hidden; 
    font-family: 'Outfit', sans-serif; 
    background: #f1f5f9; 
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

/* 2. TŁO AURORA */
.aurora-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; background: #f8fafc; }
.sphere { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5; }
.s1 { width: 700px; height: 700px; background: #e0e7ff; top: -15%; left: -10%; }
.s2 { width: 600px; height: 600px; background: #fae8ff; bottom: -10%; right: -5%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.glass-card { background: var(--glass); backdrop-filter: blur(25px); border: 1px solid var(--glass-border); border-radius: 28px; padding: 35px; box-shadow: 0 15px 35px rgba(0,0,0,0.03); transition: 0.3s ease; }

/* 4. NAWIGACJA */
.main-nav ul { list-style: none; display: flex; gap: 15px; align-items: center; margin: 0; padding: 0; }
.main-nav a { text-decoration: none !important; color: var(--text-dark); font-weight: 600; padding: 10px 18px; border-radius: 12px; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.main-nav a:hover { background: rgba(79, 70, 229, 0.08); color: var(--primary); }
.nav-important { background: var(--dark-glass) !important; color: white !important; }

/* 5. PRZYCISKI GŁÓWNE */
.btn-aurora { border: none !important; padding: 18px 35px !important; border-radius: 18px !important; font-weight: 700 !important; cursor: pointer; transition: 0.3s; display: inline-block; text-decoration: none !important; text-align: center; }
.btn-blue { background: var(--primary-grad); color: white !important; box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2); }

/* 6. HAMBURGER MENU */
.menu-toggle { display: none; background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; width: 46px; height: 46px; cursor: pointer; }
@media (max-width: 992px) {
    .menu-toggle { display: block; position: relative; z-index: 3000; }
    .main-nav { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(255,255,255,0.98); z-index: 2500; padding: 100px 20px; transform: translateY(-100%); transition: 0.5s; opacity: 0; display: flex; justify-content: center; }
    .main-nav.active { transform: translateY(0); opacity: 1; }
}

/* 7. BOHATER - NIEBIESKA POŚWIATA (GLOW) */
#hero-trigger {
    position: fixed; 
    bottom: 0;      
    right: 0;       
    width: 280px;   
    height: auto; 
    cursor: pointer; 
    z-index: 9998; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 0;
}

#hero-trigger img { 
    width: 100%; 
    height: auto; 
    display: block;
    filter: drop-shadow(0 0 5px rgba(79, 70, 229, 0.2));
    transition: filter 0.4s ease;
}

/* EFEKT PO NAJECHANIU: POŚWIATA */
#hero-trigger:hover { transform: scale(1.03); }

#hero-trigger:hover img { 
    filter: drop-shadow(0 0 10px rgba(0, 168, 232, 0.9)) 
            drop-shadow(0 0 25px rgba(79, 70, 229, 0.6));
}

/* KOMIKSOWY DYMEK - FINALNE USTAWIENIE */
.hero-speech-bubble {
    position: absolute;
    top: -23px;        
    right: 5px;        
    background: white;
    padding: 8px 14px;
    border-radius: 15px;
    font-weight: 800;
    font-size: 0.8rem; 
    line-height: 1.1;
    text-align: center;
    color: #000;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    white-space: nowrap;
    width: auto;
    min-width: 100px;
    border: 3px solid #000;
    animation: bubbleFloat 3s infinite ease-in-out;
    pointer-events: none;
    z-index: 9999;
}

/* OGONEK DYMKA */
.hero-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -9px;      
    right: 50px;       
    width: 12px;
    height: 12px;
    background: white;
    border-right: 3px solid #000;
    border-bottom: 3px solid #000;
    transform: rotate(45deg);
    z-index: -1;       
}

/* 8. MODAL I SLIDER KOMIKSÓW (POPRAWIONA NAWIGACJA) */
#hero-modal {
    display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; 
    background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); justify-content: center; align-items: center; 
    opacity: 0; transition: opacity 0.3s ease; padding: 20px;
}
#hero-modal.active { display: flex; opacity: 1; }
.hero-modal-content.comic-mode { max-width: 1000px; width: 100%; position: relative; padding: 30px !important; text-align: center; }
.comic-slider { position: relative; width: 100%; min-height: 450px; }
.comic-slide { display: none; flex-direction: column; align-items: center; }
.comic-slide.active { display: flex; animation: heroPop 0.4s ease; }
.comic-slide img { max-width: 100%; height: auto; border-radius: 15px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }

.comic-desc { margin-top: 20px; }
.comic-desc h3 { color: var(--primary); margin-bottom: 5px; }

/* FIX: Strzałki nawigacji teraz są WEWNĄTRZ obszaru zdjęcia */
.comic-nav { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: rgba(255, 255, 255, 0.15); /* Półprzezroczyste tło */
    backdrop-filter: blur(5px);
    color: white; 
    border: 1px solid rgba(255,255,255,0.3);
    width: 50px; height: 50px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 24px; 
    display: flex; align-items: center; justify-content: center; 
    transition: 0.3s; 
    z-index: 10; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.comic-nav:hover { 
    background: var(--primary); 
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.5);
}

/* Pozycjonowanie wewnątrz ramki - naprawia ucinanie na głównej */
.comic-nav.prev { left: 20px; }
.comic-nav.next { right: 20px; }

.comic-pagination { margin-top: 15px; font-weight: 700; color: var(--text-muted); font-size: 1.1rem; }
.close-hero { position: absolute; top: -45px; right: 0; font-size: 45px; color: white; cursor: pointer; line-height: 1; }

/* 9. ANIMACJE */
@keyframes heroPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bubbleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 10. RESPONSYWNOŚĆ */
@media (max-width: 1150px) {
    /* Mniejsze marginesy na tabletach */
    .hero-modal-content.comic-mode { padding: 45px 15px 15px !important; }
}

@media (max-width: 768px) {
    #hero-trigger { width: 180px; } 
    .hero-speech-bubble { font-size: 0.7rem; top: -25px; right: 5px; padding: 6px 10px; }
    
    /* Na telefonach strzałki jeszcze bliżej krawędzi */
    .comic-nav { width: 40px; height: 40px; font-size: 18px; }
    .comic-nav.prev { left: 10px; }
    .comic-nav.next { right: 10px; }
}