/* ================= ZMIENNE I KOLORY ================= */
:root {
    --bg-main: #FDFCFB;
    --bg-dark: #121A25;
    --color-text: #2D3748;
    --color-light: #F7FAFC;
    --accent-primary: #1E3A8A; /* Granat */
    --accent-secondary: #D4A373; /* Elegancki nude/karmel */
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================= RESET I BAZA ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--bg-main); overflow-x: hidden; line-height: 1.6; }

/* Typografia */
h1, h2, h3, h4 { color: var(--accent-primary); line-height: 1.2; font-weight: 600; }
.section-title { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.5rem; }
.section-subtitle { font-size: 1.2rem; color: var(--accent-secondary); margin-bottom: 2rem; font-weight: 400; }
.text-light { color: var(--color-light); }

/* Utylity */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.pt-100 { padding-top: 100px; }
.pb-100 { padding-bottom: 100px; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.dark-bg { background-color: var(--bg-dark); }

/* ================= HEADER STICKY & DYNAMIC ================= */
#main-header {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; transition: var(--transition-smooth);
    padding: 30px 0; background: transparent;
}
/* Ukrywamy ikonkę wewnątrz menu na dużych ekranach (zostaje ta w rogu) */
.mobile-social-item { display: none; }

#main-header.scrolled {
    padding: 15px 0;
    background: rgba(253, 252, 251, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1300px; margin: 0 auto; padding: 0 5%; }

/* Kolory linków w headerze: NA GÓRZE SĄ BIAŁE (bo tło jest ciemne) */
.logo a { font-family: var(--font-serif); font-size: 28px; font-weight: 700; color: #ffffff; text-decoration: none; transition: var(--transition-smooth); }
.desktop-nav ul { display: flex; gap: 3rem; list-style: none; }
.desktop-nav a { text-decoration: none; color: #ffffff; font-weight: 500; font-size: 18px; transition: var(--transition-smooth); position: relative; }
.social-widget {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
    color: #ffffff; transition: var(--transition-smooth);
}

/* Kolory linków PO SCROLLU (header staje się jasny) */
#main-header.scrolled .logo a { font-size: 22px; color: var(--accent-primary); }
#main-header.scrolled .desktop-nav a { font-size: 15px; color: var(--color-text); }
#main-header.scrolled .social-widget { width: 40px; height: 40px; color: var(--accent-primary); border-color: #ddd; background: transparent; }
.social-widget:hover { background: var(--accent-primary) !important; color: white !important; transform: translateY(-3px); border-color: var(--accent-primary) !important; }

.desktop-nav a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent-secondary); transition: var(--transition-smooth); }
.desktop-nav a:hover::after { width: 100%; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; }

/* ================= HERO SECTION ================= */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-bg-image {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('img/hero.png');
    background-size: cover; background-position: center; background-attachment: fixed;
    z-index: -2;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(30, 35, 42, 0.75);
    z-index: -1;
}

.hero-content { max-width: 800px; padding-top: 60px; }

.hero-subtitle { color: var(--accent-secondary); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1.5rem; font-size: 0.95rem; }
.hero-title { color: #ffffff; font-family: var(--font-serif); font-size: clamp(3rem, 6vw, 4.8rem); line-height: 1.1; margin-bottom: 1.5rem; }
.hero-title .text-accent { color: var(--accent-secondary); }
.hero-title .hero-hashtag {font-size: 0.8em; display: inline-block; margin-top: 5px;}
.hero-description { color: #E2E8F0; font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; max-width: 650px; margin-bottom: 3rem; }

.hero-buttons { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.btn-hero-solid { display: inline-block; background: var(--accent-secondary); color: var(--bg-dark); padding: 1rem 2.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; text-decoration: none; border: 2px solid var(--accent-secondary); transition: var(--transition-smooth); }
.btn-hero-solid:hover { background: transparent; color: var(--accent-secondary); }
.btn-hero-outline { display: inline-block; background: transparent; color: #ffffff; padding: 1rem 2.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; text-decoration: none; border: 2px solid #ffffff; transition: var(--transition-smooth); }
.btn-hero-outline:hover { background: #ffffff; color: var(--bg-dark); }

/* ================= O MNIE (Pop-out / Out of bounds effect) ================= */
.layout-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.layout-split.reverse { direction: rtl; }
.layout-split.reverse > * { direction: ltr; }

/* Główny kontener - nadaje stałe proporcje i trzyma wszystko w ryzach */
.image-widget { 
    position: relative; 
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/5; /* Stałe proporcje, niezbędne do nałożenia zdjęć */
    margin: 0 auto;
}

/* Animowany kształt w tle (Blob) */
.blob-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%; /* Wypełnia 80% od dołu, zostawia miejsce na głowę na górze */
    background: #F4F2F0; /* Kolor tła bloba */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphBlob 8s ease-in-out infinite alternate;
    
    /* TO JEST KLUCZOWE: Obcina zdjęcie pod spodem idealnie do swoich zaokrąglonych krawędzi */
    overflow: hidden; 
    z-index: 1;
}

@keyframes morphBlob {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    100% { border-radius: 40% 60% 50% 50% / 40% 60% 50% 60%; }
}

/* WSPÓLNE DLA OBU ZDJĘĆ: Gwarantuje, że nałożą się na siebie idealnie co do piksela */
.person-image-top, 
.person-image-bottom {
    position: absolute;
    bottom: 0; 
    left: 50%;
    transform: translateX(-50%);
    width: 110%; /* Zmniejszyliśmy z 135% do 110%, żeby nie wychodziła tak mocno na boki */
    height: auto;
    pointer-events: none; 
}

/* ZDJĘCIE NA WIERZCHU: Głowa i ręce */
.person-image-top {
    z-index: 2; 
    /* Zmniejszamy ucięcie z 30% na 12%. 
       Jeśli nadal tnie za wysoko, zmień na 10%. Jeśli za nisko (widać krawędź na dole), daj np. 15% */
    clip-path: inset(0 0 12% 0);
    -webkit-clip-path: inset(0 0 12% 0);
}

/* ZDJĘCIE POD SPODEM: Perfekcyjny zaokrąglony dół */
.person-image-bottom {
    z-index: 1;
    /* Nie ma żadnych dodatkowych właściwości, bo "overflow: hidden" z .blob-bg ucina je samo! */
}

/* Pływająca etykieta "10+ lat" */
.floating-badge { 
    position: absolute; 
    bottom: 30px; 
    right: -20px; 
    background: white; 
    padding: 1.5rem; 
    border-radius: 16px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    animation: float 4s ease-in-out infinite;
    z-index: 3; /* Zawsze najwyżej */
}
.badge-number { font-size: 2.5rem; font-weight: 800; color: var(--accent-secondary); line-height: 1; }
.badge-text { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.highlight-box { background: rgba(212, 163, 115, 0.1); border-left: 4px solid var(--accent-secondary); padding: 1.5rem; margin-top: 2rem; border-radius: 0 8px 8px 0; }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }

/* ================= WIDŻETY USŁUG (Czym się zajmuję) ================= */
.widgets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 4rem; }
.service-widget { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255,255,255,0.1); padding: 3rem 2rem; border-radius: 20px; backdrop-filter: blur(10px); transition: var(--transition-smooth); color: var(--color-light); position: relative; overflow: hidden; }
.service-widget::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, transparent, rgba(255,255,255,0.05)); transform: translateY(100%); transition: var(--transition-smooth); }
.service-widget:hover { transform: translateY(-10px); border-color: var(--accent-secondary); background: rgba(255,255,255,0.08); }
.service-widget:hover::before { transform: translateY(0); }
.service-widget h3 { color: white; margin-bottom: 1rem; }
.widget-icon { font-family: var(--font-serif); font-size: 4rem; color: rgba(212, 163, 115, 0.3); position: absolute; top: -10px; right: 10px; font-weight: bold; }

/* ================= JAK PRACUJĘ ================= */
.process-list { margin-top: 2rem; position: relative; padding-left: 30px; border-left: 2px dashed #CBD5E0; }
.process-item { margin-bottom: 2rem; position: relative; }
.process-item::before { content: ''; position: absolute; left: -36px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-main); border: 2px solid var(--accent-secondary); }

.glass-card-stack { position: relative; height: 400px; }
.glass-card { position: absolute; width: 80%; padding: 3rem 2rem; border-radius: 24px; background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.6); }
.glass-card.back { top: 0; right: 0; transform: scale(0.9) rotate(5deg); background: rgba(212, 163, 115, 0.2); }
.glass-card.middle { top: 20px; right: 10%; transform: scale(0.95) rotate(-3deg); background: rgba(30, 58, 138, 0.1); }
.glass-card.front { top: 40px; left: 0; z-index: 3; }
.giant-hash { font-family: var(--font-serif); font-size: 2.5rem; color: var(--accent-primary); margin-bottom: 1rem; }

/* ================= DLA KOGO (Ciemna sekcja premium ze złotymi kropkami) ================= */

/* Generowanie ciemnego tła ze złotą/karmelową siatką kropek */
.dark-bg-pattern {
    background-color: var(--bg-dark);
    
    /* Zmiana: Zamiast pełnego koloru, używamy rgba(212, 163, 115, 0.15), co daje 15% przezroczystości */
    background-image: radial-gradient(rgba(212, 163, 115, 0.15) 1.5px, transparent 1.5px);
    
    background-size: 30px 30px;
    background-position: 0 0;
}

.tags-widget { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin: 3rem 0; }

/* Styl premium dla tagów (ciemne pastylki ze złotym obrysem) */
.premium-tag { 
    padding: 1rem 2.5rem; 
    background: rgba(255, 255, 255, 0.03); /* Bardzo delikatne, półprzezroczyste tło */
    border-radius: 50px; 
    font-weight: 400; 
    letter-spacing: 0.5px;
    color: #ffffff; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    transition: var(--transition-smooth); 
    border: 1px solid rgba(212, 163, 115, 0.4); /* Subtelny złoto-karmelowy obrys */
    backdrop-filter: blur(5px);
}

/* Po najechaniu myszką obrys i tekst stają się w pełni złote/karmelowe */
.premium-tag:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent-secondary); 
    color: var(--accent-secondary);
    background: rgba(255, 255, 255, 0.08);
}

/* ================= KONTAKT ================= */
.contact-widget { background: white; border-radius: 30px; padding: 4rem; display: flex; align-items: center; gap: 4rem; box-shadow: 0 30px 60px rgba(0,0,0,0.08); }
.contact-info { flex: 1; }
.contact-image { width: 300px; height: 300px; border-radius: 50%; background: #E2E8F0; display: flex; align-items: center; justify-content: center; color: #A0AEC0; }
.btn-modern { display: inline-flex; align-items: center; gap: 10px; padding: 1rem 2.5rem; border-radius: 50px; font-weight: 600; text-decoration: none; transition: var(--transition-smooth); cursor: pointer; }
.btn-linkedin { background: #0A66C2; color: white; }
.btn-outline { border: 2px solid var(--accent-primary); color: var(--accent-primary); background: transparent; }
.btn-outline:hover { background: var(--accent-primary); color: white; }
.action-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

footer { padding: 2rem; border-top: 1px solid #E2E8F0; color: #718096; }

/* ================= KONTAKT (Styl ze zdjęciem) ================= */
.contact-photo-frame {
    position: relative;
    width: 100%;
    max-width: 380px; 
    margin: 0 auto;
    aspect-ratio: 1 / 1; 
    /* Zmniejszyłem trochę zaokrąglenie, by gruba ramka na dole wyglądała naturalniej */
    border-radius: 16px; 
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06); 
    
    /* KLUCZOWA ZMIANA (czerwona ramka z Twojego rysunku): */
    border: 8px solid #ffffff; 
    border-bottom: 40px solid #ffffff; /* Grubszy, biały pas na dole */
    
    transition: var(--transition-smooth);
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zdjęcie idealnie wypełni kwadrat bez zniekształceń */
    object-position: top center; /* Skupienie na twarzy */
    transition: transform 0.6s ease;
}

.contact-photo-frame:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.contact-photo-frame:hover .contact-photo {
    transform: scale(1.05); /* Subtelne przybliżenie zdjęcia po najechaniu myszką */
}

/* ================= STOPKA (Ciemny styl) ================= */
footer { 
    padding: 3rem 0; /* Więcej oddechu */
    background-color: var(--bg-dark); /* Ten sam ciemny kolor co w sekcji "Czym się zajmuję" */
    color: var(--color-light); /* Jasny tekst */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Bardzo subtelna, półprzezroczysta linia oddzielająca */
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

footer p {
    margin-bottom: 0; /* Usuwa niepotrzebny margines na dole */
}

/* Wyróżniony hashtag w stopce na kolor karmelowy */
.footer-hashtag {
    color: var(--accent-secondary);
    font-weight: 600;
    margin-left: 5px;
}

/* ================= REFERENCJE (Slider na mobile, siatka na PC) ================= */

.references-slider-container {
    max-width: 1200px; /* Zwiększona szerokość na 3 karty */
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.references-slider {
    position: relative;
    min-height: 300px;
}

/* WIDOK BAZOWY / MOBILE (Pojedynczy slajd) */
.reference-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.reference-slide.active {
    display: block;
}

/* KARTA PREMIUM */
.reference-card {
    background: #ffffff;
    padding: 4rem 3rem 3rem;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    height: 100%; /* Zrównuje wysokość kart */
    display: flex;
    flex-direction: column;
}

.quote-icon {
    position: absolute;
    top: 1.5rem;
    left: 2.5rem;
    font-family: var(--font-serif);
    font-size: 6rem;
    color: var(--accent-secondary);
    line-height: 1;
    opacity: 0.15;
}

.ref-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.ref-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--accent-primary);
    margin: 0;
}

.ref-date {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ref-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4a5568;
    font-style: italic;
    margin: 0;
    flex-grow: 1; /* Rozpycha tekst, żeby dół kart kończył się w jednej linii */
}

/* NAWIGACJA SLIDERA */
.slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 3rem;
}

.slider-btn {
    background: white;
    border: 1px solid #e2e8f0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent-primary);
    transition: all 0.3s;
}

.slider-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.slider-dots { display: flex; gap: 8px; }

.dot {
    width: 8px; height: 8px; background: #cbd5e0;
    border-radius: 50%; cursor: pointer; transition: 0.3s;
}

.dot.active {
    width: 24px; border-radius: 10px; background: var(--accent-secondary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= PRZYCISK ZOBACZ WIĘCEJ (Pod referencjami) ================= */
.all-references-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem; /* Odstęp od slidera/kart powyżej */
    padding-top: 1rem;
}

/* ================= WIDOK KOMPUTEROWY (3 kolumny) ================= */
@media (min-width: 993px) {
    .references-slider {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    /* Wymuszamy pokazanie wszystkich 3 kart naraz i wyłączamy animacje JS */
    .reference-slide {
        display: block !important;
        animation: none !important;
    }

    .reference-slide .reference-card {
        padding: 3rem 2rem 2.5rem; /* Odrobinę mniejszy padding, żeby 3 karty obok siebie lepiej wyglądały */
    }

    /* Ukrywamy nawigację (strzałki i kropki) na komputerze */
    .slider-nav {
        display: none !important;
    }
}

/* ================= WIDOK TELEFONU (Poprawki ciasnych ekranów) ================= */
@media (max-width: 768px) {
    .reference-card { 
        padding: 3rem 1.5rem 2rem; 
    }
    .ref-header { 
        flex-direction: column; 
        gap: 5px; 
        align-items: flex-start;
    }
    .ref-name { 
        font-size: 1.3rem; 
    }
}

/* ================= ANIMACJE JS ================= */
.animate-on-scroll { opacity: 0; transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-on-scroll.slide-right { transform: translateX(-50px); }
.animate-on-scroll.slide-left { transform: translateX(50px); }
.animate-on-scroll.popup { transform: translateY(50px); }
.animate-on-scroll.is-visible { opacity: 1; transform: translate(0); }

/* ================= WYRÓWNANIE SEKCJI KONTAKTOWEJ ================= */
#kontakt .layout-split {
    /* Zmieniamy z "center" na "stretch", aby obie kolumny dzieliły tę samą wysokość */
    align-items: stretch; 
}

#kontakt .text-content {
    margin-top: 0; 
    padding-top: 0;
    /* Włączamy tryb kolumnowy dla tekstu, by móc nim sterować w pionie */
    display: flex;
    flex-direction: column;
}

#kontakt .section-title {
    margin-top: 0; /* Nagłówek przykleja się do samego "sufitu" */
}

#kontakt .action-buttons {
    /* MAGIA CSS: To automatycznie wypchnie przyciski na sam dół pustej przestrzeni, 
       zrównując je idealnie z dolną krawędzią zdjęcia obok! */
    margin-top: 1rem; 
}
/* ================= ROZCIĄGNIĘCIE PRZYCISKU LINKEDIN I WYRÓWNANIE (Tylko komputery) ================= */
@media (min-width: 993px) {
    #kontakt .action-buttons {
        align-items: stretch !important; 
        width: fit-content; 
        max-width: 100%; /* Zabezpieczenie na bardzo długie maile */
    }

    #kontakt .btn-linkedin {
        justify-content: center; 
    }

    /* NAPRAWA: Wymuszenie trzymania emaila i telefonu w jednej linii */
    #kontakt .action-buttons > div {
        flex-wrap: nowrap !important; /* Blokuje "spadanie" do nowej linijki */
        width: 100%;
    }

    /* Zmuszamy oba małe przyciski do równego podziału przestrzeni (50% / 50%) */
    #kontakt .action-buttons > div > .btn-modern {
        flex: 1; 
        justify-content: center;
        white-space: nowrap; /* Zabrania łamania tekstu wewnątrz samego przycisku */
    }
}
/* ================= RWD / MEDIA QUERIES ================= */
@media(max-width: 992px) {
    .layout-split, .contact-widget { grid-template-columns: 1fr; flex-direction: column; text-align: center; }
    .layout-split.reverse { direction: ltr; }
    .widgets-grid { grid-template-columns: 1fr; }
    .process-list { text-align: left; margin: 2rem auto; max-width: 500px; }
    .glass-card-stack { display: flex; justify-content: center; height: auto; margin-top: 3rem; }
    .glass-card { position: relative; width: 100%; top: auto; right: auto; left: auto; transform: none !important; }
    .glass-card.back, .glass-card.middle { display: none; }

    #kontakt .layout-split {
        display: flex;
        flex-direction: column;
    }
    
    #kontakt .text-content {
        display: contents; 
    }
    
    #kontakt .section-title { 
        order: 1; 
        text-align: center;
    }
    
    /* Zmniejszony margines pod tekstem */
    #kontakt .text-content > p { 
        order: 2; 
        text-align: center;
        margin-bottom: 1.5rem !important; 
    }
    
    /* Zmniejszony margines pod zdjęciem */
    #kontakt .image-widget { 
        order: 3; 
        margin-bottom: 1.5rem;
    }
    
    /* Wyrównanie GŁÓWNEGO kontenera z przyciskami */
   #kontakt .action-buttons { 
        order: 4; 
        display: flex !important;
        flex-direction: column !important; 
        align-items: center !important;
        width: 100% !important;
        margin-top: 0 !important;
        gap: 1rem !important; 
    }
    
    #kontakt .action-buttons .btn-modern {
        width: 100% !important;
        max-width: 280px !important; /* Sztywna, optymalna szerokość na telefon - wszystkie będą równe! */
        justify-content: center !important;
        box-sizing: border-box !important;
        margin: 0 !important; /* Reset marginesów bocznych */
    }

    /* Zabezpieczenie: jeśli masz tam jeszcze w HTMLu tego dodatkowego diva, 
       który grupował mail i telefon, to to go "zignoruje" w układzie */
    #kontakt .action-buttons > div {
        display: contents !important;
    }
}

@media(max-width: 768px) {
    .mobile-menu-btn { display: flex; flex-direction: column; gap: 6px; width: 30px; z-index: 1001; }
    .mobile-menu-btn span { width: 100%; height: 2px; background: white; transition: 0.3s; }
    #main-header.scrolled .mobile-menu-btn span { background: var(--accent-primary); }
    
    /* ================= MENU MOBILNE (Dropdown z kafelkami) ================= */
    .desktop-nav {
        /* Przyklejamy menu idealnie do dolnej krawędzi nawigacji */
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        height: auto; /* Menu zajmie tylko tyle miejsca, ile potrzebują kafelki */
        
        /* Tło panelu wysuwanego (delikatne szkło i cień) */
        background: rgba(253, 252, 251, 0.98); 
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        
        padding: 20px; /* Marginesy wewnątrz menu */
        display: block;
        
        /* Animacja płynnego opadania (zamiast wjazdu z boku) */
        transform: translateY(-15px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .desktop-nav.active { 
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .desktop-nav ul { 
        display: flex; 
        flex-direction: column; 
        gap: 12px; /* Odstęp pomiędzy kafelkami */
        margin: 0;
        padding: 0;
    }
    
    /* Prostokąty/Kafelki dla każdego linku */
    .desktop-nav ul li:not(.mobile-social-item) a { 
        display: block;
        width: 100%;
        text-align: center;
        padding: 16px;
        background: #ffffff; /* Białe tło prostokąta */
        border: 1px solid #e2e8f0; /* Delikatna ramka wokół */
        border-radius: 12px; /* Zaokrąglone rogi (możesz zmniejszyć do 8px lub 0) */
        font-size: 18px !important; 
        color: var(--accent-primary) !important;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(0,0,0,0.02); /* Bardzo subtelny cień kafelka */
        transition: background 0.2s;
    }

    .desktop-nav ul li:not(.mobile-social-item) a:active {
        background: #f7fafc; /* Efekt kliknięcia (ciemniejsze tło) */
    }
    
    .social-icons { gap: 0.5rem; }
   
    /* POPRAWNY FIX NAGŁÓWKA NA TELEFONIE */
    #main-header {
        padding: 20px 0 !important; /* Stała wysokość od samego początku, bez skakania */
    }
    
    #main-header.scrolled {
        padding: 20px 0 !important; 
        background: rgba(253, 252, 251, 1) !important; /* Pełne białe tło na telefonie (bez przezroczystości) */
        backdrop-filter: none !important; /* Wyłączamy rozmycie na mobile - to ono powoduje ucinanie tła w Safari! */
        -webkit-backdrop-filter: none !important;
    }
    
    .logo a {
        line-height: 1; /* Zapobiega ucinaniu dołu liter w logo */
    }
    /* 1. Ukrywamy ikonkę IN w głównym nagłówku na telefonie */
    .desktop-social { 
        display: none !important; 
    }
    
    /* 2. Pokazujemy ikonkę IN na samym dole rozwijanego menu */
    .mobile-social-item { 
        display: flex; 
        justify-content: center; 
        margin-top: 15px; 
    }
    
    .mobile-social-item .social-widget {
        display: flex; align-items: center; justify-content: center;
        width: 50px; height: 50px; padding: 0; border-radius: 50%;
        background: var(--accent-primary) !important;
        color: white !important;
        border-color: var(--accent-primary) !important;
    }
    
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-hero-solid, .btn-hero-outline { width: 100%; text-align: center; }
    .image-widget {
        max-width: 280px; /* Sztywna blokada szerokości na małych ekranach */
        margin-top: 2rem; /* Odsunięcie od sekcji powyżej, żeby na nią nie najeżdżać */
    }

    .hero-bg-image {
        /* Tu podajesz zdjęcie pionowe/mobilne */
        background-image: url('img/hero-mobile.png');
        
        /* Pro-tip: wyłączamy efekt "fixed" na telefonach. 
           Telefony (zwłaszcza iPhone'y) bardzo źle radzą sobie z przyklejonym tłem 
           i potrafią je brzydko rozciągnąć. "scroll" to naprawia. */
        background-attachment: scroll; 
    }
}