/* ===================================
   BLOG LOOP HERO BLOCK STYLES
   =================================== */

/* Main block container */
.blog-hero-section {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 80px 20px 0px 20px;
    overflow-x: hidden;
    box-sizing: border-box;
    background: white;
}

/* Main Title - now in left column */
.blog-hero-main-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wp--preset--color--custom-dark-blue, #354477);
    margin: 0 0 24px 0; /* Added bottom margin for spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Content container */
.blog-hero-content { 
    background: white; 
    width: 100%;
    display: flex;
    flex-direction: column;
}

.blog-hero-content-container {
    max-width: var(--container-width, 1200px);
    width: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: stretch; /* CRITICAL: Ensures both columns have equal height */
    gap: 80px;
    padding: 0;
    box-sizing: border-box;
}

/* Image Column - Fixed height of 500px */
.blog-hero-image {
    flex: 1;
    max-width: 500px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative; /* For absolute positioned image */
    overflow: hidden; /* Hide overflow to maintain column height */
    min-height: 0; /* Allow flex item to shrink */
}

.blog-hero-image-wrapper {
    width: 100%;
    height: 100%; /* Take full height of parent */
    position: relative; /* Container for absolute positioned image */
    min-height: 100%; /* Ensure wrapper takes full height */
}

.blog-hero-image-img {
    width: 100%;
    height: 100%; /* Take full height of wrapper */
    position: absolute; /* Absolute positioned to fill entire column */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    object-fit: cover; /* Scale and crop to fit container */
    border-radius: 12px; /* Slightly rounded corners */
    display: block;
}

/* Text Column */
.blog-hero-text {
    flex: 1;
    max-width: 600px;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: flex-start;
}

/* Category Tag */
.blog-hero-category {
    margin: 0 0 16px 0;
}

.blog-hero-category-tag {
    display: inline-block;
    background: var(--primary-color, #354477); /* Primary blue background */
    color: white; /* White text */
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Post Title */
.blog-hero-post-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wp--preset--color--custom-dark-blue, #354477);
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    hyphens: auto;
}

/* Post Meta */
.blog-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--wp--preset--color--custom-mid-grey, #888888);
    font-family: 'Montserrat', sans-serif;
}

.blog-hero-date,
.blog-hero-reading-time {
    font-weight: 500;
}

.blog-hero-separator {
    font-weight: 400;
}

/* Post Excerpt */
.blog-hero-excerpt {
    margin: 16px 0 24px 0;
}

.blog-hero-excerpt p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--wp--preset--color--custom-dark-blue, #354477);
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    word-wrap: break-word;
}



/* Button removed - content will be placed below */

/* Overflow protection */
.blog-hero-main-title,
.blog-hero-post-title,
.blog-hero-excerpt p {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

.blog-hero-content {
    max-width: 100%;
    overflow: hidden;
}

.blog-hero-content-container {
    min-width: 0;
    flex-shrink: 1;
}

/* Responsive Design */
@media (max-width: 1600px) {
    .blog-hero-content-container {
        gap: 60px;
    }
}

@media (max-width: 1150px) {
    .blog-hero-content-container {
        max-width: var(--wide-width, 1280px);
        gap: 50px;
        padding: 0;
        flex-direction: column;
        text-align: center;
    }
    
    .blog-hero-text {
        order: 1;
        max-width: 800px;
    }
    
    .blog-hero-image {
        max-width: 450px;
        height: 400px; /* Slightly smaller on tablet */
        order: 2;
    }
}

@media (max-width: 767px) {
    .blog-hero-section {
        padding: 60px 16px 30px 16px;
    }
    
    .blog-hero-main-title {
        font-size: 36px; /* Mobile title scaling */
        margin-bottom: 20px; /* Adjusted for mobile */
    }
    
    .blog-hero-content-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 0;
    }
    
    .blog-hero-post-title {
        font-size: 28px;
    }
    
    .blog-hero-text {
        order: 1;
        max-width: 100%;
    }
    
    .blog-hero-image {
        max-width: 100%;
        height: 300px; /* Smaller on mobile */
        order: 2;
    }
}

/* Alignment support */
.blog-hero-section.alignwide {
    max-width: var(--wide-width, 1280px);
}

.blog-hero-section.alignfull {
    max-width: 100%;
}