/**
 * ══════════════════════════════════════════════════════════════════════════
 * GLOBAL RESPONSIVE RESET & ZERO OVERFLOW-X ENGINE (lumina-responsive-reset.css)
 * Portal LUMINA & Ekosystem Christian Culture
 * Standard: Mobile & Tablet First | Safe-Area Inset Support
 * ══════════════════════════════════════════════════════════════════════════
 */

/* ── 1. GLOBAL BOX-SIZING & OVERFLOW LOCK ── */
*, *::before, *::after {
    box-sizing: border-box !important;
}

html {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    position: relative !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ── 2. FLUID MEDIA SCALING ── */
img, video, iframe, canvas, svg {
    max-width: 100% !important;
    height: auto;
}

/* ── 3. RESPONSIVE CONTAINERS & GRIDS ── */
.container, .layout-container, .content-container, .main-layout, .bottom-layout, .cards-section, .hero-content {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(12px, 3vw, 24px) !important;
    padding-right: clamp(12px, 3vw, 24px) !important;
}

/* ── 4. RESPONSIVE MODALS & WINDOWS ── */
.modal-overlay, .cc-nav-modal {
    padding: clamp(8px, 2.5vw, 20px) !important;
}

.modal-card, 
.coffee-modal-card, 
.auth-modal-card, 
.pin-modal-card, 
.chat-modal-window,
.profile-modal-card,
.modal-box {
    width: calc(100% - 16px) !important;
    max-width: 480px !important;
    margin: 8px auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* ── 5. TOP NAVBAR FLUIDITY (Mobile & Tablet) ── */
.lumina-nav, .profile-navbar, .header-container {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) {
    .lumina-nav .nav-links {
        display: none !important; /* Managed by PWA Bottom Nav */
    }
    .hero-section {
        min-height: auto !important;
        padding: 12px 14px 10px !important;
    }
    .hero-content {
        padding: 0 !important;
        max-width: 100% !important;
    }
    .hero-pill-badge {
        font-size: 0.72rem !important;
        padding: 4px 12px !important;
        margin-bottom: 8px !important;
    }
    .hero-title {
        font-size: clamp(1.35rem, 5vw, 1.8rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
    }
    .hero-subtitle {
        font-size: 0.86rem !important;
        line-height: 1.38 !important;
        margin-bottom: 12px !important;
    }
    .hero-search-wrap {
        margin: 0 auto 10px auto !important;
    }
}

/* ── 6. CAROUSEL TOUCH FLUIDITY ── */
.profiles-carousel-wrap, .profiles-grid-wrap {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.profiles-grid {
    max-width: 100vw !important;
    -webkit-overflow-scrolling: touch !important;
}

/* ── BULLETPROOF 3D CENTER MAGNIFICATION STANDARD ── */
.profile-card.active-center-card,
.profile-card.featured {
    opacity: 1 !important;
    transform: scale(1.12) translateY(-14px) !important;
    filter: brightness(1) grayscale(0%) !important;
    z-index: 25 !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(250, 204, 21, 0.35) !important;
    border: 2px solid #facc15 !important;
}

.profile-card.video-card.active-center-card {
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.95), 0 0 45px rgba(147, 51, 234, 0.6) !important;
    border: 2px solid #eab308 !important;
}

/* ── 7. ULTRA-CLEAN UNIFIED TOP NAVBAR (ICONS-ONLY STANDARD) ── */
.lumina-nav, .profile-navbar, .header-container {
    background: rgba(9, 14, 30, 0.92) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.nav-logo-text, 
.nav-logo-text span, 
.nav-logo-text strong {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-family: 'Outfit', sans-serif !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

/* ── UNIFIED EXACT-SIZE 38PX CIRCULAR NAVBAR BUTTONS ── */
.nav-circle-btn,
.notif-bell-btn,
.lang-switcher-btn,
.nav-back-icon-btn,
.nav-radio-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    border-radius: 50% !important;
    background: rgba(11, 24, 56, 0.90) !important;
    border: 1.5px solid rgba(250, 204, 21, 0.4) !important;
    color: #facc15 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(250, 204, 21, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    position: relative !important;
}

.nav-circle-btn:hover,
.notif-bell-btn:hover,
.lang-switcher-btn:hover,
.nav-back-icon-btn:hover,
.nav-radio-btn:hover {
    background: #facc15 !important;
    color: #070e24 !important;
    border-color: #fde047 !important;
    transform: scale(1.08) !important;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.6) !important;
}

.nav-circle-btn i,
.notif-bell-btn i,
.nav-back-icon-btn i,
.nav-radio-btn i {
    font-size: 1.05rem !important;
    color: #facc15 !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    border-bottom: none !important;
    transition: color 0.2s, transform 0.2s !important;
}

.nav-circle-btn:hover i,
.notif-bell-btn:hover i,
.nav-back-icon-btn:hover i,
.nav-radio-btn:hover i {
    color: #070e24 !important;
}

.lang-switcher-btn {
    font-size: 1.25rem !important;
    border: 1.5px solid rgba(250, 204, 21, 0.4) !important;
}

@media (max-width: 900px) {
    .lumina-nav, .profile-navbar, .header-container {
        padding: 8px 12px !important;
        gap: 8px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* Hide desktop links */
    .lumina-nav .nav-links {
        display: none !important;
    }

    /* Hide text labels in header widgets */
    .nav-radio-info, 
    .sound-bars,
    .nav-radio-sub,
    .user-nav-name,
    .btn-nav-cta-text {
        display: none !important;
    }

    /* Compact Radio CC widget - single icon circle */
    .nav-radio-pill {
        padding: 0 !important;
        min-width: 36px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
        gap: 0 !important;
    }

    .nav-radio-play {
        width: 100% !important;
        height: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 0.85rem !important;
        color: #facc15 !important;
    }

    /* Clean Avatar Only on Mobile (No duplicate logout icon) */
    .user-nav-profile {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    .user-nav-avatar {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        border: 2px solid #facc15 !important;
        box-shadow: 0 0 10px rgba(250, 204, 21, 0.4) !important;
        cursor: pointer !important;
    }

    .btn-nav-logout {
        display: none !important; /* Eliminate duplicate logout icon on mobile */
    }

    body.user-is-authenticated .btn-nav-cta,
    body.logged-in .btn-nav-cta {
        display: none !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
 * 8. UNIFIED PROFESSIONAL NAVBAR COLOR THEME (TOP & BOTTOM BARS - ALL DEVICES)
 * Color: Dark Luxury Navy Obsidian Glass [ rgba(9, 14, 30, 0.94) ]
 * ══════════════════════════════════════════════════════════════════════════ */
:root {
    --lumina-bar-bg: rgba(9, 14, 30, 0.94);
    --lumina-bar-blur: blur(24px) saturate(180%);
    --lumina-bar-border: 1px solid rgba(255, 255, 255, 0.08);
}

/* TOP NAVBAR (Desktop, Tablet, Mobile) */
.lumina-nav, 
.profile-navbar, 
.header-container,
nav.lumina-nav {
    background: var(--lumina-bar-bg) !important;
    backdrop-filter: var(--lumina-bar-blur) !important;
    -webkit-backdrop-filter: var(--lumina-bar-blur) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
}

/* BOTTOM NAVBAR (Mobile, Tablet, PWA) */
.lumina-bottom-nav, 
.lumina-mobile-nav,
nav.lumina-bottom-nav {
    background: var(--lumina-bar-bg) !important;
    backdrop-filter: var(--lumina-bar-blur) !important;
    -webkit-backdrop-filter: var(--lumina-bar-blur) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
 * 9. LUMINA MOBILE ANTI-FLICKER & GPU STABILIZATION
 * Eliminacja przeliczania warstw WebKit/Blink na smartfonach i tabletach
 * ══════════════════════════════════════════════════════════════════════════ */
html, body {
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Wymuszenie stabilnej warstwy kompozycji dla pasków fixed */
.lumina-nav, 
.profile-navbar, 
.header-container, 
.lumina-bottom-nav, 
.lumina-mobile-nav, 
.notif-dropdown, 
.modal-overlay, 
.cc-nav-modal {
    -webkit-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    will-change: transform !important;
}

/* Optymalizacja rozmycia na smartfonach - stabilne tło bez obciążania GPU */
@media (max-width: 768px) {
    .lumina-nav, 
    .profile-navbar, 
    .header-container, 
    .lumina-bottom-nav, 
    .lumina-mobile-nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #090e1e !important; /* Płynne, jednolite tło bez przeliczania blur przez GPU */
    }
}

/* Bezpieczna animacja bez wymuszania Layout Reflow */
@keyframes pulseBadge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ══════════════════════════════════════════════════════════════════════════
 * 10. UNIVERSAL FULL TITLE & PROFILE NAME VISIBILITY (ZERO TRUNCATION)
 * Gwarancja pełnego wyświetlania nazw i tytułów wszystkich profili bez ucinania
 * ══════════════════════════════════════════════════════════════════════════ */
.head-user-name, 
.profile-name, 
.user-name, 
.card-name,
#userNameEl,
h1.head-user-name {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    line-height: 1.25 !important;
}

.head-user-details {
    min-width: 0 !important;
    overflow: visible !important;
}

/* ══════════════════════════════════════════════════════════════════════════
 * 11. PERFECT VIEWPORT MODAL CENTERING (CLOSED BY DEFAULT)
 * ══════════════════════════════════════════════════════════════════════════ */
.modal-overlay,
.cc-nav-modal,
div.modal-overlay,
div.cc-nav-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: none !important;
    will-change: auto !important;
}

.modal-overlay.open,
.cc-nav-modal.open,
div.modal-overlay.open,
div.cc-nav-modal.open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-card, 
.auth-modal-card, 
.coffee-modal-card, 
.pin-modal-card, 
.chat-modal-window,
.profile-modal-card,
.modal-box {
    margin: auto !important;
    position: relative !important;
    width: calc(100% - 16px) !important;
    max-width: 500px !important;
    max-height: calc(90vh - 32px) !important;
    max-height: calc(90dvh - 32px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
 * 12. GLOBAL STRICT OWNER SECURITY (READ-ONLY GUEST STANDARD)
 * Ukrycie wszelkich kontrolek edycji, ołówków i paneli dla niezalogowanych gości
 * ══════════════════════════════════════════════════════════════════════════ */
.card-edit-btn,
.btn-gear-settings,
.settings-dropdown-wrap,
.post-creator-box,
.feed-composer,
#channelComposer,
.cover-hint-badge,
.cover-upload-btn,
.cover-reposition-toolbar,
.photo-delete-badge,
.post-header-actions,
.owner-only {
    display: none !important;
}

body.owner-mode-active .card-edit-btn {
    display: inline-flex !important;
}

body.owner-mode-active .btn-gear-settings,
body.owner-mode-active .settings-dropdown-wrap {
    display: block !important;
}

body.owner-mode-active .post-creator-box,
body.owner-mode-active .feed-composer,
body.owner-mode-active #channelComposer {
    display: block !important;
}

body.owner-mode-active .cover-hint-badge,
body.owner-mode-active .cover-upload-btn,
body.owner-mode-active .photo-delete-badge,
body.owner-mode-active .post-header-actions,
body.owner-mode-active .owner-only {
    display: inline-flex !important;
}

        /* ── EXPANDED FULL-WIDTH HORIZONTAL PROFILE HEAD ── */
        .profile-head-top {
            display: flex;
            flex-direction: column;
            gap: 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            padding-bottom: 22px;
        }

        .profile-head-main {
            display: flex;
            align-items: flex-end;
            gap: 24px;
            width: 100%;
            flex-wrap: wrap;
        }

        .head-user-details {
            flex: 1 1 500px;
            min-width: 280px;
            margin-top: 8px;
        }

        .head-user-name {
            font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
            font-size: clamp(1.45rem, 3.2vw, 2.2rem);
            font-weight: 800;
            color: #ffffff;
            display: inline-flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            white-space: normal;
            line-height: 1.25;
            margin: 0 0 6px 0;
        }

        .head-user-tagline {
            font-size: 0.95rem;
            color: var(--text-secondary);
            margin-top: 6px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px 18px;
            width: 100%;
        }

        .head-user-tagline span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .head-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 6px;
            width: 100%;
        }
