﻿/* ============================================ */
/* PEŁNY, AUTORSKI CSS - BEZ ZEWNĘTRZNYCH ZASOBÓW */
/* POPRAWIONY: CLS < 0.01 */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #ffffff;
    color: #1a2c3e;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eef2f6;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 16px;
}

.logo img {
    height: auto;
    width: auto;
    max-width: 200px;
    max-height: 48px;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    color: #1f3a5f;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #0056a7;
    text-decoration: underline;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #eef4ff 0%, #dce8f5 100%);
    padding: 60px 0;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    text-align: center;
}

/* ============================================ */
/* KLUCZOWA POPRAWKA DLA CLS */
/* ============================================ */
.hero-image {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

/* Sztywna rezerwacja miejsca - CLS NAPRAWIONY */
.hero-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 30px;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.2);
    /* SZTYWNY aspect-ratio - klucz do CLS */
    aspect-ratio: 550 / 350;
    object-fit: cover;
}

/* Dodatkowe zabezpieczenie: kontener wymusza minimalną wysokość */
.hero-image::before {
    content: "";
    display: block;
    padding-bottom: 63.636%; /* 350/550 = 63.636% */
}

.hero-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.2);
    object-fit: cover;
}

/* Poprawka dla responsywności - nie psuje layoutu */
@media (max-width: 768px) {
    .hero-image {
        max-width: 100%;
    }
}
/* ============================================ */

h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #0a2540;
    letter-spacing: -0.02em;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0056a7;
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: #003d7a;
    transform: translateY(-2px);
}

/* Sekcje */
.section {
    padding: 60px 0;
}

.section-light {
    background-color: #f8fafc;
}

.section-white {
    background-color: #ffffff;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0a2540;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0a2540;
}

/* Produkty */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 24px;
    padding: 28px 20px 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9edf2;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #0056a7;
    box-shadow: 0 20px 30px -12px rgba(0,86,167,0.15);
}

.product-image {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fbfd;
    border-radius: 16px;
    padding: 12px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    aspect-ratio: 1/1;
}

.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.product-card p {
    color: #4a627a;
    font-size: 0.85rem;
}

/* Serie */
.info-highlight {
    background: #ffffff;
    border-radius: 32px;
    padding: 40px;
    border: 1px solid #eef2f8;
}

.series-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.series-badge {
    background: #eef3fc;
    padding: 6px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #0056a7;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.faq-item {
    background: white;
    border-radius: 20px;
    padding: 22px;
    border: 1px solid #eef2f8;
}

.faq-question {
    font-weight: 700;
    font-size: 1rem;
    color: #0a2540;
    margin-bottom: 10px;
}

/* Definicje */
.definitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.def-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    border-left: 4px solid #0056a7;
}

.def-term {
    font-weight: 800;
    color: #0056a7;
    margin-bottom: 8px;
}

/* Kontakt */
.contact-bar {
    background: linear-gradient(135deg, #0a2b44 0%, #0d3557 100%);
    color: white;
    border-radius: 32px;
    padding: 45px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.contact-details p {
    margin: 12px 0;
}

.contact-details a {
    color: #b8dcff;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Języki - wszystkie 25 flag - ZOPTYMALIZOWANE POD DOM */
.lang-section {
    background: #f8fafc;
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
}

/* Zmniejszenie rozmiaru DOM przez bardziej efektywny grid */
.lang-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    list-style: none;
}

.lang-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #1e3a5f;
    font-weight: 500;
    font-size: 0.8rem;
}

.lang-item:hover {
    color: #0056a7;
}

/* Footer */
.main-footer {
    background: #0f2b3d;
    color: #cddfe7;
    padding: 50px 0 30px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-main p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-main a {
    color: #8fcbff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-main a:hover {
    text-decoration-thickness: 2px;
}

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 24px 0;
}

.footer-links {
    margin: 20px 0 16px;
}

.footer-links a {
    color: #8fcbff;
    text-decoration: underline;
}

.footer-links span {
    margin: 0 8px;
    color: #8aa9c4;
}

.footer-small {
    font-size: 0.8rem;
    color: #8aa9c4;
    margin-top: 16px;
}

/* Responsywność */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .header-container { flex-direction: column; }
    .nav-links { justify-content: center; gap: 16px; }
    .hero-content { flex-direction: column; }
    .hero-text { text-align: center; }
    .contact-bar { flex-direction: column; text-align: center; padding: 30px; }
    .product-grid { grid-template-columns: 1fr; gap: 20px; }
    .faq-grid { grid-template-columns: 1fr; }
    .definitions-grid { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
    .lang-grid { justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .info-highlight { padding: 24px; }
}

/* Poprawki dla ułatwień dostępu - linki nie tylko po kolorze */
a:not(.lang-item):not(.product-card):not(.btn-primary) {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

a:not(.lang-item):not(.product-card):not(.btn-primary):hover {
    text-decoration-thickness: 2px;
}