/* =========================================
   ZMIENNE GŁÓWNE
   ========================================= */
:root {
    /* Kolory oryginalne dla artykułu */
    --brand-dark: #426D8C;
    --brand-blue: #3b82f6;
    --text-main: #334155;
    --bg-main: #f8fafc;
    --border: #e2e8f0;
    
    /* Zmienne dodane z pliku Liquid (dla menu i stopki) */
    --accent: #916a2d; 
    --accent-dark: #0f172a;
    --bg-light: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

* { box-sizing: border-box; }

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

/* =========================================
   NAGŁÓWEK: NIEBIESKI PASEK (Z PLIKU LIQUID)
   ========================================= */
.main-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 99999;
}

.ice-blue-bar {
    background: rgb(66, 109, 140); /* Ten konkretny kolor z Twojego projektu */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo po lewej, menu po prawej */
    padding: 0.5rem 5vw;
    border-bottom: 3px solid rgba(0,0,0,0.1);
    min-height: 85px;
}

.logo-link img {
    display: block;
    transition: var(--transition);
}

.logo-link:hover img {
    transform: scale(1.02);
}

/* =========================================
   NAGŁÓWEK: BIAŁY PASEK (Z PLIKU REFERENCYJNEGO)
   ========================================= */
.main-header {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0.8rem 5vw; 
    position: sticky; 
    top: 0; 
    z-index: 99999; 
    /* Białe tło z przezroczystością i efektem rozmycia tła pod spodem */
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    min-height: 85px;
}

.logo-link img { 
    display: block; 
    /* Domyślnie lekko szare logo (jak w Twoim oryginale), wyostrza się po najechaniu */
    filter: grayscale(1) contrast(1.2);
    transition: var(--transition); 
}

.logo-link:hover img { 
    filter: grayscale(0);
    transform: scale(1.02); 
}

/* =========================================
   MENU NAWIGACYJNE
   ========================================= */
nav { justify-self: end; }

.menu {
    display: flex;
    gap: clamp(1rem, 3vw, 3.5rem); 
    list-style: none; 
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Linki na białym pasku - ciemny kolor (czarny) */
.menu > li > a {
    text-decoration: none;
    color: var(--text-main); /* Używamy zmiennej z czarnym kolorem */
    font-weight: 500; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 0.15em;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.menu > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 1px;
    background: var(--accent); /* Złoty akcent przy najechaniu */
    transition: var(--transition);
}

.menu > li > a:hover {
    color: var(--accent); /* Zmiana tekstu na złoty po najechaniu */
}

.menu > li > a:hover::after { width: 100%; }

#menu-toggle { display: none; }

.menu-icon {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--text-main); /* Ciemny hamburger dla urządzeń mobilnych */
    padding: 0.5rem;
}

/* Submenu */
.has-sub { position: relative; }

.submenu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.has-sub:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu-list {
    background: var(--bg-light);
    min-width: 240px;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    list-style: none;
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    text-align: left;
    margin: 0;
}

.submenu-list li {
    width: 100%;
    padding: 0;
}

.submenu-list a {
    color: var(--text-main);
    font-weight: 500;
    padding: 0.6rem 1rem;
    display: block;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.submenu-list a:hover {
    background: #f1f5f9;
    color: var(--accent); /* Złoty hover w submenu */
    border-radius: 4px;
}

/* =========================================
   TYTUŁ ARTYKUŁU
   ========================================= */
.article-title-section {
    background: var(--brand-dark);
    color: white;
    padding: 50px 0;
    text-align: center;
    border-bottom: 5px solid var(--brand-blue);
    margin-bottom: 40px;
}

.article-title-section h1 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    letter-spacing: 1px;
}

.article-title-section p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* =========================================
   STYLE ARTYKUŁU I ANIMACJI
   ========================================= */
.blog-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 50px;
    border: 1px solid var(--border);
}

.blog-content h2 { color: var(--brand-dark); border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-top: 40px; }
.blog-content h3 { color: var(--brand-blue); }

.math-box {
    background: #f1f5f9; padding: 20px; border-left: 4px solid var(--brand-blue); border-radius: 4px; margin: 25px 0; font-family: monospace;
}

/* Tunel aerodynamiczny */
.teaser-section {
    background: #1e293b; margin: -30px auto 40px auto; border-radius: 16px; overflow: hidden; position: relative; cursor: pointer;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2); border: 2px solid #334155; transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; min-height: 200px; z-index: 10;
}

.teaser-section:hover { transform: translateY(-5px); box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3); border-color: var(--brand-blue); }

.teaser-content { padding: 30px; z-index: 10; width: 50%; display: flex; flex-direction: column; justify-content: center; }
.teaser-content h2 { color: white; margin: 0 0 10px 0; font-size: 1.8rem; }
.teaser-content p { color: #94a3b8; margin: 0 0 20px 0; font-size: 1rem; }

.btn-teaser {
    background: var(--brand-blue); color: white; padding: 10px 20px; border-radius: 8px; font-weight: bold; display: inline-block; width: fit-content; text-transform: uppercase; font-size: 0.85rem;
}

#wind-tunnel { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; background: #0f172a; overflow: hidden; }

.wind-line {
    position: absolute; background: rgba(59, 130, 246, 0.6); height: 2px; border-radius: 2px;
    animation-name: speed-wind; animation-timing-function: linear; animation-iteration-count: infinite;
}

.shape-outline {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #64748b; box-shadow: 0 0 20px rgba(100, 116, 139, 0.5);
}

.shape-circle { width: 80px; height: 80px; border-radius: 50%; }
.shape-octagon { width: 80px; height: 80px; clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%); }

.shape-outline::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px;
    background: #0f172a; border-radius: 50%; box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

@keyframes speed-wind { 0% { left: -100px; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { left: 110%; opacity: 0; } }

/* Galeria */
.image-gallery { display: flex; gap: 20px; margin: 30px 0; padding: 0; }
.gallery-item { flex: 1; display: flex; flex-direction: column; }
.gallery-item img { width: 100%; height: auto; border-radius: 8px; border: 1px solid #cbd5e1; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.gallery-item figcaption { margin-top: 10px; font-size: 0.85rem; color: #64748b; font-style: italic; text-align: center; }

/* =========================================
   STOPKA (Z PLIKU LIQUID)
   ========================================= */
footer.main-footer {
    margin-top: 5rem;
    background: #141618; /* Ciemny, inżynieryjny kolor */
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container { max-width: 1100px; margin: 0 auto; padding: 0 6vw; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-tag { font-family: monospace; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 0.75rem; display: block; font-weight: 700; }
.footer-header { font-size: 1.1rem; font-weight: 700; color: #ffffff; margin-bottom: 0.8rem; letter-spacing: -0.01em; }
.footer-p { font-size: 0.85rem; line-height: 1.6; opacity: 0.7; font-weight: 500; }
.footer-nav { list-style: none; padding: 0; }
.footer-link { color: #ffffff; text-decoration: none; font-size: 0.9rem; display: block; margin-bottom: 0.5rem; opacity: 0.6; transition: 0.3s ease; font-weight: 600; }
.footer-link:hover { opacity: 1; color: var(--accent); transform: translateX(5px); }
.footer-contact-item { font-size: 0.9rem; margin-bottom: 0.3rem; color: #fff; font-weight: 600; }

.manifesto {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.status-mini { display: flex; align-items: center; gap: 8px; font-family: monospace; color: var(--accent); font-weight: 700; }
.dot-pulse { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); animation: footerPulse 2s infinite ease-in-out; }

@keyframes footerPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.footer-bottom-info {
    margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.03); text-align: center;
    font-family: monospace; font-size: 0.52rem; letter-spacing: 0.12em; line-height: 1.4; color: #ffffff; font-weight: 300;
}
.footer-bottom-info p { margin: 0.15rem 0; }

/* =========================================
   RESPONSYWNOŚĆ (TELEFONY I TABLETY)
   ========================================= */
@media (max-width: 1024px) {
    .menu-icon { display: inline-flex; z-index: 10001; }
    
    .menu {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--bg-light); flex-direction: column; padding: 1.5rem 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); border-top: 1px solid #eee; z-index: 10000;
    }
    
    #menu-toggle:checked ~ .menu { display: flex; }
    
    /* Na telefonie główne linki stają się ciemne na białym tle rozwijanego menu */
    .menu > li > a { color: var(--text-main); padding: 10px 0; }
    .menu > li > a::after { display: none; }

    .submenu { position: static; opacity: 1; visibility: visible; transform: none; display: none; padding: 0; width: 100%; pointer-events: auto; }
    .has-sub { width: 100%; position: relative; text-align: center; }
    .has-sub:hover .submenu { display: block; }
    
    .submenu-list { box-shadow: none; padding: 0.5rem 0; border: none; background: #f9fafb; margin: 0; width: 100%; }
    .submenu-list li a { padding: 0.8rem 2.5rem; display: block; width: 100%; text-align: center; }

    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .footer-p { margin: 0 auto; max-width: 80vw; }
    .footer-link:hover { transform: none; }
    .manifesto { flex-direction: column; gap: 1rem; text-align: center; }
}
/* =========================================
   TABELE INŻYNIERSKIE (Ewolucja i Wzory)
   ========================================= */
.table-container {
    width: 100%;
    overflow-x: auto; /* Pozwala na przewijanie tabeli na małych ekranach (telefonach) */
    margin: 2rem 0;
}

.engineering-table {
    width: 100%;
    border-collapse: collapse; /* Kluczowe: tworzy pojedyncze linie (kreski) zamiast podwójnych ramek */
    font-size: 0.85rem; /* Zmniejszona czcionka dla elegancji i oszczędności miejsca */
    line-height: 1.4;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Lekki cień pod tabelą */
}

/* Styl dla pojedynczych komórek (wiersze i kolumny) */
.engineering-table th,
.engineering-table td {
    border: 1px solid #94a3b8; /* Pojedyncze, wyraźne kreski dzielące komórki */
    padding: 8px 12px; /* Mniejsze odstępy (tabela staje się bardziej kompaktowa) */
    text-align: left;
    vertical-align: middle;
}

/* Nagłówki tabeli */
.engineering-table th {
    background-color: #f1f5f9; /* Delikatne, szare tło dla nagłówków */
    color: var(--brand-dark);
    font-weight: 700;
    border-bottom: 2px solid #64748b; /* Grubsza linia oddzielająca nagłówek od treści */
}

/* Tytuł tabeli (jeśli występuje, np. przy wzorach) */
.engineering-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 0.95rem;
}

/* Delikatne naprzemienne tło wierszy (efekt "zebry") dla ułatwienia czytania */
.engineering-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}


@media (max-width: 768px) {
    .image-gallery { flex-direction: column; gap: 30px; }
    .teaser-section { flex-direction: column; }
    .teaser-content, #wind-tunnel { width: 100%; }
    #wind-tunnel { position: relative; height: 150px; }
}