/* ========================================
   HERO IMAGE BLOCK - BASE STYLES
   ======================================== */

.hero-image-block {
    position: relative;
    overflow: hidden;
    margin: 0;
    max-width: none;
    width: 100vw;
    height: var(--hero-height, 70vh) !important;
    margin-top: calc(-1 * var(--header-height, 90px));
    padding-top: var(--header-height, 90px);
    margin-bottom: 40px !important;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 12px !important;
    font-family: inherit;
    line-height: inherit;
}

/* Admin bar support */
.admin-bar .hero-image-block {
    margin-top: calc(-1 * (var(--header-height, 90px) + 32px));
    padding-top: calc(var(--header-height, 90px) + 32px);
}

/* Remove conflicting margins from following content */
.hero-image-block + * {
    margin-top: 0 !important;
}

/* ========================================
   HERO IMAGE
   ======================================== */

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    z-index: 1;
}

/* Dark overlay for text readability */
.hero-image-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* ========================================
   HERO OVERLAY & POSITIONING
   ======================================== */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    z-index: 2;
    pointer-events: none;
    padding: 2rem;
}

/* Text positioning variations */
.hero-overlay.hero-text-top-left { align-items: flex-start; justify-content: flex-start; }
.hero-overlay.hero-text-top-center { align-items: flex-start; justify-content: center; }
.hero-overlay.hero-text-top-right { align-items: flex-start; justify-content: flex-end; }
.hero-overlay.hero-text-center-left { align-items: center; justify-content: flex-start; }
.hero-overlay.hero-text-center-center { align-items: center; justify-content: center; }
.hero-overlay.hero-text-center-right { align-items: center; justify-content: flex-end; }
.hero-overlay.hero-text-bottom-left { align-items: flex-end; justify-content: flex-start; }
.hero-overlay.hero-text-bottom-center { align-items: flex-end; justify-content: center; }
.hero-overlay.hero-text-bottom-right { align-items: flex-end; justify-content: flex-end; }

/* ========================================
   HERO CONTENT CONTAINER
   ======================================== */

.hero-content {
    max-width: 800px !important;
    width: 100%;
    text-align: left;
    pointer-events: auto;
    background: none;
    padding: 0;
    margin-bottom: 2rem;
}

/* Text alignment based on position */
.hero-text-top-center .hero-content,
.hero-text-center-center .hero-content,
.hero-text-bottom-center .hero-content {
    text-align: center;
}

.hero-text-top-right .hero-content,
.hero-text-center-right .hero-content,
.hero-text-bottom-right .hero-content {
    text-align: right;
}

/* ========================================
   STANDARD FONT STYLES (INTER) - SMALLER SIZES
   ======================================== */

.hero-text {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    line-height: 1.1;
    display: block;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-align: inherit;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    word-break: keep-all !important;
    font-size: clamp(2rem, 6vw, 4.5rem) !important;
    max-width: 95vw !important;
    width: 100% !important;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    margin-bottom: 2.5rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    display: block;
    margin-top: 0;
    line-height: 1.4;
    opacity: 0.95;
    color: #ffffff;
    text-align: inherit;
    font-style: inherit;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    word-break: keep-all !important;
    font-size: clamp(1.2rem, 3.5vw, 2.5rem) !important;
    max-width: 95vw !important;
    width: 100% !important;
}

/* ========================================
   MONOSPACE FONT STYLES (JETBRAINS MONO) - SMALLER SIZES
   ======================================== */

.hero-font-mono .hero-content,
.hero-design-centered .hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    max-width: 90vw !important;
    width: 100% !important;
}

.hero-mono-title,
.hero-font-mono .hero-text {
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.02em !important;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.9) !important;
    line-height: 0.9 !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    word-break: keep-all !important;
    font-size: clamp(1.5rem, 8vw, 5rem) !important;
    max-width: 98vw !important;
    width: 100% !important;
    user-select: none !important;
}

.hero-mono-subtitle,
.hero-font-mono .hero-subtitle {
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8) !important;
    line-height: 1.2 !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    word-break: keep-all !important;
    font-size: clamp(0.8rem, 4vw, 2.5rem) !important;
    max-width: 96vw !important;
    width: 100% !important;
    user-select: none !important;
}

/* Button styling for mono design */
.hero-font-mono .hero-button {
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    white-space: nowrap !important;
    font-size: clamp(0.75rem, 2vw, 1.2rem) !important;
    border: 2px solid !important;
    padding: 16px 24px !important;
}

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

/* Desktop - Smaller sizes for Inter */
@media (min-width: 1025px) {
    .hero-text {
        font-size: clamp(3rem, 7vw, 6rem) !important;
        line-height: 1.05 !important;
    }
    
    .hero-subtitle {
        font-size: clamp(1.8rem, 4vw, 3.5rem) !important;
        line-height: 1.3 !important;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .hero-content {
        max-width: 900px;
    }
    
    .hero-text {
        font-size: clamp(3.5rem, 8vw, 7rem) !important;
        line-height: 1 !important;
    }
    
    .hero-subtitle {
        font-size: clamp(2rem, 5vw, 4rem) !important;
        line-height: 1.25 !important;
    }
    
    .hero-mono-title,
    .hero-font-mono .hero-text {
        font-size: clamp(2.5rem, 10vw, 8rem) !important;
        line-height: 0.8 !important;
    }
    
    .hero-mono-subtitle,
    .hero-font-mono .hero-subtitle {
        font-size: clamp(1.2rem, 5vw, 4rem) !important;
    }
}

/* Ultra-wide Desktop */
@media (min-width: 1920px) {
    .hero-text {
        font-size: clamp(4rem, 9vw, 8rem) !important;
        line-height: 0.95 !important;
    }
    
    .hero-subtitle {
        font-size: clamp(2.2rem, 5.5vw, 4.5rem) !important;
        line-height: 1.2 !important;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-image-block {
        height: var(--hero-tablet-height, var(--hero-height, 65vh)) !important;
        margin-top: calc(-1 * var(--header-height, 70px));
        padding-top: var(--header-height, 70px);
    }
    
    .admin-bar .hero-image-block {
        margin-top: calc(-1 * (var(--header-height, 70px) + 32px));
        padding-top: calc(var(--header-height, 70px) + 32px);
    }
    
    .hero-content {
        max-width: 600px;
        margin-bottom: 1.5rem;
    }
    
    .hero-text {
        font-size: clamp(1.8rem, 6vw, 4rem) !important;
        margin-bottom: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: clamp(1.1rem, 3.5vw, 2.5rem) !important;
        margin-bottom: 2rem;
    }
    
    .hero-mono-title,
    .hero-font-mono .hero-text {
        font-size: clamp(1.2rem, 7vw, 3.5rem) !important;
    }
    
    .hero-mono-subtitle,
    .hero-font-mono .hero-subtitle {
        font-size: clamp(0.7rem, 3.5vw, 2rem) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-image-block {
        height: var(--hero-mobile-height, 60vh) !important;
        min-height: 400px !important;
        margin-top: calc(-1 * var(--header-height, 70px));
        padding-top: var(--header-height, 70px);
    }
    
    .admin-bar .hero-image-block {
        margin-top: calc(-1 * (var(--header-height, 70px) + 46px));
        padding-top: calc(var(--header-height, 70px) + 46px);
    }
    
    .hero-overlay {
        padding: 1.5rem;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-text {
        font-size: clamp(1.5rem, 5vw, 3rem) !important;
        margin-bottom: 1rem;
        line-height: 1.2 !important;
        letter-spacing: -0.01em;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 2rem) !important;
        margin-bottom: 1.8rem;
        line-height: 1.5;
    }
    
    .hero-mono-title,
    .hero-font-mono .hero-text {
        font-size: clamp(1rem, 6vw, 2.5rem) !important;
        line-height: 0.95 !important;
    }
    
    .hero-mono-subtitle,
    .hero-font-mono .hero-subtitle {
        font-size: clamp(0.6rem, 3vw, 1.5rem) !important;
    }
    
    .hero-font-mono .hero-button {
        font-size: clamp(0.6rem, 3vw, 1rem) !important;
        padding: 12px 20px !important;
        letter-spacing: 1px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-image-block {
        height: var(--hero-mobile-height, 50vh) !important;
        min-height: 350px !important;
        margin-top: calc(-1 * var(--header-height, 65px));
        padding-top: var(--header-height, 65px);
    }
    
    .admin-bar .hero-image-block {
        margin-top: calc(-1 * (var(--header-height, 65px) + 46px));
        padding-top: calc(var(--header-height, 65px) + 46px);
    }
    
    .hero-overlay {
        padding: 1rem;
    }
    
    .hero-text {
        font-size: clamp(1.25rem, 4.5vw, 2.5rem) !important;
        margin-bottom: 0.8rem;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: clamp(0.9rem, 2.5vw, 1.5rem) !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-mono-title,
    .hero-font-mono .hero-text {
        font-size: clamp(0.8rem, 5vw, 2rem) !important;
        line-height: 1 !important;
    }
    
    .hero-mono-subtitle,
    .hero-font-mono .hero-subtitle {
        font-size: clamp(0.5rem, 2.5vw, 1.2rem) !important;
    }
    
    .hero-font-mono .hero-button {
        font-size: clamp(0.5rem, 3.5vw, 0.9rem) !important;
        padding: 10px 16px !important;
    }
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .hero-text {
        font-size: clamp(1.1rem, 4vw, 2rem) !important;
        line-height: 1.4 !important;
        margin-bottom: 0.6rem !important;
    }
    
    .hero-subtitle {
        font-size: clamp(0.8rem, 2vw, 1.3rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 1.2rem !important;
    }
    
    .hero-mono-title,
    .hero-font-mono .hero-text {
        font-size: clamp(0.7rem, 4.5vw, 1.5rem) !important;
        line-height: 1.1 !important;
    }
    
    .hero-mono-subtitle,
    .hero-font-mono .hero-subtitle {
        font-size: clamp(0.45rem, 2vw, 1rem) !important;
    }
}

/* ========================================
   ACCESSIBILITY & PREFERENCES
   ======================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-image-block::before {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .hero-text {
        text-shadow: 3px 3px 6px rgba(0,0,0,1);
    }
    
    .hero-subtitle {
        text-shadow: 2px 2px 4px rgba(0,0,0,1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-content {
        animation: none;
    }
    
    .hero-image:hover {
        transform: none;
    }
    
    .hero-button {
        transition: none;
    }
    
    .hero-button:hover {
        transform: none;
    }
}