.subheadline-image-block {
    /* margin: 2rem 0; */
    padding: 1.5rem 0;
    font-family: 'Inter', sans-serif;
}

.subheadline-image-container {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.subheadline-content {
    flex: 1;
    max-width: calc(100% - 250px);
    z-index: 2;
    position: relative;
}

.subheadline-title {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    color: var(--school-primary, #FF4500) !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
    line-height: 1.3 !important;
    font-family: 'Inter', sans-serif !important;
    
    /* Reset any fancy heading styles for this specific block */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    position: static !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Force override of global H3 styles specifically for this block */
.subheadline-image-block h3.subheadline-title,
.subheadline-image-block .subheadline-title {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    color: var(--school-primary, #FF4500) !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    position: static !important;
    box-shadow: none !important;
    line-height: 1.3 !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transform: none !important;
    transition: none !important;
}

.subheadline-title::before,
.subheadline-title::after,
.subheadline-image-block h3::before,
.subheadline-image-block h3::after {
    display: none !important;
    content: none !important;
}

.subheadline-text {
    color: var(--school-text, #555555);
    line-height: 1.7;
    font-size: 1rem;
}

.subheadline-text p {
    margin-bottom: 1rem;
    color: inherit;
    line-height: inherit;
}

.subheadline-text p:last-child {
    margin-bottom: 0;
}

.subheadline-image-wrapper {
    flex-shrink: 0;
    width: 220px;
    position: relative;
    z-index: 1;
}

.image-tile {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: visible;
    /* transform: perspective(800px) rotateX(5deg) rotateY(-5deg);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); */
}

.image-tile:hover {
    /* transform: perspective(800px) rotateX(0deg) rotateY(0deg) translateY(-4px); */
}

.subheadline-image {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% - 2mm);
    height: calc(100% - 2mm);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 2;
    transition: transform 0.4s ease;
}

.image-tile:hover .subheadline-image {
    /* transform: scale(1.02); */
}

.tile-background {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: all 0.4s ease;
}

/* Color variations for the 3D tile effect */
.image-tile--primary .tile-background {
    background: linear-gradient(135deg, var(--school-primary, #FF4500) 0%, rgba(255, 69, 0, 0.8) 100%);
    box-shadow: 
        0 0 0 1px rgba(255, 69, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.image-tile--secondary .tile-background {
    background: linear-gradient(135deg, var(--school-secondary, #FFA500) 0%, rgba(255, 165, 0, 0.8) 100%);
    box-shadow: 
        0 0 0 1px rgba(255, 165, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.image-tile--accent .tile-background {
    background: linear-gradient(135deg, var(--school-accent, #FFD700) 0%, rgba(255, 215, 0, 0.8) 100%);
    box-shadow: 
        0 0 0 1px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .subheadline-image-container {
        gap: 2rem;
    }
    
    .subheadline-content {
        max-width: calc(100% - 200px);
    }
    
    .subheadline-image-wrapper {
        width: 180px;
    }
    
    .image-tile {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .subheadline-image-container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .subheadline-content {
        max-width: 100%;
        width: 100%;
    }
    
    .subheadline-title {
        text-align: center;
        font-size: 1.5rem !important;
    }
    
    .subheadline-text {
        text-align: left;
    }
    
    .subheadline-image-wrapper {
        width: 240px;
        align-self: center;
    }
    
    .image-tile {
        height: 170px;
        transform: perspective(600px) rotateX(3deg) rotateY(-3deg);
    }
    
    .image-tile:hover {
        /* transform: perspective(600px) rotateX(0deg) rotateY(0deg) translateY(-3px); */
    }
}

@media (max-width: 480px) {
    .subheadline-image-block {
        margin: 1.5rem 0;
        padding: 1rem 0;
    }
    
    .subheadline-image-container {
        gap: 1rem;
    }
    
    .subheadline-title {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .subheadline-text {
        font-size: 0.9rem;
    }
    
    .subheadline-image-wrapper {
        width: 200px;
    }
    
    .image-tile {
        height: 150px;
    }
}

/* Editor specific styles */
.subheadline-image-block-editor {
    border: 2px dashed #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    background: #fafafa !important;
}

.subheadline-image-block-editor:hover {
    border-color: var(--school-primary, #FF4500) !important;
}

/* Override all editor H3 styles within this block */
.subheadline-image-block-editor h3,
.subheadline-image-block-editor .subheadline-title {
    margin-top: 0 !important;
    padding: 8px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background: white !important;
    box-shadow: none !important;
    position: static !important;
    transform: none !important;
}

.subheadline-image-block-editor h3::before,
.subheadline-image-block-editor h3::after,
.subheadline-image-block-editor .subheadline-title::before,
.subheadline-image-block-editor .subheadline-title::after {
    display: none !important;
    content: none !important;
}

.wp-block-biztheme-subheadline-image {
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wp-block-biztheme-subheadline-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Remove all custom H3 styling - use theme default */
.wp-block-biztheme-subheadline-image h3 {
    /* Let the theme's H3 styles apply naturally */
    flex: 1;
    margin: 0 !important; /* Only override margin for layout */
}

.subheadline-image-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.subheadline-image-img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.wp-block-biztheme-subheadline-image:hover .subheadline-image-img {
    transform: scale(1.05);
}

.subheadline-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin-top: 0.5rem;
}

/* Layout variations */
.subheadline-layout-right {
    flex-direction: row-reverse;
}

.subheadline-layout-top {
    flex-direction: column;
    text-align: center;
}

.subheadline-layout-top .subheadline-image-img {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
}

.subheadline-layout-bottom {
    flex-direction: column-reverse;
    text-align: center;
}

.subheadline-layout-bottom .subheadline-image-img {
    width: 150px;
    height: 150px;
    margin: 1rem auto 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .wp-block-biztheme-subheadline-image {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .subheadline-image-img {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .subheadline-layout-top .subheadline-image-img,
    .subheadline-layout-bottom .subheadline-image-img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .wp-block-biztheme-subheadline-image {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .subheadline-image-img {
        width: 80px;
        height: 80px;
    }
    
    .subheadline-layout-top .subheadline-image-img,
    .subheadline-layout-bottom .subheadline-image-img {
        width: 100px;
        height: 100px;
    }
}
