/* =========================================
   ZMIENNE I USTAWIENIA GLOBALNE
   ========================================= */
:root {
    --bg-color: #0a0a0a;        
    --surface-color: #171717;   
    --text-color: #f5f5f5;      
    --text-muted: #a3a3a3;      
    --radius-soft: 24px; 
    --radius-round: 50px;
}

html {
    scroll-behavior: smooth;
}

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

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.6; 
}

/* =========================================
   1. NAWIGACJA
   ========================================= */
.navbar {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    padding: 0 35px;
    height: 70px;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.navbar.scrolled {
    top: 15px;
    height: 60px;
    background: rgba(15, 15, 15, 0.8);
}

/* LOGO W NAWIGACJI */
.logo {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    cursor: pointer !important;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-img-logo {
    height: 35px; 
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover .nav-img-logo {
    transform: scale(1.05); 
}

/* LINKI MENU */
.nav-links {
    list-style: none !important;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap; 
}

.nav-links a { 
    text-decoration: none; 
    color: #f5f5f5; 
    font-weight: 500; 
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #FF6B00; 
}

/* KIEDY MENU ZWIJA SIĘ W PIGUŁKĘ PO SCROLLU (PC) */
@media (min-width: 769px) {
    .navbar.hide-links {
        max-width: 120px; /* Zmień na 130px jeśli pigułka będzie za ciasna */
        /* USUNIĘTO justify-content - koniec z chamskim przeskakiwaniem! */
    }

    .navbar.hide-links .nav-links {
        opacity: 0;
        pointer-events: none;
        max-width: 0;
        width: 0;
        gap: 0;
        margin: 0;
        overflow: hidden;
    }

    /* Magiczny, kinowy wjazd na środek */
    .navbar.hide-links .logo {
        left: 50%; /* Jedzie na środek paska */
        transform: translate(-50%, -50%); /* Idealnie się wyśrodkowuje */
    }
}

/* =========================================
   2. SEKCJE OGÓLNE I PRZYCISKI
   ========================================= */
.section { padding: 120px 20px 60px; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2rem; margin-bottom: 40px; font-weight: 800; }

.btn { display: inline-block; padding: 15px 30px; background-color: var(--text-color); color: var(--bg-color); text-decoration: none; font-weight: 600; border-radius: var(--radius-round); box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05); transition: background-color 0.3s ease, transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); backface-visibility: hidden; -webkit-font-smoothing: antialiased; }
.btn:hover { background-color: #d4d4d8; }
.btn-dark { background: transparent !important; color: var(--text-color) !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.btn-dark:hover { background: rgba(255,255,255,0.05) !important; }

/* =========================================
   3. HERO
   ========================================= */
.hero { position: relative; height: 100vh; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow: hidden; }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: -1; }
.hero-content { position: relative; z-index: 1; padding: 0 20px; color: #ffffff; }
.hero-content h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; max-width: 800px; margin-left: auto; margin-right: auto; color: #e4e4e7; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* =========================================
   4. PORTFOLIO
   ========================================= */
.subsection-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 3px solid var(--text-color);
    padding-left: 15px;
}

/* POZIOME WIDEO */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.video-card { background: var(--surface-color); border-radius: var(--radius-soft); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: transform 0.3s ease; }
.video-card:hover { transform: scale(1.02); }
.video-wrapper { position: relative; width: 100%; aspect-ratio: 16 / 9; background-color: var(--surface-color); overflow: hidden; }
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; object-fit: cover; }
.video-info { padding: 20px; }
.video-info h3 { margin-bottom: 5px; font-size: 1.1rem; }
.video-info p { font-size: 0.9rem; color: var(--text-muted); }

/* PIONOWE WIDEO (Rolek) */
.reels-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    align-items: start; 
}
.reels-grid-container .video-card {
    max-width: 320px; 
    margin: 0 auto; 
    width: 100%;
}

/* --- TAGI Z ZAKRESEM OBOWIĄZKÓW W PORTFOLIO --- */
.video-roles { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin-top: 15px; 
}

/* Baza dla każdego tagu (wspólne cechy) */
.role-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #fff; /* Tekst na stałe biały, bo tła będą kolorowe */
    padding: 5px 12px;
    border-radius: 4px;
    transition: transform 0.3s ease, filter 0.3s ease; 
    cursor: default; 
}

/* Wspólny efekt po najechaniu (tylko lekkie uniesienie i rozjaśnienie) */
.role-badge:hover {
    transform: translateY(-2px); 
    filter: brightness(1.15); /* Lekko "podświetla" kolor */
}

/* --- STAŁE KOLORY TAGÓW --- */

/* Pomarańczowy dla Montażu */
.role-montaz {
    background: #FF6000; 
    border: 1px solid #FF6000; 
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2); /* Delikatna poświata */
}

/* Fioletowy dla Kamery */
.role-kamera {
    background: #B0006E; 
    border: 1px solid #B0006E;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

/* Niebieski dla Color Grading (jeśli używasz) */
.role-color {
    background: #4A00E0; 
    border: 1px solid #4A00E0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* =========================================
   5. SEKCJA "ROLKI" (Opis i telefon)
   ========================================= */
#reels { padding: 100px 0; overflow: hidden; }
.reels-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; position: relative; }

.reels-wrapper {
    position: relative;
    width: 100%;
    max-width: calc(100% - 150px); 
    background: rgba(25, 25, 28, 0.4);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 70px 100px;
    z-index: 5;
    transition: transform 0.2s ease;
}

.reels-text { width: 63%; text-align: left; }
.reels-text h2 { text-align: left; }
.reels-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; color: var(--text-color); font-weight: 600; }
.reels-list li::marker { content: none; }

.reels-visual {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -150px; 
    width: 300px;
    z-index: 10;
    pointer-events: none;
    transition: transform 0.15s ease-out;
}

/* Mockup Telefonu */
.phone-mockup { width: 280px; height: 580px; border: 12px solid #1a1a1a; border-radius: 45px; position: relative; background: #000; box-shadow: 0 40px 100px rgba(0,0,0,0.6); overflow: hidden; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 25px; background: #1a1a1a; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; z-index: 10; }
.phone-screen { width: 100%; height: 100%; background: linear-gradient(135deg, #1f1f22, #101012, #2a2a35); display: flex; align-items: center; justify-content: center; }
.screen-content { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 15px; backface-visibility: hidden; -webkit-font-smoothing: antialiased; }
.pulse-dot { width: 12px; height: 12px; background-color: #ff3b30; border-radius: 50%; box-shadow: 0 0 10px #ff3b30; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }

/* =========================================
   6. O MNIE & KONTAKT
   ========================================= */
.about-container { display: flex; gap: 50px; align-items: center; background: var(--surface-color); padding: 40px; border-radius: var(--radius-soft); }
.about-image { flex-shrink: 0; display: flex; justify-content: center; }
.profile-photo {
    width: 300px !important; 
    height: 300px !important;
    max-width: 100%;
    object-fit: cover; 
    border-radius: var(--radius-soft);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    filter: grayscale(30%) contrast(1.1); 
    transition: filter 0.4s ease, transform 0.4s ease;
}
.profile-photo:hover { filter: grayscale(0%) contrast(1); transform: scale(1.03); }

/* KONTAKT */
.contact-box { background: var(--surface-color); padding: 60px; text-align: center; border-radius: var(--radius-soft); }
.contact-box h2 { font-size: 2.5rem; margin-bottom: 10px; }
.contact-box p { margin-bottom: 30px; color: var(--text-muted); }

/* Ułożenie przycisków kontaktowych */
.contact-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Odstęp między przyciskami */
    margin-top: 10px;
    flex-wrap: wrap; /* Pozwala przyciskom spaść do nowej linii, gdy brakuje miejsca */
}

/* Wymuszenie równego wyrównania wewnątrz przycisku z emotikoną */
.contact-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

footer { text-align: center; padding: 40px; color: #888; font-size: 0.9rem; }

/* =========================================
   7. RWD (Responsywność dla telefonów)
   ========================================= */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; }
.hamburger span { width: 25px; height: 3px; background-color: var(--text-color); border-radius: 3px; transition: all 0.3s ease; }

@media (max-width: 900px) {
    .reels-wrapper { 
        max-width: 100%; 
        padding: 50px 30px; 
        display: flex; 
        flex-direction: column; 
        align-items: flex-start; /* Wyrównuje zawartość kontenera do lewej */
        text-align: left; /* Wyrównuje tekst do lewej */
    }
    
    .reels-text { 
        width: 100%; 
        text-align: left; 
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Spycha przycisk do lewej strony */
    }
    
    .reels-text h2 { 
        text-align: left; 
    }
    
    .reels-list li { 
        justify-content: flex-start; /* Układa emoji i punkty równo od lewej krawędzi */
        text-align: left;
    }
    
    .reels-visual { 
        position: relative; 
        top: 0; 
        right: 0; 
        transform: none !important; 
        margin-top: 50px; 
        align-self: center; /* Trzyma atrapę telefonu idealnie na środku ekranu! */
    }
}

@media (max-width: 768px) {
    .navbar, .navbar.hide-links, .navbar.scrolled {
        width: 90% !important;
        max-width: 90% !important;
        padding: 0 25px !important;
        height: 60px !important;
        overflow: visible !important; 
    }
    
    .hamburger { display: flex !important; }

	.logo {
        left: 25px;
    }
	
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 0;
        border-radius: 20px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
    }

    .nav-links.active {
        opacity: 1 !important;
        pointer-events: all !important;
        transform: translateY(0) !important;
    }

    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-content h1 { font-size: 2.8rem; }
    .about-container { flex-direction: column; }
    .profile-photo { width: 100% !important; height: auto !important; max-height: 400px !important; }
}

/* =========================================
   8. EFEKT ZIARNA (Cinematic Grain)
   ========================================= */
body::after {
    content: "";
    position: fixed;
    top: -100%; 
    left: -100%;
    width: 300%;
    height: 300%;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iNDAwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNuKSIvPjwvc3ZnPg==");
    background-repeat: repeat;
    opacity: 0.12; 
    z-index: 9999; 
    pointer-events: none; 
    animation: grainAnimation 5s steps(6) infinite;
}

@keyframes grainAnimation {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -2%); }
    20% { transform: translate(-3%, 1%); }
    30% { transform: translate(2%, -4%); }
    40% { transform: translate(-1%, 4%); }
    50% { transform: translate(-2%, 2%); }
    60% { transform: translate(3%, 0%); }
    70% { transform: translate(0%, 3%); }
    80% { transform: translate(1%, 5%); } 
    90% { transform: translate(-2%, 2%); }
}

/* =========================================
   9. STOPKA LOKALIZACJE (SEO LOKALNE)
   ========================================= */
.footer-locations {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-locations strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.footer-locations a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 5px;
    display: inline-block;
}

.footer-locations a:hover {
    color: #FF6B00;
}