/* =========================================
   1. ZMIENNE I RESET
   ========================================= */
:root {
    --dark-blue: #1F3A5F;    /* Granat z logo */
    --orange: #F28C28;       /* Pomarańczowy z logo */
    --dark-orange: #d1751d;  /* Ciemniejszy pomarańcz na hover */
    --bg-light: #f4f7f9;     /* Jasne tło sekcji */
    --text-main: #333;       /* Główny kolor tekstu */
    --white: #ffffff;
    --transition: 0.3s ease-in-out;
}

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

html { 
    scroll-behavior: smooth; 
}

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

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

img { 
    max-width: 100%; 
    height: auto; 
}

/* =========================================
   2. HEADER & NAWIGACJA (Sticky)
   ========================================= */
.main-header { 
    background: var(--white); 
    padding: 10px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.main-header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo img { 
    height: 110px; 
    display: block;
}

.main-nav ul { 
    list-style: none; 
    display: flex; 
    align-items: center; 
}

.main-nav ul li { 
    margin-left: 30px; 
}

.main-nav ul li a { 
    text-decoration: none; 
    color: var(--dark-blue); 
    font-weight: 700; 
    font-size: 14px;
    text-transform: uppercase;
    position: relative; 
    transition: var(--transition);
}

/* Efekt hover z podkreśleniem */
.main-nav ul li a:hover { 
    color: var(--orange); 
}

.main-nav ul li a::after {
    content: '';
    position: absolute; 
    width: 0; 
    height: 2px;
    bottom: -5px; 
    left: 0; 
    background: var(--orange);
    transition: var(--transition);
}

.main-nav ul li a:hover::after { 
    width: 100%; 
}

/* CTA w menu */
.nav-cta {
    background: var(--orange);
    color: var(--white) !important;
    padding: 8px 15px;
    border-radius: 4px;
}

.nav-cta:hover {
    background: var(--dark-orange);
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero { 
    height: 85vh; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--white); 
    overflow: hidden; 
}

.hero-bg { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: -2; 
}

.hero-video-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(31, 58, 95, 0.65); 
    z-index: -1; 
}

.hero-content { 
    text-align: center; 
    padding: 0 20px;
}

.hero-content h1 { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 3.5rem; 
    margin-bottom: 20px; 
    font-weight: 800;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* PRZYCISKI */
.btn { 
    padding: 15px 35px; 
    text-decoration: none; 
    border-radius: 5px; 
    font-weight: bold; 
    margin: 10px; 
    display: inline-block;
    transition: 0.3s transform, 0.3s background;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-blue { background: var(--dark-blue); color: var(--white); }
.btn-orange { background: var(--orange); color: var(--white); }

.btn:hover { 
    transform: translateY(-3px); 
}

.btn-blue:hover { background: #162a45; }
.btn-orange:hover { background: var(--dark-orange); }

/* =========================================
   4. USŁUGI (KAFELKI)
   ========================================= */
.services { 
    padding: 100px 0; 
    background: var(--white);
}

.section-title { 
    text-align: center; 
    margin-bottom: 60px; 
}

.section-title h2 { 
    font-size: 2.5rem; 
    color: var(--dark-blue); 
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--orange);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.service-card { 
    background: var(--white); 
    padding: 40px; 
    border-radius: 10px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
    text-align: center; 
    transition: var(--transition); 
    border-bottom: 5px solid var(--dark-blue);
}

.service-card:hover { 
    transform: translateY(-12px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    border-color: var(--orange); 
}

.service-card .icon { 
    font-size: 3.5rem; 
    margin-bottom: 25px; 
    display: block; 
}

.btn-text {
    color: var(--orange);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 15px;
}

/* =========================================
   5. O FIRMIE & DLACZEGO MY (Poprawione)
   ========================================= */
.about-section { 
    padding-top: 100px; 
    background: var(--bg-light); 
}

.about-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; 
    align-items: center; 
    margin-bottom: 80px;
}

.about-text h2 { 
    color: var(--dark-blue); 
    margin-bottom: 25px; 
    font-size: 2.2rem; 
}

.about-text p { 
    font-size: 1.1rem; 
    color: #444; 
    text-align: justify; 
    margin-bottom: 20px;
}

.about-img img { 
    border-radius: 10px; 
    box-shadow: 10px 10px 0px var(--orange);
}

/* Poziomy pas zalet */
.features-bar { 
    background: var(--dark-blue); 
    padding: 40px 0; 
    color: var(--white); 
}

.features-flex { 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
}

.feature-item { 
    display: flex; 
    align-items: center; 
    margin: 10px;
}

.check-icon { 
    color: var(--orange); 
    font-size: 1.8rem; 
    margin-right: 15px; 
    font-weight: bold; 
}

.feature-item p { 
    margin: 0; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    letter-spacing: 1px; 
}

/* =========================================
   6. CTA (Wezwanie do działania)
   ========================================= */
.cta { 
    background: linear-gradient(rgba(31, 58, 95, 0.9), rgba(31, 58, 95, 0.9)), url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white); 
    padding: 100px 0; 
    text-align: center; 
}

.cta h2 { 
    font-size: 2.8rem; 
    margin-bottom: 20px; 
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* =========================================
   7. STOPKA (Footer)
   ========================================= */
.main-footer { 
    background: #0f1c2e; 
    color: #cbd5e0; 
    padding: 80px 0 30px; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 50px; 
}

.footer-info .logo { 
    color: var(--white); 
    font-size: 28px; 
    font-weight: bold; 
    margin-bottom: 25px; 
    text-decoration: none;
    display: block;
}

.footer-info span { 
    color: var(--orange); 
}

.footer-grid h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.footer-grid p {
    margin-bottom: 10px;
}

.footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.1); 
    margin-top: 60px; 
    padding-top: 30px; 
    text-align: center; 
}

.footer-bottom a {
    color: var(--orange);
    text-decoration: none;
}

/* =========================================
   8. RESPONSIVE (Telefony i Tablety)
   ========================================= */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .features-flex { justify-content: center; gap: 30px; }
}

@media (max-width: 768px) {
    .main-nav { display: none; } /* Tutaj docelowo będzie menu hamburgerowe */
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1.1rem; }
    .section-title h2 { font-size: 2rem; }
}

/* --- STYLE DLA MENU DESKTOPOWEGO I HAMBURGERA --- */

/* Domyślnie ukrywamy hamburger na dużych ekranach */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101; /* Aby był nad rozwiniętym menu */
}

/* Kreski hamburgera */
.hamburger-box { width: 30px; height: 24px; display: inline-block; position: relative; }
.hamburger-inner { width: 100%; height: 3px; background-color: #1F3A5F; position: absolute; top: 50%; transform: translateY(-50%); transition: background-color 0.2s; }
.hamburger-inner::before, .hamburger-inner::after { content: ''; width: 100%; height: 3px; background-color: #1F3A5F; position: absolute; left: 0; transition: transform 0.2s; }
.hamburger-inner::before { top: -8px; }
.hamburger-inner::after { top: 8px; }

/* Animacja wciśniętego hamburgera (zmienia się w "X") */
.hamburger.active .hamburger-inner { background-color: transparent; }
.hamburger.active .hamburger-inner::before { transform: translateY(8px) rotate(45deg); }
.hamburger.active .hamburger-inner::after { transform: translateY(-8px) rotate(-45deg); }

/* Ułożenie wierszowe dla dużych ekranów */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}
.main-nav a { text-decoration: none; color: #1F3A5F; font-weight: bold; }

/* --- ROZWIJANE MENU (DROPDOWN) - OSTATECZNA POPRAWKA --- */

.main-nav .dropdown {
    position: relative;
}

.main-nav ul.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 260px; /* Lekko poszerzone dla estetyki */
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
    padding: 0; /* Zmienione na 0, aby podświetlenie dotykało krawędzi */
    margin: 0;
    flex-direction: column; 
    gap: 0; 
    overflow: hidden; /* KLUCZOWE: Utrzyma podświetlenie ryzach białej ramki! */
}

.main-nav ul.dropdown-menu li {
    width: 100%;
    text-align: left;
    margin: 0;
    padding: 0;
}

.main-nav ul.dropdown-menu li a {
    display: block;
    padding: 15px 20px; /* Trochę więcej oddechu dla tekstu */
    color: #1F3A5F;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
    box-sizing: border-box; /* KLUCZOWE: Wlicza padding do szerokości */
    border-bottom: none !important; /* KLUCZOWE: Usuwa dziedziczoną pomarańczową linię */
}

.main-nav ul.dropdown-menu li a:hover {
    background-color: #f0f4f8; 
    color: #0056b3;
    border-bottom: none !important; /* Blokuje pomarańczową linię po najechaniu myszką */
}

/* Pokaż menu po najechaniu myszką (tylko na komputerach: > 768px) */
@media (min-width: 769px) {
    .main-nav .dropdown:hover ul.dropdown-menu {
        display: block;
    }
}

/* Zachowanie podmenu na telefonach komórkowych (<= 768px) */
@media (max-width: 768px) {
    .main-nav ul.dropdown-menu {
        display: block; 
        position: static; 
        box-shadow: none;
        background-color: #f8f9fa; 
        padding: 0;
        border-radius: 0;
    }
    
    .main-nav ul.dropdown-menu li a {
        padding: 12px 20px 12px 40px; 
        font-size: 16px;
        border-bottom: 1px solid #eee !important; /* Delikatna szara linia tylko na telefonach dla oddzielenia opcji */
    }
    
    .main-nav ul.dropdown-menu li:last-child a {
        border-bottom: none !important;
    }
}

/* --- RESPONSYWNOŚĆ (Poniżej 768px) --- */
@media (max-width: 768px) {
    /* Pokazujemy przycisk */
    .hamburger { display: block; }
    
    /* Ukrywamy domyślnie menu nawigacyjne */
    .main-nav {
        display: none; 
        position: absolute;
        top: 100%; /* Zaraz pod nagłówkiem */
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 100;
        border-top: 1px solid #eee;
    }
    
    /* Klasa dodawana przez JS, która wysuwa menu */
    .main-nav.active { display: block; }
    
    /* Zmiana ułożenia linków z poziomego na pionowe */
    .main-nav ul {
        flex-direction: column;
        padding: 20px 0;
        gap: 0;
    }
    
    .main-nav ul li { text-align: center; }
    
    .main-nav ul li a {
        display: block;
        padding: 15px;
        font-size: 18px;
    }
}

