/* =================================================================
   HERO SECTION BLOCK - Pixel-perfect implementation
   Based on Kredlo design PNG
   ================================================================= */

.hero-section {
    position: relative;
    width: 100%;
    background-color: #F5F5F7; /* Light gray background like design */
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Better spacing for design consistency */
    padding: 0;
    /* Compensate for fixed header */
    margin-top: 118px;
}

/* Container for content positioning */
.hero-section__container {
    display: flex;
    align-items: center;
    min-height: inherit;
}

@media(max-width: 768px){
    .hero-section__container {
        background-image: none !important;
    }
}

/* Content area - left side */
.hero-section__content {
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 750px; /* Better proportions matching design */
    padding-right: 80px;
}

/* Main headline styling - matching design exactly */
.hero-section__headline {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: #000000;
    margin: 0;
    padding: 0;
    letter-spacing: -0.03em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

@media(max-width: 768px){
    .hero-section__headline {
        font-size: var(--font-size-44) !important;
        line-height: 1.2 !important;
        width: 400px;
        max-width: 100%;
    }
}

/* Kredlo diagonal pattern - right side */
.hero-section__pattern {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 70%;
    height: 120%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 1;
    opacity: 0.65;
}

.hero-section__pattern-svg {
    width: 100%;
    height: auto;
    max-width: 600px;
    transform: translateX(10%);
    filter: brightness(1.0);
}

/* Background image overlay for better text readability */
.hero-section__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    z-index: 1;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Large desktop */
@media (min-width: 1400px) {
    .hero-section__headline {
        font-size: 52px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .hero-section__headline {
        font-size: 44px;
    }

    .hero-section__content {
        max-width: 550px;
        padding-right: 40px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        /* Compensate for mobile header height */
        margin-top: -56px;
    }

    .hero-section.alignfull {
        margin-top: -56px;
    }

    .hero-section__content {
        max-width: 100%;
        padding-right: 0;
        padding-bottom: 40px;
    }

    .hero-section__headline {
        font-size: 36px;
        line-height: 1.3;
    }

    /* Adjust pattern for mobile */
    .hero-section__pattern {
        position: relative;
        width: 100%;
        height: 200px;
        justify-content: center;
        opacity: 0.3;
        top: 0;
        right: 0;
    }

    .hero-section__pattern-svg {
        transform: none;
        max-width: 300px;
        height: 100%;
    }

    /* Adjust overlay opacity for mobile */
    .hero-section__overlay {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.05) 100%
        );
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero-section {
        /* Keep same mobile header compensation */
        margin-top: -56px;
    }

    .hero-section.alignfull {
        margin-top: -56px;
    }

    .hero-section__headline {
        font-size: 28px;
        line-height: 1.4;
        letter-spacing: -0.01em;
    }

    .hero-section__content {
        padding-bottom: 30px;
    }

}

/* =================================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================================= */

/* Ensure proper contrast for text */
.hero-section__headline {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .hero-section__overlay {
        background: rgba(0, 0, 0, 0.3) !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-section__headline {
        color: #000000;
        text-shadow: none;
    }

    .hero-section__overlay {
        background: rgba(0, 0, 0, 0.6) !important;
    }
}

/* Focus states for keyboard navigation (if interactive elements added) */
.hero-section *:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* =================================================================
   GUTENBERG EDITOR STYLES
   ================================================================= */

/* Editor-specific styles for better preview */
.block-editor-block-list__layout .hero-section {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.block-editor-block-list__layout .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B5CF6, #E0B4D6);
    z-index: 10;
}

/* Block toolbar positioning */
.hero-section .block-editor-block-list__block-edit {
    position: relative;
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .hero-section {
        background: white !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }


    .hero-section__headline {
        color: black !important;
        text-shadow: none !important;
    }
}
