/* ==========================================================================
   Hero V2 Block - Enhanced Responsive Design
   Mobile-First Approach with Progressive Enhancement
   ========================================================================== */

/* ==========================================================================
   Mobile First Base (320px - 767px)
   ========================================================================== */
@media (max-width: 767px) {
    .hero-v2-section {
        padding: 100px 0 40px; /* Account for mobile header */
        min-height: auto;
    }
    
    .hero-v2-container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .hero-v2-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        text-align: left; /* Left-align for mobile */
    }
    
    /* Content Area */
    .hero-v2-content {
        order: 1;
        max-width: 100%;
        padding: 0;
    }
    
    .hero-v2-title {
        font-size: 2rem; /* 32px base */
        font-size: clamp(1.75rem, 5vw + 0.5rem, 2.5rem);
        line-height: 1.2;
        margin-bottom: 1rem;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-v2-subtitle {
        font-size: 1rem; /* 16px base */
        font-size: clamp(0.95rem, 2vw + 0.5rem, 1.125rem);
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .hero-v2-subtitle p {
        margin-bottom: 0.75rem;
    }
    
    /* Image Area */
    .hero-v2-image {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-v2-img {
        width: 100%;
        height: auto;
        border-radius: 12px;
        object-fit: cover;
        max-height: 400px;
    }
    
    /* Spacing Adjustments */
    .hero-v2-section.spacing-small {
        padding-bottom: 1.5rem;
    }
    
    .hero-v2-section.spacing-medium {
        padding-bottom: 2.5rem;
    }
    
    .hero-v2-section.spacing-large {
        padding-bottom: 3.5rem;
    }
    
    .hero-v2-section.spacing-x-large {
        padding-bottom: 4.5rem;
    }
    
    .hero-v2-section.spacing-xx-large {
        padding-bottom: 6rem;
    }
    
    /* Animation Adjustments for Mobile */
    .hero-v2-content,
    .hero-v2-subtitle,
    .hero-v2-image {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Small Mobile (320px - 374px)
   ========================================================================== */
@media (max-width: 374px) {
    .hero-v2-section {
        padding: 90px 0 30px;
    }
    
    .hero-v2-container {
        padding: 0 0.75rem;
    }
    
    .hero-v2-title {
        font-size: 1.625rem; /* 26px */
    }
    
    .hero-v2-subtitle {
        font-size: 0.9375rem; /* 15px */
    }
    
    .hero-v2-img {
        max-height: 300px;
        border-radius: 10px;
    }
}

/* ==========================================================================
   Medium Mobile (375px - 479px)
   ========================================================================== */
@media (min-width: 375px) and (max-width: 479px) {
    .hero-v2-title {
        font-size: 1.875rem; /* 30px */
    }
    
    .hero-v2-subtitle {
        font-size: 1rem; /* 16px */
    }
    
    .hero-v2-img {
        max-height: 350px;
    }
}

/* ==========================================================================
   Large Mobile (480px - 767px)
   ========================================================================== */
@media (min-width: 480px) and (max-width: 767px) {
    .hero-v2-section {
        padding: 110px 0 50px;
    }
    
    .hero-v2-container {
        padding: 0 1.5rem;
    }
    
    .hero-v2-grid {
        gap: 2.5rem;
    }
    
    .hero-v2-title {
        font-size: 2.25rem; /* 36px */
    }
    
    .hero-v2-subtitle {
        font-size: 1.125rem; /* 18px */
    }
    
    .hero-v2-img {
        max-height: 450px;
        border-radius: 15px;
    }
}

/* ==========================================================================
   Tablet Portrait (768px - 900px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 900px) {
    .hero-v2-section {
        padding: 130px 0 60px;
    }
    
    .hero-v2-container {
        padding: 0 2rem;
        max-width: 100%;
    }
    
    .hero-v2-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        align-items: center;
    }
    
    .hero-v2-content {
        max-width: 700px;
        margin: 0 auto;
    }
    
    .hero-v2-title {
        font-size: 3rem; /* 48px */
        font-size: clamp(2.5rem, 6vw, 3.5rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-v2-subtitle {
        font-size: 1.375rem; /* 22px */
        font-size: clamp(1.25rem, 3vw, 1.5rem);
        line-height: 1.4;
    }
    
    .hero-v2-image {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-v2-img {
        border-radius: 18px;
        max-height: 500px;
    }
    
    /* Re-enable animations for tablets */
    .hero-v2-content {
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .hero-v2-section.visible .hero-v2-content {
        opacity: 1;
        transform: translateY(0);
    }
    
    .hero-v2-subtitle {
        opacity: 0;
        transform: translateY(15px);
        transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
    }
    
    .hero-v2-section.visible .hero-v2-subtitle {
        opacity: 1;
        transform: translateY(0);
    }
    
    .hero-v2-image {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
    }
    
    .hero-v2-section.visible .hero-v2-image {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Tablet Landscape (901px - 1024px)
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1024px) {
    .hero-v2-section {
        padding: 140px 0 70px;
    }
    
    .hero-v2-container {
        padding: 0 3rem;
        max-width: 100%;
    }
    
    .hero-v2-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    
    .hero-v2-content {
        max-width: 450px;
    }
    
    .hero-v2-title {
        font-size: 3.5rem; /* 56px */
        font-size: clamp(3rem, 7vw, 4rem);
        text-align: left;
    }
    
    .hero-v2-subtitle {
        font-size: 1.5rem; /* 24px */
        font-size: clamp(1.25rem, 2.5vw, 1.625rem);
        text-align: left;
    }
    
    .hero-v2-image {
        text-align: right;
    }
    
    .hero-v2-img {
        max-width: 100%;
        max-height: 550px;
        object-fit: cover;
        border-radius: 20px;
    }
}

/* ==========================================================================
   Small Desktop (1025px - 1280px)
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1280px) {
    .hero-v2-container {
        max-width: 1200px;
    }
    
    .hero-v2-grid {
        gap: 3.5rem;
    }
    
    .hero-v2-content {
        max-width: 500px;
    }
    
    .hero-v2-title {
        font-size: clamp(3rem, 6vw, 4.5rem);
    }
    
    .hero-v2-subtitle {
        font-size: 1.625rem;
    }
}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .hero-v2-section * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================================================
   Landscape Orientation Adjustments
   ========================================================================== */
@media (max-width: 900px) and (orientation: landscape) {
    .hero-v2-section {
        padding: 80px 0 40px;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .hero-v2-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .hero-v2-content {
        text-align: left;
    }
    
    .hero-v2-image {
        max-height: 60vh;
    }
    
    .hero-v2-img {
        max-height: 100%;
        width: auto;
    }
}

/* ==========================================================================
   High DPI / Retina Display Optimizations
   ========================================================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-v2-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .hero-v2-section {
        padding: 20px 0;
        background: white !important;
    }
    
    .hero-v2-title {
        color: black !important;
        font-size: 24pt !important;
    }
    
    .hero-v2-subtitle {
        color: black !important;
        font-size: 12pt !important;
    }
    
    .hero-v2-image {
        display: none;
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-v2-section,
    .hero-v2-section *,
    .hero-v2-content,
    .hero-v2-subtitle,
    .hero-v2-image {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Focus styles for keyboard navigation */
.hero-v2-section *:focus-visible {
    outline: 3px solid var(--blaze-primary, #FF6B35);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==========================================================================
   iOS Safari Specific Fixes
   ========================================================================== */
@supports (-webkit-touch-callout: none) {
    .hero-v2-section {
        /* Prevent iOS bounce scrolling issues */
        -webkit-overflow-scrolling: touch;
    }
    
    .hero-v2-img {
        /* Fix iOS image rendering */
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }
}