/* ========================================
   RESET I PODSTAWY
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans', 'Noto Sans SC', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #4a3c31;
    background: #f5ece4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;

    background-color: #f5ece4;
    background-image: url('images/obrazek.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    background-size: auto 100vh;
}

/* ========================================
   MIĘDZYNARODOWOŚĆ – RTL I BIDI
   ======================================== */
[lang="ar"],
[dir="rtl"] {
    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
}

[lang="zh"] {
    unicode-bidi: isolate;
}

/* ========================================
   SEKCJA HERO
   ======================================== */
.hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 60vh;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* usunięto brązową linię */
    /* border-bottom: 4px solid #8b5a2b; */

    position: relative;
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(109, 76, 65, 0.2), rgba(139, 90, 43, 0.1));
    z-index: 1;
}

/* ========================================
   SIATKA FLAG
   ======================================== */
.flags-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    width: 100%;
    padding: 1.5rem;
    background-color: transparent;
    position: relative;
    z-index: 2;
}

.flags-grid a {
    direction: ltr !important;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.flag {
    width: 100%;
    max-width: 120px;
    height: 75px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #8b5a2b;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(109, 76, 65, 0.3);
    will-change: transform;
}

.flag:hover,
.flag:focus {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 16px 32px rgba(139, 90, 43, 0.5);
    border-color: #a1887f;
    outline: none;
}

/* ========================================
   BLOK SEO
   ======================================== */
.seo-text {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    z-index: 2;
    position: relative;
}

.seo-text p {
    margin: 0.8rem 0;
}

.seo-text strong {
    color: #5d4037;
    font-weight: 600;
}

.seo-text a {
    color: #6d4c41;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.seo-text a:hover,
.seo-text a:focus {
    color: #8b5a2b;
    outline: none;
}

/* ========================================
   MENU GÓRNE – LEKKIE, BRĄZOWE, Z CIENIEM
   ======================================== */
.top-menu {
    background: transparent;
    padding: 1rem 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

.top-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0;
}

/* każdy link ma delikatne brązowe tło + cień */
.top-menu a {
    color: #2b1a12; /* NOWY, MOCNIEJSZY KONTRAST */
    text-decoration: none;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;

    background: rgba(139, 90, 43, 0.25);
    backdrop-filter: blur(4px);

    border: 1px solid rgba(139, 90, 43, 0.35);
    box-shadow: 0 4px 12px rgba(109, 76, 65, 0.35);

    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.top-menu a:hover,
.top-menu a:focus {
    background: rgba(139, 90, 43, 0.45);
    color: #ffffff; /* jasny tekst przy hoverze */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(109, 76, 65, 0.45);
    outline: none;
}

/* ========================================
   KOLUMNY TREŚCI
   ======================================== */
.columns-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 2rem;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.column {
    flex: 1;
    min-width: 280px;
    background-color: #fff8f0;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(109, 76, 65, 0.15);
    border: 1px solid #d7ccc8;
}

.column h2 {
    margin-bottom: 1rem;
    color: #5d4037;
    border-bottom: 2px solid #a1887f;
    padding-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* ========================================
   STOPKA
   ======================================== */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #4e342e;
    color: #ddd;
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 3px solid #8d6e63;
}

/* ========================================
   UKRYWANIE DLA SEO
   ======================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========================================
   RESPONSYWNOŚĆ
   ======================================== */
@media (max-width: 992px) {
    .flags-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
        padding: 1.2rem;
    }
    .flag {
        height: 65px;
    }
    .seo-text {
        font-size: 0.93rem;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
        padding: 1.5rem 1rem;
    }
    .flags-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    .flag {
        height: 70px;
        max-width: 110px;
    }
    .seo-text {
        margin: 1.5rem auto;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 45vh;
        padding: 1rem;
    }
    .flags-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    .flag {
        height: 60px;
        max-width: 100px;
        margin: 0 auto;
    }

    .top-menu ul {
        flex-direction: column;
        gap: 0.6rem;
    }

    .top-menu a {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
        text-align: center;
    }

    .columns-container {
        padding: 1rem;
    }
    .seo-text {
        font-size: 0.9rem;
        padding: 0 0.8rem;
    }
    .seo-text p.small {
        font-size: 0.85rem;
    }
}

/* ========================================
   DARK MODE
   ======================================== */
@media (prefers-color-scheme: dark) {
    body {
        background: #2b1e18;
        color: #e0d6cd;
    }
    .column {
        background-color: #3a2a22;
        border-color: #5d4037;
    }
    .seo-text {
        color: #d7ccc8;
    }
}

/* ========================================
   OPTYMALIZACJE WYDAJNOŚCI
   ======================================== */
img {
    loading: lazy;
}

a {
    -webkit-tap-highlight-color: transparent;
}
