/* 
   Premium Design Overhaul - omawiamyfinanse.pl
   Aesthetics: Modern, spacious, glassmorphic headers, card grids, premium typography.
*/

:root {
    --premium-primary: #0052cc;
    --premium-primary-dark: #003d99;
    --premium-secondary: #10b981;
    --premium-bg: #f8fafc;
    --premium-card-bg: #ffffff;
    --premium-text-main: #1e293b;
    --premium-text-muted: #64748b;
    --premium-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --premium-shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --premium-shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

body {
    background-color: var(--premium-bg) !important;
    color: var(--premium-text-main) !important;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11" !important;
    -webkit-font-smoothing: antialiased !important;
}

/* Header & Navigation */
.premium-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    padding: 20px 0 !important;
    box-shadow: var(--premium-shadow-sm) !important;
}

.wp-block-site-title a {
    color: var(--premium-primary) !important;
    text-decoration: none !important;
    letter-spacing: -1px !important;
    transition: opacity 0.3s ease !important;
}

.wp-block-site-title a:hover {
    opacity: 0.8 !important;
}

/* Hero Section */
.premium-hero {
    background: linear-gradient(135deg, var(--premium-primary) 0%, var(--premium-primary-dark) 100%) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 120px 20px !important;
    margin-bottom: 60px !important;
    border-radius: 0 0 40px 40px !important;
}

.premium-hero::before {
    content: "" !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%) !important;
    pointer-events: none !important;
}

.premium-hero h1, .premium-hero p {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Card Grid & Posts */
.premium-card {
    background: var(--premium-card-bg) !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: var(--premium-shadow-md) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(229, 231, 235, 0.5) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.premium-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: var(--premium-shadow-lg) !important;
    border-color: var(--premium-primary) !important;
}

.premium-card img {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-card:hover img {
    transform: scale(1.1) !important;
}

/* Image container to keep zoom contained */
.premium-card .wp-block-post-featured-image {
    overflow: hidden !important;
    margin: 0 !important;
    position: relative !important;
}

.premium-card-content {
    padding: 32px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    z-index: 2 !important;
}

.premium-card-content h2 {
    margin: 0 0 16px 0 !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: var(--premium-text-main) !important;
}

.premium-card-content p {
    color: var(--premium-text-muted) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
}

.premium-card-content .wp-block-post-date {
    margin-top: auto !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: var(--premium-primary) !important;
}

/* Buttons */
.wp-block-button__link {
    background: var(--premium-primary) !important;
    color: #ffffff !important;
    border-radius: 100px !important;
    padding: 14px 32px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 82, 204, 0.15) !important;
    border: none !important;
}

.wp-block-button__link:hover {
    background: var(--premium-primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 12px rgba(0, 82, 204, 0.25) !important;
}

/* Typography Refinements */
h1, h2, h3, h4 {
    letter-spacing: -0.03em !important;
    font-weight: 900 !important;
}

.has-drop-cap:not(:focus)::first-letter {
    font-family: inherit !important;
    font-size: 5rem !important;
    font-weight: 900 !important;
    color: var(--premium-primary) !important;
}

/* Footer */
.premium-footer {
    background: #0f172a !important;
    color: #f8fafc !important;
    padding: 80px 20px !important;
    margin-top: 100px !important;
    border-radius: 40px 40px 0 0 !important;
}

.premium-footer a {
    color: var(--premium-secondary) !important;
    text-decoration: none !important;
}

.premium-footer a:hover {
    text-decoration: underline !important;
}

/* Content Image Styling */
.wp-block-post-content img {
    border-radius: 20px !important;
    box-shadow: var(--premium-shadow-md) !important;
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.wp-block-image figcaption {
    font-size: 0.85rem !important;
    color: var(--premium-text-muted) !important;
    text-align: center !important;
    margin-top: 10px !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .premium-header {
        padding: 12px 0 !important;
    }

    .wp-block-site-title a {
        font-size: 1.2rem !important;
    }

    .premium-hero {
        padding: 60px 20px !important;
        margin-bottom: 40px !important;
        border-radius: 0 0 24px 24px !important;
    }

    .premium-hero h1 {
        font-size: 2.2rem !important;
    }

    .premium-hero p {
        font-size: 1.1rem !important;
    }

    .premium-card {
        margin-bottom: 24px !important;
        border-radius: 16px !important;
    }

    .premium-card img {
        height: 220px !important;
    }

    .premium-card-content {
        padding: 24px !important;
    }

    .premium-card-content h2 {
        font-size: 1.3rem !important;
    }

    .premium-footer {
        padding: 60px 20px 40px 20px !important;
        text-align: center !important;
    }

    .wp-block-columns {
        flex-direction: column !important;
    }

    .wp-block-column {
        flex-basis: 100% !important;
        margin-bottom: 40px !important;
        width: 100% !important;
    }

    .wp-block-group.alignwide {
        padding: 0 15px !important;
    }

    /* Single Post Mobile Adjustments */
    .premium-hero header {
        padding: 40px 20px !important;
    }

    .premium-hero header h1 {
        font-size: 1.8rem !important;
    }

    .wp-block-post-featured-image {
        margin-top: -30px !important;
    }

    .wp-block-post-featured-image img {
        border-radius: 16px !important;
    }
}

/* Hide empty navigation blocks if they have no items */
.wp-block-navigation:not(:has(li)) {
    display: none !important;
}

/* Ensure mobile toggle is hidden if menu is empty */
.wp-block-navigation:not(:has(li)) .wp-block-navigation__responsive-container-open {
    display: none !important;
}

