*, *::before, *::after {
    box-sizing: border-box;
}

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

:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --heading-color: #111;
    --accent-color: #ff6b81;
    
    /* Zmienne do kolorów gradientów */
    --orb-1: rgba(255, 107, 129, 0.4);
    --orb-2: rgba(107, 142, 255, 0.4);
    --orb-3: rgba(255, 206, 107, 0.3);
}

body.theme-dark {
    background: #0f111a;
    --glass-bg: rgba(20, 22, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    --text-color: #d1d5db;
    --heading-color: #ffffff;
    
    --orb-1: rgba(255, 71, 87, 0.15);
    --orb-2: rgba(55, 66, 250, 0.15);
    --orb-3: rgba(255, 165, 2, 0.1);
}

body.theme-glass {
    background: #f4f6f9;
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   DYNAMICZNE TŁO (ORBS)
   ========================================= */
.glass-background {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.05) 100%);
}

.light-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.8;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 500px; height: 500px;
    background: var(--orb-1);
    top: -100px; left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px; height: 600px;
    background: var(--orb-2);
    bottom: -150px; right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px; height: 400px;
    background: var(--orb-3);
    top: 40%; left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, 50px) scale(0.9); }
}

/* =========================================
   TYPOGRAFIA & HEADER
   ========================================= */
.text-gradient {
    background: linear-gradient(135deg, var(--heading-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0; /* Nieco mniejszy padding dla lepszego efektu */
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.glass-header.header-hidden {
    transform: translateY(-100%);
}

.glass-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.glass-header p {
    margin: 10px 0 0;
    opacity: 0.8;
    font-weight: 300;
}

/* =========================================
   LAYOUT & RWD (CENTROWANIE)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
    align-items: start;
    transition: all 0.3s ease;
}

/* Kiedy ukrywamy sidebar, układ ma być na max 650px i pięknie wycentrowany */
.main-layout.no-sidebar {
    grid-template-columns: 1fr;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.feed {
    width: 100%;
    min-width: 0;
}

/* =========================================
   PREMIUM GLASS CARD
   ========================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow), var(--glass-edge);
    overflow: hidden;
    margin-bottom: 40px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), var(--glass-edge);
}

.image-wrapper {
    width: 100%;
    overflow: hidden;
}

.quote-post img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.quote-post:hover img {
    transform: scale(1.02);
}

/* =========================================
   ANIMACJE WEJŚCIOWE (STAGGERED)
   ========================================= */
.animate-entrance {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   SOCIAL SHARE BUTTONS
   ========================================= */
.social-share {
    padding: 20px 25px;
    background: rgba(0,0,0,0.02);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 20px;
}

body.theme-dark .social-share {
    background: rgba(255,255,255,0.02);
}

.share-label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.7;
}

.share-buttons-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.glass-share-btn {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: var(--glass-edge);
}

.glass-share-btn.fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; box-shadow: 0 5px 15px rgba(24,119,242,0.4); }
.glass-share-btn.pin:hover { background: #e60023; color: #fff; border-color: #e60023; box-shadow: 0 5px 15px rgba(230,0,35,0.4); }
.glass-share-btn.x:hover { background: #000; color: #fff; border-color: #000; box-shadow: 0 5px 15px rgba(0,0,0,0.4); }

/* =========================================
   PREMIUM REKLAMY AMAZON
   ========================================= */
.partner-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: var(--accent-color);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 107, 129, 0.4);
    z-index: 10;
}

.hit-badge { background: #f0c14b; color: #111; box-shadow: 0 4px 10px rgba(240, 193, 75, 0.4); }

/* Featured Horizontal (Feed) */
.featured-section-hz {
    position: relative;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-partners {
    width: 100%;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.partner-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.partner-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.partner-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.partner-content-hz {
    display: flex;
    align-items: center;
    gap: 25px;
    padding-top: 15px; /* space for badge */
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 25px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    transition: 0.3s;
}

.partner-image-hz {
    flex-shrink: 0 !important;
}

.partner-info-hz {
    flex-grow: 1 !important;
    min-width: 0 !important;
}

/* Układ Full Banner - obrazek na całą szerokość na górze */
.partner-item.layout-full {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.partner-item.layout-full .partner-image-hz {
    width: 100%;
}

.partner-item.layout-full .partner-image-hz img {
    width: 100% !important;
    height: auto !important;
    max-height: 250px;
    object-fit: cover;
}

.partner-image-hz img {
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.partner-image-hz img.aspect-1-1,
.partner-item img.aspect-1-1 {
    width: 120px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
}

.partner-image-hz img.aspect-16-9,
.partner-item img.aspect-16-9 {
    width: 180px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}

.partner-image-hz img.aspect-4-3,
.partner-item img.aspect-4-3 {
    width: 140px !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
}

.partner-image-hz img.aspect-3-2,
.partner-item img.aspect-3-2 {
    width: 150px !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
}

.partner-image-hz img.aspect-9-16,
.partner-item img.aspect-9-16 {
    width: 90px !important;
    height: auto !important;
    aspect-ratio: 9 / 16 !important;
}

/* Układ Half - większa miniaturka */
.partner-item.layout-half .partner-image-hz img.aspect-1-1,
.partner-item.layout-half img.aspect-1-1 {
    width: 180px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
}
.partner-item.layout-half .partner-image-hz img.aspect-16-9,
.partner-item.layout-half img.aspect-16-9 {
    width: 250px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}
.partner-item.layout-half .partner-image-hz img.aspect-4-3,
.partner-item.layout-half img.aspect-4-3 {
    width: 200px !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
}
.partner-item.layout-half .partner-image-hz img.aspect-3-2,
.partner-item.layout-half img.aspect-3-2 {
    width: 210px !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
}
.partner-item.layout-half .partner-image-hz img.aspect-9-16,
.partner-item.layout-half img.aspect-9-16 {
    width: 135px !important;
    height: auto !important;
    aspect-ratio: 9 / 16 !important;
}

/* Układ 3/4 - bardzo duża miniaturka */
.partner-item.layout-three-quarters .partner-image-hz img.aspect-1-1,
.partner-item.layout-three-quarters img.aspect-1-1 {
    width: 250px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
}
.partner-item.layout-three-quarters .partner-image-hz img.aspect-16-9,
.partner-item.layout-three-quarters img.aspect-16-9 {
    width: 350px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}
.partner-item.layout-three-quarters .partner-image-hz img.aspect-4-3,
.partner-item.layout-three-quarters img.aspect-4-3 {
    width: 280px !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
}
.partner-item.layout-three-quarters .partner-image-hz img.aspect-3-2,
.partner-item.layout-three-quarters img.aspect-3-2 {
    width: 300px !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
}
.partner-item.layout-three-quarters .partner-image-hz img.aspect-9-16,
.partner-item.layout-three-quarters img.aspect-9-16 {
    width: 180px !important;
    height: auto !important;
    aspect-ratio: 9 / 16 !important;
}

.partner-info-hz h4 {
    margin: 0 0 8px 0;
    color: var(--heading-color);
    font-size: 1.2rem;
}

.partner-info-hz p {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.4;
}

.glass-btn {
    display: inline-block;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--glass-edge);
}

.glass-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.amz-btn-hz, .amz-btn-vt {
    background: linear-gradient(135deg, #f0c14b 0%, #ddaa24 100%);
    color: #111;
    border: none;
    box-shadow: 0 4px 15px rgba(240, 193, 75, 0.3);
}

.amz-btn-hz:hover, .amz-btn-vt:hover {
    background: linear-gradient(135deg, #f4d078 0%, #e6bb3b 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(240, 193, 75, 0.5);
}

/* Featured Vertical (Sidebar) */
.featured-section-vt {
    padding: 30px 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.featured-section-vt img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
/* Stylizacja dowolnego przycisku wewnątrz sidebara */
.featured-section-vt a[href*="amazon"], 
.featured-section-vt button,
.featured-section-vt .btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #f0c14b 0%, #ddaa24 100%);
    color: #111 !important;
    text-decoration: none;
    padding: 12px;
    border-radius: 30px;
    font-weight: 700;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(240, 193, 75, 0.4);
    transition: 0.3s;
    border: none;
    cursor: pointer;
}
.featured-section-vt a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(240, 193, 75, 0.6);
}

.partner-content-vt {
    padding-top: 20px;
}

.partner-cover-vt {
    width: 100%;
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}

.featured-section-vt:hover .partner-cover-vt {
    transform: scale(1.05);
}

.partner-title-vt {
    margin: 0 0 10px 0;
    font-size: 1.15rem;
    color: var(--heading-color);
}

.partner-desc-vt {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 25px;
    line-height: 1.5;
}

.amz-btn-vt {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.sticky {
    position: sticky;
    top: 120px;
}

/* =========================================
   PAGINACJA
   ========================================= */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0 60px;
}

.pagination {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    background: var(--glass-bg);
    padding: 8px 20px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.page-jump:hover { opacity: 1; }

.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    padding: 5px 10px;
    width: 60px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

body.theme-dark .glass-input { background: rgba(0,0,0,0.2); }

.glass-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 107, 129, 0.2);
}

.jump-btn {
    padding: 5px 15px !important;
    font-size: 0.8rem !important;
}

.nav-btn {
    background: var(--accent-color);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 107, 129, 0.3);
}

.nav-btn:hover {
    background: #ff4757;
    color: white;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* =========================================
   RESPONSYWNOŚĆ (RWD)
   ========================================= */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr; /* Sidebar spada na dół lub znika układ z boku */
        max-width: 650px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .sticky {
        position: relative;
        top: 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }
    
    /* Na urządzeniach mobilnych 100% szerokości i mniejsze zaokrąglenia by dopasować się do krawędzi (opcjonalnie) */
    .glass-card {
        border-radius: 16px;
        margin-bottom: 25px; /* Mniejszy odstęp na mobile */
    }
    
    .glass-header h1 {
        font-size: 1.8rem;
    }
    
    /* Nowe, poprawne stylowanie reklam partnerów na mobilkach */
    .partner-item {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 15px !important;
    }
    
    .partner-image-hz {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .partner-image-hz img,
    .partner-item.layout-full .partner-image-hz img,
    .partner-item.layout-half .partner-image-hz img,
    .partner-item.layout-three-quarters .partner-image-hz img {
        width: 100% !important;
        max-width: 220px !important;
        height: auto !important;
    }
    
    .partner-image-hz img.aspect-1-1 {
        aspect-ratio: 1 / 1 !important;
    }
    
    .partner-image-hz img.aspect-16-9 {
        aspect-ratio: 16 / 9 !important;
    }

    .partner-image-hz img.aspect-4-3 {
        aspect-ratio: 4 / 3 !important;
    }

    .partner-image-hz img.aspect-3-2 {
        aspect-ratio: 3 / 2 !important;
    }

    .partner-image-hz img.aspect-9-16 {
        aspect-ratio: 9 / 16 !important;
    }
    
    .partner-info-hz {
        text-align: center !important;
        width: 100% !important;
    }
    
    .partner-content-hz {
        padding-top: 10px !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Zachowanie kompatybilności wstecznej */
    .ad-content-hz {
        flex-direction: column;
        text-align: center;
    }
    
    .ad-image-hz img {
        height: auto;
        max-width: 150px;
    }
    
    /* Bardziej kompaktowy social-share na mobile */
    .social-share {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .share-buttons-container {
        width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .glass-share-btn {
        flex-grow: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Kompaktowa nawigacja na mobilkach */
    .nav-label {
        display: none;
    }
    .pagination {
        padding: 10px 0 40px;
    }
    .page-info {
        font-size: 0.9rem;
    }
    .glass-btn.nav-btn {
        padding: 10px 20px;
    }
}

/* =========================================
   KLASA DLA SEO (UKRYTY TEKST)
   ========================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   PWA HEADER NAVIGATION
   ========================================= */
.header-nav {
    display: inline-block;
}
@media (max-width: 600px) {
    .header-nav {
        position: static !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
        display: block !important;
        text-align: center !important;
    }
}
