/**
 * Hero Image Pattern Styles
 * Based on Vallox.com HeroTall component
 * 
 * Supports both:
 * - WordPress Block Pattern (hero-image-wrapper classes)
 * - PHP Template Part (Tailwind-like utility classes)
 */

/* ==========================================================================
   Hero Image Wrapper - Responsive behavior matching Frontpage
   Mobile: full width, no header overlap
   Desktop (xl+): header overlap with -96px margin-top
   ========================================================================== */

.hero-image-wrapper,
.hero-image-wrapper.antiwrap {
    /* Break out of any parent container */
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-bottom: 2rem;
    margin-top: 0; /* No overlap on mobile/tablet */
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Desktop xl (1280px+): overlap header with negative margin */
@media (min-width: 1280px) {
    .hero-image-wrapper {
        margin-top: -96px !important; /* -6rem, overlap header navigation */
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ==========================================================================
   Hero Image Container - Main hero block
   ========================================================================== */

.hero-image-container {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: calc(100vh - 6.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

@media (min-width: 1280px) {
    .hero-image-container {
        min-height: auto;
        aspect-ratio: 2 / 1;
    }
}

/* ==========================================================================
   Hero Image Inner - Background image container with rounded corners
   ========================================================================== */

.hero-image-inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    border-bottom-right-radius: 70px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-image-inner {
        border-bottom-right-radius: 100px;
    }
}

@media (min-width: 1280px) {
    .hero-image-inner {
        border-top-left-radius: 200px;
        border-bottom-right-radius: 200px;
    }
}

/* Background image styling */
.hero-image-inner .hero-background-image,
.hero-image-inner .wp-block-image {
    width: 100%;
    height: 100%;
    margin: 0;
}

.hero-image-inner .hero-background-image img,
.hero-image-inner .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Responsive images - show/hide based on screen size
   Mobile: show hero-image-mobile, hide hero-image-desktop
   Desktop (641px+): show hero-image-desktop, hide hero-image-mobile
   ========================================================================== */

/* Default: show mobile, hide desktop */
.hero-image-inner .hero-image-desktop {
    display: none !important;
}

.hero-image-inner .hero-image-mobile {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Desktop (641px+): show desktop, hide mobile */
@media (min-width: 641px) {
    .hero-image-inner .hero-image-desktop {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .hero-image-inner .hero-image-mobile {
        display: none !important;
    }
}

/* ==========================================================================
   Hero Content Overlay - Title and CTA positioned absolutely over image
   ========================================================================== */

.hero-content-overlay {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

/* Hero Title */
.hero-main-title {
    position: relative;
    z-index: 20;
    margin-bottom: 2rem;
    font-size: 2.25rem; /* text-4xl */
    line-height: 2.5rem; /* leading-10 */
    color: #ffffff;
    font-weight: 600;
    font-family: var(--font-primary, 'Ubuntu', 'proxima-nova', Arial, sans-serif);
    text-align: center;
    width: 75%; /* w-9/12 */
}

@media (min-width: 1024px) {
    .hero-main-title {
        font-size: 3rem; /* text-5xl */
        line-height: 55px;
    }
}

@media (min-width: 1280px) {
    .hero-main-title {
        width: 66.666667%; /* w-2/3 */
    }
}

@media (min-width: 1536px) {
    .hero-main-title {
        font-size: 3.75rem; /* text-6xl */
        line-height: 65px;
    }
}

/* Hero CTA Button - Overrides WordPress default button styles */
.hero-cta-button {
    position: relative;
    z-index: 20;
    width: 100%;
    display: flex !important;
    justify-content: center !important;
}

.hero-cta-button .wp-block-button__link,
.hero-image-wrapper .wp-block-button__link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0.75rem !important;
    color: #ffffff !important;
    background-color: #0033a0 !important; /* Vallox primary color */
    font-size: 1rem !important;
    padding: 1rem 2rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
}

.hero-cta-button .wp-block-button__link:hover,
.hero-image-wrapper .wp-block-button__link:hover {
    background-color: #000000 !important;
}

@media (min-width: 1280px) {
    .hero-cta-button .wp-block-button__link,
    .hero-image-wrapper .wp-block-button__link {
        font-size: 1.125rem !important; /* text-lg */
    }
}

/* ==========================================================================
   Picture/Source responsive images support
   ========================================================================== */

.hero-image-inner picture {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-image-inner picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   HeroTall - Original Vallox.com class support (for PHP template part)
   ========================================================================== */

.HeroTall {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: calc(100vh - 6.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

@media (min-width: 1280px) {
    .HeroTall {
        min-height: auto;
        aspect-ratio: 2 / 1;
    }
}

/* HeroTall inner container with rounded corners */
.HeroTall > .absolute {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    border-bottom-right-radius: 70px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .HeroTall > .absolute {
        border-bottom-right-radius: 100px;
    }
}

@media (min-width: 1280px) {
    .HeroTall > .absolute {
        border-top-left-radius: 200px;
        border-bottom-right-radius: 200px;
    }
}

/* HeroTall Title */
.HeroTall .Title {
    position: relative;
    z-index: 20;
    margin-bottom: 2rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
    color: #ffffff;
    font-weight: 600;
    font-family: var(--font-primary, 'Ubuntu', 'proxima-nova', Arial, sans-serif);
    text-align: center;
    width: 75%;
}

@media (min-width: 1024px) {
    .HeroTall .Title {
        font-size: 3rem;
        line-height: 55px;
    }
}

@media (min-width: 1280px) {
    .HeroTall .Title {
        width: 66.666667%;
    }
}

@media (min-width: 1536px) {
    .HeroTall .Title {
        font-size: 3.75rem;
        line-height: 65px;
    }
}

/* HeroTall Button - for PHP template part */
.HeroTall .button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0.75rem !important;
    color: #ffffff !important;
    background-color: #0033a0 !important; /* Vallox primary color */
    font-size: 1rem !important;
    padding: 1rem 2rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
}

.HeroTall .button:hover {
    background-color: #000000 !important;
}

@media (min-width: 1280px) {
    .HeroTall .button {
        font-size: 1.125rem !important;
    }
}

/* Primary background color utility */
.bg-primary {
    background-color: #0033a0 !important;
}

.hover\:bg-black:hover {
    background-color: #000000 !important;
}

/* ==========================================================================
   HeroTall Picture/Source responsive images support
   ========================================================================== */

.HeroTall picture {
    width: 100%;
    height: 100%;
    display: block;
}

.HeroTall picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Tailwind-like utility classes for PHP template part
   ========================================================================== */

/* Width utilities */
.w-full { width: 100%; }
.w-9\/12 { width: 75%; }
.w-2\/3 { width: 66.666667%; }

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }

/* Z-index utilities */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }

/* Spacing utilities */
.mb-8 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: 0.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Text utilities */
.text-white { color: #ffffff; }
.text-center { text-align: center; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Background utilities */
.bg-cover { background-size: cover; }

/* Overflow utilities */
.overflow-hidden { overflow: hidden; }

/* Inset utilities */
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer; }

/* Transition utilities */
.transition-colors { transition-property: color, background-color, border-color; }
.duration-300 { transition-duration: 300ms; }

/* Responsive text sizes */
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
@media (min-width: 1024px) {
    .lg\:text-5xl { font-size: 3rem; line-height: 1; }
    .lg\:leading-\[55px\] { line-height: 55px; }
}
@media (min-width: 1536px) {
    .\32xl\:text-6xl { font-size: 3.75rem; line-height: 1; }
    .\32xl\:leading-\[65px\] { line-height: 65px; }
}

/* Responsive width */
@media (min-width: 1280px) {
    .xl\:w-2\/3 { width: 66.666667%; }
    .xl\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .xl\:min-h-full { min-height: 100%; }
    .xl\:aspect-\[2\/1\] { aspect-ratio: 2 / 1; }
    .xl\:-mt-24 { margin-top: -6rem; }
    .xl\:rounded-tl-\[200px\] { border-top-left-radius: 200px; }
    .xl\:rounded-br-\[200px\] { border-bottom-right-radius: 200px; }
}

/* Responsive rounded corners */
.rounded-br-\[70px\] { border-bottom-right-radius: 70px; }
@media (min-width: 768px) {
    .md\:rounded-br-\[100px\] { border-bottom-right-radius: 100px; }
}

/* Min-height for mobile hero */
.min-h-\[calc\(100vh-6\.5rem\)\] { min-height: calc(100vh - 6.5rem); }
