/* --- ZMIENNE GLOBALNE I MOTYW --- */
:root {

    /* --- ZMIENNE TYPOGRAFII I OKIEN (REM) --- */
    --text-xs: 0.75rem;   /* ~12px */
    --text-sm: 0.875rem;  /* ~14px */
    --text-base: 1rem;    /* ~16px */
    --text-lg: 1.125rem;  /* ~18px */
    --text-xl: 1.5rem;    /* ~24px */
    --text-2xl: 2rem;     /* ~32px */
    --text-3xl: 2.5rem;   /* ~40px */
    
    --radius-card: 12px;
    --radius-btn: 8px;
    --spacing-card: 25px;
    --spacing-section: 60px;

    --primary: #f97316; --primary-hover: #ea580c; --secondary: #0ea5e9; 
    --dark: #0f172a; --dark-card: #1e293b; --dark-header: #1e293b;
    --light: #f8fafc; --white: #ffffff; --bg-main: #f1f5f9; 
    --border: #e2e8f0; --border-hover: #cbd5e1;
    --text-main: #334155; --text-muted: #64748b;
    --primary-light: #fff7ed;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    
    --tag-budowa: #ef4444; --tag-remont: #3b82f6; --tag-wykonczenia: #a855f7; --tag-ogrod: #22c55e;
    --tag-dzialki: #f59e0b; --tag-instalacje: #06b6d4; --tag-projekt: #ec4899; --tag-finanse: #10b981; 
    --tag-gielda: #6366f1; --tag-inwest: #f43f5e; --tag-serwis: #f59e0b; --tag-odpady: #10b981;
    --tag-sprzet: #eab308; --tag-b2b: #3b82f6; --tag-urgent: #ef4444;
    --gold: #f59e0b; --gold-light: #fefce8;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.05);
    --shadow-float: 0 12px 24px -8px rgba(249, 115, 22, 0.15);
    --radius-md: 10px; --radius-lg: 16px;
}
/* ========================================= */
/* --- 3-ETAPOWA WYSZUKIWARKA (TOP BAR) --- */
/* ========================================= */
.hero-search-bar {
    background: #ffffff;
    border-radius: 50px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 1000px;
    margin: -30px auto 40px auto; 
    position: relative;
    z-index: 10;
    border: 1px solid #e2e8f0;
}
.search-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-right: 1px solid #e2e8f0;
    position: relative; /* Ważne dla pozycjonowania dropdownu */
}
.search-group:last-of-type { border-right: none; }
.search-group i { color: var(--primary); font-size: 18px; }

/* Customowe rozwijane listy */
.search-select-custom {
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-select-custom .selected-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Zawartość Dropdownu */
.search-dropdown {
    position: absolute;
    top: 130%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    padding: 10px;
    display: none; /* Domyślnie ukryte */
    flex-direction: column;
    gap: 5px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
}
.search-dropdown.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}
/* Scrollbar dla dropdownu */
.search-dropdown::-webkit-scrollbar { width: 6px; }
.search-dropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

/* Elementy wewnątrz dropdownu */
.dropdown-item {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: background 0.2s;
}
.dropdown-item:hover { background: #f0f9ff; color: var(--primary); font-weight: 600;}
.dropdown-item.back-btn { font-weight: 700; color: var(--text-muted); background: #f8fafc; border: 1px solid var(--border); display:flex; gap: 8px; align-items: center;}
.dropdown-item.back-btn:hover { background: #e2e8f0; color: var(--dark); }

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 15px 35px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
    white-space: nowrap;
}
.search-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }

@media (max-width: 1024px) { 
    .hero-search-bar { flex-direction: column; border-radius: 12px; padding: 20px;} 
    .search-group { border-right: none; border-bottom: 1px solid #e2e8f0; width: 100%; padding: 15px 10px;} 
    .search-btn { width: 100%; border-radius: 8px; margin-top: 15px;} 
    .search-dropdown { top: 100%; }
}
.search-btn:hover { background: #ea580c; transform: translateY(-2px); }

/* ========================================= */
/* --- PASEK LIVE ZLECEŃ (8 KART) --- */
/* ========================================= */
.live-jobs-section {
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 20px;
}
.live-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}
.live-header h2 { margin: 0; font-size: 22px; color: #0f172a; display: flex; align-items: center; gap: 10px;}
.live-header h2 .pulsing-dot { width: 12px; height: 12px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.live-carousel-wrapper { position: relative; }
.live-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 15px;
    scrollbar-width: thin;
}
.live-track::-webkit-scrollbar { height: 6px; }
.live-track::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

/* Smukła karta zlecenia - idealna by zmieścić 8 na dużym ekranie */
.live-card {
    flex: 0 0 calc(12.5% - 14px); /* 100% / 8 - gap */
    min-width: 170px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.live-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: #cbd5e1; }
.lc-img {
    height: 100px;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center;
    position: relative;
}
.lc-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}
.lc-body { padding: 12px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; gap: 8px;}
.lc-title { font-size: 13px; font-weight: 700; color: #0f172a; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-location { font-size: 10px; color: #64748b; display: flex; align-items: center; gap: 5px; }
.lc-price { font-size: 15px; font-weight: 800; color: var(--primary, #f97316); border-top: 1px dashed #e2e8f0; padding-top: 8px; margin-top: auto;}

/* Responsywność */
@media (max-width: 1400px) { .live-card { flex: 0 0 calc(16.66% - 13px); min-width: 170px;} } /* 6 kart */
@media (max-width: 1024px) { .live-card { flex: 0 0 calc(25% - 12px); } .hero-search-bar { flex-direction: column; border-radius: 12px; } .search-group { border-right: none; border-bottom: 1px solid #e2e8f0; width: 100%;} .search-btn { width: 100%; border-radius: 8px; margin-top: 10px;} } /* 4 karty na tablet, wyszukiwarka w pionie */
@media (max-width: 600px) { .live-card { flex: 0 0 calc(50% - 8px); } } /* 2 karty na telefon */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; color: var(--text-main); background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 100%); background-attachment: fixed; line-height: 1.6; padding-top: 80px; overflow-x: hidden; }

/* WIDOCZNE SCROLLBARY GŁÓWNE */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* --- NAV & LAYOUT SYSTEM --- */
.header { position: fixed; top: 0; left: 0; width: 100%; height: 80px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); box-shadow: 0 4px 30px rgba(0,0,0,0.02); display: flex; justify-content: space-between; align-items: center; padding: 0 4%; z-index: 1000; border-bottom: 1px solid var(--border); }
.logo { font-size: 24px; font-weight: 800; color: var(--dark); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.3s; }
.logo span { color: var(--primary); transition: color 0.3s; }

.nav-links { display: flex; gap: 8px; list-style: none; align-items: center; }
.nav-links button, .nav-links a.nav-btn { background: none; border: none; font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 10px 18px; border-radius: 30px; color: var(--text-muted); cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.nav-links button:hover, .nav-links a.nav-btn:hover { color: var(--dark); background: #f1f5f9; }

.btn { padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; transition: var(--transition); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 14px rgba(249, 115, 22, 0.2); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(249, 115, 22, 0.3); }
.btn-outline { background: var(--white); border-color: var(--border); color: var(--text-main); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fee2e2; color: #dc2626; padding: 6px 12px; font-size: 11px; border:none; border-radius: 6px; }
.btn-danger:hover { background: #fca5a5; cursor: pointer;}

/* --- HERO BANNER --- */
.hero { 
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.9)),
        url('https://images.unsplash.com/photo-1541888086114-1e0e47087cb3?w=800') top left / 50% 50% no-repeat,
        url('https://images.unsplash.com/photo-1505691938895-1758d7feb511?w=800') top right / 50% 50% no-repeat,
        url('https://images.unsplash.com/photo-1585320806297-9794b3e4eeae?w=800') bottom left / 50% 50% no-repeat,
        url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800') bottom right / 50% 50% no-repeat;
    background-color: var(--dark); padding: 50px 20px 80px 20px; color: var(--white); text-align: center; min-height: calc(100vh - 80px); display: flex; flex-direction: column; justify-content: center; position: relative;
}
.hero::before { 
    content: 'DOM REMONT BUDOWA'; 
    position: absolute; 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%); 
    font-size: 8vw; 
    font-weight: 800; color: rgba(255, 255, 255, 0.04); z-index: 0; pointer-events: none; letter-spacing: -2px; white-space: nowrap; 
}
.hero > * { position: relative; z-index: 1; }
.main-cta-calc { font-size: 17px; padding: 16px 36px; border-radius: 50px; margin-bottom: 40px; box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(249, 115, 22, 0); } 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); } }

.hero-services { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; width: 100%; max-width: 1500px; margin: 0 auto; }
.service-card { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); padding: 22px 12px; border-radius: 12px; text-align: center; color: var(--white); cursor: pointer; transition: var(--transition); backdrop-filter: blur(5px); display: flex; flex-direction: column; justify-content: flex-start; align-items: center; }
.service-card:hover { transform: translateY(-4px); background: var(--white); color: var(--dark); border-color: var(--card-color, var(--primary)); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.service-card:hover .service-desc { color: var(--text-main); opacity: 1; }
.service-card i { font-size: 26px; margin-bottom: 10px; color: var(--card-color, var(--primary)); display: block; transition: var(--transition); }
.service-card h3 { font-size: 0.95rem; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.service-desc { font-size: 0.72rem; color: #cbd5e1; line-height: 1.4; opacity: 0.85; transition: var(--transition); }
.service-card.invest-featured { border-color: var(--tag-inwest); background: linear-gradient(145deg, rgba(244,63,94,0.3), rgba(15,23,42,0.6)); }
.service-card.invest-featured:hover { background: var(--white); }

.hero-marketing-bottom { margin-top: 60px; max-width: 950px; margin-left: auto; margin-right: auto; background: rgba(15, 23, 42, 0.65); padding: 35px 40px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); text-align: center; }
.hero-marketing-bottom h2 { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 15px; letter-spacing: -0.5px; transition: color 0.3s; }
.hero-marketing-bottom p { font-size: 1.05rem; color: #e2e8f0; line-height: 1.7; margin: 0; }

/* --- PREZENTACJA GALERII --- */
.presentation-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 15px; margin-bottom: 25px; }
.presentation-gallery img { width: 100%; border-radius: 12px; object-fit: cover; }
.presentation-main-img { height: 280px; }
.presentation-side-imgs { display: grid; grid-template-rows: 1fr 1fr; gap: 15px; }
.presentation-side-imgs img { height: 132.5px; }

/* --- MODAL SYSTEM GŁÓWNY --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.8); backdrop-filter: blur(8px); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { display: flex; opacity: 1; }
.modal-box { background: var(--white); width: 100%; max-width: 800px; border-radius: var(--radius-lg); padding: 30px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); transform: translateY(-20px) scale(0.98); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); max-height: 90vh; overflow-y: auto; font-family: 'Plus Jakarta Sans', sans-serif;}
.modal-box.small { max-width: 400px; }
.modal-overlay.show .modal-box { transform: translateY(0) scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.modal-header h2 { font-size: 20px; font-weight: 800; color: var(--dark); margin: 0; }
.modal-close-btn { background: var(--bg-main); border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--text-muted); transition: var(--transition-fast); }
.modal-close-btn:hover { background: #fee2e2; color: #ef4444; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; background: var(--bg-main); transition: var(--transition-fast); }
.form-group input:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px var(--primary-light); }

/* --- SYSTEM TOASTÓW --- */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; font-family: 'Plus Jakarta Sans', sans-serif;}
.toast { background: var(--dark); color: white; padding: 14px 24px; border-radius: 8px; font-weight: 500; font-size: 13px; box-shadow: var(--shadow-md); transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 12px; }
.toast.show { transform: translateX(0); }
.toast.success { border-left: 5px solid #10b981; }
.toast.error { border-left: 5px solid #ef4444; }

/* --- CHAT WIDGET --- */
.chat-widget-btn { position: fixed; bottom: 30px; right: 30px; width: 65px; height: 65px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; cursor: pointer; box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4); z-index: 9999; transition: transform 0.3s, background 0.3s; }
.chat-widget-btn:hover { transform: scale(1.1); background: var(--primary-hover); }
.chat-window { position: fixed; bottom: 110px; right: 30px; width: 350px; background: white; border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); z-index: 9999; display: flex; flex-direction: column; overflow: hidden; transform: translateY(20px); opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid var(--border); }
.chat-window.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.chat-header { background: var(--dark); color: white; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { font-size: 15px; margin: 0; font-weight: 700; display: flex; align-items: center; gap: 8px;}
.chat-header button { background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 1; transition: color 0.2s;}
.chat-header button:hover { color: var(--primary); }
.chat-body { padding: 25px; background: #f8fafc; }
.chat-message { background: white; padding: 15px 18px; border-radius: 12px 12px 12px 0; font-size: 13.5px; color: var(--text-main); box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 25px; line-height: 1.6; border: 1px solid var(--border); }
.chat-social-links { display: flex; flex-direction: column; gap: 12px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; border-radius: 10px; color: white; text-decoration: none; font-weight: 600; font-size: 14.5px; transition: transform 0.2s, opacity 0.3s; }
.social-btn:hover { transform: translateY(-2px); opacity: 0.95; }
.fb-btn { background: #0084ff; }
.ig-btn { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.wa-btn { background: #25d366; }

footer { background: var(--dark); color: #94a3b8; text-align: center; padding: 25px; font-size: 13px; border-top: 1px solid #1e293b; margin-top: auto;}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 1100px) { 
    .hero-services { grid-template-columns: repeat(3, 1fr); } 
    .presentation-gallery { grid-template-columns: 1fr; } 
    .presentation-side-imgs { display: none; } 
    .presentation-main-img { height: 200px; } 
}
@media (max-width: 600px) { 
    .hero-services { grid-template-columns: repeat(2, 1fr); } 
    .chat-window { width: calc(100% - 40px); right: 20px; bottom: 100px; } 
    .chat-widget-btn { right: 20px; bottom: 20px; } 
}




/* ========================================================================= */
/* --- POTĘŻNY, JEDNOLITY SYSTEM RESPONSOWYNOŚCI MOBILNEJ DOM REMONT BUDOWA --- */
/* ========================================================================= */

/* --- 1. TABLETY I MAŁE LAPTOPY (Ekran poniżej 1100px) --- */
@media (max-width: 1100px) {
    :root {
        --spacing-section: 40px;
    }
    
    .hero-services {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px;
    }

    .presentation-gallery {
        grid-template-columns: 1fr !important;
    }
    .presentation-side-imgs {
        display: none !important;
    }
    .presentation-main-img {
        height: 220px;
    }

    .gielda-layout {
        grid-template-columns: 1fr !important;
        gap: 20px;
        margin: 20px auto;
    }

    .filters-sidebar {
        position: relative !important;
        top: 0 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    }

    .live-card {
        flex: 0 0 calc(33.333% - 10px) !important;
        min-width: 200px;
    }
}

/* --- 2. SMARTFONY PIONOWO I POZIOMO (Ekran poniżej 768px) --- */
@media (max-width: 768px) {
    html {
        font-size: 14px !important; /* Mniejszy bazowy font */
    }

    :root {
        --spacing-card: 15px;
        --radius-card: 10px;
    }

    /* Pasek nawigacyjny na telefonie */
    .header {
        position: static !important; /* Na telefonie wyłączamy pływający nagłówek, żeby nie zjadał 30% małego ekranu */
        height: auto !important;
        flex-direction: column !important;
        padding: 15px !important;
        gap: 15px !important;
    }
    
    body {
        padding-top: 0 !important; /* Skoro wyłączyliśmy fixed, usuwamy padding z body */
    }

    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
        justify-content: center !important;
    }

    .nav-links button, .nav-links a.nav-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        background: #f1f5f9; /* Wyraźniejsze przyciski na telefonie */
    }

    /* Wyszukiwarka na głównej */
    .hero-search-bar {
        flex-direction: column !important;
        border-radius: 16px !important;
        padding: 15px !important;
        margin: -20px 15px 30px 15px !important; /* Zmniejszamy marginesy by pasowały do mniejszego ekranu */
        width: auto !important;
    }

    .search-group {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
        padding: 12px 0 !important;
    }
    
    .search-group:last-of-type {
        border-bottom: none !important;
    }

    .search-btn {
        width: 100% !important;
        border-radius: 10px !important;
        margin-top: 15px !important;
        padding: 15px !important;
    }

    /* Dropdown w Native App Style (Wysuwa się z dołu) */
    .search-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 60vh !important;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2) !important;
        z-index: 999999 !important;
        background: #ffffff !important;
        transform: translateY(100%) !important;
        padding: 15px 10px !important;
    }
    
    .search-dropdown.active {
        transform: translateY(0) !important;
    }

    .dropdown-item {
        padding: 12px 15px !important;
        font-size: 13px !important;
        border-bottom: 1px solid #f8fafc;
    }

    /* Pasek 8 live zleceń - magnetyczny swipe */
    .live-track {
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;
        gap: 15px !important;
        padding-bottom: 20px !important;
    }

    .live-card {
        flex: 0 0 85% !important; /* Karta zajmuje 85% ekranu */
        min-width: unset !important;
        scroll-snap-align: center !important;
    }

    /* Główne Kafelki Branż */
    .hero-services {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 15px !important;
    }
    
    .service-card {
        padding: 15px !important;
    }
    
    .service-desc {
        display: none !important; /* Ukrywamy mały tekst na komórce dla czystości */
    }

    /* Karty na liście Giełdy */
    .job-card {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto !important;
    }
    
    .jc-img {
        height: 160px !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .jc-action {
        border-left: none !important;
        border-top: 1px dashed var(--border) !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 15px 20px !important;
        background: #f8fafc;
    }
    
    .btn-bid {
        width: auto !important;
        padding: 12px 20px !important;
    }
}

/* --- 3. MAŁE SMARTFONY (Ekran poniżej 400px) --- */
@media (max-width: 400px) {
    html {
        font-size: 13px !important;
    }
    
    .hero-services {
        grid-template-columns: 1fr !important; /* Na bardzo małych telefonach 1 kolumna */
    }
    
    .jc-action {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        text-align: center !important;
    }
    
    .jc-action > div {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
}