/* Hero Block - Full bleed */
.hero-block {
    /* Use dvh for better iOS support (accounts for Safari UI) */
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for iOS */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    
    /* Break out of grid and body padding */
    grid-column: 1 / -1 !important;
    margin-left: calc(-1 * var(--grid-gap-md));
    margin-right: calc(-1 * var(--grid-gap-md));
    width: 100vw;
    max-width: none;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Vertical positioning using justify-content */
.hero-block.vertical-top {
    justify-content: flex-start;
}

.hero-block.vertical-center {
    justify-content: center;
}

.hero-block.vertical-bottom {
    justify-content: flex-end;
}

/* Overlay base */
.hero-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.9;
    z-index: 1;
}

/* Auto: follows the page theme */
.hero-block.overlay-auto::before {
    background: var(--bg-primary);
}

/* Dark: always dark regardless of theme */
.hero-block.overlay-dark::before {
    background: var(--color-dark-950);
}

/* Light: always light regardless of theme */
.hero-block.overlay-light::before {
    background: var(--color-cream-50);
}

/* No overlay */
.hero-block.no-overlay::before {
    display: none;
}

/* Content container */
.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--grid-gap-sm);
    width: 100%;
    padding: var(--grid-gap-sm) var(--grid-gap-md);
    color: var(--text-primary);
}

/* Force correct text color when overlay style overrides the theme */
.hero-block.overlay-dark .hero-content {
    color: var(--color-light-50);
}

.hero-block.overlay-light .hero-content {
    color: var(--color-slate-900);
}

/* iOS safe area support - add bottom padding on mobile */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .hero-content {
        padding-bottom: calc(var(--grid-gap-sm) + env(safe-area-inset-bottom));
    }
}

/* Breadcrumb inside hero */
.hero-breadcrumb {
    grid-column: 1 / -1;
    margin-bottom: var(--space-4);
}

.hero-breadcrumb .breadcrumb {
    color: currentColor;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.hero-breadcrumb .breadcrumb:hover {
    opacity: 1;
}

/* Text alignment affects grid column placement */
.hero-content.text-left > * {
    grid-column: 1 / span 3;
}

.hero-content.text-center > * {
    grid-column: 2 / span 4;
}

.hero-content.text-right > * {
    grid-column: 4 / span 3;
}


/* Responsive adjustments */
@media (max-width: 1000px) {
    .hero-title {
        font-size: var(--font-size-lg);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-md);
    }
    
    .hero-text {
        font-size: var(--font-size-small);
    }

    .hero-content.text-left > *, .hero-content.text-right > *, .hero-content.text-center > * {
        grid-column: 1 / span 6;
    }
}

