:root {
    /* PALETA KOLORÓW */
    --primary-color: #D90429;
    --primary-hover: #b00202;
    --bg-body: #F9FAFB;
    --bg-white: #FFFFFF;
    --text-main: #111827;
    --text-secondary: #4B5563;
    --border-color: #E5E7EB;
    
    /* Zoptymalizowane cienie */
    --shadow-soft: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-hover: 0 10px 20px rgba(0,0,0,0.05);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ================= NAGŁÓWEK (MENU) ================= */
#fh5co-header-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98); 
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
    will-change: transform; 
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
    position: relative; /* Ważne dla hamburgera */
}

#fh5co-logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

/* Menu Linki (Desktop) */
.sf-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.sf-menu li { position: relative; }

.sf-menu a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 0;
    display: block;
}

.sf-menu a:hover { color: var(--primary-color); }

/* ================= HERO SECTION (POPRAWIONA) ================= */
.hero-section {
    position: relative;
    width: 100%;
    height: auto; /* Wysokość zależy TYLKO od zdjęcia */
    margin-top: 80px;
    display: block;
    overflow: hidden;
}

/* Obrazek tła - zawsze pełna szerokość, proporcjonalna wysokość */
.hero-bg {
    position: relative;
    display: block;
    width: 100%;
    height: auto; 
    z-index: 0;
    vertical-align: bottom; /* Usuwa mikroskopijny pasek pod zdjęciem */
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    text-align: center;
    /* Dzięki temu tekst nigdy nie wyjdzie poza obszar zdjęcia na mobile */
    max-height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    color: #fff;
    /* Responsywna czcionka: 5% szerokości ekranu, ale min 1.2rem i max 3.5rem */
    font-size: clamp(1.2rem, 5vw, 3.5rem); 
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    /* Responsywny rozmiar przycisku */
    font-size: clamp(0.7rem, 2vw, 1rem);
}

.btn-primary:hover {
    background-color: white;
    transform: translateY(-2px);
}

/* ================= KARTY (Wydajność) ================= */
.glass-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(217, 4, 41, 0.15);
}

/* ================= SEKCJE ================= */
.section-padding { padding: 80px 0; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

/* Partnerzy */
.partners {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.partners img {
    max-height: 45px;
    width: auto;
    transition: opacity 0.3s;
    filter: grayscale(100%);
    opacity: 0.5;
}

.partners img:hover {
    filter: none;
    opacity: 1;
}

/* ================= GALERIA (Szybka) ================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    aspect-ratio: 4/3; 
    border-radius: 8px;
    overflow: hidden;
    background: #e0e0e0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ================= STOPKA ================= */
footer {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
    content-visibility: auto; 
}

.fh5co-social-icons a {
    font-size: 24px;
    color: var(--text-main);
    margin: 0 10px;
    transition: color 0.2s;
}

.fh5co-social-icons a:hover { color: var(--primary-color); }

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ================= MENU MOBILNE (HAMBURGER) - POPRAWIONE ================= */

/* Styl przycisku (Desktop - ukryty) */
#menu-toggle {
    display: none;
}

/* RWD - Styl dla telefonów (poniżej 900px) */
@media (max-width: 900px) {
    
    /* Usunęliśmy height: 70vh dla .hero-section - to naprawiło szary pas! */

    /* Pokaż przycisk hamburgera */
    #menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1200; /* NAJWYŻEJ */
        
        /* WYPYCHAMY NA PRAWO */
        margin-left: auto; 
    }

    /* Kreski hamburgera */
    .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background-color: var(--text-main);
        border-radius: 2px;
    }

    /* MENU MOBILNE */
    .sf-menu {
        display: flex !important; /* Wymuszenie widoczności kontenera */
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        
        position: fixed;
        top: 80px; /* Zaraz pod nagłówkiem */
        left: -100%; /* Schowane poza ekranem */
        width: 100%;
        height: calc(100vh - 80px); /* Na całą wysokość ekranu */
        
        background-color: #fff;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        transition: left 0.3s ease-in-out;
        z-index: 1100;
        box-shadow: none;
        overflow-y: auto;
    }

    /* KLASA AKTYWNA - WSUWA MENU */
    .sf-menu.is-active {
        left: 0 !important; /* Wjazd na ekran */
    }

    /* Styl linków w menu mobilnym */
    .sf-menu li {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .sf-menu a {
        display: block;
        padding: 20px 0;
        font-size: 1.2rem;
        border-bottom: 1px solid #f3f4f6;
        width: 100%;
        color: var(--text-main);
    }

    /* ANIMACJA IKONY "X" */
    #menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    #menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--primary-color); }
    #menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--primary-color); }
    
    /* Poprawa czytelności tekstów w nagłówku na mobile */
    .hero-content {
        padding: 10px;
        width: 95%;
    }
}